JapaneseLanguage class
Language implementation of the Japanese language.
Properties
- countryCode → String
-
The ISO 3166-1 code or the international standard name of country.
finalinherited
- defaultFontFamily → String
-
Default font for a language.
finalinherited
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- helloWorld → String
-
Testing text for the language's basic use. This is useful for testing
and pre-loading the database for use.
finalinherited
- indexMaxDistance ↔ int?
-
Some implementations of tap-to-select are very unoptimised for a high
length of text. It is impractical to run text segmentation in some cases.
This value sets a length from the center from which input text for
wordFromIndex should be cut if longer. If null, the limit will not be
used.
read / writeinherited
- isSpaceDelimited → bool
-
Whether or not this language essentially relies on spaces to commonly
separate and discern words.
finalinherited
- languageCode → String
-
The ISO 639-1 code or the international standard language code.
finalinherited
- languageCountryCode → String
-
The language and country code separated by a dash.
read-onlyinherited
- languageName → String
-
The name of the language, as known to native speakers.
finalinherited
- locale → Locale
-
Extract a Locale from the language code and country code.
read-onlyinherited
- preferVerticalReading → bool
-
Whether or not this language should prefer vertical reading.
finalinherited
-
prepareSearchResults
→ Future<
int?> Function(DictionarySearchParams params) -
Overrides the base search function and implements search specific to
a language.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
-
segmentsCache
→ Map<
DictionaryHeading, List< RubyTextData> ?> -
Used to cache furigana segments for already generated
DictionaryHeading
items.final - standardFormat → DictionaryFormat
-
A standard format that dictionaries of this language can be found in.
This is only to set this as the default last selected format on first
time setup.
finalinherited
- textBaseline → TextBaseline
-
If this language uses an alphabetic or ideographic text baseline.
finalinherited
- textDirection → TextDirection
-
The reading direction of the language, for which reading should be
given a specific format by default. For example, Arabic is RTL, while
English is LTR.
finalinherited
- threeLetterCode → String
-
The ISO 639-3 code or the international standard language code.
finalinherited
Methods
-
fetchFurigana(
{required DictionaryHeading heading}) → List< RubyTextData> ? - Fetch furigana for a certain term and reading. If already obtained, use the cache.
-
getFinalHighlightLength(
{required DictionarySearchResult? result, required String searchTerm}) → int -
Get final highlight length after a dictionary search.
inherited
-
getGuessHighlightLength(
{required String searchTerm}) → int -
Get preliminary highlight length before a dictionary search.
inherited
-
getPitchWidget(
{required AppModel appModel, required BuildContext context, required String reading, required int downstep}) → Widget -
Some languages may have custom widgets for generating pronunciation
diagrams.
override
-
getSearchTermFromIndex(
{required String text, required int index}) → String -
Gets a search term and for a space-delimited language, assumes the index
is within the range of the first word, with remainder words included.
For a language that is not space-delimited, this is simply the substring
function.
inherited
-
getSentenceFromParagraph(
{required String paragraph, required int index, required int startOffset, required int endOffset}) → JidoujishoTextSelection -
Given paragraph text and an index, yield the part of the text such that
the result is a sentence. Different languages may decide to use different
delimiters.
inherited
-
getSentences(
String text) → List< String> -
Returns a list of sentences for a block of text.
inherited
-
getStartingIndex(
{required String text, required int index}) → int -
Returns the starting index from which the search term should be chopped
from, given a clicked index and full text. For a space-delimited language,
this will return the starting index of a clicked word. Otherwise, this
returns the clicked index itself.
inherited
-
getTermReadingOverrideWidget(
{required BuildContext context, required AppModel appModel, required DictionaryHeading heading, required dynamic onSearch(String)}) → Widget -
Some languages may want to display custom widgets rather than the built
in term and reading text that is there by default. For example, Japanese
may want to display a furigana widget instead.
override
-
initialise(
) → Future< void> -
This function is run at startup or when changing languages. It is not
called again if already run.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
prepareResources(
) → Future< void> -
Prepare text segmentation tools and other dependencies necessary for this
langauge to function.
override
-
textToWords(
String text) → List< String> -
Given unsegmented
text
, perform text segmentation particular to the language and return a list of parsed words.override -
toString(
) → String -
A string representation of this object.
inherited
-
wordFromIndex(
{required String text, required int index}) → String -
Given an
index
or a character position in giventext
, return a word such that it corresponds to a whole word from the parsed list of words from textToWords.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited