Line data Source code
1 : // Copyright 2023 The terCAD team. All rights reserved.
2 : // Use of this source code is governed by a CC BY-NC-ND 4.0 license that can be found in the LICENSE file.
3 :
4 : import 'package:material_ui/material_ui.dart';
5 :
6 : class RadialBarChart extends StatelessWidget {
7 : final Color? color;
8 : final IconData? icon;
9 : final double progress;
10 :
11 1 : const RadialBarChart({
12 : super.key,
13 : required this.progress,
14 : this.color,
15 : this.icon,
16 : });
17 :
18 1 : @override
19 : Widget build(BuildContext context) {
20 1 : return Stack(
21 : alignment: Alignment.center,
22 1 : children: [
23 1 : CircularProgressIndicator(
24 1 : value: progress,
25 : strokeWidth: 4,
26 1 : color: color,
27 1 : backgroundColor: Colors.grey.withValues(alpha: 0.5),
28 : ),
29 1 : Icon(
30 1 : icon,
31 1 : color: color,
32 : ),
33 : ],
34 : );
35 : }
36 : }
|