From ae0b7fb60d861e504c62db608c7effecf36742c1 Mon Sep 17 00:00:00 2001 From: Khoren Markosyan Date: Fri, 13 May 2022 16:21:40 +0400 Subject: [PATCH] added zxscanner project files --- .vscode/launch.json | 7 - example/android/app/build.gradle | 2 +- example/ios/Podfile.lock | 53 -- example/lib/main.dart | 88 +- example/pubspec.lock | 637 +------------- example/pubspec.yaml | 20 - lib/flutter_zxing.dart | 4 + zxscanner/android/app/build.gradle | 2 +- .../android/app/src/main/AndroidManifest.xml | 2 +- zxscanner/android/build.gradle | 4 +- zxscanner/ios/.gitignore | 2 + zxscanner/ios/Flutter/Debug.xcconfig | 1 + zxscanner/ios/Flutter/Release.xcconfig | 1 + zxscanner/ios/Podfile | 41 + .../ios/Runner.xcodeproj/project.pbxproj | 68 ++ .../contents.xcworkspacedata | 3 + .../lib/configs/app_store.dart | 0 .../lib/configs/app_store.g.dart | 0 .../lib/configs/app_theme.dart | 0 .../lib/configs/constants.dart | 0 .../lib/generated/intl/messages_all.dart | 0 .../lib/generated/intl/messages_en_US.dart | 0 .../lib/generated/l10n.dart | 0 .../lib/l10n/intl_en_US.arb | 0 zxscanner/lib/main.dart | 157 ++-- {example => zxscanner}/lib/models/code.dart | 0 {example => zxscanner}/lib/models/code.g.dart | 0 {example => zxscanner}/lib/models/encode.dart | 0 .../lib/models/encode.g.dart | 0 {example => zxscanner}/lib/models/models.dart | 0 .../lib/pages/barcodes_page.dart | 8 +- .../lib/pages/creator_page.dart | 10 +- .../lib/pages/help_page.dart | 0 .../lib/pages/history_page.dart | 6 +- .../lib/pages/home_page.dart | 10 +- .../lib/pages/scanner_page.dart | 6 +- .../lib/pages/settings_page.dart | 8 +- .../lib/utils/db_service.dart | 2 +- .../lib/utils/extensions.dart | 0 {example => zxscanner}/lib/utils/router.dart | 10 +- .../lib/utils/scroll_behavior.dart | 0 .../lib/widgets/common_widgets.dart | 2 +- .../lib/widgets/language_widget.dart | 6 +- .../lib/widgets/setting_tile.dart | 0 .../lib/widgets/theme_mode_switch.dart | 0 .../lib/widgets/theme_selector.dart | 2 +- zxscanner/pubspec.lock | 816 ++++++++++++++++++ zxscanner/pubspec.yaml | 27 +- 48 files changed, 1091 insertions(+), 914 deletions(-) create mode 100644 zxscanner/ios/Podfile rename {example => zxscanner}/lib/configs/app_store.dart (100%) rename {example => zxscanner}/lib/configs/app_store.g.dart (100%) rename {example => zxscanner}/lib/configs/app_theme.dart (100%) rename {example => zxscanner}/lib/configs/constants.dart (100%) rename {example => zxscanner}/lib/generated/intl/messages_all.dart (100%) rename {example => zxscanner}/lib/generated/intl/messages_en_US.dart (100%) rename {example => zxscanner}/lib/generated/l10n.dart (100%) rename {example => zxscanner}/lib/l10n/intl_en_US.arb (100%) rename {example => zxscanner}/lib/models/code.dart (100%) rename {example => zxscanner}/lib/models/code.g.dart (100%) rename {example => zxscanner}/lib/models/encode.dart (100%) rename {example => zxscanner}/lib/models/encode.g.dart (100%) rename {example => zxscanner}/lib/models/models.dart (100%) rename {example => zxscanner}/lib/pages/barcodes_page.dart (92%) rename {example => zxscanner}/lib/pages/creator_page.dart (90%) rename {example => zxscanner}/lib/pages/help_page.dart (100%) rename {example => zxscanner}/lib/pages/history_page.dart (93%) rename {example => zxscanner}/lib/pages/home_page.dart (83%) rename {example => zxscanner}/lib/pages/scanner_page.dart (91%) rename {example => zxscanner}/lib/pages/settings_page.dart (87%) rename {example => zxscanner}/lib/utils/db_service.dart (95%) rename {example => zxscanner}/lib/utils/extensions.dart (100%) rename {example => zxscanner}/lib/utils/router.dart (76%) rename {example => zxscanner}/lib/utils/scroll_behavior.dart (100%) rename {example => zxscanner}/lib/widgets/common_widgets.dart (85%) rename {example => zxscanner}/lib/widgets/language_widget.dart (88%) rename {example => zxscanner}/lib/widgets/setting_tile.dart (100%) rename {example => zxscanner}/lib/widgets/theme_mode_switch.dart (100%) rename {example => zxscanner}/lib/widgets/theme_selector.dart (98%) diff --git a/.vscode/launch.json b/.vscode/launch.json index 761222d..e3ada42 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -15,13 +15,6 @@ "request": "launch", "type": "dart" }, - { - "name": "example (profile mode)", - "cwd": "example", - "request": "launch", - "type": "dart", - "flutterMode": "profile" - }, { "name": "ZxScanner", "cwd": "zxscanner", diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 685e442..a81c2de 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -44,7 +44,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.markosyan.flutter_zxing_example" - minSdkVersion 23 + minSdkVersion 21 targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 7a277ce..21b0182 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,92 +1,39 @@ PODS: - camera (0.0.1): - Flutter - - connectivity_plus (0.0.1): - - Flutter - - ReachabilitySwift - Flutter (1.0.0) - flutter_beep (0.0.1): - Flutter - flutter_zxing (0.0.1): - Flutter - - fluttertoast (0.0.2): - - Flutter - - Toast - image_picker_ios (0.0.1): - Flutter - - nb_utils (0.0.1): - - Flutter - - path_provider_ios (0.0.1): - - Flutter - - ReachabilitySwift (5.0.0) - - share_plus (0.0.1): - - Flutter - - shared_preferences_ios (0.0.1): - - Flutter - - Toast (4.0.0) - - url_launcher_ios (0.0.1): - - Flutter DEPENDENCIES: - camera (from `.symlinks/plugins/camera/ios`) - - connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`) - Flutter (from `Flutter`) - flutter_beep (from `.symlinks/plugins/flutter_beep/ios`) - flutter_zxing (from `.symlinks/plugins/flutter_zxing/ios`) - - fluttertoast (from `.symlinks/plugins/fluttertoast/ios`) - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`) - - nb_utils (from `.symlinks/plugins/nb_utils/ios`) - - path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`) - - share_plus (from `.symlinks/plugins/share_plus/ios`) - - shared_preferences_ios (from `.symlinks/plugins/shared_preferences_ios/ios`) - - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) - -SPEC REPOS: - trunk: - - ReachabilitySwift - - Toast EXTERNAL SOURCES: camera: :path: ".symlinks/plugins/camera/ios" - connectivity_plus: - :path: ".symlinks/plugins/connectivity_plus/ios" Flutter: :path: Flutter flutter_beep: :path: ".symlinks/plugins/flutter_beep/ios" flutter_zxing: :path: ".symlinks/plugins/flutter_zxing/ios" - fluttertoast: - :path: ".symlinks/plugins/fluttertoast/ios" image_picker_ios: :path: ".symlinks/plugins/image_picker_ios/ios" - nb_utils: - :path: ".symlinks/plugins/nb_utils/ios" - path_provider_ios: - :path: ".symlinks/plugins/path_provider_ios/ios" - share_plus: - :path: ".symlinks/plugins/share_plus/ios" - shared_preferences_ios: - :path: ".symlinks/plugins/shared_preferences_ios/ios" - url_launcher_ios: - :path: ".symlinks/plugins/url_launcher_ios/ios" SPEC CHECKSUMS: camera: 9993f92f2c793e87b65e35f3a23c70582afb05b1 - connectivity_plus: 413a8857dd5d9f1c399a39130850d02fe0feaf7e Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a flutter_beep: 54fb393b22dfa0f0e4573c81b1c74dd71c4e5af8 flutter_zxing: 19a866d17c8a87ee1026d68521c69d2f008635f6 - fluttertoast: 16fbe6039d06a763f3533670197d01fc73459037 image_picker_ios: b786a5dcf033a8336a657191401bfdf12017dabb - nb_utils: ada4338858d8827ec92fdab2a545206b4ba4cfb1 - path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02 - ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825 - share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68 - shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad - Toast: 91b396c56ee72a5790816f40d3a94dd357abc196 - url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c diff --git a/example/lib/main.dart b/example/lib/main.dart index 00998d5..8dafa93 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,48 +1,10 @@ import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_mobx/flutter_mobx.dart'; -import 'package:flutter_zxing_example/utils/db_service.dart'; -import 'package:flutter_zxing_example/utils/extensions.dart'; -import 'package:nb_utils/nb_utils.dart'; +import 'package:flutter_zxing/flutter_zxing.dart'; -import 'configs/app_store.dart'; -import 'configs/app_theme.dart'; -import 'generated/l10n.dart' as loc; -import 'utils/router.dart'; -import 'utils/scroll_behavior.dart'; - -void main() async { - WidgetsFlutterBinding.ensureInitialized(); - await _initializeAppStore(); - await DbService.instance.initializeApp(); +void main() { runApp(const MyApp()); } -_initializeAppStore() async { - await initialize(); - final themeModeString = getStringAsync( - themeModePref, - defaultValue: appStore.themeMode.toString(), - ); - await appStore.setThemeMode( - ThemeMode.values - .firstWhere((element) => element.toString() == themeModeString), - ); - await appStore.setColorSchemeIndex( - getIntAsync(colorSchemeIndexPref, defaultValue: appStore.colorSchemeIndex), - ); - await appStore.toggleSoundMode( - value: getBoolAsync(isSoundOnPref, defaultValue: appStore.isSoundOn), - ); - await appStore.toggleVibrationMode( - value: - getBoolAsync(isVibrationOnPref, defaultValue: appStore.isVibrationOn), - ); - await appStore.setLanguage( - getStringAsync(languagePref, defaultValue: appStore.selectedLanguage), - ); -} - class MyApp extends StatefulWidget { const MyApp({Key? key}) : super(key: key); @@ -51,27 +13,35 @@ class MyApp extends StatefulWidget { } class _MyAppState extends State { - final _appRouter = AppRouter(); - @override Widget build(BuildContext context) { - return Observer( - builder: (_) => MaterialApp( - title: 'ZxScanner', - theme: AppTheme.flexLightTheme(), - darkTheme: AppTheme.flexDarkTheme(), - themeMode: appStore.themeMode, - localizationsDelegates: const [ - loc.S.delegate, - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - GlobalCupertinoLocalizations.delegate, - ], - supportedLocales: loc.S.delegate.supportedLocales, - locale: appStore.selectedLanguage.parseLocale(), - onGenerateRoute: _appRouter.onGenerateRoute, - scrollBehavior: MyCustomScrollBehavior(), - debugShowCheckedModeBanner: false, + FlutterZxing.setLogEnabled(true); + return MaterialApp( + title: 'Flutter Zxing Example', + home: DefaultTabController( + length: 2, + child: Scaffold( + appBar: AppBar( + title: const Text('Flutter Zxing Example'), + bottom: const TabBar( + tabs: [ + Tab(text: 'Scan Code'), + Tab(text: 'Create Code'), + ], + ), + ), + body: TabBarView( + children: [ + ReaderWidget( + onScan: (value) {}, + ), + WriterWidget( + onSuccess: (result, bytes) {}, + onError: (error) {}, + ), + ], + ), + ), ), ); } diff --git a/example/pubspec.lock b/example/pubspec.lock index b2e7ce0..fcb1913 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -1,20 +1,6 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: - _fe_analyzer_shared: - dependency: transitive - description: - name: _fe_analyzer_shared - url: "https://pub.dartlang.org" - source: hosted - version: "38.0.0" - analyzer: - dependency: transitive - description: - name: analyzer - url: "https://pub.dartlang.org" - source: hosted - version: "3.4.1" archive: dependency: transitive description: @@ -22,13 +8,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "3.3.0" - args: - dependency: transitive - description: - name: args - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.1" async: dependency: transitive description: @@ -43,62 +22,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" - build: - dependency: transitive - description: - name: build - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.0" - build_config: - dependency: transitive - description: - name: build_config - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - build_daemon: - dependency: transitive - description: - name: build_daemon - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" - build_resolvers: - dependency: transitive - description: - name: build_resolvers - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.8" - build_runner: - dependency: "direct dev" - description: - name: build_runner - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.10" - build_runner_core: - dependency: transitive - description: - name: build_runner_core - url: "https://pub.dartlang.org" - source: hosted - version: "7.2.3" - built_collection: - dependency: transitive - description: - name: built_collection - url: "https://pub.dartlang.org" - source: hosted - version: "5.1.1" - built_value: - dependency: transitive - description: - name: built_value - url: "https://pub.dartlang.org" - source: hosted - version: "8.3.0" camera: dependency: transitive description: @@ -134,13 +57,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.3.1" - checked_yaml: - dependency: transitive - description: - name: checked_yaml - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.1" clock: dependency: transitive description: @@ -148,13 +64,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.0" - code_builder: - dependency: transitive - description: - name: code_builder - url: "https://pub.dartlang.org" - source: hosted - version: "4.1.0" collection: dependency: transitive description: @@ -162,62 +71,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.16.0" - connectivity_plus: - dependency: transitive - description: - name: connectivity_plus - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.0" - connectivity_plus_linux: - dependency: transitive - description: - name: connectivity_plus_linux - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - connectivity_plus_macos: - dependency: transitive - description: - name: connectivity_plus_macos - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.2" - connectivity_plus_platform_interface: - dependency: transitive - description: - name: connectivity_plus_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_web: - dependency: transitive - description: - name: connectivity_plus_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_windows: - dependency: transitive - description: - name: connectivity_plus_windows - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - convert: - dependency: transitive - description: - name: convert - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - convex_bottom_bar: - dependency: "direct main" - description: - name: convex_bottom_bar - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" cross_file: dependency: transitive description: @@ -232,27 +85,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "3.0.2" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.4" - dart_style: - dependency: transitive - description: - name: dart_style - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.3" - dbus: - dependency: transitive - description: - name: dbus - url: "https://pub.dartlang.org" - source: hosted - version: "0.7.3" fake_async: dependency: transitive description: @@ -267,27 +99,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.2" - file: - dependency: transitive - description: - name: file - url: "https://pub.dartlang.org" - source: hosted - version: "6.1.2" - fixnum: - dependency: transitive - description: - name: fixnum - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - flex_color_scheme: - dependency: "direct main" - description: - name: flex_color_scheme - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.1" flutter: dependency: "direct main" description: flutter @@ -307,18 +118,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.1" - flutter_localizations: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_mobx: - dependency: "direct main" - description: - name: flutter_mobx - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" flutter_plugin_android_lifecycle: dependency: transitive description: @@ -343,13 +142,6 @@ packages: relative: true source: path version: "0.1.2" - fluttertoast: - dependency: transitive - description: - name: fluttertoast - url: "https://pub.dartlang.org" - source: hosted - version: "8.0.9" font_awesome_flutter: dependency: "direct main" description: @@ -357,48 +149,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "10.1.0" - frontend_server_client: - dependency: transitive - description: - name: frontend_server_client - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.2" - glob: - dependency: transitive - description: - name: glob - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.2" - graphs: - dependency: transitive - description: - name: graphs - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - hive: - dependency: "direct main" - description: - name: hive - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - hive_flutter: - dependency: "direct main" - description: - name: hive_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - hive_generator: - dependency: "direct dev" - description: - name: hive_generator - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.2" http: dependency: transitive description: @@ -406,13 +156,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.13.4" - http_multi_server: - dependency: transitive - description: - name: http_multi_server - url: "https://pub.dartlang.org" - source: hosted - version: "3.2.0" http_parser: dependency: transitive description: @@ -462,20 +205,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.5.0" - intl: - dependency: "direct main" - description: - name: intl - url: "https://pub.dartlang.org" - source: hosted - version: "0.17.0" - io: - dependency: transitive - description: - name: io - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.3" js: dependency: transitive description: @@ -483,13 +212,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.6.4" - json_annotation: - dependency: transitive - description: - name: json_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "4.5.0" lints: dependency: transitive description: @@ -497,13 +219,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.0" - logging: - dependency: transitive - description: - name: logging - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.2" matcher: dependency: transitive description: @@ -525,48 +240,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.7.0" - mime: - dependency: transitive - description: - name: mime - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.2" - mobx: - dependency: "direct main" - description: - name: mobx - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.7" - mobx_codegen: - dependency: "direct dev" - description: - name: mobx_codegen - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5+2" - nb_utils: - dependency: "direct main" - description: - name: nb_utils - url: "https://pub.dartlang.org" - source: hosted - version: "4.5.1" - nm: - dependency: transitive - description: - name: nm - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.0" - package_config: - dependency: transitive - description: - name: package_config - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.2" path: dependency: transitive description: @@ -574,55 +247,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.8.1" - path_provider: - dependency: "direct main" - description: - name: path_provider - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.10" - path_provider_android: - dependency: transitive - description: - name: path_provider_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.14" - path_provider_ios: - dependency: transitive - description: - name: path_provider_ios - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.9" - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.6" - path_provider_macos: - dependency: transitive - description: - name: path_provider_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.6" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.4" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.6" petitparser: dependency: transitive description: @@ -630,13 +254,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "5.0.0" - platform: - dependency: transitive - description: - name: platform - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" plugin_platform_interface: dependency: transitive description: @@ -644,34 +261,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.2" - pool: - dependency: transitive - description: - name: pool - url: "https://pub.dartlang.org" - source: hosted - version: "1.5.0" - process: - dependency: transitive - description: - name: process - url: "https://pub.dartlang.org" - source: hosted - version: "4.2.4" - pub_semver: - dependency: transitive - description: - name: pub_semver - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - pubspec_parse: - dependency: transitive - description: - name: pubspec_parse - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" quiver: dependency: transitive description: @@ -679,137 +268,11 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "3.1.0" - share_plus: - dependency: "direct main" - description: - name: share_plus - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.4" - share_plus_linux: - dependency: transitive - description: - name: share_plus_linux - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" - share_plus_macos: - dependency: transitive - description: - name: share_plus_macos - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" - share_plus_platform_interface: - dependency: transitive - description: - name: share_plus_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.2" - share_plus_web: - dependency: transitive - description: - name: share_plus_web - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" - share_plus_windows: - dependency: transitive - description: - name: share_plus_windows - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" - shared_preferences: - dependency: transitive - description: - name: shared_preferences - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.15" - shared_preferences_android: - dependency: transitive - description: - name: shared_preferences_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.12" - shared_preferences_ios: - dependency: transitive - description: - name: shared_preferences_ios - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - shared_preferences_linux: - dependency: transitive - description: - name: shared_preferences_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - shared_preferences_macos: - dependency: transitive - description: - name: shared_preferences_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.4" - shared_preferences_platform_interface: - dependency: transitive - description: - name: shared_preferences_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - shared_preferences_web: - dependency: transitive - description: - name: shared_preferences_web - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.4" - shared_preferences_windows: - dependency: transitive - description: - name: shared_preferences_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - shelf: - dependency: transitive - description: - name: shelf - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - shelf_web_socket: - dependency: transitive - description: - name: shelf_web_socket - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" sky_engine: dependency: transitive description: flutter source: sdk version: "0.0.99" - source_gen: - dependency: transitive - description: - name: source_gen - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.2" - source_helper: - dependency: transitive - description: - name: source_helper - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.2" source_span: dependency: transitive description: @@ -859,13 +322,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.4.9" - timing: - dependency: transitive - description: - name: timing - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" typed_data: dependency: transitive description: @@ -873,62 +329,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.3.0" - url_launcher: - dependency: transitive - description: - name: url_launcher - url: "https://pub.dartlang.org" - source: hosted - version: "6.1.2" - url_launcher_android: - dependency: transitive - description: - name: url_launcher_android - url: "https://pub.dartlang.org" - source: hosted - version: "6.0.17" - url_launcher_ios: - dependency: transitive - description: - name: url_launcher_ios - url: "https://pub.dartlang.org" - source: hosted - version: "6.0.16" - url_launcher_linux: - dependency: transitive - description: - name: url_launcher_linux - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - url_launcher_macos: - dependency: transitive - description: - name: url_launcher_macos - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - url_launcher_platform_interface: - dependency: transitive - description: - name: url_launcher_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - url_launcher_web: - dependency: transitive - description: - name: url_launcher_web - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.11" - url_launcher_windows: - dependency: transitive - description: - name: url_launcher_windows - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" vector_math: dependency: transitive description: @@ -936,34 +336,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.2" - watcher: - dependency: transitive - description: - name: watcher - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.0" - win32: - dependency: transitive - description: - name: win32 - url: "https://pub.dartlang.org" - source: hosted - version: "2.5.2" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0+1" xml: dependency: transitive description: @@ -971,13 +343,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "5.4.1" - yaml: - dependency: transitive - description: - name: yaml - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.1" sdks: dart: ">=2.17.0-206.0.dev <3.0.0" - flutter: ">=2.10.0" + flutter: ">=2.8.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index a15045d..3e4ff73 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -7,38 +7,18 @@ environment: sdk: ">=2.16.1 <3.0.0" dependencies: - convex_bottom_bar: ^3.0.0 - cupertino_icons: ^1.0.2 - flex_color_scheme: ^5.0.1 flutter: sdk: flutter - flutter_localizations: - sdk: flutter - flutter_mobx: ^2.0.5 flutter_zxing: path: ../ font_awesome_flutter: ^10.1.0 - hive: ^2.1.0 - hive_flutter: ^1.1.0 image: ^3.1.3 image_picker: ^0.8.5 - intl: ^0.17.0 - mobx: ^2.0.7 - nb_utils: ^4.5.1 - path_provider: ^2.0.10 - share_plus: ^4.0.4 - -flutter_intl: - main_locale: en_US - enabled: true dev_dependencies: - build_runner: ^2.1.10 flutter_lints: ^2.0.1 flutter_test: sdk: flutter - hive_generator: - mobx_codegen: flutter: uses-material-design: true diff --git a/lib/flutter_zxing.dart b/lib/flutter_zxing.dart index 0c433d6..cdec67c 100644 --- a/lib/flutter_zxing.dart +++ b/lib/flutter_zxing.dart @@ -27,6 +27,10 @@ class FlutterZxing { static bool logEnabled = false; + static void setLogEnabled(bool enabled) { + logEnabled = enabled; + } + static String version() { return bindings.version().cast().toDartString(); } diff --git a/zxscanner/android/app/build.gradle b/zxscanner/android/app/build.gradle index 54057b9..bb5155b 100644 --- a/zxscanner/android/app/build.gradle +++ b/zxscanner/android/app/build.gradle @@ -47,7 +47,7 @@ android { applicationId "com.markosyan.zxscanner" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. - minSdkVersion flutter.minSdkVersion + minSdkVersion 21 targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName diff --git a/zxscanner/android/app/src/main/AndroidManifest.xml b/zxscanner/android/app/src/main/AndroidManifest.xml index 2051435..c2a09a2 100644 --- a/zxscanner/android/app/src/main/AndroidManifest.xml +++ b/zxscanner/android/app/src/main/AndroidManifest.xml @@ -1,7 +1,7 @@ :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/zxscanner/ios/Runner.xcodeproj/project.pbxproj b/zxscanner/ios/Runner.xcodeproj/project.pbxproj index ed675de..31acf9a 100644 --- a/zxscanner/ios/Runner.xcodeproj/project.pbxproj +++ b/zxscanner/ios/Runner.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 0D9535CE302EB9BB6839F79A /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 03A8DB94F06123C973CE7845 /* Pods_Runner.framework */; }; 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; @@ -29,8 +30,10 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 03A8DB94F06123C973CE7845 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 225C78DCB04A9324D20B98E2 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -42,6 +45,8 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 9A8341A4E573B03B27A71F6D /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + F18E6CF31C3C93655BF7C27D /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -49,6 +54,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 0D9535CE302EB9BB6839F79A /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -72,6 +78,8 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, + C1F92D6E50E39FFA834789E9 /* Pods */, + ED862C98908AC772A1DE46FC /* Frameworks */, ); sourceTree = ""; }; @@ -98,6 +106,25 @@ path = Runner; sourceTree = ""; }; + C1F92D6E50E39FFA834789E9 /* Pods */ = { + isa = PBXGroup; + children = ( + F18E6CF31C3C93655BF7C27D /* Pods-Runner.debug.xcconfig */, + 9A8341A4E573B03B27A71F6D /* Pods-Runner.release.xcconfig */, + 225C78DCB04A9324D20B98E2 /* Pods-Runner.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; + ED862C98908AC772A1DE46FC /* Frameworks */ = { + isa = PBXGroup; + children = ( + 03A8DB94F06123C973CE7845 /* Pods_Runner.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -105,12 +132,14 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( + 77667BC54F8D028A4E77A229 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + DE3D017DF1D5B936180E5CD7 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -183,6 +212,28 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; + 77667BC54F8D028A4E77A229 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -197,6 +248,23 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; + DE3D017DF1D5B936180E5CD7 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ diff --git a/zxscanner/ios/Runner.xcworkspace/contents.xcworkspacedata b/zxscanner/ios/Runner.xcworkspace/contents.xcworkspacedata index 1d526a1..21a3cc1 100644 --- a/zxscanner/ios/Runner.xcworkspace/contents.xcworkspacedata +++ b/zxscanner/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -4,4 +4,7 @@ + + diff --git a/example/lib/configs/app_store.dart b/zxscanner/lib/configs/app_store.dart similarity index 100% rename from example/lib/configs/app_store.dart rename to zxscanner/lib/configs/app_store.dart diff --git a/example/lib/configs/app_store.g.dart b/zxscanner/lib/configs/app_store.g.dart similarity index 100% rename from example/lib/configs/app_store.g.dart rename to zxscanner/lib/configs/app_store.g.dart diff --git a/example/lib/configs/app_theme.dart b/zxscanner/lib/configs/app_theme.dart similarity index 100% rename from example/lib/configs/app_theme.dart rename to zxscanner/lib/configs/app_theme.dart diff --git a/example/lib/configs/constants.dart b/zxscanner/lib/configs/constants.dart similarity index 100% rename from example/lib/configs/constants.dart rename to zxscanner/lib/configs/constants.dart diff --git a/example/lib/generated/intl/messages_all.dart b/zxscanner/lib/generated/intl/messages_all.dart similarity index 100% rename from example/lib/generated/intl/messages_all.dart rename to zxscanner/lib/generated/intl/messages_all.dart diff --git a/example/lib/generated/intl/messages_en_US.dart b/zxscanner/lib/generated/intl/messages_en_US.dart similarity index 100% rename from example/lib/generated/intl/messages_en_US.dart rename to zxscanner/lib/generated/intl/messages_en_US.dart diff --git a/example/lib/generated/l10n.dart b/zxscanner/lib/generated/l10n.dart similarity index 100% rename from example/lib/generated/l10n.dart rename to zxscanner/lib/generated/l10n.dart diff --git a/example/lib/l10n/intl_en_US.arb b/zxscanner/lib/l10n/intl_en_US.arb similarity index 100% rename from example/lib/l10n/intl_en_US.arb rename to zxscanner/lib/l10n/intl_en_US.arb diff --git a/zxscanner/lib/main.dart b/zxscanner/lib/main.dart index 202509b..3e4bba3 100644 --- a/zxscanner/lib/main.dart +++ b/zxscanner/lib/main.dart @@ -1,115 +1,78 @@ import 'package:flutter/material.dart'; +import 'package:flutter_localizations/flutter_localizations.dart'; +import 'package:flutter_mobx/flutter_mobx.dart'; +import 'package:zxscanner/utils/db_service.dart'; +import 'package:zxscanner/utils/extensions.dart'; +import 'package:nb_utils/nb_utils.dart'; -void main() { +import 'configs/app_store.dart'; +import 'configs/app_theme.dart'; +import 'generated/l10n.dart' as loc; +import 'utils/router.dart'; +import 'utils/scroll_behavior.dart'; + +void main() async { + WidgetsFlutterBinding.ensureInitialized(); + await _initializeAppStore(); + await DbService.instance.initializeApp(); runApp(const MyApp()); } -class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); - - // This widget is the root of your application. - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'Flutter Demo', - theme: ThemeData( - // This is the theme of your application. - // - // Try running your application with "flutter run". You'll see the - // application has a blue toolbar. Then, without quitting the app, try - // changing the primarySwatch below to Colors.green and then invoke - // "hot reload" (press "r" in the console where you ran "flutter run", - // or simply save your changes to "hot reload" in a Flutter IDE). - // Notice that the counter didn't reset back to zero; the application - // is not restarted. - primarySwatch: Colors.blue, - ), - home: const MyHomePage(title: 'Flutter Demo Home Page'), - ); - } +_initializeAppStore() async { + await initialize(); + final themeModeString = getStringAsync( + themeModePref, + defaultValue: appStore.themeMode.toString(), + ); + await appStore.setThemeMode( + ThemeMode.values + .firstWhere((element) => element.toString() == themeModeString), + ); + await appStore.setColorSchemeIndex( + getIntAsync(colorSchemeIndexPref, defaultValue: appStore.colorSchemeIndex), + ); + await appStore.toggleSoundMode( + value: getBoolAsync(isSoundOnPref, defaultValue: appStore.isSoundOn), + ); + await appStore.toggleVibrationMode( + value: + getBoolAsync(isVibrationOnPref, defaultValue: appStore.isVibrationOn), + ); + await appStore.setLanguage( + getStringAsync(languagePref, defaultValue: appStore.selectedLanguage), + ); } -class MyHomePage extends StatefulWidget { - const MyHomePage({Key? key, required this.title}) : super(key: key); - - // This widget is the home page of your application. It is stateful, meaning - // that it has a State object (defined below) that contains fields that affect - // how it looks. - - // This class is the configuration for the state. It holds the values (in this - // case the title) provided by the parent (in this case the App widget) and - // used by the build method of the State. Fields in a Widget subclass are - // always marked "final". - - final String title; +class MyApp extends StatefulWidget { + const MyApp({Key? key}) : super(key: key); @override - State createState() => _MyHomePageState(); + State createState() => _MyAppState(); } -class _MyHomePageState extends State { - int _counter = 0; - - void _incrementCounter() { - setState(() { - // This call to setState tells the Flutter framework that something has - // changed in this State, which causes it to rerun the build method below - // so that the display can reflect the updated values. If we changed - // _counter without calling setState(), then the build method would not be - // called again, and so nothing would appear to happen. - _counter++; - }); - } +class _MyAppState extends State { + final _appRouter = AppRouter(); @override Widget build(BuildContext context) { - // This method is rerun every time setState is called, for instance as done - // by the _incrementCounter method above. - // - // The Flutter framework has been optimized to make rerunning build methods - // fast, so that you can just rebuild anything that needs updating rather - // than having to individually change instances of widgets. - return Scaffold( - appBar: AppBar( - // Here we take the value from the MyHomePage object that was created by - // the App.build method, and use it to set our appbar title. - title: Text(widget.title), - ), - body: Center( - // Center is a layout widget. It takes a single child and positions it - // in the middle of the parent. - child: Column( - // Column is also a layout widget. It takes a list of children and - // arranges them vertically. By default, it sizes itself to fit its - // children horizontally, and tries to be as tall as its parent. - // - // Invoke "debug painting" (press "p" in the console, choose the - // "Toggle Debug Paint" action from the Flutter Inspector in Android - // Studio, or the "Toggle Debug Paint" command in Visual Studio Code) - // to see the wireframe for each widget. - // - // Column has various properties to control how it sizes itself and - // how it positions its children. Here we use mainAxisAlignment to - // center the children vertically; the main axis here is the vertical - // axis because Columns are vertical (the cross axis would be - // horizontal). - mainAxisAlignment: MainAxisAlignment.center, - children: [ - const Text( - 'You have pushed the button this many times:', - ), - Text( - '$_counter', - style: Theme.of(context).textTheme.headline4, - ), - ], - ), + return Observer( + builder: (_) => MaterialApp( + title: 'ZxScanner', + theme: AppTheme.flexLightTheme(), + darkTheme: AppTheme.flexDarkTheme(), + themeMode: appStore.themeMode, + localizationsDelegates: const [ + loc.S.delegate, + GlobalMaterialLocalizations.delegate, + GlobalWidgetsLocalizations.delegate, + GlobalCupertinoLocalizations.delegate, + ], + supportedLocales: loc.S.delegate.supportedLocales, + locale: appStore.selectedLanguage.parseLocale(), + onGenerateRoute: _appRouter.onGenerateRoute, + scrollBehavior: MyCustomScrollBehavior(), + debugShowCheckedModeBanner: false, ), - floatingActionButton: FloatingActionButton( - onPressed: _incrementCounter, - tooltip: 'Increment', - child: const Icon(Icons.add), - ), // This trailing comma makes auto-formatting nicer for build methods. ); } } diff --git a/example/lib/models/code.dart b/zxscanner/lib/models/code.dart similarity index 100% rename from example/lib/models/code.dart rename to zxscanner/lib/models/code.dart diff --git a/example/lib/models/code.g.dart b/zxscanner/lib/models/code.g.dart similarity index 100% rename from example/lib/models/code.g.dart rename to zxscanner/lib/models/code.g.dart diff --git a/example/lib/models/encode.dart b/zxscanner/lib/models/encode.dart similarity index 100% rename from example/lib/models/encode.dart rename to zxscanner/lib/models/encode.dart diff --git a/example/lib/models/encode.g.dart b/zxscanner/lib/models/encode.g.dart similarity index 100% rename from example/lib/models/encode.g.dart rename to zxscanner/lib/models/encode.g.dart diff --git a/example/lib/models/models.dart b/zxscanner/lib/models/models.dart similarity index 100% rename from example/lib/models/models.dart rename to zxscanner/lib/models/models.dart diff --git a/example/lib/pages/barcodes_page.dart b/zxscanner/lib/pages/barcodes_page.dart similarity index 92% rename from example/lib/pages/barcodes_page.dart rename to zxscanner/lib/pages/barcodes_page.dart index 26deda0..b626231 100644 --- a/example/lib/pages/barcodes_page.dart +++ b/zxscanner/lib/pages/barcodes_page.dart @@ -2,10 +2,10 @@ import 'dart:typed_data'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:flutter_zxing_example/models/models.dart'; -import 'package:flutter_zxing_example/utils/db_service.dart'; -import 'package:flutter_zxing_example/utils/router.dart'; -import 'package:flutter_zxing_example/widgets/common_widgets.dart'; +import 'package:zxscanner/models/models.dart'; +import 'package:zxscanner/utils/db_service.dart'; +import 'package:zxscanner/utils/router.dart'; +import 'package:zxscanner/widgets/common_widgets.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:hive_flutter/hive_flutter.dart'; diff --git a/example/lib/pages/creator_page.dart b/zxscanner/lib/pages/creator_page.dart similarity index 90% rename from example/lib/pages/creator_page.dart rename to zxscanner/lib/pages/creator_page.dart index dcf349e..ee0a2c5 100644 --- a/example/lib/pages/creator_page.dart +++ b/zxscanner/lib/pages/creator_page.dart @@ -3,11 +3,11 @@ import 'dart:typed_data'; import 'package:flutter/material.dart'; import 'package:flutter_zxing/flutter_zxing.dart'; -import 'package:flutter_zxing_example/configs/constants.dart'; -import 'package:flutter_zxing_example/models/encode.dart'; -import 'package:flutter_zxing_example/utils/db_service.dart'; -import 'package:flutter_zxing_example/utils/extensions.dart'; -import 'package:flutter_zxing_example/widgets/common_widgets.dart'; +import 'package:zxscanner/configs/constants.dart'; +import 'package:zxscanner/models/encode.dart'; +import 'package:zxscanner/utils/db_service.dart'; +import 'package:zxscanner/utils/extensions.dart'; +import 'package:zxscanner/widgets/common_widgets.dart'; import 'package:path_provider/path_provider.dart'; import 'package:share_plus/share_plus.dart'; diff --git a/example/lib/pages/help_page.dart b/zxscanner/lib/pages/help_page.dart similarity index 100% rename from example/lib/pages/help_page.dart rename to zxscanner/lib/pages/help_page.dart diff --git a/example/lib/pages/history_page.dart b/zxscanner/lib/pages/history_page.dart similarity index 93% rename from example/lib/pages/history_page.dart rename to zxscanner/lib/pages/history_page.dart index 7d98518..1f0eb1f 100644 --- a/example/lib/pages/history_page.dart +++ b/zxscanner/lib/pages/history_page.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:flutter_zxing_example/models/code.dart'; -import 'package:flutter_zxing_example/utils/db_service.dart'; -import 'package:flutter_zxing_example/widgets/common_widgets.dart'; +import 'package:zxscanner/models/code.dart'; +import 'package:zxscanner/utils/db_service.dart'; +import 'package:zxscanner/widgets/common_widgets.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:hive_flutter/hive_flutter.dart'; diff --git a/example/lib/pages/home_page.dart b/zxscanner/lib/pages/home_page.dart similarity index 83% rename from example/lib/pages/home_page.dart rename to zxscanner/lib/pages/home_page.dart index 7240a45..892d31f 100644 --- a/example/lib/pages/home_page.dart +++ b/zxscanner/lib/pages/home_page.dart @@ -1,10 +1,10 @@ import 'package:convex_bottom_bar/convex_bottom_bar.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_zxing_example/pages/barcodes_page.dart'; -import 'package:flutter_zxing_example/pages/help_page.dart'; -import 'package:flutter_zxing_example/pages/history_page.dart'; -import 'package:flutter_zxing_example/pages/scanner_page.dart'; -import 'package:flutter_zxing_example/pages/settings_page.dart'; +import 'package:zxscanner/pages/barcodes_page.dart'; +import 'package:zxscanner/pages/help_page.dart'; +import 'package:zxscanner/pages/history_page.dart'; +import 'package:zxscanner/pages/scanner_page.dart'; +import 'package:zxscanner/pages/settings_page.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; class HomePage extends StatefulWidget { diff --git a/example/lib/pages/scanner_page.dart b/zxscanner/lib/pages/scanner_page.dart similarity index 91% rename from example/lib/pages/scanner_page.dart rename to zxscanner/lib/pages/scanner_page.dart index d298061..27fe915 100644 --- a/example/lib/pages/scanner_page.dart +++ b/zxscanner/lib/pages/scanner_page.dart @@ -2,9 +2,9 @@ import 'dart:typed_data'; import 'package:flutter/material.dart'; import 'package:flutter_zxing/flutter_zxing.dart'; -import 'package:flutter_zxing_example/models/models.dart'; -import 'package:flutter_zxing_example/utils/db_service.dart'; -import 'package:flutter_zxing_example/utils/extensions.dart'; +import 'package:zxscanner/models/models.dart'; +import 'package:zxscanner/utils/db_service.dart'; +import 'package:zxscanner/utils/extensions.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:image_picker/image_picker.dart'; import 'package:image/image.dart' as imglib; diff --git a/example/lib/pages/settings_page.dart b/zxscanner/lib/pages/settings_page.dart similarity index 87% rename from example/lib/pages/settings_page.dart rename to zxscanner/lib/pages/settings_page.dart index 6710634..59f1edf 100644 --- a/example/lib/pages/settings_page.dart +++ b/zxscanner/lib/pages/settings_page.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:flutter_zxing_example/configs/app_store.dart'; -import 'package:flutter_zxing_example/configs/constants.dart'; -import 'package:flutter_zxing_example/generated/l10n.dart'; -import 'package:flutter_zxing_example/widgets/common_widgets.dart'; +import 'package:zxscanner/configs/app_store.dart'; +import 'package:zxscanner/configs/constants.dart'; +import 'package:zxscanner/generated/l10n.dart'; +import 'package:zxscanner/widgets/common_widgets.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; diff --git a/example/lib/utils/db_service.dart b/zxscanner/lib/utils/db_service.dart similarity index 95% rename from example/lib/utils/db_service.dart rename to zxscanner/lib/utils/db_service.dart index 2243acd..fa573e5 100644 --- a/example/lib/utils/db_service.dart +++ b/zxscanner/lib/utils/db_service.dart @@ -1,4 +1,4 @@ -import 'package:flutter_zxing_example/models/models.dart'; +import 'package:zxscanner/models/models.dart'; import 'package:hive_flutter/hive_flutter.dart'; class DbService { diff --git a/example/lib/utils/extensions.dart b/zxscanner/lib/utils/extensions.dart similarity index 100% rename from example/lib/utils/extensions.dart rename to zxscanner/lib/utils/extensions.dart diff --git a/example/lib/utils/router.dart b/zxscanner/lib/utils/router.dart similarity index 76% rename from example/lib/utils/router.dart rename to zxscanner/lib/utils/router.dart index aaed0a6..c53f98a 100644 --- a/example/lib/utils/router.dart +++ b/zxscanner/lib/utils/router.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:flutter_zxing_example/pages/creator_page.dart'; -import 'package:flutter_zxing_example/pages/history_page.dart'; -import 'package:flutter_zxing_example/pages/home_page.dart'; -import 'package:flutter_zxing_example/pages/scanner_page.dart'; -import 'package:flutter_zxing_example/pages/settings_page.dart'; +import 'package:zxscanner/pages/creator_page.dart'; +import 'package:zxscanner/pages/history_page.dart'; +import 'package:zxscanner/pages/home_page.dart'; +import 'package:zxscanner/pages/scanner_page.dart'; +import 'package:zxscanner/pages/settings_page.dart'; abstract class AppRoutes { static const creator = '/creator'; diff --git a/example/lib/utils/scroll_behavior.dart b/zxscanner/lib/utils/scroll_behavior.dart similarity index 100% rename from example/lib/utils/scroll_behavior.dart rename to zxscanner/lib/utils/scroll_behavior.dart diff --git a/example/lib/widgets/common_widgets.dart b/zxscanner/lib/widgets/common_widgets.dart similarity index 85% rename from example/lib/widgets/common_widgets.dart rename to zxscanner/lib/widgets/common_widgets.dart index 3e1c115..4a2d2ba 100644 --- a/example/lib/widgets/common_widgets.dart +++ b/zxscanner/lib/widgets/common_widgets.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:flutter_zxing_example/configs/constants.dart'; +import 'package:zxscanner/configs/constants.dart'; class ContainerX extends StatelessWidget { const ContainerX({Key? key, this.child}) : super(key: key); diff --git a/example/lib/widgets/language_widget.dart b/zxscanner/lib/widgets/language_widget.dart similarity index 88% rename from example/lib/widgets/language_widget.dart rename to zxscanner/lib/widgets/language_widget.dart index 755e315..e5f1e6e 100644 --- a/example/lib/widgets/language_widget.dart +++ b/zxscanner/lib/widgets/language_widget.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:flutter_zxing_example/configs/app_store.dart'; -import 'package:flutter_zxing_example/generated/l10n.dart'; -import 'package:flutter_zxing_example/utils/extensions.dart'; +import 'package:zxscanner/configs/app_store.dart'; +import 'package:zxscanner/generated/l10n.dart'; +import 'package:zxscanner/utils/extensions.dart'; class LanguageWidget extends StatelessWidget { const LanguageWidget({Key? key, required this.onChanged}) : super(key: key); diff --git a/example/lib/widgets/setting_tile.dart b/zxscanner/lib/widgets/setting_tile.dart similarity index 100% rename from example/lib/widgets/setting_tile.dart rename to zxscanner/lib/widgets/setting_tile.dart diff --git a/example/lib/widgets/theme_mode_switch.dart b/zxscanner/lib/widgets/theme_mode_switch.dart similarity index 100% rename from example/lib/widgets/theme_mode_switch.dart rename to zxscanner/lib/widgets/theme_mode_switch.dart diff --git a/example/lib/widgets/theme_selector.dart b/zxscanner/lib/widgets/theme_selector.dart similarity index 98% rename from example/lib/widgets/theme_selector.dart rename to zxscanner/lib/widgets/theme_selector.dart index a4fab9c..49ad4b6 100644 --- a/example/lib/widgets/theme_selector.dart +++ b/zxscanner/lib/widgets/theme_selector.dart @@ -1,6 +1,6 @@ import 'package:flex_color_scheme/flex_color_scheme.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_zxing_example/configs/app_store.dart'; +import 'package:zxscanner/configs/app_store.dart'; // The width size of the scrolling button. const double _kWidthOfScrollItem = 71.6; diff --git a/zxscanner/pubspec.lock b/zxscanner/pubspec.lock index 38a0908..38d4bdb 100644 --- a/zxscanner/pubspec.lock +++ b/zxscanner/pubspec.lock @@ -1,6 +1,34 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + url: "https://pub.dartlang.org" + source: hosted + version: "38.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + url: "https://pub.dartlang.org" + source: hosted + version: "3.4.1" + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "3.3.0" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "2.3.1" async: dependency: transitive description: @@ -15,6 +43,83 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" + build: + dependency: transitive + description: + name: build + url: "https://pub.dartlang.org" + source: hosted + version: "2.3.0" + build_config: + dependency: transitive + description: + name: build_config + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + build_daemon: + dependency: transitive + description: + name: build_daemon + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.0" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.8" + build_runner: + dependency: "direct dev" + description: + name: build_runner + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.10" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + url: "https://pub.dartlang.org" + source: hosted + version: "7.2.3" + built_collection: + dependency: transitive + description: + name: built_collection + url: "https://pub.dartlang.org" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + url: "https://pub.dartlang.org" + source: hosted + version: "8.3.0" + camera: + dependency: transitive + description: + name: camera + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.4+24" + camera_platform_interface: + dependency: transitive + description: + name: camera_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.6" + camera_web: + dependency: transitive + description: + name: camera_web + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.1+6" characters: dependency: transitive description: @@ -29,6 +134,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.3.1" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" clock: dependency: transitive description: @@ -36,6 +148,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.0" + code_builder: + dependency: transitive + description: + name: code_builder + url: "https://pub.dartlang.org" + source: hosted + version: "4.1.0" collection: dependency: transitive description: @@ -43,6 +162,76 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.16.0" + connectivity_plus: + dependency: transitive + description: + name: connectivity_plus + url: "https://pub.dartlang.org" + source: hosted + version: "2.3.0" + connectivity_plus_linux: + dependency: transitive + description: + name: connectivity_plus_linux + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.0" + connectivity_plus_macos: + dependency: transitive + description: + name: connectivity_plus_macos + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.2" + connectivity_plus_platform_interface: + dependency: transitive + description: + name: connectivity_plus_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" + connectivity_plus_web: + dependency: transitive + description: + name: connectivity_plus_web + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" + connectivity_plus_windows: + dependency: transitive + description: + name: connectivity_plus_windows + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1" + convex_bottom_bar: + dependency: "direct main" + description: + name: convex_bottom_bar + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.0" + cross_file: + dependency: transitive + description: + name: cross_file + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.3" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.2" cupertino_icons: dependency: "direct main" description: @@ -50,6 +239,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.4" + dart_style: + dependency: transitive + description: + name: dart_style + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.3" + dbus: + dependency: transitive + description: + name: dbus + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.3" fake_async: dependency: transitive description: @@ -57,11 +260,46 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.3.0" + ffi: + dependency: transitive + description: + name: ffi + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.2" + file: + dependency: transitive + description: + name: file + url: "https://pub.dartlang.org" + source: hosted + version: "6.1.2" + fixnum: + dependency: transitive + description: + name: fixnum + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + flex_color_scheme: + dependency: "direct main" + description: + name: flex_color_scheme + url: "https://pub.dartlang.org" + source: hosted + version: "5.0.1" flutter: dependency: "direct main" description: flutter source: sdk version: "0.0.0" + flutter_beep: + dependency: transitive + description: + name: flutter_beep + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" flutter_lints: dependency: "direct dev" description: @@ -69,11 +307,189 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.1" + flutter_localizations: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_mobx: + dependency: "direct main" + description: + name: flutter_mobx + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.5" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.6" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_zxing: + dependency: "direct main" + description: + name: flutter_zxing + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.2" + fluttertoast: + dependency: transitive + description: + name: fluttertoast + url: "https://pub.dartlang.org" + source: hosted + version: "8.0.9" + font_awesome_flutter: + dependency: "direct main" + description: + name: font_awesome_flutter + url: "https://pub.dartlang.org" + source: hosted + version: "10.1.0" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.2" + glob: + dependency: transitive + description: + name: glob + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.2" + graphs: + dependency: transitive + description: + name: graphs + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + hive: + dependency: "direct main" + description: + name: hive + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + hive_flutter: + dependency: "direct main" + description: + name: hive_flutter + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + hive_generator: + dependency: "direct dev" + description: + name: hive_generator + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.2" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.4" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.0" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.0" + image: + dependency: "direct main" + description: + name: image + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.3" + image_picker: + dependency: "direct main" + description: + name: image_picker + url: "https://pub.dartlang.org" + source: hosted + version: "0.8.5+3" + image_picker_android: + dependency: transitive + description: + name: image_picker_android + url: "https://pub.dartlang.org" + source: hosted + 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.8" + image_picker_ios: + dependency: transitive + description: + name: image_picker_ios + url: "https://pub.dartlang.org" + source: hosted + 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.5.0" + intl: + dependency: "direct main" + description: + name: intl + url: "https://pub.dartlang.org" + source: hosted + version: "0.17.0" + io: + dependency: transitive + description: + name: io + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.4" + json_annotation: + dependency: transitive + description: + name: json_annotation + url: "https://pub.dartlang.org" + source: hosted + version: "4.5.0" lints: dependency: transitive description: @@ -81,6 +497,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.0" + logging: + dependency: transitive + description: + name: logging + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" matcher: dependency: transitive description: @@ -102,6 +525,48 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.7.0" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" + mobx: + dependency: "direct main" + description: + name: mobx + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.7" + mobx_codegen: + dependency: "direct dev" + description: + name: mobx_codegen + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.5+2" + nb_utils: + dependency: "direct main" + description: + name: nb_utils + url: "https://pub.dartlang.org" + source: hosted + version: "4.5.1" + nm: + dependency: transitive + description: + name: nm + url: "https://pub.dartlang.org" + source: hosted + version: "0.5.0" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.2" path: dependency: transitive description: @@ -109,11 +574,242 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.8.1" + path_provider: + dependency: "direct main" + description: + name: path_provider + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.10" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.14" + path_provider_ios: + dependency: transitive + description: + name: path_provider_ios + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.9" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.6" + path_provider_macos: + dependency: transitive + description: + name: path_provider_macos + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.6" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.4" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.6" + petitparser: + dependency: transitive + description: + name: petitparser + url: "https://pub.dartlang.org" + source: hosted + version: "5.0.0" + platform: + dependency: transitive + description: + name: platform + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.0" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.2" + pool: + dependency: transitive + description: + name: pool + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.0" + process: + dependency: transitive + description: + name: process + url: "https://pub.dartlang.org" + source: hosted + version: "4.2.4" + pub_semver: + dependency: transitive + description: + name: pub_semver + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" + quiver: + dependency: transitive + description: + name: quiver + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.0" + share_plus: + dependency: "direct main" + description: + name: share_plus + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.4" + share_plus_linux: + dependency: transitive + description: + name: share_plus_linux + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.0" + share_plus_macos: + dependency: transitive + description: + name: share_plus_macos + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.0" + share_plus_platform_interface: + dependency: transitive + description: + name: share_plus_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.2" + share_plus_web: + dependency: transitive + description: + name: share_plus_web + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.0" + share_plus_windows: + dependency: transitive + description: + name: share_plus_windows + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.0" + shared_preferences: + dependency: transitive + description: + name: shared_preferences + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.15" + shared_preferences_android: + dependency: transitive + description: + name: shared_preferences_android + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.12" + shared_preferences_ios: + dependency: transitive + description: + name: shared_preferences_ios + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + shared_preferences_linux: + dependency: transitive + description: + name: shared_preferences_linux + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + shared_preferences_macos: + dependency: transitive + description: + name: shared_preferences_macos + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.4" + shared_preferences_platform_interface: + dependency: transitive + description: + name: shared_preferences_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + shared_preferences_web: + dependency: transitive + description: + name: shared_preferences_web + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.4" + shared_preferences_windows: + dependency: transitive + description: + name: shared_preferences_windows + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + shelf: + dependency: transitive + description: + name: shelf + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.0" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" sky_engine: dependency: transitive description: flutter source: sdk version: "0.0.99" + source_gen: + dependency: transitive + description: + name: source_gen + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.2" + source_helper: + dependency: transitive + description: + name: source_helper + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.2" source_span: dependency: transitive description: @@ -135,6 +831,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" + stream_transform: + dependency: transitive + description: + name: stream_transform + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" string_scanner: dependency: transitive description: @@ -156,6 +859,76 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.4.9" + timing: + dependency: transitive + description: + name: timing + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.1" + url_launcher: + dependency: transitive + description: + name: url_launcher + url: "https://pub.dartlang.org" + source: hosted + version: "6.1.2" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + url: "https://pub.dartlang.org" + source: hosted + version: "6.0.17" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + url: "https://pub.dartlang.org" + source: hosted + version: "6.0.16" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.5" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.11" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1" vector_math: dependency: transitive description: @@ -163,5 +936,48 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.2" + watcher: + dependency: transitive + description: + name: watcher + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + win32: + dependency: transitive + description: + name: win32 + url: "https://pub.dartlang.org" + source: hosted + version: "2.5.2" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0+1" + xml: + dependency: transitive + description: + name: xml + url: "https://pub.dartlang.org" + source: hosted + version: "5.4.1" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.1" sdks: dart: ">=2.17.0 <3.0.0" + flutter: ">=2.10.0" diff --git a/zxscanner/pubspec.yaml b/zxscanner/pubspec.yaml index c1e96f1..2c8f3e6 100644 --- a/zxscanner/pubspec.yaml +++ b/zxscanner/pubspec.yaml @@ -8,14 +8,37 @@ environment: sdk: ">=2.17.0 <3.0.0" dependencies: + convex_bottom_bar: ^3.0.0 + cupertino_icons: ^1.0.2 + flex_color_scheme: ^5.0.1 flutter: sdk: flutter - cupertino_icons: ^1.0.2 + flutter_localizations: + sdk: flutter + flutter_mobx: ^2.0.5 + flutter_zxing: ^0.1.2 + font_awesome_flutter: ^10.1.0 + hive: ^2.1.0 + hive_flutter: ^1.1.0 + image: ^3.1.3 + image_picker: ^0.8.5 + intl: ^0.17.0 + mobx: ^2.0.7 + nb_utils: ^4.5.1 + path_provider: ^2.0.10 + share_plus: ^4.0.4 + +flutter_intl: + main_locale: en_US + enabled: true dev_dependencies: + build_runner: ^2.1.10 + flutter_lints: ^2.0.1 flutter_test: sdk: flutter - flutter_lints: ^2.0.0 + hive_generator: + mobx_codegen: flutter: