📅  最后修改于: 2022-03-11 14:56:07.750000             🧑  作者: Mango
GestureDetector(
behavior: HitTestBehavior.translucent, //or HitTestBehavior.opaque
onTap: () {
setState(() {
mainColor = Color.fromRGBO(Random().nextInt(254) + 1,
Random().nextInt(254) + 1, Random().nextInt(254) + 1, 1);
});
},
child: Center(
child: Text('Hey there', style: TextStyle(fontSize: 32.0)),
),
),