texImage2D2 method Null safety

void texImage2D2 (
  1. int target,
  2. int level,
  3. int internalformat,
  4. int width,
  5. int height,
  6. int border,
  7. int format,
  8. int type,
  9. dynamic bitmap_OR_canvas_OR_data_OR_image_OR_offset_OR_srcData_OR_video,
  10. [int? srcOffset]
)

Implementation

void texImage2D2(
    int target,
    int level,
    int internalformat,
    int width,
    int height,
    int border,
    int format,
    int type,
    bitmap_OR_canvas_OR_data_OR_image_OR_offset_OR_srcData_OR_video,
    [int? srcOffset]) {
  if ((bitmap_OR_canvas_OR_data_OR_image_OR_offset_OR_srcData_OR_video
          is int) &&
      srcOffset == null) {
    _texImage2D2_1(
        target,
        level,
        internalformat,
        width,
        height,
        border,
        format,
        type,
        bitmap_OR_canvas_OR_data_OR_image_OR_offset_OR_srcData_OR_video);
    return;
  }
  if ((bitmap_OR_canvas_OR_data_OR_image_OR_offset_OR_srcData_OR_video
          is ImageData) &&
      srcOffset == null) {
    var data_1 = convertDartToNative_ImageData(
        bitmap_OR_canvas_OR_data_OR_image_OR_offset_OR_srcData_OR_video);
    _texImage2D2_2(target, level, internalformat, width, height, border,
        format, type, data_1);
    return;
  }
  if ((bitmap_OR_canvas_OR_data_OR_image_OR_offset_OR_srcData_OR_video
          is ImageElement) &&
      srcOffset == null) {
    _texImage2D2_3(
        target,
        level,
        internalformat,
        width,
        height,
        border,
        format,
        type,
        bitmap_OR_canvas_OR_data_OR_image_OR_offset_OR_srcData_OR_video);
    return;
  }
  if ((bitmap_OR_canvas_OR_data_OR_image_OR_offset_OR_srcData_OR_video
          is CanvasElement) &&
      srcOffset == null) {
    _texImage2D2_4(
        target,
        level,
        internalformat,
        width,
        height,
        border,
        format,
        type,
        bitmap_OR_canvas_OR_data_OR_image_OR_offset_OR_srcData_OR_video);
    return;
  }
  if ((bitmap_OR_canvas_OR_data_OR_image_OR_offset_OR_srcData_OR_video
          is VideoElement) &&
      srcOffset == null) {
    _texImage2D2_5(
        target,
        level,
        internalformat,
        width,
        height,
        border,
        format,
        type,
        bitmap_OR_canvas_OR_data_OR_image_OR_offset_OR_srcData_OR_video);
    return;
  }
  if ((bitmap_OR_canvas_OR_data_OR_image_OR_offset_OR_srcData_OR_video
          is ImageBitmap) &&
      srcOffset == null) {
    _texImage2D2_6(
        target,
        level,
        internalformat,
        width,
        height,
        border,
        format,
        type,
        bitmap_OR_canvas_OR_data_OR_image_OR_offset_OR_srcData_OR_video);
    return;
  }
  if (srcOffset != null &&
      (bitmap_OR_canvas_OR_data_OR_image_OR_offset_OR_srcData_OR_video
          is TypedData)) {
    _texImage2D2_7(
        target,
        level,
        internalformat,
        width,
        height,
        border,
        format,
        type,
        bitmap_OR_canvas_OR_data_OR_image_OR_offset_OR_srcData_OR_video,
        srcOffset);
    return;
  }
  throw new ArgumentError("Incorrect number or type of arguments");
}