Labs ICT
Pro Login

Buttons and Gestures

Responding to taps and touches.

Buttons in Flutter

ElevatedButton has a raised appearance, TextButton is plain, OutlinedButton has a border. IconButton shows an icon, GestureDetector handles taps and swipes, FloatingActionButton is for primary actions.

ElevatedButton(
  onPressed: () {},
  child: Text('Elevated'),
)

TextButton(
  onPressed: () {},
  child: Text('Text'),
)

OutlinedButton(
  onPressed: () {},
  child: Text('Outlined'),
)

IconButton(
  icon: Icon(Icons.favorite),
  onPressed: () {},
)

GestureDetector(
  onTap: () {},
  child: Text('Tap me'),
)

FloatingActionButton(
  onPressed: () {},
  child: Icon(Icons.add),
)
Try it Yourself ->