im using permission_handle to take permission for location.
and it always saying "No permissions found in manifest"
even i tried "flutter clean"
import 'package:permission_handler/permission_handler.dart';
class PermissionsService {
final PermissionHandler _permissionHandler = PermissionHandler();
Future<bool> _requestPermission(PermissionGroup permission) async {
var result = await _permissionHandler.requestPermissions([permission]);
if (result[permission] == PermissionStatus.granted) {
print('innnn');
return true;
}
return false;
}
Future<bool> requestLocationPermission({Function onPermissionDenied} ) async {
// return _requestPermission(PermissionGroup.locationWhenInUse);
var granted = await _requestPermission(PermissionGroup.location );
if(!granted){
onPermissionDenied();
}
return granted;
}
}
my Manifest.xml file
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.artistry">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
Add the permissions your app needs to the android/app/src/main/AndroidManifest. xml. Put the permissions in the manifest tag, infront of the application tag.
You can get a Permission 's status , which is either granted , denied , restricted or permanentlyDenied . var status = await Permission. camera. status; if (status.
You added permission in the Wrong Manifest File, You have to add location permission inside Android Manifest of this Directory android\app\src\main\AndroidManifest
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With