Merge pull request #3 from ashutosh2014/Perfromance-Impovements-&-Re-factoring-Code

performance improvements and code refactoring. 😊
This commit is contained in:
Bijoy Ghosh
2024-07-15 22:08:28 +06:00
committed by GitHub
16 changed files with 472 additions and 335 deletions

View File

@@ -1,32 +1,32 @@
# This is a generated file; do not edit or check into version control.
camera=C:\\Users\\BJ\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\camera-0.10.5+9\\
camera_android=C:\\Users\\BJ\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\camera_android-0.10.8+18\\
camera_avfoundation=C:\\Users\\BJ\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\camera_avfoundation-0.9.14+2\\
camera_web=C:\\Users\\BJ\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\camera_web-0.3.2+4\\
flutter_compass=C:\\Users\\BJ\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\flutter_compass-0.8.0\\
flutter_plugin_android_lifecycle=C:\\Users\\BJ\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\flutter_plugin_android_lifecycle-2.0.17\\
geocoding=C:\\Users\\BJ\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\geocoding-3.0.0\\
geocoding_android=C:\\Users\\BJ\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\geocoding_android-3.3.0\\
geocoding_ios=C:\\Users\\BJ\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\geocoding_ios-3.0.1\\
geolocator=C:\\Users\\BJ\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\geolocator-11.0.0\\
geolocator_android=C:\\Users\\BJ\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\geolocator_android-4.5.4\\
geolocator_apple=C:\\Users\\BJ\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\geolocator_apple-2.3.7\\
geolocator_web=C:\\Users\\BJ\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\geolocator_web-3.0.0\\
geolocator_windows=C:\\Users\\BJ\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\geolocator_windows-0.2.3\\
path_provider=C:\\Users\\BJ\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\path_provider-2.1.2\\
path_provider_android=C:\\Users\\BJ\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\path_provider_android-2.2.2\\
path_provider_foundation=C:\\Users\\BJ\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\path_provider_foundation-2.3.2\\
path_provider_linux=C:\\Users\\BJ\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\path_provider_linux-2.2.1\\
path_provider_windows=C:\\Users\\BJ\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\path_provider_windows-2.2.1\\
permission_handler=C:\\Users\\BJ\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\permission_handler-11.3.1\\
permission_handler_android=C:\\Users\\BJ\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\permission_handler_android-12.0.5\\
permission_handler_apple=C:\\Users\\BJ\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\permission_handler_apple-9.4.4\\
permission_handler_html=C:\\Users\\BJ\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\permission_handler_html-0.1.1\\
permission_handler_windows=C:\\Users\\BJ\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\permission_handler_windows-0.2.1\\
url_launcher=C:\\Users\\BJ\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\url_launcher-6.2.5\\
url_launcher_android=C:\\Users\\BJ\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\url_launcher_android-6.3.0\\
url_launcher_ios=C:\\Users\\BJ\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\url_launcher_ios-6.2.5\\
url_launcher_linux=C:\\Users\\BJ\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\url_launcher_linux-3.1.1\\
url_launcher_macos=C:\\Users\\BJ\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\url_launcher_macos-3.1.0\\
url_launcher_web=C:\\Users\\BJ\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\url_launcher_web-2.3.0\\
url_launcher_windows=C:\\Users\\BJ\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\url_launcher_windows-3.1.1\\
camera=/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/camera-0.10.6/
camera_android=/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/camera_android-0.10.9+7/
camera_avfoundation=/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/camera_avfoundation-0.9.16/
camera_web=/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/camera_web-0.3.3/
flutter_compass=/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/flutter_compass-0.8.0/
flutter_plugin_android_lifecycle=/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.20/
geocoding=/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/geocoding-3.0.0/
geocoding_android=/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/geocoding_android-3.3.1/
geocoding_ios=/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/geocoding_ios-3.0.1/
geolocator=/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/geolocator-11.1.0/
geolocator_android=/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/geolocator_android-4.6.0/
geolocator_apple=/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/geolocator_apple-2.3.7/
geolocator_web=/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/geolocator_web-3.0.0/
geolocator_windows=/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/geolocator_windows-0.2.3/
path_provider=/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/path_provider-2.1.3/
path_provider_android=/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/path_provider_android-2.2.6/
path_provider_foundation=/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/
path_provider_linux=/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/
path_provider_windows=/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/path_provider_windows-2.2.1/
permission_handler=/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/permission_handler-11.3.1/
permission_handler_android=/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/permission_handler_android-12.0.7/
permission_handler_apple=/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/permission_handler_apple-9.4.5/
permission_handler_html=/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/permission_handler_html-0.1.1/
permission_handler_windows=/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/permission_handler_windows-0.2.1/
url_launcher=/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/url_launcher-6.3.0/
url_launcher_android=/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.3/
url_launcher_ios=/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/url_launcher_ios-6.3.0/
url_launcher_linux=/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/url_launcher_linux-3.1.1/
url_launcher_macos=/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/url_launcher_macos-3.2.0/
url_launcher_web=/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/url_launcher_web-2.3.1/
url_launcher_windows=/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.1/

File diff suppressed because one or more lines are too long

View File

@@ -1,23 +1,59 @@
package io.flutter.plugins;
import io.flutter.plugin.common.PluginRegistry;
import androidx.annotation.Keep;
import androidx.annotation.NonNull;
import io.flutter.Log;
import io.flutter.embedding.engine.FlutterEngine;
/**
* Generated file. Do not edit.
* This file is generated by the Flutter tool based on the
* plugins that support the Android platform.
*/
@Keep
public final class GeneratedPluginRegistrant {
public static void registerWith(PluginRegistry registry) {
if (alreadyRegisteredWith(registry)) {
return;
private static final String TAG = "GeneratedPluginRegistrant";
public static void registerWith(@NonNull FlutterEngine flutterEngine) {
try {
flutterEngine.getPlugins().add(new io.flutter.plugins.camera.CameraPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin camera_android, io.flutter.plugins.camera.CameraPlugin", e);
}
try {
flutterEngine.getPlugins().add(new com.hemanthraj.fluttercompass.FlutterCompassPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin flutter_compass, com.hemanthraj.fluttercompass.FlutterCompassPlugin", e);
}
private static boolean alreadyRegisteredWith(PluginRegistry registry) {
final String key = GeneratedPluginRegistrant.class.getCanonicalName();
if (registry.hasPlugin(key)) {
return true;
try {
flutterEngine.getPlugins().add(new io.flutter.plugins.flutter_plugin_android_lifecycle.FlutterAndroidLifecyclePlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin flutter_plugin_android_lifecycle, io.flutter.plugins.flutter_plugin_android_lifecycle.FlutterAndroidLifecyclePlugin", e);
}
try {
flutterEngine.getPlugins().add(new com.baseflow.geocoding.GeocodingPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin geocoding_android, com.baseflow.geocoding.GeocodingPlugin", e);
}
try {
flutterEngine.getPlugins().add(new com.baseflow.geolocator.GeolocatorPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin geolocator_android, com.baseflow.geolocator.GeolocatorPlugin", e);
}
try {
flutterEngine.getPlugins().add(new io.flutter.plugins.pathprovider.PathProviderPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin path_provider_android, io.flutter.plugins.pathprovider.PathProviderPlugin", e);
}
try {
flutterEngine.getPlugins().add(new com.baseflow.permissionhandler.PermissionHandlerPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin permission_handler_android, com.baseflow.permissionhandler.PermissionHandlerPlugin", e);
}
try {
flutterEngine.getPlugins().add(new io.flutter.plugins.urllauncher.UrlLauncherPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin url_launcher_android, io.flutter.plugins.urllauncher.UrlLauncherPlugin", e);
}
registry.registrarFor(key);
return false;
}
}

View File

@@ -1,2 +1,2 @@
sdk.dir=E:\\Sdk
flutter.sdk=C:\\flutter
sdk.dir=/Users/ashutoshagarwal/Library/Android/sdk
flutter.sdk=/Users/ashutoshagarwal/Desktop/Development/flutter

View File

@@ -0,0 +1 @@
/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/

View File

@@ -0,0 +1 @@
/Users/ashutoshagarwal/.pub-cache/hosted/pub.dev/url_launcher_linux-3.1.1/

View File

@@ -21,26 +21,26 @@ packages:
dependency: transitive
description:
name: camera
sha256: "9499cbc2e51d8eb0beadc158b288380037618ce4e30c9acbc4fae1ac3ecb5797"
sha256: dfa8fc5a1adaeb95e7a54d86a5bd56f4bb0e035515354c8ac6d262e35cec2ec8
url: "https://pub.dev"
source: hosted
version: "0.10.5+9"
version: "0.10.6"
camera_android:
dependency: transitive
description:
name: camera_android
sha256: "1100e527b44a96906987a91ef78c8dacb539e34612a8058de89023380acf67f1"
sha256: "981654e0e56a4c735f7ecc7bd3921385eb5f7dd13deaf4a6431255d9731df01a"
url: "https://pub.dev"
source: hosted
version: "0.10.8+18"
version: "0.10.9+7"
camera_avfoundation:
dependency: transitive
description:
name: camera_avfoundation
sha256: "841682a28b99b8594532d2afe81e092a2c1edb2c93526f6f841a878dd57eec8d"
sha256: "7d021e8cd30d9b71b8b92b4ad669e80af432d722d18d6aac338572754a786c15"
url: "https://pub.dev"
source: hosted
version: "0.9.14+2"
version: "0.9.16"
camera_platform_interface:
dependency: transitive
description:
@@ -53,10 +53,10 @@ packages:
dependency: transitive
description:
name: camera_web
sha256: f18ccfb33b2a7c49a52ad5aa3f07330b7422faaecbdfd9b9fe8e51182f6ad67d
sha256: "9e9aba2fbab77ce2472924196ff8ac4dd8f9126c4f9a3096171cd1d870d6b26c"
url: "https://pub.dev"
source: hosted
version: "0.3.2+4"
version: "0.3.3"
characters:
dependency: transitive
description:
@@ -101,10 +101,10 @@ packages:
dependency: "direct main"
description:
name: cupertino_icons
sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d
sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
url: "https://pub.dev"
source: hosted
version: "1.0.6"
version: "1.0.8"
fake_async:
dependency: transitive
description:
@@ -154,26 +154,26 @@ packages:
dependency: transitive
description:
name: flutter_map
sha256: cda8d72135b697f519287258b5294a57ce2f2a5ebf234f0e406aad4dc14c9399
sha256: "87cc8349b8fa5dccda5af50018c7374b6645334a0d680931c1fe11bce88fa5bb"
url: "https://pub.dev"
source: hosted
version: "6.1.0"
version: "6.2.1"
flutter_map_location_marker:
dependency: transitive
description:
name: flutter_map_location_marker
sha256: "5873a47606b092bf181b6d17dd42a124e9a8d5d9caad58b5f98fc182e799994f"
sha256: "630e02118b84453e67c4737dadefc87ee8eb54c67bf62800ef757421a770c727"
url: "https://pub.dev"
source: hosted
version: "8.0.8"
version: "8.1.0"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
name: flutter_plugin_android_lifecycle
sha256: b068ffc46f82a55844acfa4fdbb61fad72fa2aef0905548419d97f0f95c456da
sha256: c6b0b4c05c458e1c01ad9bcc14041dd7b1f6783d487be4386f793f47a8a4d03e
url: "https://pub.dev"
source: hosted
version: "2.0.17"
version: "2.0.20"
flutter_test:
dependency: "direct dev"
description: flutter
@@ -196,10 +196,10 @@ packages:
dependency: transitive
description:
name: geocoding_android
sha256: "4e1539a136c6ab4c44963cfc631970ee499f706a03654fc1d446b2100caf7221"
sha256: "1b13eca79b11c497c434678fed109c2be020b158cec7512c848c102bc7232603"
url: "https://pub.dev"
source: hosted
version: "3.3.0"
version: "3.3.1"
geocoding_ios:
dependency: transitive
description:
@@ -220,18 +220,18 @@ packages:
dependency: transitive
description:
name: geolocator
sha256: "694ec58afe97787b5b72b8a0ab78c1a9244811c3c10e72c4362ef3c0ceb005cd"
sha256: "6cb9fb6e5928b58b9a84bdf85012d757fd07aab8215c5205337021c4999bad27"
url: "https://pub.dev"
source: hosted
version: "11.0.0"
version: "11.1.0"
geolocator_android:
dependency: transitive
description:
name: geolocator_android
sha256: f15d1536cd01b1399578f1da1eb5d566e7a718db6a3648f2c24d2e2f859f0692
sha256: "00c7177a95823dd3ee35ef42fd8666cd27d219ae14cea472ac76a21dff43000b"
url: "https://pub.dev"
source: hosted
version: "4.5.4"
version: "4.6.0"
geolocator_apple:
dependency: transitive
description:
@@ -244,10 +244,10 @@ packages:
dependency: transitive
description:
name: geolocator_platform_interface
sha256: "009a21c4bc2761e58dccf07c24f219adaebe0ff707abdfd40b0a763d4003fab9"
sha256: "386ce3d9cce47838355000070b1d0b13efb5bc430f8ecda7e9238c8409ace012"
url: "https://pub.dev"
source: hosted
version: "4.2.2"
version: "4.2.4"
geolocator_web:
dependency: transitive
description:
@@ -300,26 +300,26 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa"
sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
url: "https://pub.dev"
source: hosted
version: "10.0.0"
version: "10.0.4"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
url: "https://pub.dev"
source: hosted
version: "2.0.1"
version: "3.0.3"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
url: "https://pub.dev"
source: hosted
version: "2.0.1"
version: "3.0.1"
lints:
dependency: transitive
description:
@@ -340,17 +340,17 @@ packages:
dependency: transitive
description:
name: logger
sha256: "8c94b8c219e7e50194efc8771cd0e9f10807d8d3e219af473d89b06cc2ee4e04"
sha256: af05cc8714f356fd1f3888fb6741cbe9fbe25cdb6eedbab80e1a6db21047d4a4
url: "https://pub.dev"
source: hosted
version: "2.2.0"
version: "2.3.0"
map_camera_flutter:
dependency: "direct dev"
description:
path: ".."
relative: true
source: path
version: "0.0.4"
version: "0.0.5"
matcher:
dependency: transitive
description:
@@ -371,10 +371,10 @@ packages:
dependency: transitive
description:
name: meta
sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
url: "https://pub.dev"
source: hosted
version: "1.11.0"
version: "1.12.0"
mgrs_dart:
dependency: transitive
description:
@@ -395,26 +395,26 @@ packages:
dependency: transitive
description:
name: path_provider
sha256: b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b
sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161
url: "https://pub.dev"
source: hosted
version: "2.1.2"
version: "2.1.3"
path_provider_android:
dependency: transitive
description:
name: path_provider_android
sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668"
sha256: bca87b0165ffd7cdb9cad8edd22d18d2201e886d9a9f19b4fb3452ea7df3a72a
url: "https://pub.dev"
source: hosted
version: "2.2.2"
version: "2.2.6"
path_provider_foundation:
dependency: transitive
description:
name: path_provider_foundation
sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f"
sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16
url: "https://pub.dev"
source: hosted
version: "2.3.2"
version: "2.4.0"
path_provider_linux:
dependency: transitive
description:
@@ -440,7 +440,7 @@ packages:
source: hosted
version: "2.2.1"
permission_handler:
dependency: "direct main"
dependency: transitive
description:
name: permission_handler
sha256: "18bf33f7fefbd812f37e72091a15575e72d5318854877e0e4035a24ac1113ecb"
@@ -451,18 +451,18 @@ packages:
dependency: transitive
description:
name: permission_handler_android
sha256: "1acac6bae58144b442f11e66621c062aead9c99841093c38f5bcdcc24c1c3474"
sha256: b29a799ca03be9f999aa6c39f7de5209482d638e6f857f6b93b0875c618b7e54
url: "https://pub.dev"
source: hosted
version: "12.0.5"
version: "12.0.7"
permission_handler_apple:
dependency: transitive
description:
name: permission_handler_apple
sha256: e9ad66020b89ff1b63908f247c2c6f931c6e62699b756ef8b3c4569350cd8662
sha256: e6f6d73b12438ef13e648c4ae56bd106ec60d17e90a59c4545db6781229082a0
url: "https://pub.dev"
source: hosted
version: "9.4.4"
version: "9.4.5"
permission_handler_html:
dependency: transitive
description:
@@ -491,10 +491,10 @@ packages:
dependency: transitive
description:
name: platform
sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec"
sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65"
url: "https://pub.dev"
source: hosted
version: "3.1.4"
version: "3.1.5"
plugin_platform_interface:
dependency: transitive
description:
@@ -584,10 +584,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
url: "https://pub.dev"
source: hosted
version: "0.6.1"
version: "0.7.0"
typed_data:
dependency: transitive
description:
@@ -608,26 +608,26 @@ packages:
dependency: transitive
description:
name: url_launcher
sha256: "0ecc004c62fd3ed36a2ffcbe0dd9700aee63bd7532d0b642a488b1ec310f492e"
sha256: "21b704ce5fa560ea9f3b525b43601c678728ba46725bab9b01187b4831377ed3"
url: "https://pub.dev"
source: hosted
version: "6.2.5"
version: "6.3.0"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
sha256: d4ed0711849dd8e33eb2dd69c25db0d0d3fdc37e0a62e629fe32f57a22db2745
sha256: ceb2625f0c24ade6ef6778d1de0b2e44f2db71fded235eb52295247feba8c5cf
url: "https://pub.dev"
source: hosted
version: "6.3.0"
version: "6.3.3"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
sha256: "9149d493b075ed740901f3ee844a38a00b33116c7c5c10d7fb27df8987fb51d5"
sha256: "7068716403343f6ba4969b4173cbf3b84fc768042124bc2c011e5d782b24fe89"
url: "https://pub.dev"
source: hosted
version: "6.2.5"
version: "6.3.0"
url_launcher_linux:
dependency: transitive
description:
@@ -640,10 +640,10 @@ packages:
dependency: transitive
description:
name: url_launcher_macos
sha256: b7244901ea3cf489c5335bdacda07264a6e960b1c1b1a9f91e4bc371d9e68234
sha256: "9a1a42d5d2d95400c795b2914c36fdcb525870c752569438e4ebb09a2b5d90de"
url: "https://pub.dev"
source: hosted
version: "3.1.0"
version: "3.2.0"
url_launcher_platform_interface:
dependency: transitive
description:
@@ -656,10 +656,10 @@ packages:
dependency: transitive
description:
name: url_launcher_web
sha256: "3692a459204a33e04bc94f5fb91158faf4f2c8903281ddd82915adecdb1a901d"
sha256: "8d9e750d8c9338601e709cd0885f95825086bd8b642547f26bda435aade95d8a"
url: "https://pub.dev"
source: hosted
version: "2.3.0"
version: "2.3.1"
url_launcher_windows:
dependency: transitive
description:
@@ -672,10 +672,10 @@ packages:
dependency: transitive
description:
name: uuid
sha256: cd210a09f7c18cbe5a02511718e0334de6559871052c90a90c0cca46a4aa81c8
sha256: "814e9e88f21a176ae1359149021870e87f7cddaf633ab678a5d2b0bff7fd1ba8"
url: "https://pub.dev"
source: hosted
version: "4.3.3"
version: "4.4.0"
vector_math:
dependency: transitive
description:
@@ -688,10 +688,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
url: "https://pub.dev"
source: hosted
version: "13.0.0"
version: "14.2.1"
web:
dependency: transitive
description:
@@ -704,10 +704,10 @@ packages:
dependency: transitive
description:
name: win32
sha256: "0a989dc7ca2bb51eac91e8fd00851297cfffd641aa7538b165c62637ca0eaa4a"
sha256: a79dbe579cb51ecd6d30b17e0cae4e0ea15e2c0e66f69ad4198f22a6789e94f4
url: "https://pub.dev"
source: hosted
version: "5.4.0"
version: "5.5.1"
wkt_parser:
dependency: transitive
description:
@@ -725,5 +725,5 @@ packages:
source: hosted
version: "1.0.4"
sdks:
dart: ">=3.3.0 <4.0.0"
flutter: ">=3.19.0"
dart: ">=3.4.0 <4.0.0"
flutter: ">=3.22.0"

View File

@@ -1,11 +1,11 @@
// This is a generated file; do not edit or check into version control.
FLUTTER_ROOT=C:\flutter
FLUTTER_APPLICATION_PATH=G:\packages\map_camera_location_flutter
FLUTTER_ROOT=/Users/ashutoshagarwal/Desktop/Development/flutter
FLUTTER_APPLICATION_PATH=/Users/ashutoshagarwal/Documents/GitHub/map_camera_location_flutter
COCOAPODS_PARALLEL_CODE_SIGN=true
FLUTTER_TARGET=lib\main.dart
FLUTTER_TARGET=lib/main.dart
FLUTTER_BUILD_DIR=build
FLUTTER_BUILD_NAME=0.0.4
FLUTTER_BUILD_NUMBER=0.0.4
FLUTTER_BUILD_NAME=0.0.5
FLUTTER_BUILD_NUMBER=0.0.5
EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386
EXCLUDED_ARCHS[sdk=iphoneos*]=armv7
DART_OBFUSCATION=false

View File

@@ -1,12 +1,12 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=C:\flutter"
export "FLUTTER_APPLICATION_PATH=G:\packages\map_camera_location_flutter"
export "FLUTTER_ROOT=/Users/ashutoshagarwal/Desktop/Development/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/ashutoshagarwal/Documents/GitHub/map_camera_location_flutter"
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_TARGET=lib\main.dart"
export "FLUTTER_TARGET=lib/main.dart"
export "FLUTTER_BUILD_DIR=build"
export "FLUTTER_BUILD_NAME=0.0.4"
export "FLUTTER_BUILD_NUMBER=0.0.4"
export "FLUTTER_BUILD_NAME=0.0.5"
export "FLUTTER_BUILD_NUMBER=0.0.5"
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=true"
export "TREE_SHAKE_ICONS=false"

View File

@@ -6,9 +6,58 @@
#import "GeneratedPluginRegistrant.h"
#if __has_include(<camera_avfoundation/CameraPlugin.h>)
#import <camera_avfoundation/CameraPlugin.h>
#else
@import camera_avfoundation;
#endif
#if __has_include(<flutter_compass/FlutterCompassPlugin.h>)
#import <flutter_compass/FlutterCompassPlugin.h>
#else
@import flutter_compass;
#endif
#if __has_include(<geocoding_ios/GeocodingPlugin.h>)
#import <geocoding_ios/GeocodingPlugin.h>
#else
@import geocoding_ios;
#endif
#if __has_include(<geolocator_apple/GeolocatorPlugin.h>)
#import <geolocator_apple/GeolocatorPlugin.h>
#else
@import geolocator_apple;
#endif
#if __has_include(<path_provider_foundation/PathProviderPlugin.h>)
#import <path_provider_foundation/PathProviderPlugin.h>
#else
@import path_provider_foundation;
#endif
#if __has_include(<permission_handler_apple/PermissionHandlerPlugin.h>)
#import <permission_handler_apple/PermissionHandlerPlugin.h>
#else
@import permission_handler_apple;
#endif
#if __has_include(<url_launcher_ios/URLLauncherPlugin.h>)
#import <url_launcher_ios/URLLauncherPlugin.h>
#else
@import url_launcher_ios;
#endif
@implementation GeneratedPluginRegistrant
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry {
[CameraPlugin registerWithRegistrar:[registry registrarForPlugin:@"CameraPlugin"]];
[FlutterCompassPlugin registerWithRegistrar:[registry registrarForPlugin:@"FlutterCompassPlugin"]];
[GeocodingPlugin registerWithRegistrar:[registry registrarForPlugin:@"GeocodingPlugin"]];
[GeolocatorPlugin registerWithRegistrar:[registry registrarForPlugin:@"GeolocatorPlugin"]];
[PathProviderPlugin registerWithRegistrar:[registry registrarForPlugin:@"PathProviderPlugin"]];
[PermissionHandlerPlugin registerWithRegistrar:[registry registrarForPlugin:@"PermissionHandlerPlugin"]];
[URLLauncherPlugin registerWithRegistrar:[registry registrarForPlugin:@"URLLauncherPlugin"]];
}
@end

View File

@@ -11,7 +11,6 @@ export 'package:flutter/rendering.dart';
export 'package:flutter_map/flutter_map.dart';
export 'package:flutter_map_location_marker/flutter_map_location_marker.dart';
export 'package:geocoding/geocoding.dart';
export 'package:geolocator/geolocator.dart';
export 'package:path_provider/path_provider.dart';
export 'package:map_camera_flutter/src/image_and_location_data.dart';

View File

@@ -1,15 +1,51 @@
class ImageAndLocationData {
final String? imagePath;
final String? latitude;
final String? longitude;
final String? locationName;
final String? subLocation;
final LocationData? locationData;
String? get latitude => locationData?.longitude;
String? get longitude => locationData?.longitude;
String? get locationName => locationData?.locationName;
String? get subLocation => locationData?.subLocation;
ImageAndLocationData({
required this.imagePath,
required this.locationData,
});
}
class LocationData {
/// Latitude value of the current location as a string.
final String? latitude;
/// Longitude value of the current location as a string.
final String? longitude;
/// Name of the current location as a string.
final String? locationName;
/// SubLocation of the current location as a string.
final String? subLocation;
LocationData({
required this.latitude,
required this.longitude,
required this.locationName,
required this.subLocation,
});
@override
bool operator ==(Object other) {
return other is LocationData &&
latitude == other.latitude &&
longitude == other.longitude &&
locationName == other.locationName &&
subLocation == other.subLocation;
}
@override
int get hashCode =>
Object.hash(latitude, longitude, locationName, subLocation);
}

View File

@@ -1,7 +1,8 @@
import 'package:geolocator/geolocator.dart';
import 'package:intl/intl.dart';
import 'dart:ui' as ui;
import 'package:latlong2/latlong.dart' as lat;
import '../../map_camera_flutter.dart';
import 'package:map_camera_flutter/map_camera_flutter.dart';
///import 'package:your_app/map_camera_flutter.dart'; // Import the file where the MapCameraLocation widget is defined
@@ -103,19 +104,7 @@ class _MapCameraLocationState extends State<MapCameraLocation> {
/// Represents geocoded location information.
String? latitudeServer;
/// Latitude value of the current location as a string.
String? longitudeServer;
/// Longitude value of the current location as a string.
String? locationName;
/// Name of the current location as a string.
String? subLocation;
LocationData? locationData;
/// SubLocation of the current location as a string.
@@ -123,18 +112,18 @@ class _MapCameraLocationState extends State<MapCameraLocation> {
ImageAndLocationData getImageAndLocationData() {
return ImageAndLocationData(
imagePath: cameraImagePath?.path,
latitude: latitudeServer,
longitude: longitudeServer,
locationName: locationName,
subLocation: subLocation,
locationData: locationData,
);
}
Timer? _positionTimer;
@override
void initState() {
super.initState();
Timer.periodic(const Duration(seconds: 1), (timer) async {
_positionTimer = Timer.periodic(const Duration(seconds: 1), (timer) async {
if (mounted) {
await updatePosition(context);
}
});
// Initialize the camera controller
@@ -154,9 +143,23 @@ class _MapCameraLocationState extends State<MapCameraLocation> {
void dispose() {
_controller.dispose();
_followCurrentLocationStreamController.close();
_positionTimer?.cancel();
super.dispose();
}
@override
void setState(fn) {
if (mounted) {
super.setState(fn);
} else {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
if (mounted) {
super.setState(fn);
}
});
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
@@ -165,7 +168,8 @@ class _MapCameraLocationState extends State<MapCameraLocation> {
future: _initializeControllerFuture,
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.done) {
return RepaintBoundary(
return Center(
child: RepaintBoundary(
key: globalKey,
child: Stack(
children: [
@@ -185,18 +189,19 @@ class _MapCameraLocationState extends State<MapCameraLocation> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding:
const EdgeInsets.symmetric(horizontal: 8.0),
padding: const EdgeInsets.symmetric(
horizontal: 8.0),
child: Card(
elevation: 3,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.0)),
borderRadius:
BorderRadius.circular(8.0)),
child: SizedBox(
// height: 130,
width: 120,
child: Padding(
padding: const EdgeInsets.all(5.0),
child: latitudeServer == null
child: locationData == null
? const Center(
child:
CircularProgressIndicator())
@@ -250,7 +255,8 @@ class _MapCameraLocationState extends State<MapCameraLocation> {
CrossAxisAlignment.start,
children: [
Text(
locationName ?? "Loading...",
locationData?.locationName ??
"Loading...",
maxLines: 1,
overflow: TextOverflow.ellipsis,
softWrap: false,
@@ -263,7 +269,8 @@ class _MapCameraLocationState extends State<MapCameraLocation> {
height: 5,
),
Text(
subLocation ?? "Loading ..",
locationData?.subLocation ??
"Loading ..",
maxLines: 2,
overflow: TextOverflow.ellipsis,
softWrap: false,
@@ -276,7 +283,7 @@ class _MapCameraLocationState extends State<MapCameraLocation> {
height: 5,
),
Text(
"Lat ${latitudeServer ?? "Loading.."}",
"Lat ${locationData?.latitude ?? "Loading.."}",
maxLines: 2,
overflow: TextOverflow.ellipsis,
softWrap: false,
@@ -289,7 +296,7 @@ class _MapCameraLocationState extends State<MapCameraLocation> {
height: 5,
),
Text(
"Long ${longitudeServer ?? "Loading.."}",
"Long ${locationData?.longitude ?? "Loading.."}",
maxLines: 2,
overflow: TextOverflow.ellipsis,
softWrap: false,
@@ -326,6 +333,7 @@ class _MapCameraLocationState extends State<MapCameraLocation> {
),
],
),
),
);
} else {
return const Center(child: CircularProgressIndicator());
@@ -386,10 +394,7 @@ class _MapCameraLocationState extends State<MapCameraLocation> {
if (widget.onImageCaptured != null) {
ImageAndLocationData data = ImageAndLocationData(
imagePath: imgFile.path,
latitude: latitudeServer,
longitude: longitudeServer,
locationName: locationName,
subLocation: subLocation,
locationData: locationData,
);
widget.onImageCaptured!(data);
}
@@ -411,39 +416,43 @@ class _MapCameraLocationState extends State<MapCameraLocation> {
final placeMarks =
await placemarkFromCoordinates(position.latitude, position.longitude);
LocationData locationData;
if (placeMarks.isNotEmpty) {
final placeMark = placeMarks.first;
locationData = LocationData(
latitude: position.latitude.toString(),
longitude: position.longitude.toString(),
locationName:
"${placeMark.locality ?? ""}, ${placeMark.administrativeArea ?? ""}, ${placeMark.country ?? ""}",
subLocation:
"${placeMark.street ?? ""}, ${placeMark.thoroughfare ?? ""} ${placeMark.administrativeArea ?? ""}");
} else {
locationData = LocationData(
longitude: null,
latitude: null,
locationName: 'No Location Data',
subLocation: "");
}
if (locationData != this.locationData) {
// Update the state variables with the retrieved location data
setState(() {
latitudeServer = position.latitude.toString();
longitudeServer = position.longitude.toString();
locationName =
"${placeMark.locality ?? ""}, ${placeMark.administrativeArea ?? ""}, ${placeMark.country ?? ""}";
subLocation =
"${placeMark.street ?? ""}, ${placeMark.thoroughfare ?? ""} ${placeMark.administrativeArea ?? ""}";
this.locationData = locationData;
});
}
if (kDebugMode) {
print(
"Latitude: $latitudeServer, Longitude: $longitudeServer, Location: $locationName");
}
} else {
// Handle case when no placeMark is available
setState(() {
latitudeServer = null;
longitudeServer = null;
locationName = 'No Location Data';
subLocation = '';
});
"Latitude: ${locationData.latitude}, Longitude: ${locationData.longitude}, Location: ${locationData.locationName}");
}
} catch (e) {
// Handle any errors that occurred during location retrieval
setState(() {
latitudeServer = null;
longitudeServer = null;
locationName = 'Error Retrieving Location';
subLocation = '';
locationData = LocationData(
longitude: null,
latitude: null,
locationName: 'Error Retrieving Location',
subLocation: "");
});
}
}

View File

@@ -5,6 +5,12 @@
import FlutterMacOS
import Foundation
import geolocator_apple
import path_provider_foundation
import url_launcher_macos
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
GeolocatorPlugin.register(with: registry.registrar(forPlugin: "GeolocatorPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
}

View File

@@ -1,10 +1,10 @@
// This is a generated file; do not edit or check into version control.
FLUTTER_ROOT=C:\flutter
FLUTTER_APPLICATION_PATH=G:\packages\map_camera_location_flutter
FLUTTER_ROOT=/Users/ashutoshagarwal/Desktop/Development/flutter
FLUTTER_APPLICATION_PATH=/Users/ashutoshagarwal/Documents/GitHub/map_camera_location_flutter
COCOAPODS_PARALLEL_CODE_SIGN=true
FLUTTER_BUILD_DIR=build
FLUTTER_BUILD_NAME=0.0.4
FLUTTER_BUILD_NUMBER=0.0.4
FLUTTER_BUILD_NAME=0.0.5
FLUTTER_BUILD_NUMBER=0.0.5
DART_OBFUSCATION=false
TRACK_WIDGET_CREATION=true
TREE_SHAKE_ICONS=false

View File

@@ -1,11 +1,11 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=C:\flutter"
export "FLUTTER_APPLICATION_PATH=G:\packages\map_camera_location_flutter"
export "FLUTTER_ROOT=/Users/ashutoshagarwal/Desktop/Development/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/ashutoshagarwal/Documents/GitHub/map_camera_location_flutter"
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_BUILD_DIR=build"
export "FLUTTER_BUILD_NAME=0.0.4"
export "FLUTTER_BUILD_NUMBER=0.0.4"
export "FLUTTER_BUILD_NAME=0.0.5"
export "FLUTTER_BUILD_NUMBER=0.0.5"
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=true"
export "TREE_SHAKE_ICONS=false"