title: MissingPluginException(No implementation found for method initialize on channel dexterous.com/flutter/local_notifications)
body: <p>I am trying to setup the most basic version of flutter local notifications but I keep getting this error</p>
  <pre><code>[ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: MissingPluginException(No implementation found for method initialize on channel dexterous.com/flutter/local_notifications)
  </code></pre>
  <p>When looking at my autogenerated plugin registrant java file</p>
  <pre><code>package io.flutter.plugins;
  
  import androidx.annotation.Keep;
  import androidx.annotation.NonNull;
  
  import io.flutter.embedding.engine.FlutterEngine;
  
  /**
   * Generated file. Do not edit.
   * This file is generated by the Flutter tool based on the
   * plugins that support the Android platform.
   */
  @Keep
  public final class GeneratedPluginRegistrant {
    public static void registerWith(@NonNull FlutterEngine flutterEngine) {
      flutterEngine.getPlugins().add(new io.flutter.plugins.firebase.firestore.FlutterFirebaseFirestorePlugin());
      flutterEngine.getPlugins().add(new io.flutter.plugins.firebase.auth.FlutterFirebaseAuthPlugin());
      flutterEngine.getPlugins().add(new io.flutter.plugins.firebase.core.FlutterFirebaseCorePlugin());
      flutterEngine.getPlugins().add(new io.flutter.plugins.firebasedynamiclinks.FirebaseDynamicLinksPlugin());
      flutterEngine.getPlugins().add(new io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingPlugin());
      flutterEngine.getPlugins().add(new io.flutter.plugins.firebase.storage.FlutterFirebaseStoragePlugin());
      flutterEngine.getPlugins().add(new com.byneapp.flutter_config.FlutterConfigPlugin());
      flutterEngine.getPlugins().add(new app.meedu.flutter_facebook_auth.FlutterFacebookAuthPlugin());
      flutterEngine.getPlugins().add(new com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin());
      flutterEngine.getPlugins().add(new io.flutter.plugins.googlesignin.GoogleSignInPlugin());
    }
  }
  </code></pre>
  <p>I find that the plugin seems to be registered. So why does it throw the error then. This is the code I use</p>
  <pre><code>import 'package:flutter_local_notifications/flutter_local_notifications.dart';
  
  class FirebaseMessagingProvider extends PushNotificationProvider {
    final FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin();
  
    FirebaseMessagingProvider() {
      initializeLocalNotifications();
    }
  
    Future&lt;void&gt; initializeLocalNotifications() async {
        const AndroidInitializationSettings initializationSettingsAndroid =
        AndroidInitializationSettings('app_icon');
  
      const AndroidNotificationChannel channel = AndroidNotificationChannel(
        'high_importance_channel', // id
        'High Importance Notifications', // title
        'This channel is used for important notifications.', // description
        importance: Importance.max,
      );
  
      final InitializationSettings initializationSettings =
          InitializationSettings(android: initializationSettingsAndroid);
  
      await flutterLocalNotificationsPlugin.initialize(initializationSettings,
          onSelectNotification: (_) async =&gt; print(&quot;notified&quot;));
  
      await flutterLocalNotificationsPlugin
          .resolvePlatformSpecificImplementation&lt;AndroidFlutterLocalNotificationsPlugin&gt;()
          ?.createNotificationChannel(channel);
    }
  }
  </code></pre>
  <p>The error is being thrown at this line</p>
  <pre><code>await flutterLocalNotificationsPlugin.initialize(initializationSettings,
      onSelectNotification: (_) async =&gt; print(&quot;notified&quot;));
  </code></pre>
  <p>I looked at the following github issue</p>
  <p><a href="https://github.com/MaikuB/flutter_local_notifications/issues/238" rel="nofollow noreferrer">https://github.com/MaikuB/flutter_local_notifications/issues/238</a></p>
  <p>but it seems to be targeted mostly at flutter 1 projects where you had to register the plugins yourself. I did try with the application.kt but it did not work.</p>
  <p>So why am a getting this error?</p>
  <p>Flutter version: Flutter 2.2.0 • channel stable • <a href="https://github.com/flutter/flutter.git" rel="nofollow noreferrer">https://github.com/flutter/flutter.git</a>
  flutter_local_notifications: ^6.0.0</p>