InjectedAuthImp<T, P> constructor

InjectedAuthImp<T, P>({
  1. required IAuth<T, P> repoCreator(),
  2. T? unsignedUser,
  3. required P param()?,
  4. required void onSigned(
    1. T s
    )?,
  5. required void onUnsigned()?,
  6. required Duration autoSignOut(
    1. T auth
    )?,
  7. required FutureOr<Stream<T>> onAuthStream(
    1. IAuth<T, P> repo
    )?,
  8. required StateInterceptor<T>? stateInterceptor,
  9. required SideEffects<T>? sideEffects,
  10. required PersistState<T> persist()?,
  11. required String? debugPrintWhenNotifiedPreMessage,
  12. required Object? toDebugString(
    1. T?
    )?,
})

Injected state that is responsible for authenticating and authorization of a user.

Implementation

InjectedAuthImp({
  required this.repoCreator,
  this.unsignedUser,
  required this.param,
  required this.onSigned,
  required this.onUnsigned,
  required this.autoSignOut,
  required this.onAuthStream,
  //
  required StateInterceptor<T>? stateInterceptor,
  required this.sideEffects,
  required PersistState<T> Function()? persist,
  required String? debugPrintWhenNotifiedPreMessage,
  required Object? Function(T?)? toDebugString,
}) : super(
        creator: () => unsignedUser as T,
        initialState: unsignedUser,
        sideEffects: sideEffects,
        stateInterceptor: stateInterceptor,
        persist: persist,
        undoStackLength: 0,
        dependsOn: null,
        autoDisposeWhenNotUsed: false,
        debugPrintWhenNotifiedPreMessage: debugPrintWhenNotifiedPreMessage,
        toDebugString: toDebugString,
        watch: null,
      );