Doc: Image.memory only accepts compressed format (#37790)

See https://github.com/flutter/flutter/issues/37423
This commit is contained in:
liyuqian 2019-08-07 15:40:03 -07:00 committed by GitHub
parent b39e315e5c
commit 3ed10562c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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