Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.10.3

- fix: disable skipOffstage by default in awaitImages.

## 0.10.2

- feat: added iPhone dark mode support.
Expand Down
10 changes: 5 additions & 5 deletions example/multi_packages_app/app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
path: "../../.."
relative: true
source: path
version: "0.10.1"
version: "0.10.3"
async:
dependency: transitive
description:
Expand Down Expand Up @@ -118,10 +118,10 @@ packages:
dependency: transitive
description:
name: matcher
sha256: "12956d0ad8390bbcc63ca2e1469c0619946ccb52809807067a7020d57e647aa6"
sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861
url: "https://pub.dev"
source: hosted
version: "0.12.18"
version: "0.12.19"
material_color_utilities:
dependency: transitive
description:
Expand Down Expand Up @@ -234,10 +234,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "93167629bfc610f71560ab9312acdda4959de4df6fac7492c89ff0d3886f6636"
sha256: "8161c84903fd860b26bfdefb7963b3f0b68fee7adea0f59ef805ecca346f0c7a"
url: "https://pub.dev"
source: hosted
version: "0.7.9"
version: "0.7.10"
theodo_analysis:
dependency: "direct dev"
description:
Expand Down
10 changes: 5 additions & 5 deletions example/multi_packages_app/theme/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
path: "../../.."
relative: true
source: path
version: "0.10.1"
version: "0.10.3"
async:
dependency: transitive
description:
Expand Down Expand Up @@ -118,10 +118,10 @@ packages:
dependency: transitive
description:
name: matcher
sha256: "12956d0ad8390bbcc63ca2e1469c0619946ccb52809807067a7020d57e647aa6"
sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861
url: "https://pub.dev"
source: hosted
version: "0.12.18"
version: "0.12.19"
material_color_utilities:
dependency: transitive
description:
Expand Down Expand Up @@ -227,10 +227,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "93167629bfc610f71560ab9312acdda4959de4df6fac7492c89ff0d3886f6636"
sha256: "8161c84903fd860b26bfdefb7963b3f0b68fee7adea0f59ef805ecca346f0c7a"
url: "https://pub.dev"
source: hosted
version: "0.7.9"
version: "0.7.10"
theodo_analysis:
dependency: "direct dev"
description:
Expand Down
10 changes: 5 additions & 5 deletions example/simple_app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
path: "../.."
relative: true
source: path
version: "0.10.1"
version: "0.10.3"
async:
dependency: transitive
description:
Expand Down Expand Up @@ -118,10 +118,10 @@ packages:
dependency: transitive
description:
name: matcher
sha256: "12956d0ad8390bbcc63ca2e1469c0619946ccb52809807067a7020d57e647aa6"
sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861
url: "https://pub.dev"
source: hosted
version: "0.12.18"
version: "0.12.19"
material_color_utilities:
dependency: transitive
description:
Expand Down Expand Up @@ -227,10 +227,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "93167629bfc610f71560ab9312acdda4959de4df6fac7492c89ff0d3886f6636"
sha256: "8161c84903fd860b26bfdefb7963b3f0b68fee7adea0f59ef805ecca346f0c7a"
url: "https://pub.dev"
source: hosted
version: "0.7.9"
version: "0.7.10"
theodo_analysis:
dependency: "direct dev"
description:
Expand Down
13 changes: 10 additions & 3 deletions lib/src/helpers/await_images.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@ extension AwaitImages on WidgetTester {
/// Pauses test until images are ready to be rendered.
Future<void> awaitImages() async {
await runAsync(() async {
for (final element in find.byType(Image).evaluate().toList()) {
for (final element
in find.byType(Image, skipOffstage: false).evaluate().toList()) {
final widget = element.widget as Image;
final image = widget.image;
await precacheImage(image, element);
await pump();
}

for (final element in find.byType(FadeInImage).evaluate().toList()) {
for (final element in find
.byType(FadeInImage, skipOffstage: false)
.evaluate()
.toList()) {
final widget = element.widget as FadeInImage;
final image = widget.image;
final pumpDurationInMilliseconds = max(
Expand All @@ -27,7 +31,10 @@ extension AwaitImages on WidgetTester {
await pump(Duration(milliseconds: pumpDurationInMilliseconds));
}

for (final element in find.byType(DecoratedBox).evaluate().toList()) {
for (final element in find
.byType(DecoratedBox, skipOffstage: false)
.evaluate()
.toList()) {
final widget = element.widget as DecoratedBox;
final decoration = widget.decoration;
final image = switch (decoration) {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: adaptive_test
description: >-
A Flutter package to generate adaptive golden files during widget tests.
version: 0.10.2
version: 0.10.3
homepage: https://github.com/bamlab/adaptive_test
repository: https://github.com/bamlab/adaptive_test

Expand Down
Loading