RegistrationOptions constructor

RegistrationOptions({
  1. RegistrationRepository? registrationRepository,
  2. List<AuthStep>? registrationSteps,
  3. required VoidCallback afterRegistration,
  4. int? titleFlex,
  5. int? formFlex,
  6. int? beforeTitleFlex,
  7. int? afterTitleFlex,
  8. RegistrationTranslations registrationTranslations = const RegistrationTranslations.empty(),
  9. int? onError(
    1. String error
    )?,
  10. AppBar customAppbarBuilder(
    1. String title
    )? = _createCustomAppBar,
  11. Widget nextButtonBuilder(
    1. Future<void> onPressed()?,
    2. String label,
    3. int step,
    4. bool enabled,
    )?,
  12. Widget? previousButtonBuilder(
    1. VoidCallback onPressed,
    2. String label,
    3. int step
    )?,
  13. MainAxisAlignment? buttonMainAxisAlignment,
  14. Color? backgroundColor,
  15. Widget? titleWidget,
  16. Widget? loginButton,
  17. double? maxFormWidth,
})

Implementation

RegistrationOptions({
  this.registrationRepository,
  this.registrationSteps,
  required this.afterRegistration,
  this.titleFlex,
  this.formFlex,
  this.beforeTitleFlex,
  this.afterTitleFlex,
  this.registrationTranslations = const RegistrationTranslations.empty(),
  this.onError,
  this.customAppbarBuilder = _createCustomAppBar,
  this.nextButtonBuilder,
  this.previousButtonBuilder,
  this.buttonMainAxisAlignment,
  this.backgroundColor,
  this.titleWidget,
  this.loginButton,
  this.maxFormWidth,
}) {
  if (registrationSteps == null || registrationSteps!.isEmpty) {
    steps = RegistrationOptions.getDefaultSteps();
  } else {
    steps = registrationSteps!;
  }
  registrationRepository ??= ExampleRegistrationRepository();
}