Answers for "flutter gesturedetector only in text"

0

flutter gesturedetector only in text

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)),
  ),
),
Posted by: Guest on August-23-2021

Code answers related to "flutter gesturedetector only in text"

Browse Popular Code Answers by Language