I want to handle the status 'deniedforever', but it seems that the app cannot distinguish between 'denied' and 'deniedforever' because when I check 'denied' it give me true even if the actual status is 'deniedforever'!!
is this a bug in location package? or how can I handle this situation?
var permissionGranted = await location.hasPermission();
if (permissionGranted == locate.PermissionStatus.granted) {
handlePermissionGranted();
} else if (permissionGranted == locate.PermissionStatus.denied) {
handlePermissionDenied();
} else if (permissionGranted == locate.PermissionStatus.deniedForever) {
handlePermissionDeniedForever();
}
location package version: ^4.4.0
run flutter doctor:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, 3.1.0-9.0.pre, on Microsoft Windows [Version 10.0.19043.1826], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Enterprise 2019 16.11.1)
[√] Android Studio (version 2021.1)
[√] Android Studio (version 4.1)
[√] Android Studio (version 4.2)
[√] VS Code (version 1.68.1)
[√] Connected device (4 available)
[√] HTTP Host Availability
• No issues found!
Related
I want to record voice on flutter desktop platform.
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Version 10.0.19042.1526], locale zh-CN)
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.5)
[√] Android Studio (version 2020.3)
[√] IntelliJ IDEA Ultimate Edition (version 2020.3)
[√] Connected device (4 available)
Have you tried with the available flutter packages? If not, then try with flutter_desktop_audio_recorder or record. Both of them supports Windows.
Please follow the readme section for implementation details.
I am using the flutter package flutter_background_service
https://pub.dev/packages/flutter_background_service/example
when the app is resuming, I have this infinite message
Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: plugins.flutter.io/sensors/accelerometer. Response ID XXXX
Flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.10.2, on Microsoft Windows [version 10.0.19042.1526], locale fr-CD)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[✓] Chrome - develop for the web
[✓] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.9.4)
[✓] Android Studio (version 2020.3)
[✓] Android Studio (version 2021.1)
[✓] VS Code (version 1.64.2)
[✓] Connected device (3 available)
[✓] HTTP Host Availability
• No issues found!
You can see this post and this issue.
But unfortunately it's not fixed yet. Maybe this is a bug.
screenshot of error
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Version 10.0.19042.1466], locale en-IN)
[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[√] Chrome - develop for the web
[√] Android Studio (version 2020.3)
[√] VS Code (version 1.63.2)
[√] Connected device (2 available)
• No issues found!
this is my vs code can't find my emulator
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Version 10.0.19042.1415],)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[√] Chrome - develop for the web
[√] Android Studio (version 4.1)
[√] VS Code (version 1.63.2)
[√] Connected device (3 available)
• No issues found!
When I want to start my project the following message appears
Launching lib\main.dart on Chrome in debug mode...
Then Google Chrome starts but it doesn't show anything except a white screen.
I have already reinstalled flutter, Dart SDK and VS Code.
Flutter Doctor:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.2.2, on Microsoft Windows [Version 10.0.19041.1052], locale de-DE)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[√] Chrome - develop for the web
[√] Android Studio (version 4.1.0)
[√] IntelliJ IDEA Community Edition (version 2020.2)
[√] VS Code (version 1.57.1)
[√] Connected device (2 available)