init static method
dynamic
init({
- double height = 240,
- double radius = 6,
- double itemExtent = 48,
- double padding = 16,
- double textSize = 16,
- String textLeft = '取消',
- String textRight = '完成',
- Color textColor = const Color(0xFF333333),
- Color textColorLeft = const Color(0xFF808080),
- Color textColorRight = const Color(0xFFFF8000),
- Color lineColor = const Color(0xFFEBEBEB),
- Color backgroundColor = const Color(0xFFE0E0E0),
- double? diameterRatio,
- double? offAxisFraction,
- double? magnification,
- double? squeeze,
初始化默认值,提供可自定义的参数(可选项)
Implementation
static init({
double height = 240,
double radius = 6,
double itemExtent = 48,
double padding = 16,
double textSize = 16,
String textLeft = '取消',
String textRight = '完成',
Color textColor = const Color(0xFF333333),
Color textColorLeft = const Color(0xFF808080),
Color textColorRight = const Color(0xFFFF8000),
Color lineColor = const Color(0xFFEBEBEB),
Color backgroundColor = const Color(0xFFE0E0E0),
double? diameterRatio,
double? offAxisFraction,
double? magnification,
double? squeeze,
}) {
_height = height;
_radius = radius;
_itemExtent = itemExtent;
_padding = padding;
_textSize = textSize;
_textLeft = textLeft;
_textRight = textRight;
_textColor = textColor;
_textColorLeft = textColorLeft;
_textColorRight = textColorRight;
_lineColor = lineColor;
_backgroundColor = backgroundColor;
_diameterRatio = diameterRatio;
_offAxisFraction = offAxisFraction;
_magnification = magnification;
_squeeze = squeeze;
}