maybeWhen<TResult extends Object?> method Null safety

  1. @optionalTypeArgs
TResult maybeWhen<TResult extends Object?>(
  1. {TResult object(
    1. String key,
    2. String? description,
    3. Object? value
    )?,
  2. TResult map(
    1. String key,
    2. String? description,
    3. Map<String, Object?>? value
    )?,
  3. TResult string(
    1. String key,
    2. String? description,
    3. String? value
    )?,
  4. TResult bool(
    1. String key,
    2. String? description,
    3. bool? value
    )?,
  5. TResult double(
    1. String key,
    2. String? description,
    3. double? value
    )?,
  6. TResult int(
    1. String key,
    2. String? description,
    3. int? value
    )?,
  7. TResult num(
    1. String key,
    2. String? description,
    3. num? value
    )?,
  8. TResult dateTime(
    1. String key,
    2. String? description,
    3. DateTime? value
    )?,
  9. TResult duration(
    1. String key,
    2. String? description,
    3. Duration? value
    )?,
  10. TResult color(
    1. String key,
    2. String? description,
    3. Color? value
    )?,
  11. required TResult orElse(
      )}
    )
    @optionalTypeArgs, inherited

    Implementation

    @optionalTypeArgs
    TResult maybeWhen<TResult extends Object?>({
      TResult Function(String key, String? description, Object? value)? object,
      TResult Function(
              String key, String? description, Map<String, Object?>? value)?
          map,
      TResult Function(String key, String? description, String? value)? string,
      TResult Function(String key, String? description, bool? value)? bool,
      TResult Function(String key, String? description, double? value)? double,
      TResult Function(String key, String? description, int? value)? int,
      TResult Function(String key, String? description, num? value)? num,
      TResult Function(String key, String? description, DateTime? value)?
          dateTime,
      TResult Function(String key, String? description, Duration? value)?
          duration,
      TResult Function(String key, String? description, Color? value)? color,
      required TResult orElse(),
    }) =>
        throw _privateConstructorUsedError;