SnackBarConfig class

SnackBarConfig

全局SnackBar样式及行为配置类

用法示例

PPAlert.snackBarConfig = SnackBarConfig(
  backgroundColor: Colors.black87,
  colorText: Colors.yellow,
  borderRadius: 20,
  maxWidth: 400,
  margin: EdgeInsets.only(top: 30, left: 16, right: 16),
);

Constructors

SnackBarConfig({LinearGradient? backgroundGradient, Color backgroundColor = Colors.black54, Color colorText = Colors.white, double barBlur = 7, double borderRadius = 15, double maxWidth = 600, EdgeInsets margin = const EdgeInsets.all(15), EdgeInsets padding = const EdgeInsets.all(15), SnackPosition snackPosition = SnackPosition.TOP})
构造函数
const

Properties

backgroundColor Color
背景色
final
backgroundGradient LinearGradient?
背景渐变色
final
barBlur double
背景模糊度
final
borderRadius double
边框圆角
final
colorText Color
文字颜色
final
hashCode int
The hash code for this object.
no setterinherited
margin EdgeInsets
外边距
final
maxWidth double
最大宽度
final
padding EdgeInsets
内边距
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
snackPosition → SnackPosition
位置(顶部、底部等)
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