Class SnackBar
Inheritance
SnackBar
Inherited Members
Namespace: Unity.UIWidgets.material
Syntax
public class SnackBar : StatelessWidget
Constructors
SnackBar(Key, Widget, Color, SnackBarAction, Nullable<TimeSpan>, Animation<Single>)
Declaration
public SnackBar(Key key = null, Widget content = null, Color backgroundColor = null, SnackBarAction action = null, TimeSpan? duration = default(TimeSpan? ), Animation<float> animation = null)
Parameters
Type | Name | Description |
---|---|---|
Key | key | |
Widget | content | |
Color | backgroundColor | |
SnackBarAction | action | |
Nullable<TimeSpan> | duration | |
Animation<Single> | animation |
Fields
action
Declaration
public readonly SnackBarAction action
Field Value
Type | Description |
---|---|
SnackBarAction |
animation
Declaration
public readonly Animation<float> animation
Field Value
Type | Description |
---|---|
Animation<Single> |
backgroundColor
Declaration
public readonly Color backgroundColor
Field Value
Type | Description |
---|---|
Color |
content
Declaration
public readonly Widget content
Field Value
Type | Description |
---|---|
Widget |
duration
Declaration
public readonly TimeSpan duration
Field Value
Type | Description |
---|---|
TimeSpan |
Methods
build(BuildContext)
Declaration
public override Widget build(BuildContext context)
Parameters
Type | Name | Description |
---|---|---|
BuildContext | context |
Returns
Type | Description |
---|---|
Widget |
Overrides
createAnimationController(TickerProvider)
Declaration
public static AnimationController createAnimationController(TickerProvider vsync)
Parameters
Type | Name | Description |
---|---|---|
TickerProvider | vsync |
Returns
Type | Description |
---|---|
AnimationController |
withAnimation(Animation<Single>, Key)
Declaration
public SnackBar withAnimation(Animation<float> newAnimation, Key fallbackKey = null)
Parameters
Type | Name | Description |
---|---|---|
Animation<Single> | newAnimation | |
Key | fallbackKey |
Returns
Type | Description |
---|---|
SnackBar |