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 BarHorizontalSingle extends StatelessWidget {
7 : final Color color;
8 : final double value;
9 : final double height;
10 : final double width;
11 :
12 0 : const BarHorizontalSingle({
13 : super.key,
14 : required this.width,
15 : required this.color,
16 : required this.value,
17 : this.height = 1,
18 : });
19 :
20 0 : @override
21 : Widget build(BuildContext context) {
22 0 : return LinearProgressIndicator(
23 0 : minHeight: height,
24 0 : value: value,
25 : backgroundColor: Colors.grey,
26 0 : valueColor: AlwaysStoppedAnimation<Color>(color),
27 : );
28 : }
29 : }
|