Browse Source

minor fixes for new analysis options

pull/3/head
Khoren Markosyan 3 years ago
parent
commit
cdef93a3e9
  1. 2
      example/ios/Runner/Info.plist
  2. 1
      example/lib/pages/creator_page.dart
  3. 3
      example/lib/pages/scanner_page.dart
  4. 8
      example/lib/utils/extensions.dart
  5. 2
      example/lib/widgets/theme_selector.dart
  6. 60
      example/pubspec.lock
  7. 7
      example/pubspec.yaml

2
example/ios/Runner/Info.plist

@ -47,5 +47,7 @@
<string>$(APP_DISPLAY_NAME) needs photo library access to scan barcodes</string>
<key>NSCameraUsageDescription</key>
<string>$(APP_DISPLAY_NAME) needs camera access to scan barcodes</string>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
</dict>
</plist>

1
example/lib/pages/creator_page.dart

@ -99,6 +99,7 @@ class _CreatorPageState extends State<CreatorPage> {
onPressed: () async {
if (encode != null) {
await DbService.instance.addEncode(encode!);
if (!mounted) return;
Navigator.of(context).pop();
}
},

3
example/lib/pages/scanner_page.dart

@ -33,8 +33,8 @@ class _ScannerPageState extends State<ScannerPage> {
},
),
floatingActionButton: FloatingActionButton(
child: const Icon(FontAwesomeIcons.image),
onPressed: pickImage,
child: const Icon(FontAwesomeIcons.image),
),
);
}
@ -66,6 +66,7 @@ class _ScannerPageState extends State<ScannerPage> {
if (result.isValidBool) {
addCode(result);
} else {
if (!mounted) return;
context.showToast('No code found');
}
}

8
example/lib/utils/extensions.dart

@ -30,14 +30,14 @@ extension LocaleParsing on String {
switch (toLowerCase()) {
case 'us':
case 'en':
return toLangIcon() + ' English';
return '${toLangIcon()} English';
case 'ru':
return toLangIcon() + ' Русский';
return '${toLangIcon()} Русский';
case 'am':
case 'hy':
return toLangIcon() + ' Հայերեն';
return '${toLangIcon()} Հայերեն';
default:
return toLangIcon() + ' English';
return '${toLangIcon()} English';
}
}

2
example/lib/widgets/theme_selector.dart

@ -20,7 +20,7 @@ class ThemeSelector extends StatefulWidget {
}) : super(key: key);
@override
_ThemeSelectorState createState() => _ThemeSelectorState();
State<ThemeSelector> createState() => _ThemeSelectorState();
}
class _ThemeSelectorState extends State<ThemeSelector> {

60
example/pubspec.lock

@ -28,7 +28,7 @@ packages:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "2.3.0"
version: "2.3.1"
async:
dependency: transitive
description:
@ -105,7 +105,7 @@ packages:
name: camera
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.4+22"
version: "0.9.4+24"
camera_platform_interface:
dependency: transitive
description:
@ -119,7 +119,7 @@ packages:
name: camera_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.1+5"
version: "0.2.1+6"
characters:
dependency: transitive
description:
@ -161,7 +161,7 @@ packages:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0"
version: "1.16.0"
connectivity_plus:
dependency: transitive
description:
@ -259,7 +259,7 @@ packages:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.3.0"
ffi:
dependency: transitive
description:
@ -306,7 +306,7 @@ packages:
name: flutter_lints
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.4"
version: "2.0.1"
flutter_localizations:
dependency: "direct main"
description: flutter
@ -421,7 +421,7 @@ packages:
source: hosted
version: "4.0.0"
image:
dependency: transitive
dependency: "direct main"
description:
name: image
url: "https://pub.dartlang.org"
@ -433,37 +433,37 @@ packages:
name: image_picker
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.5+1"
version: "0.8.5+2"
image_picker_android:
dependency: transitive
description:
name: image_picker_android
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.4+12"
version: "0.8.4+13"
image_picker_for_web:
dependency: transitive
description:
name: image_picker_for_web
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.7"
version: "2.1.8"
image_picker_ios:
dependency: transitive
description:
name: image_picker_ios
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.5+1"
version: "0.8.5+2"
image_picker_platform_interface:
dependency: transitive
description:
name: image_picker_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.4"
version: "2.5.0"
intl:
dependency: transitive
dependency: "direct main"
description:
name: intl
url: "https://pub.dartlang.org"
@ -482,7 +482,7 @@ packages:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.3"
version: "0.6.4"
json_annotation:
dependency: transitive
description:
@ -496,7 +496,7 @@ packages:
name: lints
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
version: "2.0.0"
logging:
dependency: transitive
description:
@ -517,7 +517,7 @@ packages:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.3"
version: "0.1.4"
meta:
dependency: transitive
description:
@ -533,7 +533,7 @@ packages:
source: hosted
version: "1.0.2"
mobx:
dependency: transitive
dependency: "direct main"
description:
name: mobx
url: "https://pub.dartlang.org"
@ -552,7 +552,7 @@ packages:
name: nb_utils
url: "https://pub.dartlang.org"
source: hosted
version: "4.5.0"
version: "4.5.1"
nm:
dependency: transitive
description:
@ -573,7 +573,7 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
version: "1.8.1"
path_provider:
dependency: "direct main"
description:
@ -615,7 +615,7 @@ packages:
name: path_provider_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.3"
version: "2.0.4"
path_provider_windows:
dependency: transitive
description:
@ -629,7 +629,7 @@ packages:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "4.4.0"
version: "5.0.0"
platform:
dependency: transitive
description:
@ -727,7 +727,7 @@ packages:
name: shared_preferences
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.14"
version: "2.0.15"
shared_preferences_android:
dependency: transitive
description:
@ -816,7 +816,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.1"
version: "1.8.2"
stack_trace:
dependency: transitive
description:
@ -858,7 +858,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.8"
version: "0.4.9"
timing:
dependency: transitive
description:
@ -879,7 +879,7 @@ packages:
name: url_launcher
url: "https://pub.dartlang.org"
source: hosted
version: "6.1.1"
version: "6.1.2"
url_launcher_android:
dependency: transitive
description:
@ -921,7 +921,7 @@ packages:
name: url_launcher_web
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.10"
version: "2.0.11"
url_launcher_windows:
dependency: transitive
description:
@ -935,7 +935,7 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
version: "2.1.2"
watcher:
dependency: transitive
description:
@ -970,14 +970,14 @@ packages:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "5.3.1"
version: "5.4.1"
yaml:
dependency: transitive
description:
name: yaml
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.0"
version: "3.1.1"
sdks:
dart: ">=2.16.1 <3.0.0"
dart: ">=2.17.0-206.0.dev <3.0.0"
flutter: ">=2.10.0"

7
example/pubspec.yaml

@ -20,8 +20,11 @@ dependencies:
font_awesome_flutter: ^10.1.0
hive: ^2.1.0
hive_flutter: ^1.1.0
image: ^3.1.3
image_picker: ^0.8.5
nb_utils: ^4.5.0
intl: ^0.17.0
mobx: ^2.0.7
nb_utils: ^4.5.1
path_provider: ^2.0.10
share_plus: ^4.0.4
@ -31,7 +34,7 @@ flutter_intl:
dev_dependencies:
build_runner: ^2.1.10
flutter_lints: ^1.0.0
flutter_lints: ^2.0.1
flutter_test:
sdk: flutter
hive_generator:

Loading…
Cancel
Save