whenOrNull<TResult extends Object?> method Null safety

  1. @optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
  1. {TResult? widget(
    1. Widget child,
    2. PlaceholderAlignment alignment,
    3. TextBaseline? baseline,
    4. TextStyle? style
    )?,
  2. TResult? text(
    1. String? text,
    2. List<InlineSpan>? children,
    3. TextStyle? style,
    4. MouseCursor? mouseCursor,
    5. Callback? onTap,
    6. String? semanticsLabel,
    7. Locale? locale,
    8. bool? spellOut
    )?}
)
@optionalTypeArgs, inherited

Implementation

@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
  TResult? Function(Widget child, PlaceholderAlignment alignment,
          TextBaseline? baseline, TextStyle? style)?
      widget,
  TResult? Function(
          String? text,
          List<InlineSpan>? children,
          TextStyle? style,
          MouseCursor? mouseCursor,
          Callback? onTap,
          String? semanticsLabel,
          Locale? locale,
          bool? spellOut)?
      text,
}) =>
    throw _privateConstructorUsedError;