Metro Buttons

This package includes 2 types of buttons (CommandButton and ShortcutButton) inspired by Metro UI.

Instalation

Include metro_button in your pubspec.yaml file:

dependencies:
  flutter:
    sdk: flutter
  metro_button: version

Usage

To use this package, just import it into your file and enjoy it.

import 'package:metro_button/metro_button.dart';

...

CommandButton(title: Text('Title'), tap: (){},)
ShortcutButton(title: Text('Title'), tap: (){}, Icon(Icons.home))

...

CommandButton

This widget allow to generate a button with an icon

Properties

NameDescriptionRequiredDefault
titleWidget to put as button titleTrue
subtitleWidget to put as button subtitleFalse
iconWidget to put as button iconFalse
tooltipString to use as a help tooltipFalse
disabledBoolean value to disabled buttonFalseFalse
reverseBoolean value to indicate when icon is used as leading or trailingFalseFalse
widthDouble value to indicate button widthFalse
heightDouble value to indicate button heightFalse
elevationDouble value to indicate button elevationFalse0
radiusDouble value to indicate button corner radiusFalse5.0
backgroundColorColor to indicate button background colorFalse
borderColorColor to indicate button border colorFalse
onTapFunction to handle button on tapTrue
onLongTapFunction to handle button on long tapfalse

ShortcutButton

This widget allow to generate a square button with an icon and badge

Properties

NameDescriptionRequiredDefault
titleWidget to put as button titleTrue
badgeWidget to put button badgeFalse
iconWidget to put as button iconFalse
tooltipString to use as a help tooltipFalse
disabledBoolean value to disabled buttonFalseFalse
sizeDouble value to indicate button width and heightFalse
elevationDouble value to indicate button elevationFalse0
radiusDouble value to indicate button corner radiusFalse5.0
backgroundColorColor to indicate button background colorFalse
borderColorColor to indicate button border colorFalse
onTapFunction to handle button on tapTrue
onLongTapFunction to handle button on long tapfalse

Libraries

metro_button