Skip to main content
Version: 0.3.5

Button

CommonButton component

Example:

main.dart
CommonButton(
text: 'Button with elevation and custom size',
containerStyle: CommonContainerModel(
width: 0.4,
height: 0.1,
),
style: CommonButtonModel(
elevation: 10.0,
borderRadius: 0.1,
),
),

Props

text → String


description : Text that will show up

default : ''

example : --


child → Widget


description : child widget

default : --

example : --

onPress → Function


description : on press function

default : --

example : --

onLongPress → Function


description : on press function

default : --

example : --

style → CommonButtonModel


description : Widget style

default : CommonButtonModel()

example :

CommonButtonModel(
elevation: 10.0,
borderRadius: 0.1,
)

containerStyle → CommonContainerModel


description : Container style

default : CommonContainerModel()

example :

CommonContainerModel(
)

textContainerStyle → CommonContainerModel


description : Text Container style

default : CommonContainerModel()

example :

CommonContainerModel(
)

textStyle → CommonTextModel


description : Text style

default : CommonTextModel()

example :

CommonTextModel(
)