Onboarding constructor
Onboarding({
- Key? key,
- required BuildContext context,
- bool? hideReferences,
- bool? hideQrScan,
- String? atsign,
- required dynamic onboard(),
- required dynamic onError(),
- Widget? nextScreen,
- Widget? fistTimeAuthNextScreen,
- required AtClientPreference atClientPreference,
- Color? appColor,
- Widget? logo,
- String? domain,
- required RootEnvironment rootEnvironment,
- String? appAPIKey,
Implementation
Onboarding(
{Key? key,
required this.context,
this.hideReferences,
this.hideQrScan,
this.atsign,
required this.onboard,
required this.onError,
this.nextScreen,
this.fistTimeAuthNextScreen,
required this.atClientPreference,
this.appColor,
this.logo,
this.domain,
required this.rootEnvironment,
this.appAPIKey}) {
AppConstants.rootEnvironment = rootEnvironment;
if (AppConstants.rootEnvironment == RootEnvironment.Production &&
appAPIKey == null) {
throw ('App API Key is required for production environment');
} else {
_show();
}
}