dashstrap_iconbutton 1.0.0
dashstrap_iconbutton: ^1.0.0 copied to clipboard

A quick and easy way to add action buttons.

Dashstrap Icon Button #

Drop in widget to be used for buttons with icons to indicate actions to your users or when you want to add floating action buttons with a different visual feedback style.

Sample

Installation #

Using command line:

flutter pub add dashstrap_iconbutton

As a dependency in your pubspec.yaml file

dependencies:
  dashstrap_iconbutton: ^1.0.0

You can also follow the instructions on pub.dev

Usage #

Simple Usage

Import the package

import 'package:dashstrap_iconbutton/dashstrap_iconbutton.dart';

Create the button

DSIconButton(
  icon: Icons.add,
),
Modifying the appearance
DSIconButton(
  icon: Icons.add,
  style: DSIconButtonStyle.outline,
),

All properties

* - Required

Property NameTypeDescriptionDefault Value
icon*IconDataIcon to usenull
colorColor?Background color for the buttonaccentColor of Theme
iconColorColorTint color of the iconWhite
styleDSIconButtonStyleRender style of the buttonDSIconButtonStyle.normal
sizeDSIconButtonSizeDefines the icon size and padding of the buttonDSIconButtonSize.normal
feedbackStyleDSIconButtonFeedbackStyleThe visual feedback to use when the button receives pointer eventsDSIconButtonFeedbackStyle.normal
onTapUpFunction(TapUpDetails)?Function to call when a pointer up event is receivednull
onTapDownFunction(TapDownDetails)?Function to call when a pointer down event is receivednull
activeOpacitydoubleOpacity of the button when a pointer down event is active, only applicable for feedbackStyle opacity0.3
disabledboolWhether or not the button is disabled (will ignore pointer events)false
disabledColorColor?Color of button in disabled stateColor(0xFFEAEAEA)
iconSizedouble?Custom icon size to use regardless of button sizenull
shapeDSIconButtonShapeShape of the buttonDSIconButtonShape.round

Enumerations

enum DSIconButtonSize { small, normal, large }
enum DSIconButtonFeedbackStyle { normal, opacity }
enum DSIconButtonStyle { normal, outline }
enum DSIconButtonShape { round, square }

Factory methods

Round buttons
DSIconButton.rounded()
Square buttons
DSIconButton.square()
Floating action buttons

These are round buttons with a shadow, can be used to render on top of other elements.

DSIconButton.fab()

Troubleshooting #

For any issues or questions create an issue in the issue tracker

Contributors #

Contributions are always welcome, you can find the steps to setup the project and the steps involved in making contributions here

0
likes
100
pub points
0%
popularity

Publisher

Unknown

A quick and easy way to add action buttons.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD (LICENSE)

Dependencies

flutter

More

Packages that depend on dashstrap_iconbutton