createImageData method Null safety

  1. @Creates('ImageData|=Object')
ImageData createImageData(
  1. dynamic data_OR_imagedata_OR_sw,
  2. [int? sh_OR_sw,
  3. dynamic imageDataColorSettings_OR_sh,
  4. Map? imageDataColorSettings]
)

Implementation

@Creates('ImageData|=Object')
ImageData createImageData(data_OR_imagedata_OR_sw,
    [int? sh_OR_sw,
    imageDataColorSettings_OR_sh,
    Map? imageDataColorSettings]) {
  if ((data_OR_imagedata_OR_sw is ImageData) &&
      sh_OR_sw == null &&
      imageDataColorSettings_OR_sh == null &&
      imageDataColorSettings == null) {
    var imagedata_1 = convertDartToNative_ImageData(data_OR_imagedata_OR_sw);
    return convertNativeToDart_ImageData(_createImageData_1(imagedata_1));
  }
  if (sh_OR_sw != null &&
      (data_OR_imagedata_OR_sw is int) &&
      imageDataColorSettings_OR_sh == null &&
      imageDataColorSettings == null) {
    return convertNativeToDart_ImageData(
        _createImageData_2(data_OR_imagedata_OR_sw, sh_OR_sw));
  }
  if ((imageDataColorSettings_OR_sh is Map) &&
      sh_OR_sw != null &&
      (data_OR_imagedata_OR_sw is int) &&
      imageDataColorSettings == null) {
    var imageDataColorSettings_1 =
        convertDartToNative_Dictionary(imageDataColorSettings_OR_sh);
    return convertNativeToDart_ImageData(_createImageData_3(
        data_OR_imagedata_OR_sw, sh_OR_sw, imageDataColorSettings_1));
  }
  if ((imageDataColorSettings_OR_sh is int) &&
      sh_OR_sw != null &&
      data_OR_imagedata_OR_sw != null &&
      imageDataColorSettings == null) {
    return convertNativeToDart_ImageData(_createImageData_4(
        data_OR_imagedata_OR_sw, sh_OR_sw, imageDataColorSettings_OR_sh));
  }
  if (imageDataColorSettings != null &&
      (imageDataColorSettings_OR_sh is int) &&
      sh_OR_sw != null &&
      data_OR_imagedata_OR_sw != null) {
    var imageDataColorSettings_1 =
        convertDartToNative_Dictionary(imageDataColorSettings);
    return convertNativeToDart_ImageData(_createImageData_5(
        data_OR_imagedata_OR_sw,
        sh_OR_sw,
        imageDataColorSettings_OR_sh,
        imageDataColorSettings_1));
  }
  throw new ArgumentError("Incorrect number or type of arguments");
}