ULoadingSettings class
Look of the ULoading overlay: spinner or image/Lottie, text, blur, colors, percent. initU(loadingSettings: const ULoadingSettings(text: "Please wait"))
Constructors
- ULoadingSettings({WidgetBuilder? builder, String? source, String? package, UFileData? fileData, double imageWidth = 80, double imageHeight = 80, BoxFit imageFit = BoxFit.contain, Color? imageColor, double imageBorderRadius = 0, String? imagePlaceholder, Color overlayColor = Colors.black54, Duration animationDuration = const Duration(milliseconds: 300), Curve animationCurve = Curves.easeInOut, double blurAmount = 2, bool dismissible = false, bool useDefaultLoader = true, String? text, Color textColor = Colors.white, Color spinnerColor = Colors.white, double spinnerSize = 40, double spinnerStrokeWidth = 3, bool useProgressIndicator = false, double spacing = 16, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, Color? backgroundColor, double borderRadius = 0, AlignmentGeometry alignment = Alignment.center, bool showPercent = true, String percentSuffix = "%", Color? percentTextColor, ULoadingPercentBuilder? percentBuilder, VoidCallback? onDismiss})
-
Loading overlay look; every field has a sensible default.
const
Properties
- alignment → AlignmentGeometry
-
Where the loader sits on screen.
final
- animationCurve → Curve
-
Fade in/out curve.
final
- animationDuration → Duration
-
Fade in/out time.
final
- backgroundColor → Color?
-
Loader card color (none by default).
final
- blurAmount → double
-
Background blur (0 = none).
final
- borderRadius → double
-
Loader card corner radius.
final
- builder → WidgetBuilder?
-
Your own loader widget instead of the spinner.
final
- dismissible → bool
-
Lets a tap on the background close it.
final
- fileData → UFileData?
-
Image shown instead of the spinner, from bytes/url.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- imageBorderRadius → double
-
Corner radius of the image loader.
final
- imageColor → Color?
-
Tint of the image loader.
final
- imageFit → BoxFit
-
How the image loader fits its box.
final
- imageHeight → double
-
Height of the image loader.
final
- imagePlaceholder → String?
-
Asset shown while the image loader loads.
final
- imageWidth → double
-
Width of the image loader.
final
- margin → EdgeInsetsGeometry?
-
Margin of the loader card.
final
- onDismiss → VoidCallback?
-
Runs when the overlay closes.
final
- overlayColor → Color
-
Color of the dimmed background.
final
- package → String?
-
Package of source when it is a package asset.
final
- padding → EdgeInsetsGeometry?
-
Padding of the loader card.
final
- percentBuilder → ULoadingPercentBuilder?
-
Your own percent widget.
final
- percentSuffix → String
-
Text after the number, "%" by default.
final
- percentTextColor → Color?
-
Color of the percent number.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showPercent → bool
-
Shows the percent number.
final
- source → String?
-
Image/Lottie/SVG asset or URL shown instead of the spinner.
final
- spacing → double
-
Gap between loader and text.
final
- spinnerColor → Color
-
Spinner color.
final
- spinnerSize → double
-
Spinner size.
final
- spinnerStrokeWidth → double
-
Spinner line width.
final
- text → String?
-
Text under the loader, e.g. "Uploading…".
final
- textColor → Color
-
Color of text.
final
- useDefaultLoader → bool
-
Uses the built-in spinner.
final
- useProgressIndicator → bool
-
Shows a determinate ring when a percent is set.
final
Methods
-
copyWith(
{WidgetBuilder? builder, String? source, String? package, UFileData? fileData, double? imageWidth, double? imageHeight, BoxFit? imageFit, Color? imageColor, double? imageBorderRadius, String? imagePlaceholder, Color? overlayColor, Duration? animationDuration, Curve? animationCurve, double? blurAmount, bool? dismissible, bool? useDefaultLoader, String? text, Color? textColor, Color? spinnerColor, double? spinnerSize, double? spinnerStrokeWidth, bool? useProgressIndicator, double? spacing, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, Color? backgroundColor, double? borderRadius, AlignmentGeometry? alignment, bool? showPercent, String? percentSuffix, Color? percentTextColor, ULoadingPercentBuilder? percentBuilder, VoidCallback? onDismiss}) → ULoadingSettings - Copy with some fields changed.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited