Skip to content

Commit

Permalink
fixed code analyze issues
Browse files Browse the repository at this point in the history
  • Loading branch information
aissat committed May 13, 2022
1 parent 42b4c11 commit 8048ff5
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
1 change: 0 additions & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
#https://dart.dev/guides/language/analysis-options
#include: package:pedantic/analysis_options.yaml
include: package:flutter_lints/flutter.yaml
7 changes: 4 additions & 3 deletions bin/generate.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'dart:async';
import 'dart:convert';
import 'dart:developer';
import 'dart:io';

import 'package:args/args.dart';
Expand Down Expand Up @@ -30,7 +31,7 @@ bool _isHelpCommand(List<String> args) {

void _printHelperDisplay() {
var parser = _generateArgParser(null);
print(parser.usage);
log(parser.usage);
}

GenerateOptions _generateOption(List<String> args) {
Expand Down Expand Up @@ -290,9 +291,9 @@ class CodegenLoader extends AssetLoader{
// }

void printInfo(String info) {
print('\u001b[32measy localization: $info\u001b[0m');
log('\u001b[32measy localization: $info\u001b[0m');
}

void printError(String error) {
print('\u001b[31m[ERROR] easy localization: $error\u001b[0m');
log('\u001b[31m[ERROR] easy localization: $error\u001b[0m');
}
1 change: 1 addition & 0 deletions lib/src/easy_localization_app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class EasyLocalization extends StatefulWidget {
/// Class loader for localization files.
/// You can use custom loaders from [Easy Localization Loader](https://github.com/aissat/easy_localization_loader) or create your own class.
/// @Default value `const RootBundleAssetLoader()`
// ignore: prefer_typing_uninitialized_variables
final assetLoader;

/// Save locale in device storage.
Expand Down
1 change: 1 addition & 0 deletions lib/src/easy_localization_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class EasyLocalizationController extends ChangeNotifier {
Locale? _fallbackLocale;

final Function(FlutterError e) onLoadError;
// ignore: prefer_typing_uninitialized_variables
final assetLoader;
final String path;
final bool useFallbackTranslations;
Expand Down
2 changes: 1 addition & 1 deletion packages/easy_logger/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#https://dart.dev/guides/language/analysis-options
include: package:pedantic/analysis_options.yaml
include: package:flutter_lints/flutter.yaml

analyzer:
strong-mode:
Expand Down
2 changes: 1 addition & 1 deletion packages/easy_logger/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
pedantic: ^1.10.0-nullsafety.3
flutter_lints: ^2.0.1

flutter:

0 comments on commit 8048ff5

Please sign in to comment.