0

I am trying a POC on AAD_OAUTH of flutter in my Application and not able to resolve this error below.

Error:

══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following JSNoSuchMethodError was thrown building Builder:
TypeError: Cannot read properties of undefined (reading 'init')
The relevant error-causing widget was:
MaterialApp
lib\main.dart:13
When the exception was thrown, this was the stack:
packages/aad_oauth/helper/web_oauth.dart 36:5                                                                         new
packages/aad_oauth/helper/web_oauth.dart 100:44                                                                       getOAuthConfig
packages/aad_oauth/helper/core_oauth.dart 21:37                                                                       fromConfig
packages/aad_oauth/aad_oauth.dart 13:52                                                                               new
packages/lorritpmp/main.dart 46:26                                                                                    new
packages/lorritpmp/main.dart 29:37                                                                                    createState
packages/flutter/src/widgets/framework.dart 4964:24                                                                   new
packages/flutter/src/widgets/framework.dart 763:38                                                                    createElement
packages/flutter/src/widgets/framework.dart 3858:41                                                                   inflateWidget
packages/flutter/src/widgets/framework.dart 3592:18                                                                   updateChild
packages/flutter/src/widgets/framework.dart 6300:14                                                                   mount
packages/flutter/src/widgets/framework.dart 3863:15                                                                   inflateWidget
packages/flutter/src/widgets/framework.dart 3592:18                                                                   updateChild
packages/flutter/src/widgets/framework.dart 4904:16                                                                   performRebuild

My Code for the same is:

static final Config config = Config(
    tenant: "<TENANT NAME>",
    clientId: "<Client ID>",
    scope: "<scope>",
    redirectUri: "redirect uri from azure",
    isB2C: true,
    policy: "USER FLOW",
    navigatorKey: navigatorKey,
  );
  final AadOAuth oauth = AadOAuth(config);

How can I solve this Problem?

Thanks.

0 Answers0