forked from eatvio/eatvio_app
64 lines
1.9 KiB
Dart
64 lines
1.9 KiB
Dart
import 'package:eatvio_app/core/theme/theme_helper.dart';
|
||
import 'package:eatvio_app/features/plans/enums/chosen_plan_state_enum.dart';
|
||
import 'package:flutter/material.dart';
|
||
|
||
class StatusWidget extends StatelessWidget {
|
||
const StatusWidget({super.key, required this.status});
|
||
final ChosenPlanStateEnum status;
|
||
|
||
@override
|
||
Widget build(BuildContext context) {
|
||
if (status == ChosenPlanStateEnum.stateCanceledByTheInitiator) {
|
||
return Material(
|
||
color: appTheme.lightRed,
|
||
borderRadius: BorderRadius.circular(8),
|
||
child: Padding(
|
||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 4),
|
||
child: Text(
|
||
'Отменён',
|
||
style: TextStyle(
|
||
fontSize: 14,
|
||
fontWeight: FontWeight.w400,
|
||
color: appTheme.strongRed,
|
||
height: 1,
|
||
),
|
||
),
|
||
),
|
||
);
|
||
} else if (status == ChosenPlanStateEnum.stateChargeWasCollected) {
|
||
return Material(
|
||
color: const Color(0xFF0BB450).withAlpha(11),
|
||
borderRadius: BorderRadius.circular(8),
|
||
child: const Padding(
|
||
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 4),
|
||
child: Text(
|
||
'Успешно',
|
||
style: TextStyle(
|
||
fontSize: 14,
|
||
fontWeight: FontWeight.w400,
|
||
color: Color(0xFF0BB450),
|
||
height: 1,
|
||
),
|
||
),
|
||
),
|
||
);
|
||
}
|
||
return Material(
|
||
color: appTheme.transparentBlue,
|
||
borderRadius: BorderRadius.circular(8),
|
||
child: Padding(
|
||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 4),
|
||
child: Text(
|
||
'В процессе',
|
||
style: TextStyle(
|
||
fontSize: 14,
|
||
fontWeight: FontWeight.w400,
|
||
color: appTheme.blueA400,
|
||
height: 1,
|
||
),
|
||
),
|
||
),
|
||
);
|
||
}
|
||
}
|