Initial commit
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../theme/app_theme.dart';
|
||||
|
||||
|
||||
class CardProgressBar extends StatelessWidget {
|
||||
final double progress;
|
||||
final EdgeInsets padding;
|
||||
|
||||
const CardProgressBar({
|
||||
super.key,
|
||||
required this.progress,
|
||||
this.padding = const EdgeInsets.only(left: 8, right: 8, bottom: 6),
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final tokens = context.appTokens;
|
||||
return Positioned(
|
||||
left: padding.left,
|
||||
right: padding.right,
|
||||
bottom: padding.bottom,
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(3),
|
||||
child: LinearProgressIndicator(
|
||||
value: progress,
|
||||
minHeight: 3,
|
||||
backgroundColor: Colors.black.withValues(alpha: 0.35),
|
||||
valueColor: AlwaysStoppedAnimation(tokens.progressBarColor),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user