GetBar class
- Inheritance
- Available extensions
- Annotations
-
- @Deprecated('use GetSnackBar')
Constructors
-
GetBar({Key? key, String? title, String? message, Widget? titleText, Widget? messageText, Widget? icon, bool shouldIconPulse = true, double? maxWidth, EdgeInsets margin = const EdgeInsets.all(0.0), EdgeInsets padding = const EdgeInsets.all(16), double borderRadius = 0.0, Color? borderColor, double borderWidth = 1.0, Color backgroundColor = const Color(0xFF303030), Color? leftBarIndicatorColor, List<
BoxShadow> ? boxShadows, Gradient? backgroundGradient, Widget? mainButton, OnTap? onTap, Duration? duration, bool isDismissible = true, DismissDirection? dismissDirection, bool showProgressIndicator = false, AnimationController? progressIndicatorController, Color? progressIndicatorBackgroundColor, Animation<Color> ? progressIndicatorValueColor, SnackPosition snackPosition = SnackPosition.BOTTOM, SnackStyle snackStyle = SnackStyle.FLOATING, Curve forwardAnimationCurve = Curves.easeOutCirc, Curve reverseAnimationCurve = Curves.easeOutCirc, Duration animationDuration = const Duration(seconds: 1), double barBlur = 0.0, double overlayBlur = 0.0, Color overlayColor = Colors.transparent, Form? userInputForm, SnackbarStatusCallback? snackbarStatus})
Properties
- animationDuration → Duration
-
Use it to speed up or slow down the animation duration
finalinherited
- backgroundColor → Color
-
Will be ignored if backgroundGradient is not null
finalinherited
- backgroundGradient → Gradient?
-
Give to GetSnackbar a gradient background.
It Makes backgroundColor be ignored.
finalinherited
- barBlur → double
-
Default is 0.0. If different than 0.0, blurs only Snack's background.
To take effect, make sure your backgroundColor has some opacity.
The greater the value, the greater the blur.
finalinherited
- borderColor → Color?
-
Adds a border to every side of Snack
I do not recommend using it with showProgressIndicator
or leftBarIndicatorColor.
finalinherited
- borderRadius → double
-
Adds a radius to all corners of Snack. Best combined with margin.
I do not recommend using it with showProgressIndicator
or leftBarIndicatorColor.
finalinherited
- borderWidth → double?
-
Changes the width of the border if borderColor is specified
finalinherited
-
boxShadows
→ List<
BoxShadow> ? -
boxShadows The shadows generated by Snack. Leave it null
if you don't want a shadow.
You can use more than one if you feel the need.
Check (this example)
https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/material/shadows.dart
finalinherited - dismissDirection → DismissDirection?
-
The direction in which the SnackBar can be dismissed.
finalinherited
- duration → Duration?
-
How long until Snack will hide itself (be dismissed).
To make it indefinite, leave it null.
finalinherited
- forwardAnimationCurve → Curve
-
The Curve animation used when show() is called.
Curves.easeOut is default
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → Widget?
-
You can use any widget here, but I recommend Icon or Image as
indication of what kind
of message you are displaying. Other widgets may break the layout
finalinherited
- isDismissible → bool
-
Determines if the user can swipe or click the overlay
(if overlayBlur > 0) to dismiss.
It is recommended that you set duration != null if this is false.
If the user swipes to dismiss or clicks the overlay, no value
will be returned.
finalinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- leftBarIndicatorColor → Color?
-
If not null, shows a left vertical colored bar on notification.
It is not possible to use it with a Form and I do not recommend
using it with LinearProgressIndicator
finalinherited
- mainButton → Widget?
-
(optional) An action that the user can take based on the snack bar.
finalinherited
- margin → EdgeInsets
-
Adds a custom margin to Snack
finalinherited
- marginZero → Widget
-
Available on Widget, provided by the WidgetMarginX extension
no setter - maxWidth → double?
-
Used to limit Snack width (usually on large screens)
finalinherited
- message → String?
-
The message displayed to the user.
finalinherited
- messageText → Widget?
-
Replaces message. Although this accepts a Widget, it is meant
to receive Text or RichText
finalinherited
- onTap → OnTap?
-
A callback that registers the user's click anywhere.
An alternative to mainButton
finalinherited
- overlayBlur → double
-
Default is 0.0. If different than 0.0, creates a blurred
overlay that prevents the user from interacting with the screen.
The greater the value, the greater the blur.
finalinherited
- overlayColor → Color?
-
Default is Colors.transparent. Only takes effect if overlayBlur > 0.0.
Make sure you use a color with transparency here e.g.
Colors.grey
600
.withOpacity(0.2).finalinherited - padding → EdgeInsets
-
Adds a custom padding to Snack
The default follows material design guide line
finalinherited
- paddingZero → Widget
-
Available on Widget, provided by the WidgetPaddingX extension
no setter - progressIndicatorBackgroundColor → Color?
-
A LinearProgressIndicator configuration parameter.
finalinherited
- progressIndicatorController → AnimationController?
-
An optional AnimationController when you want to control the
progress of your LinearProgressIndicator.
finalinherited
-
progressIndicatorValueColor
→ Animation<
Color> ? -
A LinearProgressIndicator configuration parameter.
finalinherited
- reverseAnimationCurve → Curve
-
The Curve animation used when dismiss() is called.
Curves.fastOutSlowIn is default
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shouldIconPulse → bool
-
An option to animate the icon (if present). Defaults to true.
finalinherited
- showProgressIndicator → bool
-
True if you want to show a LinearProgressIndicator.
finalinherited
- sliverBox → Widget
-
Available on Widget, provided by the WidgetSliverBoxX extension
no setter - snackbarStatus → SnackbarStatusCallback?
-
A callback for you to listen to the different Snack status
finalinherited
- snackPosition → SnackPosition
-
Snack can be based on SnackPosition.TOP or on SnackPosition.BOTTOM
of your screen.
SnackPosition.BOTTOM is the default.
finalinherited
- snackStyle → SnackStyle
-
Snack can be floating or be grounded to the edge of the screen.
If grounded, I do not recommend using margin or borderRadius.
SnackStyle.FLOATING is the default
If grounded, I do not recommend using a backgroundColor with
transparency or barBlur
finalinherited
- title → String?
-
The title displayed to the user
finalinherited
- titleText → Widget?
-
Replaces title. Although this accepts a Widget, it is meant
to receive Text or RichText
finalinherited
- userInputForm → Form?
-
A TextFormField in case you want a simple user input.
Every other widget is ignored if this is not null.
finalinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< StatefulWidget> -
Creates the mutable state for this widget at a given 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
-
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
-
show(
) → SnackbarController -
Show the snack. It's call SnackbarStatus.OPENING state
followed by SnackbarStatus.OPEN
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