diff --git a/android/app/build.gradle b/android/app/build.gradle index a9c7f15..04876ec 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -33,8 +33,8 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "tk.shivamgoyal.google_maps_in_flutter" - minSdkVersion 16 + applicationId "co.shivamgoyal.googleofficelocations" + minSdkVersion 21 targetSdkVersion 28 versionCode flutterVersionCode.toInteger() versionName flutterVersionName diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index 0053f2f..f25a359 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="co.shivamgoyal.googleofficelocations"> diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index cca9d77..697852f 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,9 +1,7 @@ + package="co.shivamgoyal.googleofficelocations"> - - diff --git a/lib/main.dart b/lib/main.dart index aec34bc..49fc4a3 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; -import 'package:permission_handler/permission_handler.dart'; import 'src/locations.dart' as locations; void main() => runApp(MyApp()); @@ -11,32 +10,9 @@ class MyApp extends StatefulWidget { } class _MyAppState extends State { - PermissionStatus _status; - @override void initState() { super.initState(); - PermissionHandler() - .checkPermissionStatus(PermissionGroup.locationWhenInUse) - .then(_updateStatus); - } - - void _updateStatus(PermissionStatus status) { - if (status != _status) { - setState(() { - _status = status; - }); - } - } - - void _askPermission() { - PermissionHandler().requestPermissions( - [PermissionGroup.locationWhenInUse]).then(_onStatusRequested); - } - - void _onStatusRequested(Map statuses) { - final status = statuses[PermissionGroup.locationWhenInUse]; - _updateStatus(status); } final Map _markers = {}; @@ -64,9 +40,6 @@ class _MyAppState extends State { debugShowCheckedModeBanner: false, home: Scaffold( appBar: AppBar( - actions: [ - IconButton(icon: Icon(Icons.my_location), onPressed: _askPermission) - ], title: const Text('Google Office Locations'), backgroundColor: Colors.white, ), @@ -81,7 +54,6 @@ class _MyAppState extends State { tiltGesturesEnabled: true, compassEnabled: true, rotateGesturesEnabled: true, - myLocationEnabled: true, ), ), theme: ThemeData( diff --git a/pubspec.lock b/pubspec.lock index 66d6db2..3951094 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -305,13 +305,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.5.0" - permission_handler: - dependency: "direct main" - description: - name: permission_handler - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" pool: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index babe9f7..ad84e7d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,9 @@ name: GoogleOfficeLocations description: An app featuring Google office locations on Map using the Flutter SDK. version: 1.0.0+1 +author: Shivam Goyal +homepage: https://shivamgoyal.co +repository: https://github.com/ShivamGoyal1899/GoogleOfficeLocations environment: sdk: ">=2.1.0 <3.0.0" @@ -12,7 +15,6 @@ dependencies: http: ^0.12.0+1 json_serializable: ^2.0.2 cupertino_icons: ^0.1.2 - permission_handler: 2.1.0 dev_dependencies: flutter_test: