Open ARoSistemas opened 1 year ago
yes same issue any fix..? this is after the recent updates on flutter side
@ARoSistemas can you post your pubspec.yaml
Resolved!!!!!
1.- flutter doctor
Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 3.0.5, on Microsoft Windows [Versi¢n 10.0.22000.978], locale es-MX) [√] Android toolchain - develop for Android devices (Android SDK version 33.0.0) [√] Chrome - develop for the web [√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.6) [√] Android Studio (version 2021.2) [√] VS Code (version 1.69.2) [√] Connected device (6 available) [√] HTTP Host Availability
2.- In Pubspec.yml add this
**background_locator_2: ^2.0.5**
the version 1 to backgroud locator **not works on Flutter 3**
Remember :: The version of Dart is 3.0.2 only.
I test with version 3.3.2 and NOT WORKS
@jesussmile check it, and comments your results
Resolved!!!!!
1.- flutter doctor
Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 3.0.5, on Microsoft Windows [Versi¢n 10.0.22000.978], locale es-MX) [√] Android toolchain - develop for Android devices (Android SDK version 33.0.0) [√] Chrome - develop for the web [√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.6) [√] Android Studio (version 2021.2) [√] VS Code (version 1.69.2) [√] Connected device (6 available) [√] HTTP Host Availability
2.- In Pubspec.yml add this
**background_locator_2: ^2.0.5** the version 1 to backgroud locator **not works on Flutter 3**
Remember :: The version of Dart is 3.0.2 only.
I test with version 3.3.2 and NOT WORKS
@jesussmile check it, and comments your results
Thanx works fine .
Add @pragma('vm:entry-point') in location_callback_handler.dart file
@pragma('vm:entry-point')
static Future<void> callback(LocationDto locationDto) async {
LocationServiceRepository myLocationCallbackRepository = LocationServiceRepository();
await myLocationCallbackRepository.callback(locationDto);
}
Upgrade my proyect to:
Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 3.3.2, on Microsoft Windows [Versi¢n 10.0.22000.978], locale es-MX) [√] Android toolchain - develop for Android devices (Android SDK version 33.0.0) [√] Chrome - develop for the web [√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.6) [√] Android Studio (version 2021.2) [√] VS Code (version 1.69.2) [√] Connected device (4 available) [√] HTTP Host Availability
and plugin not works!
debug console::
Launching lib\main.dart on SM A225M in debug mode... e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\background_locator-1.6.12\android\src\main\kotlin\rekab\app\background_locator\BackgroundLocatorPlugin.kt: (25, 1): Class 'BackgroundLocatorPlugin' is not abstract and does not implement abstract member public abstract fun onNewIntent(p0: Intent): Boolean defined in io.flutter.plugin.common.PluginRegistry.NewIntentListener e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\background_locator-1.6.12\android\src\main\kotlin\rekab\app\background_locator\BackgroundLocatorPlugin.kt: (215, 43): Type mismatch: inferred type is Map<Any, Any>? but Map<Any, Any> was expected e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\background_locator-1.6.12\android\src\main\kotlin\rekab\app\background_locator\BackgroundLocatorPlugin.kt: (215, 48): Type mismatch: inferred type is Map<Any, Any>? but Map<Any, Any> was expected e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\background_locator-1.6.12\android\src\main\kotlin\rekab\app\background_locator\BackgroundLocatorPlugin.kt: (224, 43): Type mismatch: inferred type is Map<Any, Any>? but Map<Any, Any> was expected e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\background_locator-1.6.12\android\src\main\kotlin\rekab\app\background_locator\BackgroundLocatorPlugin.kt: (224, 48): Type mismatch: inferred type is Map<Any, Any>? but Map<Any, Any> was expected e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\background_locator-1.6.12\android\src\main\kotlin\rekab\app\background_locator\BackgroundLocatorPlugin.kt: (243, 43): Type mismatch: inferred type is Map<Any, Any>? but Map<Any, Any> was expected e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\background_locator-1.6.12\android\src\main\kotlin\rekab\app\background_locator\BackgroundLocatorPlugin.kt: (243, 48): Type mismatch: inferred type is Map<Any, Any>? but Map<Any, Any> was expected
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\background_locator-1.6.12\android\src\main\kotlin\rekab\app\background_locator\BackgroundLocatorPlugin.kt: (266, 5): 'onNewIntent' overrides nothing e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\background_locator-1.6.12\android\src\main\kotlin\rekab\app\background_locator\BackgroundLocatorPlugin.kt: (275, 35): Type mismatch: inferred type is BinaryMessenger? but BinaryMessenger was expected e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\background_locator-1.6.12\android\src\main\kotlin\rekab\app\background_locator\IsolateHolderExtension.kt: (42, 27): Type mismatch: inferred type is BinaryMessenger? but BinaryMessenger was expected
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\background_locator-1.6.12\android\src\main\kotlin\rekab\app\background_locator\IsolateHolderService.kt: (269, 35): Type mismatch: inferred type is BinaryMessenger? but BinaryMessenger was expected e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\background_locator-1.6.12\android\src\main\kotlin\rekab\app\background_locator\pluggables\DisposePluggable.kt: (17, 51): Type mismatch: inferred type is BinaryMessenger? but BinaryMessenger was expected e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\background_locator-1.6.12\android\src\main\kotlin\rekab\app\background_locator\pluggables\InitPluggable.kt: (22, 55): Type mismatch: inferred type is BinaryMessenger? but BinaryMessenger was expected
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':background_locator:compileDebugKotlin'.
Try:
Get more help at https://help.gradle.org
BUILD FAILED in 8s Exception: Gradle task assembleDebug failed with exit code 1 Exited (sigterm)
so, searching looking for, I found ::
https://github.com/imsamgarg/background_locator
And add to pubspec.yml
background_locator: git: url: https://github.com/imsamgarg/background_locator ref: master
And works only on debug mode !!!
when I run flutter on console ::
flutter run --release
the plugin not works again!!!!!
errors ::
E/flutter (11228): [ERROR:flutter/shell/common/shell.cc(93)] Dart Error: Dart_LookupLibrary: library 'package:myprojectone/repository/location_callback_handler.dart' not found.