dashstrap_button 1.0.0
dashstrap_button: ^1.0.0 copied to clipboard

A new Flutter package project.

Dashstrap Button #

A simple yet elegant button for your apps. Dashstrap supports multiple sizes and styles of buttons, Dashstrap also supports multiple feedback styles for pointer events.

Sample

Installation #

Using command line:

flutter pub add dashstrap-button

As a dependency in your pubspec.yaml file

dependencies:
  dashstrap_button: ^1.0.0

You can also follow the instructions on pub.dev

Usage #

Simple Usage

Import the package

import 'package:dashstrap_button/dashstrap_button.dart';

Create the button

DSButton(
  text: "Click Me",
)
Modifying the appearance
DSButton(
  text: "Click Me",
  size: DSButtonSize.large,
  icon: Icons.email,
)

All properties

* - Required

Property NameTypeDescriptionDefault Value
text*StringText to be rendered inside the button""
sizeDSButtonSizeSize of the buttonnormal
feedbackStyleDSButtonFeedbackStyleHow the button's appearance responds to pointer eventsnormal
fontSizedouble?Size of the text and icon (if any)Based on button size
fontColorColorColor of the text and icon (if any)Colors.white
colorColor?Background color of the button, used for border color for outline buttonsaccentColor of Theme
iconIconData?Icon to use to the left side of the textnull
styleDSButtonStyleAppearance style of the buttonnormal
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)
onTapUpFunction(TapUpDetails)?Function to call when a pointer up event is receivednull
onTapDownFunction(TapDownDetails)?Function to call when a pointer down event is receivednull

Enumerations

enum DSButtonSize { small, normal, large, fullwidth }
enum DSButtonFeedbackStyle { normal, opacity }
enum DSButtonFontStyle { normal, strong }
enum DSButtonStyle { normal, outline }

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