ImageDecoderInit constructor

ImageDecoderInit({
  1. required String type,
  2. dynamic data,
  3. PremultiplyAlpha? premultiplyAlpha,
  4. ColorSpaceConversion? colorSpaceConversion,
  5. int? desiredWidth,
  6. int? desiredHeight,
  7. bool? preferAnimation,
})

Implementation

factory ImageDecoderInit(
        {required String type,
        dynamic data,
        PremultiplyAlpha? premultiplyAlpha,
        ColorSpaceConversion? colorSpaceConversion,
        int? desiredWidth,
        int? desiredHeight,
        bool? preferAnimation}) =>
    ImageDecoderInit._(
        type: type,
        data: data ?? undefined,
        premultiplyAlpha:
            premultiplyAlpha?.value ?? PremultiplyAlpha.valueDefault.value,
        colorSpaceConversion: colorSpaceConversion?.value ??
            ColorSpaceConversion.valueDefault.value,
        desiredWidth: desiredWidth ?? undefined,
        desiredHeight: desiredHeight ?? undefined,
        preferAnimation: preferAnimation ?? undefined);