GFButtonBadge class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- GFButtonBadge
- Available extensions
Constructors
-
GFButtonBadge({Key? key, required VoidCallback? onPressed, ValueChanged<
bool> ? onHighlightChanged, TextStyle? textStyle, BoxShadow? boxShadow, bool? badgeBoxShadow, Color? focusColor, Color? hoverColor, Color? highlightColor, Color? splashColor, double elevation = 0.0, double focusElevation = 4.0, double hoverElevation = 4.0, double highlightElevation = 1.0, double disabledElevation = 0.0, EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 8), BoxConstraints? constraints, ShapeBorder? borderShape, Duration animationDuration = kThemeChangeDuration, Clip clipBehavior = Clip.none, FocusNode? focusNode, bool autofocus = false, MaterialTapTargetSize? materialTapTargetSize, GFButtonType type = GFButtonType.solid, GFButtonShape shape = GFButtonShape.standard, Color color = GFColors.PRIMARY, Color? textColor, GFPosition position = GFPosition.end, double size = GFSize.MEDIUM, BorderSide? borderSide, String? text, bool? blockButton, bool? fullWidthButton, ColorScheme? colorScheme, bool? enableFeedback, VoidCallback? onLongPress, Color? disabledColor, Color? disabledTextColor, Widget? icon}) -
Create badges badges of all types. check out GFIconButton for icon badges, and GFBadge for badges
const
Properties
- animationDuration → Duration
-
Defines the duration of animated changes for shape and elevation.
final
- autofocus → bool
-
True if this widget will be selected as the initial focus when no other
node in its scope is currently focused.
final
- badgeBoxShadow → bool?
-
on true state default box shadow appears around badge, if GFButtonType is solid
final
- blockButton → bool?
-
on true state blockButton gives block size badge
final
- borderShape → ShapeBorder?
-
The shape of the badge's Material.
final
- borderSide → BorderSide?
-
The border side for the badge's Material.
final
- boxShadow → BoxShadow?
-
The box shadow for the badge's Material.
final
- clipBehavior → Clip
-
final
- color → Color
-
Pass GFColors or Color
final
- colorScheme → ColorScheme?
-
A set of thirteen colors that can be used to derive the badge theme's
colors.
final
- constraints → BoxConstraints?
-
Defines the badge's size.
final
- disabledColor → Color?
-
The fill color of the badge when the badge is disabled.
final
- disabledElevation → double
-
The elevation for the badge's Material when the badge is not enabled.
final
- disabledTextColor → Color?
-
The color to use for this badge's text when the badge is disabled.
final
- elevation → double
-
The elevation for the badge's Material when the badge is enabled but not pressed.
final
- enabled → bool
-
Whether the badge is enabled or disabled.
no setter
- enableFeedback → bool?
-
Whether detected gestures should provide acoustic and/or haptic feedback.
final
- focusColor → Color?
-
Pass GFColors or Color. The color for the badge's Material when it has the input focus.
final
- focusElevation → double
-
The elevation for the badge's Material when the badge is enabled and has the input focus.
final
- focusNode → FocusNode?
-
An optional focus node to use as the focus node for this widget.
final
- fullWidthButton → bool?
-
on true state full width Button gives full width badge
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- highlightColor → Color?
-
Pass GFColors or Color. The highlight color for the badge's InkWell.
final
- highlightElevation → double
-
The elevation for the badge's Material when the badge is enabled and pressed.
final
- hoverColor → Color?
-
Pass GFColors or Color. The color for the badge's Material when a pointer is hovering over it.
final
- hoverElevation → double
-
The elevation for the badge's Material when the badge is enabled and a pointer is hovering over it.
final
- icon → Widget?
-
Can be used to display GFBadge, Icons inside badge design
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- marginZero → Widget
-
Available on Widget, provided by the WidgetMarginX extension
no setter - materialTapTargetSize → MaterialTapTargetSize
-
Configures the minimum size of the tap target.
final
-
onHighlightChanged
→ ValueChanged<
bool> ? -
Called by the underlying InkWell widget's InkWell.onHighlightChanged callback.
final
- onLongPress → VoidCallback?
-
Called when the badge is long-pressed.
final
- onPressed → VoidCallback?
-
Called when the button is tapped or otherwise activated.
final
- padding → EdgeInsetsGeometry
-
The internal padding for the badge's child.
final
- paddingZero → Widget
-
Available on Widget, provided by the WidgetPaddingX extension
no setter - position → GFPosition
-
icon type of GFPosition i.e, start, end
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shape → GFButtonShape
-
Button type of GFButtonBadgeShape i.e, standard, pills, square, shadow, icons
final
- size → double
-
size of double or GFSize i.e, 1.2, small, medium, large etc.
final
- sliverBox → Widget
-
Available on Widget, provided by the WidgetSliverBoxX extension
no setter - splashColor → Color?
-
Pass GFColors or Color. The splash color for the badge's InkWell.
final
- text → String?
-
text of type String is alternative to child. text will get priority over child
final
- textColor → Color?
-
Pass GFColors or Color
final
- textStyle → TextStyle?
-
Defines the default text style, with Material.textStyle, for the button's child.
final
- type → GFButtonType
-
Button type of GFButtonType i.e, solid, outline, outline2x, transparent
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _GFButtonBadgeState -
Creates the mutable state for this widget at a given location in the tree.
override
-
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
-
marginAll(
double margin) → Widget -
Available on Widget, provided by the WidgetMarginX extension
-
marginOnly(
{double left = 0.0, double top = 0.0, double right = 0.0, double bottom = 0.0}) → Widget -
Available on Widget, provided by the WidgetMarginX extension
-
marginSymmetric(
{double horizontal = 0.0, double vertical = 0.0}) → Widget -
Available on Widget, provided by the WidgetMarginX extension
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
paddingAll(
double padding) → Widget -
Available on Widget, provided by the WidgetPaddingX extension
-
paddingOnly(
{double left = 0.0, double top = 0.0, double right = 0.0, double bottom = 0.0}) → Widget -
Available on Widget, provided by the WidgetPaddingX extension
-
paddingSymmetric(
{double horizontal = 0.0, double vertical = 0.0}) → Widget -
Available on Widget, provided by the WidgetPaddingX extension
-
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