Skip to content
Closed
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
Binary file modified test/mounted.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/mounted_no_rebuild.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/unmounted.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/visible_default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 20 additions & 20 deletions test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -474,10 +474,10 @@ Future<void> main() async {

testWidgets('Portal synchronously add portals to PortalProvider',
(tester) async {
final firstChild =
Container(height: 42, width: 42, color: Colors.green.withOpacity(.5));
final firstPortal =
Container(height: 42, width: 42, color: Colors.red.withOpacity(.5));
final firstChild = Container(
height: 42, width: 42, color: Colors.green.withValues(alpha: .5));
final firstPortal = Container(
height: 42, width: 42, color: Colors.red.withValues(alpha: .5));

await tester.pumpWidget(
Boilerplate(
Expand Down Expand Up @@ -566,12 +566,12 @@ Future<void> main() async {

testWidgets('Unmounting Portal removes it on PortalProvider synchronously',
(tester) async {
final child =
Container(height: 42, width: 42, color: Colors.red.withOpacity(.5));
final newChild =
Container(height: 42, width: 42, color: Colors.purple.withOpacity(.5));
final portalChild =
Container(height: 42, width: 42, color: Colors.yellow.withOpacity(.5));
final child = Container(
height: 42, width: 42, color: Colors.red.withValues(alpha: .5));
final newChild = Container(
height: 42, width: 42, color: Colors.purple.withValues(alpha: .5));
final portalChild = Container(
height: 42, width: 42, color: Colors.yellow.withValues(alpha: .5));

final portal = ValueNotifier<Widget>(
Center(
Expand Down Expand Up @@ -676,10 +676,10 @@ Future<void> main() async {
});

testWidgets('visible defaults to true', (tester) async {
final child =
Container(height: 42, width: 42, color: Colors.red.withOpacity(.5));
final portal =
Container(height: 42, width: 42, color: Colors.yellow.withOpacity(.5));
final child = Container(
height: 42, width: 42, color: Colors.red.withValues(alpha: .5));
final portal = Container(
height: 42, width: 42, color: Colors.yellow.withValues(alpha: .5));

await tester.pumpWidget(
Boilerplate(
Expand All @@ -706,12 +706,12 @@ Future<void> main() async {
testWidgets(
'can insert a portal without rebuilding PortalProvider at the same time',
(tester) async {
final first =
Container(height: 42, width: 42, color: Colors.green.withOpacity(.5));
final second =
Container(height: 42, width: 42, color: Colors.red.withOpacity(.5));
final portal =
Container(height: 42, width: 42, color: Colors.yellow.withOpacity(.5));
final first = Container(
height: 42, width: 42, color: Colors.green.withValues(alpha: .5));
final second = Container(
height: 42, width: 42, color: Colors.red.withValues(alpha: .5));
final portal = Container(
height: 42, width: 42, color: Colors.yellow.withValues(alpha: .5));

final child = ValueNotifier<Widget>(first);
final builder = ValueListenableBuilder<Widget>(
Expand Down
Loading