Visitar URL original
The most beautiful piece of code I have ever written (#98) · creatorpiyush/packages@c4cdb7d · GitHub
Skip to content

Commit c4cdb7d

Browse files
authored
The most beautiful piece of code I have ever written (flutter#98)
1 parent fb1ae19 commit c4cdb7d

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎packages/animations/test/open_container_test.dart‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,9 +1451,13 @@ void main() {
14511451
}
14521452

14531453
Color _getScrimColor(WidgetTester tester) {
1454+
// TODO(dnfield): fix this after https://github.com/flutter/flutter/pull/50979
14541455
final Container container = tester.widget(find.byType(Container));
1455-
final BoxDecoration decoration = container.decoration;
1456-
return decoration.color;
1456+
if (container.decoration != null) {
1457+
final BoxDecoration decoration = container.decoration;
1458+
return decoration.color;
1459+
}
1460+
return (Container as dynamic).color;
14571461
}
14581462

14591463
void _expectMaterialPropertiesHaveAdvanced({

0 commit comments

Comments
 (0)