Wrap input widgets in a repaint boundary (#6248)

Performance improvement for https://github.com/flutter/flutter/issues/6008
This commit is contained in:
Jason Simmons 2016-10-07 13:41:59 -07:00 committed by GitHub
parent e303a7f735
commit bed0300b2a

View File

@ -255,13 +255,15 @@ class _InputState extends State<Input> {
); );
} }
return new GestureDetector( return new RepaintBoundary(
child: new GestureDetector(
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
onTap: () => _rawInputLineKey.currentState?.requestKeyboard(), onTap: () => _rawInputLineKey.currentState?.requestKeyboard(),
child: new Padding( child: new Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0), padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: child child: child
) )
)
); );
} }
} }