UFUButton class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- UFUButton
Constructors
- UFUButton.new({bool disabled = false, UFUButtonColorType colorType = UFUButtonColorType.primary, Gradient? gradient, double opacity = 1, VoidCallback? onPressed, VoidCallback? onLongPress, Widget? iconWidget, Widget? suffixIconWidget, String? text, UFUButtonSize size = UFUButtonSize.flat, Color? textColor, UFUFontWeight fontWeight = UFUFontWeight.bold, UFUTextSize? textSize = UFUTextSize.heading3, UFUButtonType? type = UFUButtonType.solid, double? width, bool isFlat = true, UFUButtonRadius? buttonRadius = UFUButtonRadius.roundSquare, double? radius, Color? bgColor, Key? key})
-
const
Properties
- bgColor → Color?
-
final
-
final
- colorType → UFUButtonColorType
-
Used to set button color, text color, border color.
final
- disabled → bool
-
Defines enabled or disabled of a button.
final
- fontWeight → UFUFontWeight
-
Defines text font family of a button.
Defines font weight of a button.
final
- gradient → Gradient?
-
The gradient is drawn under the
image
.final - hashCode → int
-
The hash code for this object.
no setterinherited
- iconWidget → Widget?
-
For showing icon with button text
final
- isFlat → bool
-
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onLongPress → VoidCallback?
-
final
- onPressed → VoidCallback?
-
Called when the button is tapped or otherwise activated.
final
- opacity → double
-
Used for change opacity of button background.
final
- radius → double?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → UFUButtonSize
-
Defines size of a button.
final
- suffixIconWidget → Widget?
-
For showing icon on last with button text
final
- text → String?
-
Defines text of a button.
final
- textColor → Color?
-
Defines text color of a button.
final
- textSize → UFUTextSize?
-
Defines text size of a button.
final
- type → UFUButtonType?
-
Defines type of a button.
final
- width → double?
-
Defines width of a button.
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
getBorderColor(
UFUButtonColorType colorType) → Color -
Return Color by using colorType and default color is
AppTheme.themeColors.primary
. -
getButtonColor(
UFUButtonColorType colorType) → Color -
Return Color by using colorType and default color is
AppTheme.themeColors.primary
but for outline button color is UFUColor.transparent. -
getButtonHeight(
UFUButtonSize size) → double - Return double by using button size and default size is flat.
-
getContainerData(
) → Widget - Defines child widget of a container
-
getHighlightColor(
UFUButtonColorType colorType) → Color - Returning highlight color
-
getIcon(
) → Widget - Defines icon widget
-
getSuffixIcon(
) → Widget -
getText(
) → Widget - Defines text widget
-
getTextColor(
UFUButtonColorType colorType) → Color -
Return Color by using colorType and default color is
AppTheme.themeColors.base
but for outline button default color isAppTheme.themeColors.primary
. -
getTextSize(
UFUButtonSize size) → UFUTextSize - Return textSize by using button size and default size is UFUTextSize.heading3.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
shapeRadius(
) → double -
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited