TranslationFileReader class
Provides a way to easily read translation files.
Constructors
-
TranslationFileReader({required Future<
String> fileReader(String filePath), ConfigFileType fileType = ConfigFileType.YAML, List<String> translationsDirPath = const ['assets', 'translations']}) -
const
Properties
-
fileReader
→ Future<
String> Function(String filePath) -
A function to read a file, such as
(filePath) => File(filePath).readAsString()
or(filePath) => rootBundle.loadString(filePath)
.final - fileType → ConfigFileType
-
The type of the files to read.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
translationsDirPath
→ List<
String> -
The directory path where the translations are stored.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
read(
String languageTag, {String? fileName}) → Future< FileConfig> - Reads a locale file.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited