mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Make sure that a CupertinoDesktopTextSelectionToolbar doesn't crash i… (#173964)
This is my attempt to handle https://github.com/flutter/flutter/issues/6537 for the CupertinoDesktopTextSelectionToolbar UI control. --------- Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
This commit is contained in:
parent
246a6a2f2f
commit
3d3e2ebc51
@ -127,4 +127,22 @@ void main() {
|
||||
greaterThan(anchor),
|
||||
);
|
||||
});
|
||||
|
||||
testWidgets('CupertinoDesktopTextSelectionToolbar does not crash at zero area', (
|
||||
WidgetTester tester,
|
||||
) async {
|
||||
await tester.pumpWidget(
|
||||
CupertinoApp(
|
||||
home: Center(
|
||||
child: SizedBox.shrink(
|
||||
child: CupertinoDesktopTextSelectionToolbar(
|
||||
anchor: const Offset(10, 10),
|
||||
children: const <Widget>[Text('X')],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
expect(tester.getSize(find.byType(CupertinoDesktopTextSelectionToolbar)), Size.zero);
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user