From 3ed10562c833c0307be2a6bdd47b31cf416ecbc4 Mon Sep 17 00:00:00 2001 From: liyuqian Date: Wed, 7 Aug 2019 15:40:03 -0700 Subject: [PATCH] Doc: Image.memory only accepts compressed format (#37790) See https://github.com/flutter/flutter/issues/37423 --- packages/flutter/lib/src/widgets/image.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/flutter/lib/src/widgets/image.dart b/packages/flutter/lib/src/widgets/image.dart index 208cbc8100..9dfa4a59ab 100644 --- a/packages/flutter/lib/src/widgets/image.dart +++ b/packages/flutter/lib/src/widgets/image.dart @@ -533,6 +533,10 @@ class Image extends StatefulWidget { /// /// The [bytes], [scale], and [repeat] arguments must not be null. /// + /// This only accepts compressed image formats (e.g. PNG). Uncompressed + /// formats like rawRgba (the default format of [ui.Image.toByteData]) will + /// lead to exceptions. + /// /// Either the [width] and [height] arguments should be specified, or the /// widget should be placed in a context that sets tight layout constraints. /// Otherwise, the image dimensions will change as the image is loaded, which