@@ -23,3 +23,52 @@ const List<int> kAnimatedGif = <int> [
2323 0xf9 , 0x04 , 0x00 , 0x0a , 0x00 , 0xff , 0x00 , 0x2c , 0x00 , 0x00 , 0x00 , 0x00 , 0x01 ,
2424 0x00 , 0x01 , 0x00 , 0x00 , 0x02 , 0x02 , 0x44 , 0x01 , 0x00 , 0x3b ,
2525];
26+
27+ // A PNG with 100x100 blue pixels.
28+ //
29+ // Constructed by the following code:
30+ // ```dart
31+ // Future<void> someTest(WidgetTester tester) async {
32+ // Uint8List bytes;
33+ // await tester.runAsync(() async {
34+ // const int imageWidth = 100;
35+ // const int imageHeight = 100;
36+ // final Uint8List pixels = Uint8List.fromList(List<int>.generate(
37+ // imageWidth * imageHeight * 4,
38+ // (int i) => i % 4 < 2 ? 0x00 : 0xFF, // opaque blue
39+ // ));
40+ // final Completer<void> completer = Completer<void>();
41+ // ui.decodeImageFromPixels(
42+ // pixels, imageWidth, imageHeight, ui.PixelFormat.rgba8888,
43+ // (ui.Image image) async {
44+ // final ByteData byteData = await image.toByteData(
45+ // format: ui.ImageByteFormat.png);
46+ // bytes = byteData.buffer.asUint8List();
47+ // completer.complete();
48+ // },
49+ // );
50+ // await completer.future;
51+ // });
52+ // print(bytes);
53+ // }
54+ // ```
55+ const List <int > kBlueRectPng = < int > [
56+ 137 , 80 , 78 , 71 , 13 , 10 , 26 , 10 , 0 , 0 , 0 , 13 , 73 , 72 , 68 , 82 , 0 , 0 , 0 , 100 , 0 ,
57+ 0 , 0 , 100 , 8 , 6 , 0 , 0 , 0 , 112 , 226 , 149 , 84 , 0 , 0 , 0 , 4 , 115 , 66 , 73 , 84 , 8 ,
58+ 8 , 8 , 8 , 124 , 8 , 100 , 136 , 0 , 0 , 1 , 0 , 73 , 68 , 65 , 84 , 120 , 156 , 237 , 209 , 65 ,
59+ 13 , 0 , 32 , 16 , 192 , 176 , 3 , 255 , 158 , 225 , 141 , 2 , 246 , 104 , 21 , 44 , 217 , 154 ,
60+ 57 , 103 , 200 , 216 , 191 , 3 , 120 , 25 , 18 , 99 , 72 , 140 , 33 , 49 , 134 , 196 , 24 , 18 ,
61+ 99 , 72 , 140 , 33 , 49 , 134 , 196 , 24 , 18 , 99 , 72 , 140 , 33 , 49 , 134 , 196 , 24 , 18 ,
62+ 99 , 72 , 140 , 33 , 49 , 134 , 196 , 24 , 18 , 99 , 72 , 140 , 33 , 49 , 134 , 196 , 24 , 18 ,
63+ 99 , 72 , 140 , 33 , 49 , 134 , 196 , 24 , 18 , 99 , 72 , 140 , 33 , 49 , 134 , 196 , 24 , 18 ,
64+ 99 , 72 , 140 , 33 , 49 , 134 , 196 , 24 , 18 , 99 , 72 , 140 , 33 , 49 , 134 , 196 , 24 , 18 ,
65+ 99 , 72 , 140 , 33 , 49 , 134 , 196 , 24 , 18 , 99 , 72 , 140 , 33 , 49 , 134 , 196 , 24 , 18 ,
66+ 99 , 72 , 140 , 33 , 49 , 134 , 196 , 24 , 18 , 99 , 72 , 140 , 33 , 49 , 134 , 196 , 24 , 18 ,
67+ 99 , 72 , 140 , 33 , 49 , 134 , 196 , 24 , 18 , 99 , 72 , 140 , 33 , 49 , 134 , 196 , 24 , 18 ,
68+ 99 , 72 , 140 , 33 , 49 , 134 , 196 , 24 , 18 , 99 , 72 , 140 , 33 , 49 , 134 , 196 , 24 , 18 ,
69+ 99 , 72 , 140 , 33 , 49 , 134 , 196 , 24 , 18 , 99 , 72 , 140 , 33 , 49 , 134 , 196 , 24 , 18 ,
70+ 99 , 72 , 140 , 33 , 49 , 134 , 196 , 24 , 18 , 99 , 72 , 140 , 33 , 49 , 134 , 196 , 24 , 18 ,
71+ 99 , 72 , 140 , 33 , 49 , 134 , 196 , 24 , 18 , 99 , 72 , 140 , 33 , 49 , 134 , 196 , 24 , 18 ,
72+ 99 , 72 , 140 , 33 , 49 , 134 , 196 , 24 , 18 , 99 , 72 , 204 , 5 , 234 , 78 , 2 , 198 , 180 ,
73+ 170 , 48 , 200 , 0 , 0 , 0 , 0 , 73 , 69 , 78 , 68 , 174 , 66 , 96 , 130
74+ ];
0 commit comments