FxButton class
Get custom button style
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- FxButton
- Available Extensions
Constructors
-
FxButton({required String text, required VoidCallback onPressed, IconData? leadingIcon, IconData? trailingIcon, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, BorderRadius? radius, Color? color, List<
BoxShadow> ? shadow, Color? textColor, Color? iconColor, Color outlineColor = FxColors.primary, BtnShape shape = BtnShape.rounded, BtnSize size = BtnSize.normal, BtnType type = BtnType.solid}) -
FxButton.danger({required String text, required VoidCallback onPressed, IconData? leadingIcon, IconData? trailingIcon, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, BorderRadius? radius, Color? color = FxColors.danger, List<
BoxShadow> ? shadow, Color? textColor = Colors.white, Color? iconColor, Color outlineColor = FxColors.danger, BtnShape shape = BtnShape.rounded, BtnSize size = BtnSize.normal, BtnType type = BtnType.solid}) -
factory
-
FxButton.dark({required String text, required VoidCallback onPressed, IconData? leadingIcon, IconData? trailingIcon, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, BorderRadius? radius, Color? color = FxColors.dark, List<
BoxShadow> ? shadow, Color? textColor = Colors.white, Color? iconColor, Color outlineColor = FxColors.dark, BtnShape shape = BtnShape.rounded, BtnSize size = BtnSize.normal, BtnType type = BtnType.solid}) -
factory
-
FxButton.info({required String text, required VoidCallback onPressed, IconData? leadingIcon, IconData? trailingIcon, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, BorderRadius? radius, Color? color = FxColors.info, List<
BoxShadow> ? shadow, Color? textColor = Colors.white, Color? iconColor, Color outlineColor = FxColors.info, BtnShape shape = BtnShape.rounded, BtnSize size = BtnSize.normal, BtnType type = BtnType.solid}) -
factory
-
FxButton.light({required String text, required VoidCallback onPressed, IconData? leadingIcon, IconData? trailingIcon, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, BorderRadius? radius, Color? color = FxColors.light, List<
BoxShadow> ? shadow, Color? textColor = FxColors.dark, Color? iconColor, Color outlineColor = FxColors.light, BtnShape shape = BtnShape.rounded, BtnSize size = BtnSize.normal, BtnType type = BtnType.solid}) -
factory
-
FxButton.primary({required String text, required VoidCallback onPressed, IconData? leadingIcon, IconData? trailingIcon, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, BorderRadius? radius, Color? color = FxColors.primary, List<
BoxShadow> ? shadow, Color? textColor = Colors.white, Color? iconColor, Color outlineColor = FxColors.primary, BtnShape shape = BtnShape.rounded, BtnSize size = BtnSize.normal, BtnType type = BtnType.solid}) -
factory
-
FxButton.success({required String text, required VoidCallback onPressed, IconData? leadingIcon, IconData? trailingIcon, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, BorderRadius? radius, Color? color = FxColors.success, List<
BoxShadow> ? shadow, Color? textColor = Colors.white, Color? iconColor, Color outlineColor = FxColors.success, BtnShape shape = BtnShape.rounded, BtnSize size = BtnSize.normal, BtnType type = BtnType.solid}) -
factory
-
FxButton.warning({required String text, required VoidCallback onPressed, IconData? leadingIcon, IconData? trailingIcon, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, BorderRadius? radius, Color? color = FxColors.warning, List<
BoxShadow> ? shadow, Color? textColor = Colors.white, Color? iconColor, Color outlineColor = FxColors.warning, BtnShape shape = BtnShape.rounded, BtnSize size = BtnSize.normal, BtnType type = BtnType.solid}) -
factory
Properties
- color → Color?
-
set button color
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- iconColor → Color?
-
set icon color
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- leadingIcon → IconData?
-
set leading icon to button
final
- margin → EdgeInsetsGeometry?
-
set margin to button
final
- onPressed → VoidCallback
-
set
final
- outlineColor → Color
-
set border color
final
- padding → EdgeInsetsGeometry?
-
set padding to button
final
- radius → BorderRadius?
-
set border radius to button
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
shadow
→ List<
BoxShadow> ? -
set shadow to button
final
- shape → BtnShape
-
set button shape (eg. pill, rounded)
final
- size → BtnSize
-
set button size (eg. small, medium, large)
final
- text → String
-
set text to button
final
- textColor → Color?
-
set text color
final
- trailingIcon → IconData?
-
set trailing icon to button
final
- type → BtnType
-
set button type (eg. solid,outline)
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
-
getBtnShape(
) → BorderRadius - Get button shape (eg. pill,rounded,leaf)
-
getBtnSize(
) → double - Get button size (eg. small,medium,large)
-
getBtnType(
) → Color -
Get
Fxbutton
type (eg. solid,outline) -
getButtonBorder(
) → Border - Get FxButton border
-
getTextColor(
Color color) → Color - Get text color according to backgound color brightness
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
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}) → 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