when<TResult extends Object?> method Null safety

  1. @optionalTypeArgs
TResult when<TResult extends Object?>(
  1. {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. bool forceElevated,
    13. Color? backgroundColor,
    14. Color? foregroundColor,
    15. bool primary,
    16. bool? centerTitle,
    17. bool excludeHeaderSemantics,
    18. double? titleSpacing,
    19. double? collapsedHeight,
    20. double? expandedHeight,
    21. bool floating,
    22. bool pinned,
    23. bool snap,
    24. bool stretch,
    25. double stretchTriggerOffset,
    26. ShapeBorder? shape,
    27. double toolbarHeight,
    28. double? leadingWidth,
    29. TextStyle? toolbarTextStyle,
    30. TextStyle? titleTextStyle,
    31. bool forceMaterialTransparency
    ),
  2. required TResult appBarMedium(
    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. bool forceElevated,
    13. Color? backgroundColor,
    14. Color? foregroundColor,
    15. bool primary,
    16. bool? centerTitle,
    17. bool excludeHeaderSemantics,
    18. double? titleSpacing,
    19. double? collapsedHeight,
    20. double? expandedHeight,
    21. bool floating,
    22. bool pinned,
    23. bool snap,
    24. bool stretch,
    25. double stretchTriggerOffset,
    26. ShapeBorder? shape,
    27. double toolbarHeight,
    28. double? leadingWidth,
    29. TextStyle? toolbarTextStyle,
    30. TextStyle? titleTextStyle
    ),
  3. required TResult appBarLarge(
    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. bool forceElevated,
    13. Color? backgroundColor,
    14. Color? foregroundColor,
    15. bool primary,
    16. bool? centerTitle,
    17. bool excludeHeaderSemantics,
    18. double? titleSpacing,
    19. double? collapsedHeight,
    20. double? expandedHeight,
    21. bool floating,
    22. bool pinned,
    23. bool snap,
    24. bool stretch,
    25. double stretchTriggerOffset,
    26. ShapeBorder? shape,
    27. double toolbarHeight,
    28. double? leadingWidth,
    29. TextStyle? toolbarTextStyle,
    30. TextStyle? titleTextStyle
    ),
  4. required TResult toBoxAdapter(
    1. Key? key,
    2. Widget? child
    ),
  5. required TResult fillRemaining(
    1. Key? key,
    2. Widget? child,
    3. bool hasScrollBody,
    4. bool fillOverscroll
    ),
  6. required TResult fillViewport(
    1. Key? key,
    2. SliverChildDelegate delegate,
    3. double viewportFraction,
    4. bool padEnds
    ),
  7. required TResult fixedExtentList(
    1. Key? key,
    2. SliverChildDelegate delegate,
    3. double itemExtent
    ),
  8. required TResult offstage(
    1. Key? key,
    2. bool offstage,
    3. Sliver? sliver
    ),
  9. required TResult list(
    1. Key? key,
    2. SliverChildDelegate delegate
    ),
  10. required TResult grid(
    1. Key? key,
    2. SliverChildDelegate delegate,
    3. SliverGridDelegate gridDelegate
    ),
  11. required TResult ignorePointer(
    1. Key? key,
    2. bool ignoring,
    3. bool? ignoringSemantics,
    4. Sliver? sliver
    ),
  12. required TResult opacity(
    1. Key? key,
    2. double opacity,
    3. bool alwaysIncludeSemantics,
    4. Sliver? sliver
    ),
  13. required TResult padding(
    1. Key? key,
    2. EdgeInsets padding,
    3. Sliver? sliver
    ),
  14. required TResult prototypeExtendList(
    1. Key? key,
    2. SliverChildDelegate delegate,
    3. Widget prototypeItem
    ),
  15. required TResult safeArea(
    1. Key? key,
    2. bool left,
    3. bool top,
    4. bool right,
    5. bool bottom,
    6. EdgeInsets minimum,
    7. Sliver sliver
    ),
  16. required TResult visibility(
    1. Key? key,
    2. Sliver sliver,
    3. Sliver replacementSliver,
    4. bool visible,
    5. bool maintainState,
    6. bool maintainAnimation,
    7. bool maintainSize,
    8. bool maintainSemantics,
    9. bool maintainInteractivity
    ),
  17. required TResult visibilityMaintain(
    1. Key? key,
    2. Sliver sliver,
    3. Sliver replacementSliver,
    4. bool visible
    )}
)
@optionalTypeArgs, inherited

Implementation

@optionalTypeArgs
TResult when<TResult extends Object?>({
  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,
          bool forceElevated,
          Color? backgroundColor,
          Color? foregroundColor,
          bool primary,
          bool? centerTitle,
          bool excludeHeaderSemantics,
          double? titleSpacing,
          double? collapsedHeight,
          double? expandedHeight,
          bool floating,
          bool pinned,
          bool snap,
          bool stretch,
          double stretchTriggerOffset,
          ShapeBorder? shape,
          double toolbarHeight,
          double? leadingWidth,
          TextStyle? toolbarTextStyle,
          TextStyle? titleTextStyle,
          bool forceMaterialTransparency)
      appBar,
  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,
          bool forceElevated,
          Color? backgroundColor,
          Color? foregroundColor,
          bool primary,
          bool? centerTitle,
          bool excludeHeaderSemantics,
          double? titleSpacing,
          double? collapsedHeight,
          double? expandedHeight,
          bool floating,
          bool pinned,
          bool snap,
          bool stretch,
          double stretchTriggerOffset,
          ShapeBorder? shape,
          double toolbarHeight,
          double? leadingWidth,
          TextStyle? toolbarTextStyle,
          TextStyle? titleTextStyle)
      appBarMedium,
  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,
          bool forceElevated,
          Color? backgroundColor,
          Color? foregroundColor,
          bool primary,
          bool? centerTitle,
          bool excludeHeaderSemantics,
          double? titleSpacing,
          double? collapsedHeight,
          double? expandedHeight,
          bool floating,
          bool pinned,
          bool snap,
          bool stretch,
          double stretchTriggerOffset,
          ShapeBorder? shape,
          double toolbarHeight,
          double? leadingWidth,
          TextStyle? toolbarTextStyle,
          TextStyle? titleTextStyle)
      appBarLarge,
  required TResult Function(Key? key, Widget? child) toBoxAdapter,
  required TResult Function(
          Key? key, Widget? child, bool hasScrollBody, bool fillOverscroll)
      fillRemaining,
  required TResult Function(Key? key, SliverChildDelegate delegate,
          double viewportFraction, bool padEnds)
      fillViewport,
  required TResult Function(
          Key? key, SliverChildDelegate delegate, double itemExtent)
      fixedExtentList,
  required TResult Function(Key? key, bool offstage, Sliver? sliver) offstage,
  required TResult Function(Key? key, SliverChildDelegate delegate) list,
  required TResult Function(Key? key, SliverChildDelegate delegate,
          SliverGridDelegate gridDelegate)
      grid,
  required TResult Function(
          Key? key, bool ignoring, bool? ignoringSemantics, Sliver? sliver)
      ignorePointer,
  required TResult Function(Key? key, double opacity,
          bool alwaysIncludeSemantics, Sliver? sliver)
      opacity,
  required TResult Function(Key? key, EdgeInsets padding, Sliver? sliver)
      padding,
  required TResult Function(
          Key? key, SliverChildDelegate delegate, Widget prototypeItem)
      prototypeExtendList,
  required TResult Function(Key? key, bool left, bool top, bool right,
          bool bottom, EdgeInsets minimum, Sliver sliver)
      safeArea,
  required TResult Function(
          Key? key,
          Sliver sliver,
          Sliver replacementSliver,
          bool visible,
          bool maintainState,
          bool maintainAnimation,
          bool maintainSize,
          bool maintainSemantics,
          bool maintainInteractivity)
      visibility,
  required TResult Function(
          Key? key, Sliver sliver, Sliver replacementSliver, bool visible)
      visibilityMaintain,
}) =>
    throw _privateConstructorUsedError;