dispose property Null safety

(void Function?(BuildContext context, Injected<R>? rm, T? mix)?) dispose
final
StateWithMixinBuilder(
 dispose:(BuildContext context,  TickerProvider ticker)=> myModel.dispose([context, ticker]),
 MixinWith : MixinWith.singleTickerProviderStateMixin
 builder:(BuildContext context, Injected model) =>MyWidget(),
)

Called when this object is removed from the tree permanently.

The second parameter depends on the mixin used. It is a TickerProvider for tickerProviderStateMixin

Implementation

final void Function(BuildContext context, Injected<R>? rm, T? mix)? dispose;