Skip to content

Commit

Permalink
Fix instantiateImageCodec api diff with web (stub) (flutter#9234)
Browse files Browse the repository at this point in the history
Also filed: flutter#34075
to potentially support on web.

addresses:
https://cirrus-ci.com/task/5192675427352576
  • Loading branch information
iskakaushik committed Jun 7, 2019
1 parent 99240b7 commit 06dbe28
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/stub_ui/lib/src/ui/painting.dart
Expand Up @@ -1777,14 +1777,17 @@ class Codec {
/// Instantiates an image codec [Codec] object.
///
/// [list] is the binary image data (e.g a PNG or GIF binary data).
/// The data can be for either static or animated images.
/// The data can be for either static or animated images. The following image
/// formats are supported: {@macro flutter.dart:ui.imageFormats}
///
/// The following image formats are supported: {@macro flutter.dart:ui.imageFormats}
/// The [targetWidth] and [targetHeight] arguments are ignored.
///
/// The returned future can complete with an error if the image decoding has
/// failed.
Future<Codec> instantiateImageCodec(Uint8List list,
{double decodedCacheRatioCap = double.infinity}) {
Future<Codec> instantiateImageCodec(Uint8List list, {
int targetWidth,
int targetHeight,
}) {
return engine.futurize((engine.Callback<Codec> callback) =>
_instantiateImageCodec(list, callback, null));
}
Expand Down

0 comments on commit 06dbe28

Please sign in to comment.