init static method

dynamic init({
  1. double height = 240,
  2. double radius = 6,
  3. double itemExtent = 48,
  4. double padding = 16,
  5. double textSize = 16,
  6. String textLeft = '取消',
  7. String textRight = '完成',
  8. Color textColor = const Color(0xFF333333),
  9. Color textColorLeft = const Color(0xFF808080),
  10. Color textColorRight = const Color(0xFFFF8000),
  11. Color lineColor = const Color(0xFFEBEBEB),
  12. Color backgroundColor = const Color(0xFFE0E0E0),
  13. double? diameterRatio,
  14. double? offAxisFraction,
  15. double? magnification,
  16. 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;
}