diff --git a/.gitignore b/.gitignore index 0d1fb0c..b4151cd 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ .buildlog/ .history .svn/ +.env* # IntelliJ related *.iml diff --git a/android/app/build.gradle b/android/app/build.gradle index 6575340..5c6d597 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -69,7 +69,7 @@ android { release { signingConfig signingConfigs.release shrinkResources false - minifyEnabled true + minifyEnabled false proguardFiles "${background_geolocation.projectDir}/proguard-rules.pro" } debug { diff --git a/lib/location_updates.dart b/lib/location_updates.dart index 76e142f..45c8067 100644 --- a/lib/location_updates.dart +++ b/lib/location_updates.dart @@ -85,7 +85,8 @@ class LocationUpdates { static Future currentLocation() async => bg.BackgroundGeolocation.getCurrentPosition(); static Future isWithinAvailableGeoLocation() async { - var success = await PushNotifications.updateLoggedInUser(); + var location = await LocationUpdates.currentLocation(); + var success = await ApiRepository.isExistsInLocationGate(location); return success; } diff --git a/lib/main.dart b/lib/main.dart index ec14170..51c0d08 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -8,6 +8,7 @@ import 'package:corona_trace/ui_v1_1/notification_location/onboarding_notificati import 'package:corona_trace/ui_v1_1/onboarding_get_started.dart'; import 'package:firebase_crashlytics/firebase_crashlytics.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_dotenv/flutter_dotenv.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:instabug_flutter/Instabug.dart'; import 'package:instabug_flutter/Surveys.dart'; @@ -15,6 +16,7 @@ import 'package:instabug_flutter/Surveys.dart'; import 'utils/app_localization.dart'; void main() async { + await DotEnv().load('.env'); WidgetsFlutterBinding.ensureInitialized(); Crashlytics.instance.enableInDevMode = true; diff --git a/lib/network/airtable/airtable_record.dart b/lib/network/airtable/airtable_record.dart new file mode 100644 index 0000000..c7d0fdc --- /dev/null +++ b/lib/network/airtable/airtable_record.dart @@ -0,0 +1,30 @@ +import 'package:corona_trace/network/airtable/airtable_record_fields.dart'; + +class AirtableRecord { + String _id; + AirtableRecordFields _fields; + String _createdTime; + + String get id => _id; + + AirtableRecordFields get fields => _fields; + + String get createdTime => _createdTime; + + AirtableRecord( + this._id, this._fields, this._createdTime); + + AirtableRecord.map(dynamic obj) { + _id = obj["id"]; + _fields = AirtableRecordFields.map(obj["fields"]); + _createdTime = obj["createdTime"]; + } + + Map toMap() { + var map = {}; + map["Id"] = _id; + map["fields"] = _fields; + map["createdTime"] = _createdTime; + return map; + } +} \ No newline at end of file diff --git a/lib/network/airtable/airtable_record_fields.dart b/lib/network/airtable/airtable_record_fields.dart new file mode 100644 index 0000000..f8ef11c --- /dev/null +++ b/lib/network/airtable/airtable_record_fields.dart @@ -0,0 +1,19 @@ + +class AirtableRecordFields { + String _name; + + String get name => _name; + + AirtableRecordFields( + this._name); + + AirtableRecordFields.map(dynamic obj) { + _name = obj["Name"]; + } + + Map toMap() { + var map = {}; + map["Name"] = _name; + return map; + } +} \ No newline at end of file diff --git a/lib/network/airtable/airtable_repository.dart b/lib/network/airtable/airtable_repository.dart new file mode 100644 index 0000000..3c7beef --- /dev/null +++ b/lib/network/airtable/airtable_repository.dart @@ -0,0 +1,82 @@ +import 'dart:convert' as JSON; + +import 'package:corona_trace/analytics/CTAnalyticsManager.dart'; +import 'package:corona_trace/app_constants.dart'; +import 'package:corona_trace/network/airtable/airtable_response.dart'; +import 'package:corona_trace/network/notification/response_notification.dart'; +import 'package:dio/dio.dart'; +import 'package:flutter_background_geolocation/flutter_background_geolocation.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_dotenv/flutter_dotenv.dart'; +import 'package:http/http.dart' as http; +import 'package:shared_preferences/shared_preferences.dart'; + +class AirtableRepository { + static final AirtableRepository _instance = AirtableRepository._internal(); + + factory AirtableRepository() => _instance; + + static AirtableRepository get instance => _instance; + + AirtableRepository._internal(); + + static BaseOptions dioOptions = + new BaseOptions( + connectTimeout: 15000, + receiveTimeout: 30000, + headers: { + "Authorization":"Bearer ${DotEnv().env['AIRTABLE_API_KEY']}" + }); + static Dio _dio = Dio(dioOptions); + + static const AIRTABLE_API_BASE_URL = "https://api.airtable.com/v0/appeeTR6FdXwMaHYo"; + static const STATES_URL = "$AIRTABLE_API_BASE_URL/States"; + static const COUNTRIES_URL = "$AIRTABLE_API_BASE_URL/Countries"; + static const CITIES_URL = "$AIRTABLE_API_BASE_URL/Cities"; + + static String getAirtableQueryURL(String url, String name) { + return "$url?fields%5B%5D=Name&filterByFormula=AND(%7BAvailability%7D%2C%7BName%7D%3D%22$name%22)"; + } + + static Future checkIfAvailableInStatesList(String state) async { + try { + var url = getAirtableQueryURL(STATES_URL, state); + Response response = await _dio.get(url); + var statusCode = response.statusCode; + debugPrint("$statusCode - $url"); + var records = AirtableResponse.map(response.data).records; + return records.isNotEmpty; + } catch (ex) { + debugPrint('checkIfAvailableInStatesList Failed: $ex'); + throw ex; + } + } + + static Future checkIfAvailableInCountriesList(String country) async { + try { + var url = getAirtableQueryURL(COUNTRIES_URL, country); + Response response = await _dio.get(url); + var statusCode = response.statusCode; + debugPrint("$statusCode - $url"); + var records = AirtableResponse.map(response.data).records; + return records.isNotEmpty; + } catch (ex) { + debugPrint('checkIfAvailableInCountriesList Failed: $ex'); + throw ex; + } + } + + static Future checkIfAvailableInCitiesList(String city) async { + try { + var url = getAirtableQueryURL(CITIES_URL, city); + Response response = await _dio.get(url); + var statusCode = response.statusCode; + debugPrint("$statusCode - $url"); + var records = AirtableResponse.map(response.data).records; + return records.isNotEmpty; + } catch (ex) { + debugPrint('checkIfAvailableInCitiesList Failed: $ex'); + throw ex; + } + } +} diff --git a/lib/network/airtable/airtable_response.dart b/lib/network/airtable/airtable_response.dart new file mode 100644 index 0000000..7ae13d5 --- /dev/null +++ b/lib/network/airtable/airtable_response.dart @@ -0,0 +1,27 @@ +import 'package:corona_trace/network/airtable/airtable_record.dart'; + +class AirtableResponse { + List _records; + String _offset; + + List get records => _records; + + String get offset => _offset; + + AirtableResponse(this._records, this._offset); + + AirtableResponse.map(dynamic obj) { + _records = obj["records"] == null + ? null + : new List.from( + obj["records"].map((x) => AirtableRecord.map(x))); + _offset = obj["offset"] ?? ""; + } + + Map toMap() { + var map = {}; + map["records"] = _records; + map["offset"] = _offset; + return map; + } +} diff --git a/lib/network/api_repository.dart b/lib/network/api_repository.dart index e5a8b5c..5d89dc8 100644 --- a/lib/network/api_repository.dart +++ b/lib/network/api_repository.dart @@ -2,13 +2,18 @@ import 'dart:convert' as JSON; import 'package:corona_trace/analytics/CTAnalyticsManager.dart'; import 'package:corona_trace/app_constants.dart'; +import 'package:corona_trace/network/airtable/airtable_repository.dart'; import 'package:corona_trace/network/notification/response_notification.dart'; import 'package:dio/dio.dart'; import 'package:flutter_background_geolocation/flutter_background_geolocation.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_dotenv/flutter_dotenv.dart'; +import 'package:google_geocoding/google_geocoding.dart' as GoogleGeo; import 'package:http/http.dart' as http; import 'package:shared_preferences/shared_preferences.dart'; +import '../app_constants.dart'; + class ApiRepository { static final ApiRepository _instance = ApiRepository._internal(); @@ -43,8 +48,7 @@ class ApiRepository { var deviceID = await AppConstants.getDeviceId(); var url = "$API_URL/users"; var body = tokenRequestBody(token, deviceID, currentLocation); - Response response = - await _dio.post(url, data: JSON.jsonEncode(body)); + Response response = await _dio.post(url, data: JSON.jsonEncode(body)); var statusCode = response.statusCode; debugPrint("$statusCode - $url"); if (response.statusCode == 200) { @@ -54,9 +58,48 @@ class ApiRepository { return false; } - static Map tokenRequestBody(String token, String deviceID, Location location) => - { - "token": token, + static Future isExistsInLocationGate(Location fromLocation) async { + try { + GoogleGeo.GoogleGeocoding googleGeocoding = + GoogleGeo.GoogleGeocoding(DotEnv().env['API_KEY_GEOCODING']); + var geocodingResponse = await googleGeocoding.geocoding.getReverse( + GoogleGeo.LatLon( + fromLocation.coords.latitude, fromLocation.coords.longitude)); + var address = geocodingResponse.results.first.addressComponents; + Triple csc = extractCSC(address); + return await AirtableRepository.checkIfAvailableInCitiesList(csc.c); + } catch (ex) { + print(ex); + } + return false; + } + + static Triple extractCSC(List address) { + var country; + var state; + var city; + if (address.isNotEmpty) { + address.forEach((addressComponent) { + addressComponent.types.forEach((type) { + if (type == "country") { + country = addressComponent.longName; + } + if (type == "administrative_area_level_1") { + state = addressComponent.longName; + } + if (type == "locality") { + city = addressComponent.longName; + } + }); + }); + } + return Triple(country, state, city); + } + + static Map tokenRequestBody(String token, String deviceID, + Location location) => + { + "token": token, "userId": deviceID, "location": { "latitude": location.coords.latitude, @@ -162,3 +205,11 @@ class ApiRepository { await sharedPrefs.setBool(DID_ALLOW_NOTIFY_WHEN_AVAILABLE, shouldNotify); } } + +class Triple { + T a; + S b; + C c; + + Triple(this.a, this.b, this.c); +} diff --git a/lib/service/push_notifications/push_notifications.dart b/lib/service/push_notifications/push_notifications.dart index 6974796..dad6d0a 100644 --- a/lib/service/push_notifications/push_notifications.dart +++ b/lib/service/push_notifications/push_notifications.dart @@ -118,7 +118,6 @@ class PushNotifications { 'Zero channel', playSound: false, enableVibration: false, - style: AndroidNotificationStyle.BigText, importance: Importance.Max, priority: Priority.High, ); diff --git a/lib/ui_v1_1/notification_location/onboarding_location_permission.dart b/lib/ui_v1_1/notification_location/onboarding_location_permission.dart index 8cdfc40..73c6c84 100644 --- a/lib/ui_v1_1/notification_location/onboarding_location_permission.dart +++ b/lib/ui_v1_1/notification_location/onboarding_location_permission.dart @@ -134,8 +134,6 @@ class OnboardingLocationPermissionState } Future onPremissionAvailable(BuildContext context) async { - showLoadingDialog(tapDismiss: false); - hideLoadingDialog(); navigateNotificationPermission(context); } diff --git a/pubspec.lock b/pubspec.lock deleted file mode 100644 index dc3f5f7..0000000 --- a/pubspec.lock +++ /dev/null @@ -1,829 +0,0 @@ -# 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: "1.0.3" - analyzer: - dependency: transitive - description: - name: analyzer - url: "https://pub.dartlang.org" - source: hosted - version: "0.39.4" - archive: - dependency: transitive - description: - name: archive - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.13" - args: - dependency: transitive - description: - name: args - url: "https://pub.dartlang.org" - source: hosted - version: "1.6.0" - async: - dependency: transitive - description: - name: async - url: "https://pub.dartlang.org" - source: hosted - version: "2.4.1" - background_fetch: - dependency: transitive - description: - name: background_fetch - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.5" - bloc: - dependency: transitive - description: - name: bloc - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - build: - dependency: transitive - description: - name: build - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.2" - build_config: - dependency: transitive - description: - name: build_config - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.2" - build_daemon: - dependency: transitive - description: - name: build_daemon - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.4" - build_resolvers: - dependency: transitive - description: - name: build_resolvers - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.3" - build_runner: - dependency: "direct dev" - description: - name: build_runner - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0" - build_runner_core: - dependency: transitive - description: - name: build_runner_core - url: "https://pub.dartlang.org" - source: hosted - version: "4.5.3" - built_collection: - dependency: transitive - description: - name: built_collection - url: "https://pub.dartlang.org" - source: hosted - version: "4.3.2" - built_value: - dependency: "direct main" - description: - name: built_value - url: "https://pub.dartlang.org" - source: hosted - version: "7.0.9" - built_value_generator: - dependency: "direct dev" - description: - name: built_value_generator - url: "https://pub.dartlang.org" - source: hosted - version: "7.0.9" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.3" - checked_yaml: - dependency: transitive - description: - name: checked_yaml - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.2" - code_builder: - dependency: transitive - description: - name: code_builder - url: "https://pub.dartlang.org" - source: hosted - version: "3.2.1" - collection: - dependency: transitive - description: - name: collection - url: "https://pub.dartlang.org" - source: hosted - version: "1.14.12" - connectivity: - dependency: "direct main" - description: - name: connectivity - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.8+2" - connectivity_macos: - dependency: transitive - description: - name: connectivity_macos - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.0+2" - connectivity_platform_interface: - dependency: transitive - description: - name: connectivity_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.3" - convert: - dependency: transitive - description: - name: convert - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - crypto: - dependency: transitive - description: - name: crypto - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.4" - csslib: - dependency: transitive - description: - name: csslib - url: "https://pub.dartlang.org" - source: hosted - version: "0.16.1" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.3" - dart_style: - dependency: transitive - description: - name: dart_style - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.3" - device_info: - dependency: "direct main" - description: - name: device_info - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.2+1" - dio: - dependency: "direct main" - description: - name: dio - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.9" - equatable: - dependency: transitive - description: - name: equatable - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.1" - firebase_analytics: - dependency: "direct main" - description: - name: firebase_analytics - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.11" - firebase_crashlytics: - dependency: "direct main" - description: - name: firebase_crashlytics - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.3+3" - firebase_messaging: - dependency: "direct main" - description: - name: firebase_messaging - url: "https://pub.dartlang.org" - source: hosted - version: "6.0.13" - fixnum: - dependency: transitive - description: - name: fixnum - url: "https://pub.dartlang.org" - source: hosted - version: "0.10.11" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_background_geolocation: - dependency: "direct main" - description: - name: flutter_background_geolocation - url: "https://pub.dartlang.org" - source: hosted - version: "1.7.1" - flutter_bloc: - dependency: "direct main" - description: - name: flutter_bloc - url: "https://pub.dartlang.org" - source: hosted - version: "3.2.0" - flutter_cache_manager: - dependency: "direct main" - description: - name: flutter_cache_manager - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.3" - flutter_local_notifications: - dependency: "direct main" - description: - name: flutter_local_notifications - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - flutter_local_notifications_platform_interface: - dependency: transitive - description: - name: flutter_local_notifications_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - flutter_localizations: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_plugin_android_lifecycle: - dependency: transitive - description: - name: flutter_plugin_android_lifecycle - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.6" - flutter_screenutil: - dependency: "direct main" - description: - name: flutter_screenutil - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - 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" - geolocator: - dependency: "direct main" - description: - name: geolocator - url: "https://pub.dartlang.org" - source: hosted - version: "5.3.0" - glob: - dependency: transitive - description: - name: glob - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - google_api_availability: - dependency: transitive - description: - name: google_api_availability - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - google_maps_flutter: - dependency: "direct main" - description: - name: google_maps_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.25+1" - graphs: - dependency: transitive - description: - name: graphs - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - html: - dependency: transitive - description: - name: html - url: "https://pub.dartlang.org" - source: hosted - version: "0.14.0+3" - http: - dependency: transitive - description: - name: http - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.0+4" - http_multi_server: - dependency: transitive - description: - name: http_multi_server - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.0" - http_parser: - dependency: transitive - description: - name: http_parser - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.4" - image: - dependency: transitive - description: - name: image - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.12" - image_res: - dependency: "direct dev" - description: - name: image_res - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.3" - instabug_flutter: - dependency: "direct main" - description: - name: instabug_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "9.1.0" - intl: - dependency: transitive - description: - name: intl - url: "https://pub.dartlang.org" - source: hosted - version: "0.16.1" - io: - dependency: transitive - description: - name: io - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.3" - js: - dependency: transitive - description: - name: js - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.1+1" - json_annotation: - dependency: transitive - description: - name: json_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - location_permissions: - dependency: transitive - description: - name: location_permissions - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - logging: - dependency: transitive - description: - name: logging - url: "https://pub.dartlang.org" - source: hosted - version: "0.11.4" - matcher: - dependency: transitive - description: - name: matcher - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.6" - meta: - dependency: transitive - description: - name: meta - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.8" - mime: - dependency: transitive - description: - name: mime - url: "https://pub.dartlang.org" - source: hosted - version: "0.9.6+3" - nested: - dependency: transitive - description: - name: nested - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.4" - node_interop: - dependency: transitive - description: - name: node_interop - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.3" - node_io: - dependency: transitive - description: - name: node_io - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1+2" - package_config: - dependency: transitive - description: - name: package_config - url: "https://pub.dartlang.org" - source: hosted - version: "1.9.3" - package_resolver: - dependency: transitive - description: - name: package_resolver - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.10" - path: - dependency: transitive - description: - name: path - url: "https://pub.dartlang.org" - source: hosted - version: "1.6.4" - path_provider: - dependency: transitive - description: - name: path_provider - url: "https://pub.dartlang.org" - source: hosted - version: "1.6.5" - path_provider_macos: - dependency: transitive - description: - name: path_provider_macos - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.4" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0+1" - permission_handler: - dependency: "direct main" - description: - name: permission_handler - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.0+hotfix.1" - permission_handler_platform_interface: - dependency: transitive - description: - name: permission_handler_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - petitparser: - dependency: transitive - description: - name: petitparser - url: "https://pub.dartlang.org" - source: hosted - version: "2.4.0" - platform: - dependency: transitive - description: - name: platform - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.1" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.2" - pool: - dependency: transitive - description: - name: pool - url: "https://pub.dartlang.org" - source: hosted - version: "1.4.0" - provider: - dependency: transitive - description: - name: provider - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.4" - pub_semver: - dependency: transitive - description: - name: pub_semver - url: "https://pub.dartlang.org" - source: hosted - version: "1.4.4" - pubspec_parse: - dependency: transitive - description: - name: pubspec_parse - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.5" - quiver: - dependency: transitive - description: - name: quiver - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.3" - rxdart: - dependency: transitive - description: - name: rxdart - url: "https://pub.dartlang.org" - source: hosted - version: "0.23.1" - shared_preferences: - dependency: "direct main" - description: - name: shared_preferences - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.6+3" - shared_preferences_macos: - dependency: transitive - description: - name: shared_preferences_macos - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.1+6" - shared_preferences_platform_interface: - dependency: transitive - description: - name: shared_preferences_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.3" - shared_preferences_web: - dependency: transitive - description: - name: shared_preferences_web - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.2+4" - shelf: - dependency: transitive - description: - name: shelf - url: "https://pub.dartlang.org" - source: hosted - version: "0.7.5" - shelf_web_socket: - dependency: transitive - description: - name: shelf_web_socket - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.3" - 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: "0.9.5" - source_span: - dependency: transitive - description: - name: source_span - url: "https://pub.dartlang.org" - source: hosted - version: "1.7.0" - sqflite: - dependency: transitive - description: - name: sqflite - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - sqflite_common: - dependency: transitive - description: - name: sqflite_common - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0+1" - stack_trace: - dependency: transitive - description: - name: stack_trace - url: "https://pub.dartlang.org" - source: hosted - version: "1.9.3" - stream_channel: - dependency: transitive - description: - name: stream_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - stream_transform: - dependency: transitive - description: - name: stream_transform - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.5" - synchronized: - dependency: transitive - description: - name: synchronized - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - test_api: - dependency: transitive - description: - name: test_api - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.15" - timing: - dependency: transitive - description: - name: timing - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.1+2" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.6" - url_launcher: - dependency: "direct main" - description: - name: url_launcher - url: "https://pub.dartlang.org" - source: hosted - version: "5.4.2" - url_launcher_macos: - dependency: transitive - description: - name: url_launcher_macos - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.1+4" - url_launcher_platform_interface: - dependency: transitive - description: - name: url_launcher_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.6" - url_launcher_web: - dependency: transitive - description: - name: url_launcher_web - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.1+1" - uuid: - dependency: "direct main" - description: - name: uuid - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.4" - vector_math: - dependency: transitive - description: - name: vector_math - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.8" - watcher: - dependency: transitive - description: - name: watcher - url: "https://pub.dartlang.org" - source: hosted - version: "0.9.7+14" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - xml: - dependency: transitive - description: - name: xml - url: "https://pub.dartlang.org" - source: hosted - version: "3.6.1" - yaml: - dependency: transitive - description: - name: yaml - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.0" -sdks: - dart: ">=2.7.0 <3.0.0" - flutter: ">=1.12.13+hotfix.5 <2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 416f682..823ab72 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -35,7 +35,7 @@ dependencies: permission_handler: ^5.0.0+hotfix.1 flutter_cache_manager: ^1.1.3 device_info: ^0.4.2+1 - flutter_background_geolocation: ^1.7.0 + flutter_background_geolocation: ^1.7.3 google_maps_flutter: ^0.5.25+1 url_launcher: ^5.4.2 flutter_screenutil: ^1.0.2 @@ -44,6 +44,8 @@ dependencies: cupertino_icons: ^0.1.3 connectivity: ^0.4.8+2 instabug_flutter: ^9.1.0 + google_geocoding: ^0.1.3 + flutter_dotenv: ^2.1.0 dev_dependencies: image_res: ^0.2.3 @@ -64,6 +66,7 @@ flutter: uses-material-design: true assets: + - .env - assets/images/combined_shape.png - assets/images/oval_notification.png - assets/images/map_pin.png