BGSwipeButton class
A customizable swipe button widget that changes state upon user interaction. The button includes features like gradient background, customizable icons, text, and color changes on swipe completion.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- BGSwipeButton
Constructors
-
BGSwipeButton({Key? key, required VoidCallback onCompleted, required String text, required String completedText, Color backgroundColor = Colors.grey, Color completeColor = Colors.green, double buttonRadius = 30, Color beforeSwipeTextColor = Colors.white, Color afterSwipeTextColor = Colors.white, required Icon beforeSwipeIcon, required Icon afterSwipeIcon, List<
Color> gradientColors = const [Colors.blue, Colors.blueAccent]}) -
Constructor to initialize the swipe button with required and optional properties.
const
Properties
- afterSwipeIcon → Icon
-
The icon to display after the swipe action is completed.
final
- afterSwipeTextColor → Color
-
The text color after the swipe action is completed.
final
- backgroundColor → Color
-
The background color of the swipe button before completion.
final
- beforeSwipeIcon → Icon
-
The icon to display before the swipe action.
final
- beforeSwipeTextColor → Color
-
The text color before the swipe action.
final
-
The radius of the swipe button's circular avatar.
final
- completeColor → Color
-
The color of the swipe button when it's completed.
final
- completedText → String
-
The text to display after the swipe action is completed.
final
-
gradientColors
→ List<
Color> -
A list of colors used for the gradient background.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onCompleted → VoidCallback
-
Callback to be executed when the swipe is completed.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- text → String
-
The text to display before the swipe action.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< BGSwipeButton> -
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
-
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, 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