gascom/lib/widgets/order_state_badge.dart
Abdullah Salah 216efb8a83 first commit
2024-12-25 11:09:55 +03:00

29 lines
795 B
Dart

import 'package:flutter/material.dart';
import 'package:gascom/constants/app_theme.dart';
class OrderStateBadge extends StatelessWidget {
const OrderStateBadge({
super.key,
required this.state,
});
final String state;
@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 2),
decoration: BoxDecoration(
color: state == "قيد المراجعة" ? AppTheme.yellowColor : AppTheme.primaryColor,
borderRadius: BorderRadius.circular(20),
),
child: Text(
state,
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: state == "قيد المراجعة" ? AppTheme.brownColor : AppTheme.textColor,
),
),
);
}
}