when<TResult extends Object?> method

  1. @optionalTypeArgs
TResult when<TResult extends Object?>({
  1. required TResult imageFile(
    1. int index,
    2. String type,
    3. MessageContentImageFile? imageFile
    ),
  2. required TResult text(
    1. int index,
    2. String type,
    3. MessageDeltaContentText? text
    ),
  3. required TResult refusal(
    1. int index,
    2. String type,
    3. String? refusal
    ),
  4. required TResult imageUrl(
    1. int index,
    2. String type,
    3. MessageContentImageUrl? imageUrl
    ),
})
inherited

Implementation

@optionalTypeArgs
TResult when<TResult extends Object?>({
  required TResult Function(
          int index,
          String type,
          @JsonKey(name: 'image_file', includeIfNull: false)
          MessageContentImageFile? imageFile)
      imageFile,
  required TResult Function(int index, String type,
          @JsonKey(includeIfNull: false) MessageDeltaContentText? text)
      text,
  required TResult Function(int index, String type,
          @JsonKey(includeIfNull: false) String? refusal)
      refusal,
  required TResult Function(
          int index,
          String type,
          @JsonKey(name: 'image_url', includeIfNull: false)
          MessageContentImageUrl? imageUrl)
      imageUrl,
}) =>
    throw _privateConstructorUsedError;