TypeError: dart.global.FacebookAuth is not a constructor

TypeError: dart.global.FacebookAuth is not a constructor

flutter_facebook_auth 包添加到您的 Flutter 网络应用程序时出现此错误:
TypeError: dart.global.FacebookAuth is not a constructor

将此添加到正文标签的顶部

  <script>
      var FACEBOOK_APP_ID = "YOUR_FACEBOOK_APP_ID";
      window.fbAsyncInit = function () {
        FB.init({
          appId: FACEBOOK_APP_ID,
          cookie: true,
          xfbml: true,
          version: "v9.0",
        });
        FB.AppEvents.logPageView();
      };
    </script>
    <script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js" ></script>
    <script src="flutter_facebook_auth.js" type="application/javascript" ></script>

参见:https://pub.dev/packages/flutter_facebook_auth#add-support-for-flutter-web