优化 隐式组件使用

This commit is contained in:
toly
2021-06-17 08:51:54 +08:00
parent 1f78f08bbf
commit eeea347c27
10 changed files with 13 additions and 62 deletions

View File

@@ -35,12 +35,7 @@ class _CustomScaleTransitionState extends State<CustomScaleTransition>
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () {
setState(() {
_ctrl.reset();
_ctrl.forward();
});
},
onTap: () => _ctrl.forward(from: 0),
child: Container(
color: Colors.grey.withAlpha(22),
width: 100,