diff options
author | xAlpharax <42233094+xAlpharax@users.noreply.github.com> | 2023-10-13 16:11:31 +0300 |
---|---|---|
committer | xAlpharax <42233094+xAlpharax@users.noreply.github.com> | 2023-10-13 16:11:31 +0300 |
commit | 07150b61d3593fc9ad764a7884e50a5190178e1b (patch) | |
tree | 7ffea1ef93165cbefe47bbf06181b62b20be155c | |
parent | 6f176a8545278424add9167ad616dc2f2037c2cb (diff) |
Functional Project State
Changes to be committed:
modified: .metadata
modified: android/app/build.gradle
renamed: android/app/src/main/kotlin/com/example/yolo/MainActivity.kt -> android/app/src/main/kotlin/com/example/yoloo/MainActivity.kt
new file: android/app/src/main/res/AndroidManifest.xml
deleted: android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png
deleted: android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png
deleted: android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png
deleted: android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png
deleted: android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png
deleted: android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
modified: android/app/src/main/res/mipmap-hdpi/ic_launcher.png
modified: android/app/src/main/res/mipmap-mdpi/ic_launcher.png
modified: android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
modified: android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
modified: android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
deleted: android/app/src/main/res/values/colors.xml
modified: ios/Runner/Info.plist
modified: lib/main.dart
modified: pubspec.lock
modified: pubspec.yaml
20 files changed, 105 insertions, 108 deletions
@@ -1,33 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: "ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a" - channel: "stable" - -project_type: app - -# Tracks metadata for the flutter migrate command -migration: - platforms: - - platform: root - create_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a - base_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a - - platform: android - create_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a - base_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a - - platform: ios - create_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a - base_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a - - # User provided section - - # List of Local paths (relative to this file) that should be - # ignored by the migrate tool. - # - # Files that are not part of the templates will be ignored by default. - unmanaged_files: - - 'lib/main.dart' - - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/android/app/build.gradle b/android/app/build.gradle index 74c9c72..b6f0da9 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -23,8 +23,8 @@ if (flutterVersionName == null) { } android { - namespace "com.example.yolo" - compileSdkVersion 33 + namespace "com.example.yoloo" + compileSdkVersion flutter.compileSdkVersion ndkVersion flutter.ndkVersion compileOptions { @@ -46,7 +46,7 @@ android { // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. minSdkVersion 21 - targetSdkVersion 33 + targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName } diff --git a/android/app/src/main/kotlin/com/example/yolo/MainActivity.kt b/android/app/src/main/kotlin/com/example/yoloo/MainActivity.kt index 5cd250f..ccee61d 100644 --- a/android/app/src/main/kotlin/com/example/yolo/MainActivity.kt +++ b/android/app/src/main/kotlin/com/example/yoloo/MainActivity.kt @@ -1,4 +1,4 @@ -package com.example.yolo +package com.example.yoloo import io.flutter.embedding.android.FlutterActivity diff --git a/android/app/src/main/res/AndroidManifest.xml b/android/app/src/main/res/AndroidManifest.xml new file mode 100644 index 0000000..dd90eee --- /dev/null +++ b/android/app/src/main/res/AndroidManifest.xml @@ -0,0 +1,38 @@ +<manifest xmlns:android="http://schemas.android.com/apk/res/android"> + + <uses-permission android:name="android.permission.CAMERA" /> + <uses-feature android:name="android.hardware.camera" /> + <uses-feature android:name="android.hardware.camera.autofocus" /> + + <application + android:label="MegaView" + android:name="${applicationName}" + android:icon="@mipmap/ic_launcher"> + <activity + android:name=".MainActivity" + android:exported="true" + android:launchMode="singleTop" + android:theme="@style/LaunchTheme" + android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" + android:hardwareAccelerated="true" + android:windowSoftInputMode="adjustResize"> + <!-- Specifies an Android theme to apply to this Activity as soon as + the Android process has started. This theme is visible to the user + while the Flutter UI initializes. After that, this theme continues + to determine the Window background behind the Flutter UI. --> + <meta-data + android:name="io.flutter.embedding.android.NormalTheme" + android:resource="@style/NormalTheme" + /> + <intent-filter> + <action android:name="android.intent.action.MAIN"/> + <category android:name="android.intent.category.LAUNCHER"/> + </intent-filter> + </activity> + <!-- Don't delete the meta-data below. + This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --> + <meta-data + android:name="flutterEmbedding" + android:value="2" /> + </application> +</manifest> diff --git a/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png b/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png Binary files differdeleted file mode 100644 index 12c504e..0000000 --- a/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png +++ /dev/null diff --git a/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png b/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png Binary files differdeleted file mode 100644 index 942dafe..0000000 --- a/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png +++ /dev/null diff --git a/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png b/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png Binary files differdeleted file mode 100644 index dc649a0..0000000 --- a/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png +++ /dev/null diff --git a/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png Binary files differdeleted file mode 100644 index e7d5767..0000000 --- a/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png +++ /dev/null diff --git a/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png Binary files differdeleted file mode 100644 index 72bc366..0000000 --- a/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png +++ /dev/null diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml deleted file mode 100644 index 5f349f7..0000000 --- a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> - <background android:drawable="@color/ic_launcher_background"/> - <foreground android:drawable="@drawable/ic_launcher_foreground"/> -</adaptive-icon> diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png Binary files differindex 6b3d6d6..db77bb4 100644 --- a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +++ b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png Binary files differindex 2e7d1b6..17987b7 100644 --- a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +++ b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png Binary files differindex fa971cb..09d4391 100644 --- a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +++ b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png Binary files differindex b942a71..d5f1c8d 100644 --- a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +++ b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png Binary files differindex 7bddebb..4d6372e 100644 --- a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +++ b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/android/app/src/main/res/values/colors.xml b/android/app/src/main/res/values/colors.xml deleted file mode 100644 index beab31f..0000000 --- a/android/app/src/main/res/values/colors.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<resources> - <color name="ic_launcher_background">#000000</color> -</resources>
\ No newline at end of file diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 856b89b..760e2e2 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -2,50 +2,50 @@ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> - <key>CFBundleDevelopmentRegion</key> - <string>$(DEVELOPMENT_LANGUAGE)</string> - <key>CFBundleDisplayName</key> - <string>MegaView</string> - <key>CFBundleExecutable</key> - <string>$(EXECUTABLE_NAME)</string> - <key>CFBundleIdentifier</key> - <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> - <key>CFBundleInfoDictionaryVersion</key> - <string>6.0</string> - <key>CFBundleName</key> - <string>MegaView</string> - <key>CFBundlePackageType</key> - <string>APPL</string> - <key>CFBundleShortVersionString</key> - <string>$(FLUTTER_BUILD_NAME)</string> - <key>CFBundleSignature</key> - <string>????</string> - <key>CFBundleVersion</key> - <string>$(FLUTTER_BUILD_NUMBER)</string> - <key>LSRequiresIPhoneOS</key> - <true/> - <key>UILaunchStoryboardName</key> - <string>LaunchScreen</string> - <key>UIMainStoryboardFile</key> - <string>Main</string> - <key>UISupportedInterfaceOrientations</key> - <array> - <string>UIInterfaceOrientationPortrait</string> - <string>UIInterfaceOrientationLandscapeLeft</string> - <string>UIInterfaceOrientationLandscapeRight</string> - </array> - <key>UISupportedInterfaceOrientations~ipad</key> - <array> - <string>UIInterfaceOrientationPortrait</string> - <string>UIInterfaceOrientationPortraitUpsideDown</string> - <string>UIInterfaceOrientationLandscapeLeft</string> - <string>UIInterfaceOrientationLandscapeRight</string> - </array> - <key>CADisableMinimumFrameDurationOnPhone</key> - <true/> - <key>UIApplicationSupportsIndirectInputEvents</key> - <true/> - <key>NSCameraUsageDescription</key> + <key>CFBundleDevelopmentRegion</key> + <string>$(DEVELOPMENT_LANGUAGE)</string> + <key>CFBundleDisplayName</key> + <string>MegaView</string> + <key>CFBundleExecutable</key> + <string>$(EXECUTABLE_NAME)</string> + <key>CFBundleIdentifier</key> + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>MegaView</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleShortVersionString</key> + <string>$(FLUTTER_BUILD_NAME)</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>$(FLUTTER_BUILD_NUMBER)</string> + <key>LSRequiresIPhoneOS</key> + <true/> + <key>UILaunchStoryboardName</key> + <string>LaunchScreen</string> + <key>UIMainStoryboardFile</key> + <string>Main</string> + <key>UISupportedInterfaceOrientations</key> + <array> + <string>UIInterfaceOrientationPortrait</string> + <string>UIInterfaceOrientationLandscapeLeft</string> + <string>UIInterfaceOrientationLandscapeRight</string> + </array> + <key>UISupportedInterfaceOrientations~ipad</key> + <array> + <string>UIInterfaceOrientationPortrait</string> + <string>UIInterfaceOrientationPortraitUpsideDown</string> + <string>UIInterfaceOrientationLandscapeLeft</string> + <string>UIInterfaceOrientationLandscapeRight</string> + </array> + <key>CADisableMinimumFrameDurationOnPhone</key> + <true/> + <key>UIApplicationSupportsIndirectInputEvents</key> + <true/> + <key>NSCameraUsageDescription</key> <string>This app needs access to your camera in order to scan text.</string> </dict> </plist> diff --git a/lib/main.dart b/lib/main.dart index 46d76b8..173a152 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -92,7 +92,7 @@ class _MainScreenState extends State<MainScreen> with WidgetsBindingObserver { void dispose() { WidgetsBinding.instance.removeObserver(this); _stopCamera(); - textRecognizer.close(); + textRecognizer.close(); // OCR Stop flutterTts.stop(); // TTS Stop vision.closeYoloModel(); // YOLO Stop super.dispose(); @@ -137,6 +137,7 @@ class _MainScreenState extends State<MainScreen> with WidgetsBindingObserver { appBar: AppBar( backgroundColor: Theme.of(context).colorScheme.inversePrimary, title: const Text('MegaView'), + centerTitle: true, ), backgroundColor: _isPermissionGranted ? Colors.transparent : null, body: _isPermissionGranted diff --git a/pubspec.lock b/pubspec.lock index 44e4a22..595ca0c 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,10 +5,10 @@ packages: dependency: transitive description: name: archive - sha256: "49b1fad315e57ab0bbc15bcbb874e83116a1d78f77ebd500a4af6c9407d6b28e" + sha256: "7e0d52067d05f2e0324268097ba723b71cb41ac8a6a2b24d1edf9c536b987b03" url: "https://pub.dev" source: hosted - version: "3.3.8" + version: "3.4.6" args: dependency: transitive description: @@ -37,26 +37,26 @@ packages: dependency: "direct main" description: name: camera - sha256: f63f2687fb1795c36f7c57b18a03071880eabb0fd8b5291b0fcd3fb979cb0fb1 + sha256: "1f9010f0689774380fbcd7d6b7820a5157e8e97685fa66d619e1d1f58b3fdf93" url: "https://pub.dev" source: hosted - version: "0.10.5+4" + version: "0.10.5+5" camera_android: dependency: transitive description: name: camera_android - sha256: ed4f645848074166fc3b8e20350f83ca07e09a2becc1e185040ee561f955d4df + sha256: c978373b41a463c9edda3fea0a06966299f55db63232cd0f0d4efc21a59a0006 url: "https://pub.dev" source: hosted - version: "0.10.8+8" + version: "0.10.8+12" camera_avfoundation: dependency: transitive description: name: camera_avfoundation - sha256: "718b60ed2e22b4067fe6e2c0e9ebe2856c2de5c8b1289ba95d10db85b0b00bc2" + sha256: "9495e633cda700717bbe299b0979e6c4a08cee45f298945973dc9cf3e4c1cba5" url: "https://pub.dev" source: hosted - version: "0.9.13+4" + version: "0.9.13+6" camera_platform_interface: dependency: transitive description: @@ -125,10 +125,10 @@ packages: dependency: transitive description: name: cross_file - sha256: fd832b5384d0d6da4f6df60b854d33accaaeb63aa9e10e736a87381f08dee2cb + sha256: "445db18de832dba8d851e287aff8ccf169bed30d2e94243cb54c7d2f1ed2142c" url: "https://pub.dev" source: hosted - version: "0.3.3+5" + version: "0.3.3+6" crypto: dependency: transitive description: @@ -239,10 +239,10 @@ packages: dependency: "direct main" description: name: flutter_tts - sha256: "00a7af85ba2b53847028efc175029764240ab980b984eb0eae8386e2c3f7c460" + sha256: "23d47e1335c632228b80d9693e2494a834393fff5893b66e8ae494dcce4e9867" url: "https://pub.dev" source: hosted - version: "3.8.2" + version: "3.8.3" flutter_vision: dependency: "direct main" description: @@ -500,10 +500,10 @@ packages: dependency: transitive description: name: permission_handler_platform_interface - sha256: f2343e9fa9c22ae4fd92d4732755bfe452214e7189afcc097380950cf567b4b2 + sha256: "6760eb5ef34589224771010805bea6054ad28453906936f843a8cc4d3a55c4a4" url: "https://pub.dev" source: hosted - version: "3.11.5" + version: "3.12.0" permission_handler_windows: dependency: transitive description: @@ -524,10 +524,10 @@ packages: dependency: transitive description: name: platform - sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102 + sha256: "0a279f0707af40c890e80b1e9df8bb761694c074ba7e1d4ab1bc4b728e200b59" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "3.1.3" plugin_platform_interface: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 93cc2eb..c54a83e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -21,8 +21,8 @@ dependencies: google_mlkit_text_recognition: ^0.10.0 # google_mlkit_object_detection: ^0.10.0 -# flutter_sound: ^9.2.13 # google_ml_kit: ^0.16.2 +# flutter_sound: ^9.2.13 cupertino_icons: ^1.0.2 |