title: Flutter 2.0 - The method 'configure' isn't defined for the type 'FirebaseMessaging'
body: <p>I am a newbie to flutter. I just upgraded a project built for me to flutter 2.0 and I am not certain how to resolve this particular issue. I have googled and found examples. I understand there is improvement here which potentially resolves one of the issues my app was facing. But I do not know enough to know how to adjust this particular section of code because it is more complicated than any examples I can find online. Hoping someone can point me in the right direction.</p>
  <pre><code>void initFCMNotification() {
      _firebaseMessaging.configure(
        onMessage: (Map&lt;String, dynamic&gt; message) async {
          mapEntry = message;
          String type =
              message['Notificationtype'] ?? message['data']['Notificationtype'];
          print(&quot;notification onMessage $type&quot;);
  
          if (type == '5' || type == '11' || type == '3') {
            Function reload = context.read&lt;EventsProvider&gt;().reload;
            Future.delayed(Duration(seconds: 1), () {
              reload(true);
            });
          } else if (type == '4') {
            var notification = getNotification(message);
            nav.currentState.push(MaterialPageRoute(
                builder: (context) =&gt; MeetAgainScreen(notification)));
          }
          if (type != '11') {
            if (Platform.isIOS) {
              notiType = message['Notificationtype'];
              print('isIOS on message ${message['aps']['alert']['title']}');
              if (type == &quot;0&quot;) {
                reloadData(type, message);
              } else {
                showSilentNotification(flutterLocalNotificationsPlugin,
                    title:
                        &quot;${message['title'] ?? message['aps']['alert']['title'] ?? message['notification']['title'] ?? ''}&quot;,
                    payload: &quot;${message['Notificationtype'] ?? ''}&quot;,
                    body:
                        &quot;${message['body'] ?? message['aps']['alert']['body'] ?? message['notification']['body'] ?? ''}&quot;,
                    id: 1);
              }
            } else if (Platform.isAndroid) {
              notiType = message['data']['Notificationtype'];
  
              print('Android on message /*${message['data']['body']}*/');
              if (type == &quot;0&quot;) {
                reloadData(type, message);
              } else {
                showSilentNotification(flutterLocalNotificationsPlugin,
                    title:
                        &quot;${message['data']['title'] ?? message['notification']['title'] ?? ''}&quot;,
                    payload: &quot;${message['data']['Notificationtype'] ?? ''}&quot;,
                    body:
                        &quot;${message['data']['body'] ?? message['notification']['body'] ?? ''}&quot;,
                    id: 1);
              }
            }
          }
  </code></pre>