StateWithMixinBuilder<T, R> constructor Null safety

const StateWithMixinBuilder<T, R>(
  1. {Key? key,
  2. dynamic tag,
  3. InjectedBaseState<R> observe(
      )?,
    1. Widget builder(
      1. BuildContext context,
      2. Injected<R>? rm
      )?,
    2. Widget builderWithChild(
      1. BuildContext context,
      2. Injected<R>? rm,
      3. Widget child
      )?,
    3. Widget? child,
    4. void initState(
      1. BuildContext context,
      2. Injected<R>? rm,
      3. T? mix
      )?,
    5. void dispose(
      1. BuildContext context,
      2. Injected<R>? rm,
      3. T? mix
      )?,
    6. void didChangeDependencies(
      1. BuildContext context,
      2. Injected<R>? rm,
      3. T? mix
      )?,
    7. void didUpdateWidget(
      1. BuildContext context,
      2. StateWithMixinBuilder<T, R> oldWidget,
      3. T? mix
      )?,
    8. void afterInitialBuild(
      1. BuildContext context,
      2. Injected<R>? rm
      )?,
    9. void afterRebuild(
      1. BuildContext context,
      2. Injected<R>? rm
      )?,
    10. void didChangeAppLifecycleState(
      1. BuildContext context,
      2. AppLifecycleState state
      )?,
    11. void didChangeLocales(
      1. BuildContext context,
      2. List<Locale>? locale
      )?,
    12. required MixinWith mixinWith}
    )

    StateBuilder that can be mixin with one of the predefined mixin in mixinWith

    Implementation

    const StateWithMixinBuilder({
      Key? key,
      this.tag,
      this.observe,
      // this.observeMany,
      this.builder,
      this.builderWithChild,
      this.child,
      this.initState,
      this.dispose,
      this.didChangeDependencies,
      this.didUpdateWidget,
      this.afterInitialBuild,
      this.afterRebuild,
      this.didChangeAppLifecycleState,
      this.didChangeLocales,
      required this.mixinWith,
    })  : assert(builder != null || builderWithChild != null, '''
    
    | ***Builder not defined***
    | You have to define either 'builder' or 'builderWithChild' parameter.
    | Use 'builderWithChild' with 'child' parameter.
    | If 'child' is null use 'builder' instead.
    
          '''),
          assert(builderWithChild == null || child != null, '''
    | ***child is null***
    | You have defined the 'builderWithChild' parameter without defining the child parameter.
    | Use 'builderWithChild' with 'child' parameter.
    | If 'child' is null use 'builder' instead.
    
          '''),
          super(key: key);