at_widgets
at_widgets copied to clipboard
bug(onboarding_flutter): There are 3 places to specify rootDomain in at_onboarding_flutter
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.