Unverified Commit e62a6451 authored by Hans Muller's avatar Hans Muller Committed by GitHub

Fixed (#17010)

parent d8f2f369
......@@ -364,7 +364,8 @@ class _TextFieldState extends State<TextField> with AutomaticKeepAliveClientMixi
InteractiveInkFeature _createInkFeature(TapDownDetails details) {
final MaterialInkController inkController = Material.of(context);
final RenderBox referenceBox = InputDecorator.containerOf(_editableTextKey.currentContext);
final BuildContext editableContext = _editableTextKey.currentContext;
final RenderBox referenceBox = InputDecorator.containerOf(editableContext) ?? editableContext.findRenderObject();
final Offset position = referenceBox.globalToLocal(details.globalPosition);
final Color color = Theme.of(context).splashColor;
......
......@@ -206,4 +206,25 @@ void main() {
await tester.pump(); // in case the AutomaticKeepAlive widget thinks it needs a cleanup frame
expect(find.byType(TextField), findsOneWidget);
});
testWidgets('TextField with decoration:null', (WidgetTester tester) async {
// Regression test for https://github.com/flutter/flutter/issues/16880
await tester.pumpWidget(
new MaterialApp(
home: const Material(
child: const Center(
child: const TextField(
decoration: null
),
),
),
),
);
expect(tester.testTextInput.isVisible, isFalse);
await tester.tap(find.byType(TextField));
await tester.idle();
expect(tester.testTextInput.isVisible, isTrue);
});
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment