You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
I'm using the same codebase for mobile and web, and I use the Huawei location library. When I run flutter build web, the build crashes during the compilation of the library.
Log:
Target dart2js failed: ProcessException: Process exited abnormally with exit code 1:
../../.pub-cache/hosted/pub.dev/huawei_location-6.12.0+302/lib/src/location/location_request.dart:120:23:
Error: The integer literal 9223372036854775807 can't be represented exactly in JavaScript.
_expirationTime = 9223372036854775807;
Expected Behavior
The build should compile normally.
Current Behavior
The build fails during compilation.
Logs
Target dart2js failed: ProcessException: Process exited abnormally with exit code 1:
../../.pub-cache/hosted/pub.dev/huawei_location-6.12.0+302/lib/src/location/location_request.dart:120:23:
Error: The integer literal 9223372036854775807 can't be represented exactly in JavaScript.
_expirationTime = 9223372036854775807;
^^^^^^^^^^^^^^^^^^^
Environment
Platform: flutter
Kit: huawei_location
Kit Version huawei_location : 6.12.0+302
OS Version WEB
The text was updated successfully, but these errors were encountered:
Huawei Flutter Location Library depend on Huawei Android Location SDK, it is intended to be used with Android only and it is not compatible with web applications, as a workaround, consider using conditional import to exclude Huawei Location library from your web build:
this code was not tested
create empty implementation for Web platform
example path: lib/stubs/huawei_location_stub.dart:
classFusedLocationProviderClient {
// Define the methods and properties used from Huawei Location library.Future<void> getLastLocation() async {
// No implementation for web.
}
// Add other methods as needed.
}
use conditional import to exclude real FusedLocationProviderClient for web
Description
I'm using the same codebase for mobile and web, and I use the Huawei location library. When I run
flutter build web
, the build crashes during the compilation of the library.Log:
Expected Behavior
The build should compile normally.
Current Behavior
The build fails during compilation.
Logs
Environment
The text was updated successfully, but these errors were encountered: