SmartNetworkAssetLoader class
SmartNetworkAssetLoader(
assetsPath: 'assets/translations',
localCacheDuration: Duration(days: 1),
localeUrl: (String localeName) => Constants.appLangUrl,
timeout: Duration(seconds: 30),
)
Constructors
- SmartNetworkAssetLoader({required Function localeUrl, Duration timeout = const Duration(seconds: 30), required String assetsPath, Duration localCacheDuration = const Duration(days: 1)})
Properties
- assetsPath → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- localCacheDuration → Duration
-
final
- localeUrl → Function
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timeout → Duration
-
final
Methods
-
getFileForLocale(
String localeName) → Future< File> -
getFilenameForLocale(
String localeName) → Future< String> -
isInternetConnectionAvailable(
) → Future< bool> -
load(
String localePath, Locale locale) → Future< Map< String, dynamic> > -
loadFromLocalFile(
String localeName) → Future< String> -
loadFromNetwork(
String localeName) → Future< String> -
localeExists(
String localePath) → Future< bool> -
localTranslationExists(
String localeName, {bool ignoreCacheDuration = false}) → Future< bool> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
saveTranslation(
String localeName, String content) → Future< void> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited