title: error: The method 'configure' isn't defined for the type 'FirebaseMessaging' in flutter
body: <p>I wrote a code some time ago, now when I'm using it again, it shows me an error saying that <code>configure</code> isn't defined. Can someone edit this code, so it can be used in latest version of flutter? I tried changing some syntax bit can't convert the code.</p>
  <p>Code-</p>
  <pre><code>_initFirebaseMessaging() {
      firebaseMessaging.configure(
        onMessage: (Map&lt;String, dynamic&gt; message) {
          print('AppPushs onMessage : $message');
          _showNotification(message);
          return;
        },
        onBackgroundMessage: Platform.isIOS ? null : myBackgroundMessageHandler,
        onResume: (Map&lt;String, dynamic&gt; message) {
          print('AppPushs onResume : $message');
          Navigator.pushNamed(context, message['data']['action']);
  
          return;
        },
        onLaunch: (Map&lt;String, dynamic&gt; message) {
          print('AppPushs onLaunch : $message');
          Navigator.pushNamed(context, message['data']['action']);
  
          return;
        },
      );
      // firebaseMessaging.requestNotificationPermissions(
      // const IosNotificationSettings(sound: true, badge: true, alert: true));
      firebaseMessaging.requestPermission(
        sound: true,
        alert: true,
        badge: true,
      );
    }
  </code></pre>