whenOrNull<TResult extends Object?> method Null safety

  1. @optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
  1. {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. 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. 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. TResult? toBoxAdapter(
    1. Key? key,
    2. Widget? child
    )?,
  5. TResult? fillRemaining(
    1. Key? key,
    2. Widget? child,
    3. bool hasScrollBody,
    4. bool fillOverscroll
    )?,
  6. TResult? fillViewport(
    1. Key? key,
    2. SliverChildDelegate delegate,
    3. double viewportFraction,
    4. bool padEnds
    )?,
  7. TResult? fixedExtentList(
    1. Key? key,
    2. SliverChildDelegate delegate,
    3. double itemExtent
    )?,
  8. TResult? offstage(
    1. Key? key,
    2. bool offstage,
    3. Sliver? sliver
    )?,
  9. TResult? list(
    1. Key? key,
    2. SliverChildDelegate delegate
    )?,
  10. TResult? grid(
    1. Key? key,
    2. SliverChildDelegate delegate,
    3. SliverGridDelegate gridDelegate
    )?,
  11. TResult? ignorePointer(
    1. Key? key,
    2. bool ignoring,
    3. bool? ignoringSemantics,
    4. Sliver? sliver
    )?,
  12. TResult? opacity(
    1. Key? key,
    2. double opacity,
    3. bool alwaysIncludeSemantics,
    4. Sliver? sliver
    )?,
  13. TResult? padding(
    1. Key? key,
    2. EdgeInsets padding,
    3. Sliver? sliver
    )?,
  14. TResult? prototypeExtendList(
    1. Key? key,
    2. SliverChildDelegate delegate,
    3. Widget prototypeItem
    )?,
  15. TResult? safeArea(
    1. Key? key,
    2. bool left,
    3. bool top,
    4. bool right,
    5. bool bottom,
    6. EdgeInsets minimum,
    7. Sliver sliver
    )?,
  16. 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. TResult? visibilityMaintain(
    1. Key? key,
    2. Sliver sliver,
    3. Sliver replacementSliver,
    4. bool visible
    )?}
)
@optionalTypeArgs, inherited

Implementation

@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
  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,
  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,
  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,
  TResult? Function(Key? key, Widget? child)? toBoxAdapter,
  TResult? Function(
          Key? key, Widget? child, bool hasScrollBody, bool fillOverscroll)?
      fillRemaining,
  TResult? Function(Key? key, SliverChildDelegate delegate,
          double viewportFraction, bool padEnds)?
      fillViewport,
  TResult? Function(
          Key? key, SliverChildDelegate delegate, double itemExtent)?
      fixedExtentList,
  TResult? Function(Key? key, bool offstage, Sliver? sliver)? offstage,
  TResult? Function(Key? key, SliverChildDelegate delegate)? list,
  TResult? Function(Key? key, SliverChildDelegate delegate,
          SliverGridDelegate gridDelegate)?
      grid,
  TResult? Function(
          Key? key, bool ignoring, bool? ignoringSemantics, Sliver? sliver)?
      ignorePointer,
  TResult? Function(Key? key, double opacity, bool alwaysIncludeSemantics,
          Sliver? sliver)?
      opacity,
  TResult? Function(Key? key, EdgeInsets padding, Sliver? sliver)? padding,
  TResult? Function(
          Key? key, SliverChildDelegate delegate, Widget prototypeItem)?
      prototypeExtendList,
  TResult? Function(Key? key, bool left, bool top, bool right, bool bottom,
          EdgeInsets minimum, Sliver sliver)?
      safeArea,
  TResult? Function(
          Key? key,
          Sliver sliver,
          Sliver replacementSliver,
          bool visible,
          bool maintainState,
          bool maintainAnimation,
          bool maintainSize,
          bool maintainSemantics,
          bool maintainInteractivity)?
      visibility,
  TResult? Function(
          Key? key, Sliver sliver, Sliver replacementSliver, bool visible)?
      visibilityMaintain,
}) =>
    throw _privateConstructorUsedError;