sodipto / flutter-phone-state-background

MIT License
5 stars 7 forks source link

probleme in release mode #1

Closed dongosiddik closed 1 year ago

dongosiddik commented 1 year ago

[When I am in debug mode, the caller package works fine, but when I switch to release mode, it cannot find the caller package. What should I do?

E/flutter (31645): [ERROR:flutter/shell/common/shell.cc(89)] Dart Error: Dart_LookupLibrary: library 'package:phone_state_background/phone_state_background.dart' not found. E/flutter (31645): [ERROR:flutter/runtime/dart_isolate.cc(668)] Could not resolve main entrypoint function. E/flutter (31645): [ERROR:flutter/runtime/dart_isolate.cc(168)] Could not run the run main Dart entrypoint. E/flutter (31645): [ERROR:flutter/runtime/runtime_controller.cc(417)] Could not create root isolate. E/flutter (31645): [ERROR:flutter/shell/common/shell.cc(606)] Could not launch engine with configuration.

sodipto commented 1 year ago

@dongosiddik What is your flutter sdk version?

dongosiddik commented 1 year ago

@sodipto my flutter sdk version is 3.7.12 image

sodipto commented 1 year ago

@dongosiddik I will be check it again. If there is any problem I will let you know right away. Thank you.

dongosiddik commented 1 year ago

@sodipto Thank you very much, I'm always listening.

sodipto commented 1 year ago

@dongosiddik I fixed this issue. Please use phone_state_background: ^0.0.3 this version.

@pragma('vm:entry-point') // Be sure to annotate your callback function to avoid issues in release mode.

See Example

image