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> <string>$(APP_DISPLAY_NAME) needs photo library access to scan barcodes</string>
<key>NSCameraUsageDescription</key> <key>NSCameraUsageDescription</key>
<string>$(APP_DISPLAY_NAME) needs camera access to scan barcodes</string> <string>$(APP_DISPLAY_NAME) needs camera access to scan barcodes</string>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
</dict> </dict>
</plist> </plist>

1
example/lib/pages/creator_page.dart

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

3
example/lib/pages/scanner_page.dart

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

8
example/lib/utils/extensions.dart

@ -30,14 +30,14 @@ extension LocaleParsing on String {
switch (toLowerCase()) { switch (toLowerCase()) {
case 'us': case 'us':
case 'en': case 'en':
return toLangIcon() + ' English'; return '${toLangIcon()} English';
case 'ru': case 'ru':
return toLangIcon() + ' Русский'; return '${toLangIcon()} Русский';
case 'am': case 'am':
case 'hy': case 'hy':
return toLangIcon() + ' Հայերեն'; return '${toLangIcon()} Հայերեն';
default: 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); }) : super(key: key);
@override @override
_ThemeSelectorState createState() => _ThemeSelectorState(); State<ThemeSelector> createState() => _ThemeSelectorState();
} }
class _ThemeSelectorState extends State<ThemeSelector> { class _ThemeSelectorState extends State<ThemeSelector> {

60
example/pubspec.lock

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

7
example/pubspec.yaml

@ -20,8 +20,11 @@ dependencies:
font_awesome_flutter: ^10.1.0 font_awesome_flutter: ^10.1.0
hive: ^2.1.0 hive: ^2.1.0
hive_flutter: ^1.1.0 hive_flutter: ^1.1.0
image: ^3.1.3
image_picker: ^0.8.5 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 path_provider: ^2.0.10
share_plus: ^4.0.4 share_plus: ^4.0.4
@ -31,7 +34,7 @@ flutter_intl:
dev_dependencies: dev_dependencies:
build_runner: ^2.1.10 build_runner: ^2.1.10
flutter_lints: ^1.0.0 flutter_lints: ^2.0.1
flutter_test: flutter_test:
sdk: flutter sdk: flutter
hive_generator: hive_generator:

Loading…
Cancel
Save