-
Notifications
You must be signed in to change notification settings - Fork 241
Description
Description
i use huawei_location: ^6.14.2+301
Expected behavior
get current location for my user
Current behavior
the function return this response ==>>> Location(provider: null, latitude: null, longitude: null, altitude: null, speed: null, bearing: null, horizontalAccuracyMeters: null, verticalAccuracyMeters: null, speedAccuracyMetersPerSecond: null, bearingAccuracyDegrees: null, time: null, elapsedRealtimeNanos: null)
All the time
Screenshots
If applicable, add screenshots to help explain your issue
my code is
Future<AppLatLng?> getCurrentPosition() async {
final FusedLocationProviderClient _locationService = FusedLocationProviderClient();
await _locationService.initFusedLocationService();
final LocationStatus status = await checkPermission();
if (!status.isGPSEnabled || !status.hasPermission) {
return null;
}
try {
final Location location = await _locationService.getLastLocation();
if (location.latitude != null && location.longitude != null) {
return AppLatLng(location.latitude!, location.longitude!);
}
} catch (e) {
debugPrint('Huawei Location Error: $e');
}
return null;
}
Logs
nothing appears
Environment
- Platform: flutter
- Kit: huawei_location
- Kit Version huawei_location: ^6.14.2+301
- OS Version hawei device nova
- Android Studio version Build #AI-241.19072.14.2412.12360217, built on September 12, 2024
Runtime version: 17.0.11+0-17.0.11b1207.24-11852314 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. - egypt
Other
output of flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.5, on macOS 15.6.1 24G90 darwin-arm64, locale en-EG)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.4)
[✓] Android Studio (version 2022.3)
[✓] Android Studio (version 2024.1)
[✓] IntelliJ IDEA Ultimate Edition (version 2024.3.1)
[✓] IntelliJ IDEA Community Edition (version 2024.3.1)
[✓] VS Code (version 1.103.2)
[✓] Connected device (3 available)
[✓] Network resources
• No issues found!
@fuatbakkal @aktug @ozkulbeng @cagdasmer