Buttons

Buttons are components that can be clicked

You need to install package:flutter/material.dart

There are different types of buttons:

Contained button

They display contained text

ElevatedButton(
  onPressed: () {
      // Respond to button press
  },
  child: Text('CONTAINED BUTTON'),
)

Also, you can add an Icon

ElevatedButton.icon(
  onPressed: () {
      // Respond to button press
  },
  icon: Icon(Icons.add, size: 18),
  label: Text("CONTAINED BUTTON"),
)

Text button

They only displays text

Also, you can add an Icon

RawMaterialButton

https://material.io/components/buttons/flutter#toggle-button ๐Ÿ‘ˆ more button info

Last updated