CaseWidget<T> constructor

const CaseWidget<T>({
  1. Key? key,
  2. required T? activeCase,
  3. required Map<T, WidgetBuilder> builders,
  4. WidgetBuilder? placeholder,
  5. CrossTransition? transition,
  6. Map<T, CrossTransition>? transitions,
  7. bool autoKey = true,
  8. bool reverseOrder = false,
  9. bool reverseAnimation = false,
  10. bool soft = true,
})

Resolves what to show by activeCase. Every Widget has custom case T key and is build only if case is active. Only one Widget is shown at given time.

When case is changed CrossTransition animation is played between current and next Widget.

Implementation

const CaseWidget({
  Key? key,
  required this.activeCase,
  required this.builders,
  this.placeholder,
  this.transition,
  this.transitions,
  this.autoKey = true,
  this.reverseOrder = false,
  this.reverseAnimation = false,
  this.soft = true,
}) : super(key: key);