ReactiveStatus<T> constructor

ReactiveStatus<T>(
  1. Map<T, Widget Function()> cases, {
  2. Key? key,
  3. Widget defaultCase()?,
  4. Key? reactiveKey,
})

Creates a ReactiveStatus widget that reacts to changes in the global status of type T.

cases must be provided to map each status to a widget builder. If reactiveKey is not provided, it defaults to the runtime type of T.

Implementation

ReactiveStatus(
  this.cases, {
  super.key,
  this.defaultCase,
  Key? reactiveKey,
}) : reactiveKey = reactiveKey ?? ValueKey(T);