init method

  1. @override
void init(
  1. ChartsState state
)

初始化 耗时的方法都可以放到这里

Implementation

@override
void init(ChartsState state) {
  super.init(state);
  _paint = Paint()
    ..color = color
    ..style = PaintingStyle.fill
    ..strokeWidth = 1;
}