Skip to content

Commit 00e3ee9

Browse files
authored
ci: Updated the linter from pedantic to flutter_lints (#78)
* ci: Updated the linter from pedantic to flutter_lints * refactor: simplify string interpolation in SmartNetworkAssetLoader
1 parent 2e421c3 commit 00e3ee9

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#https://dart.dev/guides/language/analysis-options
2-
include: package:pedantic/analysis_options.yaml
2+
include: package:lints/recommended.yaml

lib/src/smart_network_asset_loader.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ class SmartNetworkAssetLoader extends AssetLoader {
5454

5555
// still nothing? Load from assets
5656
if (string == '') {
57-
string = await rootBundle
58-
.loadString(assetsPath + '/' + locale.toString() + '.json');
57+
string = await rootBundle.loadString('$assetsPath/$locale.json');
5958
}
6059

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

88-
url = url + '' + localeName + '.json';
89-
87+
url = '$url$localeName.json';
9088
try {
9189
final response =
9290
await Future.any([http.get(Uri.parse(url)), Future.delayed(timeout)]);

0 commit comments

Comments
 (0)