KeyedStack<T> constructor

KeyedStack<T>({
  1. Key? key,
  2. AlignmentGeometry alignment = AlignmentDirectional.topStart,
  3. TextDirection? textDirection,
  4. StackFit sizing = StackFit.loose,
  5. required T itemKey,
  6. required Map<T, Widget> children,
})

Implementation

KeyedStack({
  super.key,
  super.alignment,
  super.textDirection,
  super.sizing,
  required T itemKey,
  required Map<T, Widget> children,
}) : super(
        index: max(children.keys.toList(growable: false).indexOf(itemKey), 0),
        children: children.values.toList(growable: false),
      );