mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-09-06 20:16:56 +00:00
38 lines
972 B
Dart
38 lines
972 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class BrandLinearIndicator extends StatelessWidget {
|
|
const BrandLinearIndicator({
|
|
required this.value,
|
|
required this.color,
|
|
required this.backgroundColor,
|
|
required this.height,
|
|
final super.key,
|
|
});
|
|
|
|
final double value;
|
|
final Color color;
|
|
final Color backgroundColor;
|
|
final double height;
|
|
|
|
@override
|
|
Widget build(final BuildContext context) => Container(
|
|
height: height,
|
|
width: double.infinity,
|
|
clipBehavior: Clip.antiAlias,
|
|
decoration: BoxDecoration(
|
|
color: backgroundColor,
|
|
borderRadius: BorderRadius.circular(height),
|
|
),
|
|
alignment: Alignment.centerLeft,
|
|
child: FractionallySizedBox(
|
|
widthFactor: value,
|
|
child: Container(
|
|
decoration: BoxDecoration(
|
|
color: color,
|
|
borderRadius: BorderRadius.circular(height),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|