@@ -442,7 +442,9 @@ void main() {
442442 );
443443 await tester.pumpAndSettle ();
444444
445- expect (await completer.future, isA <PictureInfo >());
445+ final PictureInfo picture = await completer.future;
446+ addTearDown (picture.picture.dispose);
447+ expect (picture, isA <PictureInfo >());
446448 expect (debugLastLocale, const Locale ('fr' , 'CH' ));
447449 expect (debugLastTextDirection, TextDirection .rtl);
448450 });
@@ -475,7 +477,9 @@ void main() {
475477 );
476478 await tester.pumpAndSettle ();
477479
478- expect (await completer.future, isA <PictureInfo >());
480+ final PictureInfo picture = await completer.future;
481+ addTearDown (picture.picture.dispose);
482+ expect (picture, isA <PictureInfo >());
479483 expect (debugLastLocale, PlatformDispatcher .instance.locale);
480484 expect (debugLastTextDirection, TextDirection .ltr);
481485 });
@@ -584,7 +588,7 @@ void main() {
584588 expect (imageCache.statusForKey (imageKey).live, false );
585589 expect (imageCache.statusForKey (imageKey).keepAlive, true );
586590
587- // A blue square, becuase the image is available now.
591+ // A blue square, because the image is available now.
588592 await expectLater (
589593 find.byKey (key),
590594 matchesGoldenFile ('vg_with_image_blue.png' ),
0 commit comments