Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(onboarding_flutter): There are 3 places to specify rootDomain in at_onboarding_flutter #929

Open
XavierChanth opened this issue Oct 16, 2024 · 0 comments
Assignees

Comments

@XavierChanth
Copy link
Member

XavierChanth commented Oct 16, 2024

There should only be one.

Example code:

Future<AtClientPreference> loadAtClientPreference(String rootDomain) async {
  var dir = await getApplicationSupportDirectory();

  return AtClientPreference()
    ..rootDomain = rootDomain
    ..namespace = Constants.namespace
    ..hiveStoragePath = dir.path
    ..commitLogPath = dir.path
    ..isLocalStoreRequired = true;
}

    AtOnboardingResult onboardingResult = await AtOnboarding.onboard(
      atsign: atsign,
      // ignore: use_build_context_synchronously
      context: context,
      config: AtOnboardingConfig(
        atClientPreference: await loadAtClientPreference(rootDomain),
        rootEnvironment: RootEnvironment.Production,
        domain: rootDomain,
        appAPIKey: Constants.appAPIKey,
      ),
    );

AtClientPreference, RootEnvironment, and domain all imply the same thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants