when<TResult extends Object?> method Null safety

  1. @optionalTypeArgs
TResult when<TResult extends Object?>(
  1. TResult $default(
    1. Key? key,
    2. Size preferredSize,
    3. Widget child
    ),
  2. {required TResult appBar(
    1. Key? key,
    2. Widget? leading,
    3. bool automaticallyImplyLeading,
    4. Widget? title,
    5. List<Widget>? actions,
    6. Widget? flexibleSpace,
    7. PreferredSizeWidget? bottom,
    8. double? elevation,
    9. double? scrolledUnderElevation,
    10. Color? shadowColor,
    11. Color? surfaceTintColor,
    12. ShapeBorder? shape,
    13. Color? backgroundColor,
    14. Color? foregroundColor,
    15. bool primary,
    16. bool? centerTitle,
    17. bool excludeHeaderSemantics,
    18. double? titleSpacing,
    19. double toolbarOpacity,
    20. double bottomOpacity,
    21. double? toolbarHeight,
    22. double? leadingWidth,
    23. TextStyle? toolbarTextStyle,
    24. TextStyle? titleTextStyle,
    25. bool forceMaterialTransparency
    ),
  3. required TResult tabBar(
    1. Key? key,
    2. List<Widget> tabs,
    3. bool isScrollable,
    4. IntSelectionCallback? onTap,
    5. EdgeInsets? padding,
    6. Color? indicatorColor,
    7. bool automaticIndicatorColorAdjustment,
    8. double indicatorWeight,
    9. EdgeInsets indicatorPadding,
    10. Decoration? indicator,
    11. TabBarIndicatorSize? indicatorSize,
    12. Color? dividerColor,
    13. Color? labelColor,
    14. TextStyle? labelStyle,
    15. EdgeInsets? labelPadding,
    16. Color? unselectedLabelColor,
    17. TextStyle? unselectedLabelStyle,
    18. DragStartBehavior dragStartBehavior,
    19. MaterialStateProperty? overlayColor,
    20. MouseCursor? mouseCursor,
    21. bool? enableFeedback,
    22. ScrollPhysics? physics,
    23. BorderRadius? splashBorderRadius
    )}
)
@optionalTypeArgs, inherited

Implementation

@optionalTypeArgs
TResult when<TResult extends Object?>(
  TResult Function(Key? key, Size preferredSize, Widget child) $default, {
  required TResult Function(
          Key? key,
          Widget? leading,
          bool automaticallyImplyLeading,
          Widget? title,
          List<Widget>? actions,
          Widget? flexibleSpace,
          PreferredSizeWidget? bottom,
          double? elevation,
          double? scrolledUnderElevation,
          Color? shadowColor,
          Color? surfaceTintColor,
          ShapeBorder? shape,
          Color? backgroundColor,
          Color? foregroundColor,
          bool primary,
          bool? centerTitle,
          bool excludeHeaderSemantics,
          double? titleSpacing,
          double toolbarOpacity,
          double bottomOpacity,
          double? toolbarHeight,
          double? leadingWidth,
          TextStyle? toolbarTextStyle,
          TextStyle? titleTextStyle,
          bool forceMaterialTransparency)
      appBar,
  required TResult Function(
          Key? key,
          List<Widget> tabs,
          bool isScrollable,
          IntSelectionCallback? onTap,
          EdgeInsets? padding,
          Color? indicatorColor,
          bool automaticIndicatorColorAdjustment,
          double indicatorWeight,
          EdgeInsets indicatorPadding,
          Decoration? indicator,
          TabBarIndicatorSize? indicatorSize,
          Color? dividerColor,
          Color? labelColor,
          TextStyle? labelStyle,
          EdgeInsets? labelPadding,
          Color? unselectedLabelColor,
          TextStyle? unselectedLabelStyle,
          DragStartBehavior dragStartBehavior,
          MaterialStateProperty? overlayColor,
          MouseCursor? mouseCursor,
          bool? enableFeedback,
          ScrollPhysics? physics,
          BorderRadius? splashBorderRadius)
      tabBar,
}) =>
    throw _privateConstructorUsedError;