ConnectionNotificationOptions class

Configuration options of the connection notification.

Annotations

Constructors

ConnectionNotificationOptions({AlignmentGeometry alignment = AlignmentDirectional.topCenter, bool pauseConnectionListenerWhenAppInBackground = false, double? height, double? width, BorderRadiusGeometry? borderRadius, Color? connectedBackgroundColor, Color? disconnectedBackgroundColor, Duration? connectedDuration, Duration? disconnectedDuration, OverlayAnimationType overlayAnimationType = OverlayAnimationType.fadeAndSlide, Curve? animationCurve, Duration? animationDuration, Widget? connectedContent, Widget? disconnectedContent, bool shouldAlwaysPullContentDownOnTopAlignment = true, bool hasIndicationIcon = true, double? textAndIconSeparationWidth, String? connectedText, String? disconnectedText, TextStyle? connectedTextStyle, TextStyle? disconnectedTextStyle, Icon? connectedIcon, Icon? disconnectedIcon, double? iconBoxSideLength, Widget? connectedConnectionNotification, Widget? disconnectedConnectionNotification})
const

Properties

alignment AlignmentGeometry
Alignment of the connection notification, default is AlignmentDirectional.topCenter.
final
animationCurve Curve?
Animation curve of the connection notification, default is Curves.fastOutSlowIn.
final
animationDuration Duration?
Animation duration of the connection notification, default is 300 milliseconds.
final
borderRadius BorderRadiusGeometry?
Border radius of the connection notification.
final
connectedBackgroundColor Color?
Background color of the connection notification in connected state, default is Colors.green.
final
connectedConnectionNotification Widget?
This is useful if you want to override default connection notification with a custom widget in connected state and it will use the alignment and animation.
final
connectedContent Widget?
Content of connection notification in connected state. if this is given, it will override all the specific parameters for the default content in connected state, typically a Row widget.
final
connectedDuration Duration?
Duration of the connection notification in connected state before it's auto dismissing, default is 2 seconds.
final
connectedIcon Icon?
Icon of the default content of the connection notification in connected state, default is icon widget with Icons.check.
final
connectedText String?
Text of the default content of the connection notification in connected state, default is 'Back Online'.
final
connectedTextStyle TextStyle?
Text style of the default content of the connection notification in connected state.
final
disconnectedBackgroundColor Color?
Background color of the connection notification in connected state, default is Colors.red.
final
disconnectedConnectionNotification Widget?
This is useful if you want to override default connection notification with a custom widget in disconnected state and it will use the alignment and animation.
final
disconnectedContent Widget?
Content of connection notification in disconnected state. if this is given, it will override all the specific parameters for the default content in disconnected state, typically a Row widget.
final
disconnectedDuration Duration?
Duration of the connection notification in disconnected state before it's auto dismissing, default is infinity.
final
disconnectedIcon Icon?
Icon of the default content of the connection notification in disconnected state, default is circular progress indicator.
final
disconnectedText String?
Text of the default content of the connection notification in disconnected state, default is 'Retrying'.
final
disconnectedTextStyle TextStyle?
Text style of the default content of the connection notification in disconnected state.
final
hashCode int
The hash code for this object.
no setterinherited
hasIndicationIcon bool
If the default content has an indication icon, default is true.
final
height double?
Height of the connection notification, default is twice top padding.
final
iconBoxSideLength double?
Length of each side (height and width) of the SizedBox that wraps the Icon of the default content of the connection notification, default is 10.
final
overlayAnimationType OverlayAnimationType
Overlay animation type of the connection notification, default is OverlayAnimationType.fadeAndSlide.
final
pauseConnectionListenerWhenAppInBackground bool
To pause listening to changes while app in background, default is false.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shouldAlwaysPullContentDownOnTopAlignment bool
If the content of the connection notification should be pulled down in case of top alignment and height is grater than twice of top padding only, to test it visually just set a height that is bigger than twice of top padding (300 for example) and toggle it between true and false to see it's effect, default is true.
final
textAndIconSeparationWidth double?
Distance between text and icon in default content, default is 10.
final
width double?
Width of the connection notification, default is double.infinity.
final

Methods

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