DefaultKeyedTabController<K>.fromKeys constructor

const DefaultKeyedTabController<K>.fromKeys({
  1. Key? key,
  2. required Widget child,
  3. required List<K> keys,
  4. Duration? animationDuration,
  5. K? initialKey,
  6. ValueChanged<K?>? onChanged,
})

Provides KeyedTabController that is created from keys and initialKey.

If on sequential builds keys or animationDuration will change, the existing controller will be preserved and updated.

Implementation

const factory DefaultKeyedTabController.fromKeys({
  Key? key,
  required Widget child,
  required List<K> keys,
  Duration? animationDuration,
  K? initialKey,
  ValueChanged<K?>? onChanged,
}) = DefaultKeyedTabControllerFromKeys<K>;