Wrap input widgets in a repaint boundary (#6248)
Performance improvement for https://github.com/flutter/flutter/issues/6008
This commit is contained in:
parent
e303a7f735
commit
bed0300b2a
@ -255,12 +255,14 @@ class _InputState extends State<Input> {
|
||||
);
|
||||
}
|
||||
|
||||
return new GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () => _rawInputLineKey.currentState?.requestKeyboard(),
|
||||
child: new Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
child: child
|
||||
return new RepaintBoundary(
|
||||
child: new GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () => _rawInputLineKey.currentState?.requestKeyboard(),
|
||||
child: new Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
child: child
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user