You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
686 B
Dart
32 lines
686 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
const defaultChartValueStyle = TextStyle(
|
|
fontSize: 12,
|
|
fontWeight: FontWeight.bold,
|
|
color: Colors.black,
|
|
);
|
|
|
|
const defaultLegendStyle = TextStyle(
|
|
fontSize: 12,
|
|
fontWeight: FontWeight.bold,
|
|
);
|
|
|
|
const List<Color> defaultColorList = [
|
|
Color(0xFFff7675),
|
|
Color(0xFF74b9ff),
|
|
Color(0xFF55efc4),
|
|
Color(0xFFffeaa7),
|
|
Color(0xFFa29bfe),
|
|
Color(0xFFfd79a8),
|
|
Color(0xFFe17055),
|
|
Color(0xFF00b894),
|
|
];
|
|
|
|
Color getColor(List<Color> colorList, int index) {
|
|
if (index > (colorList.length - 1)) {
|
|
final newIndex = index % (colorList.length - 1);
|
|
return colorList.elementAt(newIndex);
|
|
}
|
|
return colorList.elementAt(index);
|
|
}
|