-
Notifications
You must be signed in to change notification settings - Fork 352
Description
- I have read the README
- I have done the setup for Android
- I have done the setup for iOS
- I have ran the sample app and it does not work there
Version
| Technology | Version |
|---|---|
| Workmanager version | 0.9.0+3 |
| Xcode version | 16.2 |
Describe the error
Hello, community. I am registering a periodic task with the work manager package. I have tried calling the method channel with the following code:
void callbackDispatcher() {
Workmanager().executeTask((task, inputData) async {
print("======================================== WorkManager");
await logToFile("======================================== WorkManager");
WidgetsFlutterBinding.ensureInitialized();
print("WorkManager : Task started: $task");
await logToFile("WorkManager : Task started: $task");
print("WorkManager : Input data: $inputData");
await logToFile("WorkManager : Input data: $inputData");
try {
if (task == taskMidnightAPI) {
static const MethodChannel _channel = MethodChannel('mypackage/custom_notifications');
final res = await _channel.invokeMethod('scheduleDailyAlarm', {
'id': id,
'hour': hour,
'minute': minute,
});
}
} catch (e, stackTrace) {
log(e.toString(), error: e, stackTrace: stackTrace, name: "WORK MANAGER(CALL BACK ERROR)");
}
}
But I am getting following error:
MissingPluginException(No implementation found for method scheduleDailyAlarm on channel mypackage/custom_notifications)
Output of flutter doctor -v
[!] Flutter (Channel stable, 3.35.5, on macOS 14.5 23F79 darwin-x64, locale en-US) [2.3s]
β’ Flutter version 3.35.5 on channel stable at /Users/infibraindev/Documents/softwares/flutter_v3.35.5
! Warning: flutter on your path resolves to /Users/infibraindev/Documents/Softwares/flutter_v3.35.5/bin/flutter, which is not inside your current Flutter SDK
checkout at /Users/infibraindev/Documents/softwares/flutter_v3.35.5. Consider adding /Users/infibraindev/Documents/softwares/flutter_v3.35.5/bin to the front of your
path.
! Warning: dart on your path resolves to /Users/infibraindev/Documents/Softwares/flutter_v3.35.5/bin/dart, which is not inside your current Flutter SDK checkout at
/Users/infibraindev/Documents/softwares/flutter_v3.35.5. Consider adding /Users/infibraindev/Documents/softwares/flutter_v3.35.5/bin to the front of your path.
β’ Upstream repository https://github.com/flutter/flutter.git
β’ Framework revision ac4e799d23 (6 weeks ago), 2025-09-26 12:05:09 -0700
β’ Engine revision d3d45dcf25
β’ Dart version 3.9.2
β’ DevTools version 2.48.0
β’ Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-lldb-debugging
β’ If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
[!] Android toolchain - develop for Android devices (Android SDK version 36.0.0) [5.7s]
β’ Android SDK at /Users/infibraindev/Library/Android/sdk
β’ Emulator version 35.6.11.0 (build_id 13610412) (CL:N/A)
β’ Platform android-36.1, build-tools 36.0.0
β’ ANDROID_HOME = /Users/infibraindev/Library/Android/sdk
β’ Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
This is the JDK bundled with the latest Android Studio installation on this machine.
To manually set the JDK path, use: flutter config --jdk-dir="path/to/jdk".
β’ Java version OpenJDK Runtime Environment (build 21.0.6+-13368085-b895.109)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[β] Xcode - develop for iOS and macOS (Xcode 16.2) [5.0s]
β’ Xcode at /Applications/Xcode_16.2.app/Contents/Developer
β’ Build 16C5032a
β’ CocoaPods version 1.16.2
[β] Chrome - develop for the web [23ms]
β’ Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[β] Android Studio (version 2024.3) [21ms]
β’ Android Studio at /Applications/Android Studio.app/Contents
β’ Flutter plugin can be installed from:
π¨ https://plugins.jetbrains.com/plugin/9212-flutter
β’ Dart plugin can be installed from:
π¨ https://plugins.jetbrains.com/plugin/6351-dart
β’ Java version OpenJDK Runtime Environment (build 21.0.6+-13368085-b895.109)
[β] VS Code (version 1.105.1) [18ms]
β’ VS Code at /Applications/Visual Studio Code.app/Contents
β’ Flutter extension version 3.122.0
[β] Connected device (3 available) [7.2s]
β’ sdk gphone16k x86 64 (mobile) β’ emulator-5554 β’ android-x64 β’ Android 16 (API 36) (emulator)
β’ macOS (desktop) β’ macos β’ darwin-x64 β’ macOS 14.5 23F79 darwin-x64
β’ Chrome (web) β’ chrome β’ web-javascript β’ Google Chrome 142.0.7444.60
[β] Network resources [584ms]
β’ All expected network resources are available.