Widget.navigationRail constructor Null safety

const Widget.navigationRail(
  1. {Key? key,
  2. Color? backgroundColor,
  3. @Default(false) bool extended,
  4. Widget? leading,
  5. Widget? trailing,
  6. required List<NavigationRailDestination> destinations,
  7. required int? selectedIndex,
  8. IntSelectionCallback? onDestinationSelected,
  9. double? elevation,
  10. double? groupAlignment,
  11. NavigationRailLabelType? labelType,
  12. TextStyle? unselectedLabelTextStyle,
  13. TextStyle? selectedLabelTextStyle,
  14. IconThemeData? unselectedIconTheme,
  15. IconThemeData? selectedIconTheme,
  16. double? minWidth,
  17. double? minExtendedWidth,
  18. bool? useIndicator,
  19. Color? indicatorColor,
  20. ShapeBorder? indicatorShape}
)

Implementation

const factory Widget.navigationRail({
  Key? key,
  Color? backgroundColor,
  @Default(false) bool extended,
  Widget? leading,
  Widget? trailing,
  required List<NavigationRailDestination> destinations,
  required int? selectedIndex,
  IntSelectionCallback? onDestinationSelected,
  double? elevation,
  double? groupAlignment,
  NavigationRailLabelType? labelType,
  TextStyle? unselectedLabelTextStyle,
  TextStyle? selectedLabelTextStyle,
  IconThemeData? unselectedIconTheme,
  IconThemeData? selectedIconTheme,
  double? minWidth,
  double? minExtendedWidth,
  bool? useIndicator,
  Color? indicatorColor,
  ShapeBorder? indicatorShape,
}) = NavigationRail;