NavigationRail constructor Null safety

const NavigationRail(
  1. {Key? key,
  2. Color? backgroundColor,
  3. 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 NavigationRail(
    {final Key? key,
    final Color? backgroundColor,
    final bool extended,
    final Widget? leading,
    final Widget? trailing,
    required final List<NavigationRailDestination> destinations,
    required final int? selectedIndex,
    final IntSelectionCallback? onDestinationSelected,
    final double? elevation,
    final double? groupAlignment,
    final NavigationRailLabelType? labelType,
    final TextStyle? unselectedLabelTextStyle,
    final TextStyle? selectedLabelTextStyle,
    final IconThemeData? unselectedIconTheme,
    final IconThemeData? selectedIconTheme,
    final double? minWidth,
    final double? minExtendedWidth,
    final bool? useIndicator,
    final Color? indicatorColor,
    final ShapeBorder? indicatorShape}) = _$NavigationRail;