RadarChart.defaultStyle constructor

RadarChart.defaultStyle({
  1. Key? key,
  2. double radius = 50,
  3. int levelCount = 3,
  4. double maxValue = 10,
  5. double minValue = 0,
  6. double markerMargin = 4,
  7. int sidesCount = 5,
  8. double rotateAngle = 0,
  9. bool crossedAxisLine = false,
  10. List<Offset>? offset,
  11. required List<String> tagNames,
  12. required List<List<double>> data,
})

The default style named constructor which is designed with Bruno style. The data length should be less than the defaultRadarChartStyles's length or you should use the default constructor.

Implementation

RadarChart.defaultStyle({
  Key? key,
  this.radius = 50,
  this.levelCount = 3,
  this.maxValue = 10,
  this.minValue = 0,
  this.markerMargin = 4,
  this.sidesCount = 5,
  this.rotateAngle = 0,
  this.crossedAxisLine = false,
  this.offset,
  required List<String> tagNames,
  required List<List<double>> data,
})  : assert(sidesCount >= 3),
      assert(tagNames.length == sidesCount),
      assert(minValue < maxValue),
      assert(data.length <= defaultRadarChartStyles.length),
      this.animateProgress = 1.0,
      this.axisLineColor = const Color(0xFFCCCCCC),
      this.provider = DefaultRadarProvider(data),
      super(
          key: key,
          children: () {
            List<Widget> children = [];
            for (int i = 0; i < sidesCount; i++) {
              children.add(Container(
                constraints: const BoxConstraints(
                  maxWidth: 60,
                  maxHeight: 32,
                ),
                child: Text(
                  tagNames[i],
                  maxLines: 2,
                  overflow: TextOverflow.ellipsis,
                  style: const TextStyle(
                      color: Color(0xFF222222),
                      fontSize: 12,
                      fontWeight: FontWeight.w600),
                ),
              ));
            }
            return children;
          }());