build method

  1. @override
Widget build(
  1. BuildContext context,
  2. bool selected,
  3. VoidCallback? onPressed, {
  4. PaneDisplayMode? displayMode,
  5. bool showTextOnTop = true,
  6. ValueChanged<PaneItem>? onItemPressed,
  7. bool? autofocus,
  8. int? itemIndex,
})
override

Used to construct the pane items all around NavigationView. You can customize how the pane items should look like by overriding this method

Implementation

@override
Widget build(
  BuildContext context,
  bool selected,
  VoidCallback? onPressed, {
  PaneDisplayMode? displayMode,
  bool showTextOnTop = true,
  ValueChanged<PaneItem>? onItemPressed,
  bool? autofocus,
  int? itemIndex,
}) {
  final maybeBody = _InheritedNavigationView.maybeOf(context);
  final mode = displayMode ??
      maybeBody?.displayMode ??
      maybeBody?.pane?.displayMode ??
      PaneDisplayMode.minimal;

  return KeyedSubtree(
    key: key,
    child: _PaneItemExpander(
      key: expanderKey,
      item: this,
      items: items,
      displayMode: mode,
      showTextOnTop: showTextOnTop,
      selected: selected,
      onPressed: onPressed,
      onItemPressed: onItemPressed,
      initiallyExpanded: initiallyExpanded,
    ),
  );
}