Skip to content

Commit 79b6907

Browse files
authored
Update smart_network_asset_loader.dart (#38)
1 parent be9aacf commit 79b6907

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/src/smart_network_asset_loader.dart

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class SmartNetworkAssetLoader extends AssetLoader {
4949
// local cache duration was reached or no internet access but prefer local file to assets
5050
if (string == '' &&
5151
await localTranslationExists(locale.toString(),
52-
ignoreCacheDuration: false)) {
52+
ignoreCacheDuration: true)) {
5353
string = await loadFromLocalFile(locale.toString());
5454
}
5555

@@ -136,6 +136,7 @@ class SmartNetworkAssetLoader extends AssetLoader {
136136
Future<void> saveTranslation(String localeName, String content) async {
137137
var file = File(await getFilenameForLocale(localeName));
138138
await file.create(recursive: true);
139+
await file.writeAsString(content);
139140
return print('saved');
140141
}
141142

0 commit comments

Comments
 (0)