Vaibhav_Enhancement-#1129 #73

Merged
vaibhav.surve merged 33 commits from Vaibhav_Enhancement-#1129 into main 2025-09-30 09:09:36 +00:00
2 changed files with 4 additions and 12 deletions
Showing only changes of commit 4cb60138c0 - Show all commits

View File

@ -46,13 +46,9 @@ class AttendanceDashboardChart extends StatelessWidget {
Color(0xFF64B5F6), // Blue 300 (repeat) Color(0xFF64B5F6), // Blue 300 (repeat)
]; ];
static final Map<String, Color> _roleColorMap = {};
Color _getRoleColor(String role) { Color _getRoleColor(String role) {
return _roleColorMap.putIfAbsent( final index = role.hashCode.abs() % _flatColors.length;
role, return _flatColors[index];
() => _flatColors[_roleColorMap.length % _flatColors.length],
);
} }
@override @override

View File

@ -50,13 +50,9 @@ class ProjectProgressChart extends StatelessWidget {
]; ];
static final NumberFormat _commaFormatter = NumberFormat.decimalPattern(); static final NumberFormat _commaFormatter = NumberFormat.decimalPattern();
static final Map<String, Color> _taskColorMap = {};
Color _getTaskColor(String taskName) { Color _getTaskColor(String taskName) {
return _taskColorMap.putIfAbsent( final index = taskName.hashCode % _flatColors.length;
taskName, return _flatColors[index];
() => _flatColors[_taskColorMap.length % _flatColors.length],
);
} }
@override @override