Skip to content

Commit bed0300

Browse files
Wrap input widgets in a repaint boundary (flutter#6248)
Performance improvement for flutter#6008
1 parent e303a7f commit bed0300

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

packages/flutter/lib/src/material/input.dart

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -255,12 +255,14 @@ class _InputState extends State<Input> {
255255
);
256256
}
257257

258-
return new GestureDetector(
259-
behavior: HitTestBehavior.opaque,
260-
onTap: () => _rawInputLineKey.currentState?.requestKeyboard(),
261-
child: new Padding(
262-
padding: const EdgeInsets.symmetric(horizontal: 16.0),
263-
child: child
258+
return new RepaintBoundary(
259+
child: new GestureDetector(
260+
behavior: HitTestBehavior.opaque,
261+
onTap: () => _rawInputLineKey.currentState?.requestKeyboard(),
262+
child: new Padding(
263+
padding: const EdgeInsets.symmetric(horizontal: 16.0),
264+
child: child
265+
)
264266
)
265267
);
266268
}

0 commit comments

Comments
 (0)