mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Make sure that CupertinoNavigationBar doesn't crash in 0x0 environment (#179235)
This is my attempt to handle https://github.com/flutter/flutter/issues/6537 for the CupertinoNavigationBar widget. Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
This commit is contained in:
parent
ebd263e392
commit
a8577f996b
@ -3329,6 +3329,15 @@ void main() {
|
||||
expect(find.text('First'), findsNothing);
|
||||
expect(find.text('Second'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('CupertinoNavigationBar does not crash at zero area', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const CupertinoApp(
|
||||
home: Center(child: SizedBox.shrink(child: CupertinoNavigationBar())),
|
||||
),
|
||||
);
|
||||
expect(tester.getSize(find.byType(CupertinoNavigationBar)), Size.zero);
|
||||
});
|
||||
}
|
||||
|
||||
class _ExpectStyles extends StatelessWidget {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user