pharmacy_mobile/lib/widgets/indicator_widget.dart
2025-03-10 14:28:24 +08:00

31 lines
1,011 B
Dart

import 'package:flutter/material.dart';
import 'package:pharmacy_mobile/widgets/text_widget.dart';
class IndicatorWidget extends StatelessWidget {
final String text;
final Color? color;
const IndicatorWidget({super.key, required this.text, this.color});
@override
Widget build(BuildContext context) {
return Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
height: 24,
padding: EdgeInsets.symmetric(horizontal: 16),
decoration: BoxDecoration(
border: Border.all(color: color ?? const Color.fromRGBO(249, 249, 249, 1), width: 1),
borderRadius: BorderRadius.circular(20),
color: color ?? const Color.fromRGBO(249, 249, 249, 1)),
alignment: Alignment.center, // Center the text within the container
child: TextWidget(
text: text,
size: 12,
color: const Color.fromRGBO(0, 0, 0, 1),
),
),
],
);
}
}