FCCStateWidget class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- FCCStateWidget
Constructors
-
FCCStateWidget.empty({Key? key, String message = 'No data', String subMessage = 'There is nothing to display yet.', Future<
void> onRefresh()?, bool fullPage = false, Duration? autoDismissAfter, VoidCallback? onAutoDismiss, String? emptyLottieAsset, double lottieSize = 80, bool isNeumorphic = false, NeumorphicStyle neumorphicStyle = NeumorphicStyle.lowered, EdgeInsets cardPadding = const EdgeInsets.all(24), double borderRadiusValue = 24, Duration entryBaseDuration = const Duration(milliseconds: 500)}) -
factory
-
FCCStateWidget.error({required String message, Key? key, String title = 'Error', Future<
void> onRetry()?, String retryText = 'Retry', Duration? autoDismissAfter, VoidCallback? onAutoDismiss, String? errorLottieAsset, double lottieSize = 80, bool isNeumorphic = false, NeumorphicStyle neumorphicStyle = NeumorphicStyle.lowered, EdgeInsets cardPadding = const EdgeInsets.all(24), double borderRadiusValue = 24, Duration entryBaseDuration = const Duration(milliseconds: 500)}) -
factory
-
FCCStateWidget.loading({Key? key, String message = 'Loading...', String successMessage = 'Done', String errorMessage = 'Something went wrong', String successTitle = 'Success', String errorTitle = 'Error', Future<
void> ? future, Duration? autoDismissAfter, VoidCallback? onAutoDismiss, String? loadingLottieAsset, String? successLottieAsset, String? errorLottieAsset, double lottieSize = 80, bool isNeumorphic = false, NeumorphicStyle neumorphicStyle = NeumorphicStyle.lowered, EdgeInsets cardPadding = const EdgeInsets.all(24), double borderRadiusValue = 24, Duration entryBaseDuration = const Duration(milliseconds: 500)}) -
factory
- FCCStateWidget.success(String message, {Key? key, String title = 'Success', Duration? autoDismissAfter, VoidCallback? onAutoDismiss, String? successLottieAsset, double lottieSize = 80, bool isNeumorphic = false, NeumorphicStyle neumorphicStyle = NeumorphicStyle.lowered, EdgeInsets cardPadding = const EdgeInsets.all(24), double borderRadiusValue = 24, Duration entryBaseDuration = const Duration(milliseconds: 500)})
-
factory
Properties
- autoDismissAfter → Duration?
-
How long to keep the success, error, or empty state visible
before auto-dismiss. If null → no auto-dismiss.
final
- borderRadiusValue → double
-
final
- cardPadding → EdgeInsets
-
final
- emptyFullPage → bool
-
final
- emptyLottieAsset → String?
-
final
- emptySubMessage → String
-
final
- emptyTitle → String
-
Empty state labels.
final
- entryBaseDuration → Duration
-
final
- errorLottieAsset → String?
-
final
- errorMessage → String
-
final
- errorTitle → String
-
final
-
future
→ Future<
void> ? -
Automatic state transition: when future is passed and initialState
is FCCStateVisualType.loading, the widget listens to the future and
transitions to success or error accordingly.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialState → FCCStateVisualType
-
final
- isNeumorphic → bool
-
Neumorphic & animation flags.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- loadingLottieAsset → String?
-
Lottie assets per state (optional).
final
- loadingMessage → String
-
Loading / success / error / empty messages.
final
- lottieSize → double
-
final
- neumorphicStyle → NeumorphicStyle
-
final
- onAutoDismiss → VoidCallback?
-
final
-
onEmptyRefresh
→ Future<
void> Function()? -
Empty state refresh + layout.
final
-
onRetry
→ Future<
void> Function()? -
Optional retry callback (visible in error state).
final
- retryText → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- successLottieAsset → String?
-
final
- successMessage → String
-
final
- successTitle → String
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< FCCStateWidget> -
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