Skip to content

Icon Button

Icon Button allow users to take actions, and make choices, with a single tap.

Default

Icon Button

ElevatedButtonIcon(
    onPressed: () {},
    backgroundColor: AppColors.green,
    icon: const Icon(Icons.add),
    tooltip: 'Add',
),
Change the button type, for example ElevatedButtonIcon and OutlinedButtonIcon. If you want to use an icon button without a background color, you can use IconButton.

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

Icon Close Button

Icon Close Button

IconCloseButton(
    onPressed: () {},
),

Info

IconCloseButton is usually used for Dialog.

Authors: Nanang Prasetya