Move imageFormats template to instantiateImageCodec dartdoc (flutter/engine#34948)

This commit is contained in:
Sam Rawlins 2022-07-28 10:02:04 -07:00 committed by GitHub
parent 893405b19b
commit 85fc2ae0ba

View File

@ -15,14 +15,6 @@ part of dart.ui;
// Painting APIs will also warn about arguments representing NaN coordinates,
// which can not be rendered by Skia.
// Update this list when changing the list of supported codecs.
/// {@template dart.ui.imageFormats}
/// JPEG, PNG, GIF, Animated GIF, WebP, Animated WebP, BMP, and WBMP. Additional
/// formats may be supported by the underlying platform. Flutter will
/// attempt to call platform API to decode unrecognized formats, and if the
/// platform API supports decoding the image Flutter will be able to render it.
/// {@endtemplate}
bool _rectIsValid(Rect rect) {
assert(rect != null, 'Rect argument was null.');
assert(!rect.hasNaN, 'Rect argument contained a NaN value.');
@ -2029,7 +2021,14 @@ class Codec extends NativeFieldWrapperClass1 {
///
/// The `list` parameter is the binary image data (e.g a PNG or GIF binary data).
/// The data can be for either static or animated images. The following image
/// formats are supported: {@macro dart.ui.imageFormats}
/// formats are supported:
// Update this list when changing the list of supported codecs.
/// {@template dart.ui.imageFormats}
/// JPEG, PNG, GIF, Animated GIF, WebP, Animated WebP, BMP, and WBMP. Additional
/// formats may be supported by the underlying platform. Flutter will
/// attempt to call platform API to decode unrecognized formats, and if the
/// platform API supports decoding the image Flutter will be able to render it.
/// {@endtemplate}
///
/// The `targetWidth` and `targetHeight` arguments specify the size of the
/// output image, in image pixels. If they are not equal to the intrinsic