Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#https://dart.dev/guides/language/analysis-options
include: package:pedantic/analysis_options.yaml
include: package:lints/recommended.yaml
6 changes: 2 additions & 4 deletions lib/src/smart_network_asset_loader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ class SmartNetworkAssetLoader extends AssetLoader {

// still nothing? Load from assets
if (string == '') {
string = await rootBundle
.loadString(assetsPath + '/' + locale.toString() + '.json');
string = await rootBundle.loadString('$assetsPath/$locale.json');
}

// then returns the json file
Expand Down Expand Up @@ -85,8 +84,7 @@ class SmartNetworkAssetLoader extends AssetLoader {
Future<String> loadFromNetwork(String localeName) async {
String url = localeUrl(localeName);

url = url + '' + localeName + '.json';

url = '$url$localeName.json';
try {
final response =
await Future.any([http.get(Uri.parse(url)), Future.delayed(timeout)]);
Expand Down