|
|
|
|
@ -11,23 +11,23 @@ class StatusLabel extends StatelessWidget {
|
|
|
|
|
final double radius;
|
|
|
|
|
final bool labelInCenter;
|
|
|
|
|
|
|
|
|
|
StatusLabel({Key? key, this.id = 0, this.label, this.backgroundColor, this.textColor, this.isPriority = false, this.radius = 4, this.labelInCenter = false}) : super(key: key);
|
|
|
|
|
StatusLabel({Key? key, this.id = 0, this.label, this.backgroundColor, this.textColor, this.isPriority = false, this.radius = 4,this.labelInCenter=false}) : super(key: key);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
if (id == 82) label = context.translation.highPriority;
|
|
|
|
|
if (id == 81) label = context.translation.lowPriority;
|
|
|
|
|
if (label?.toLowerCase() == 'In progress'.toLowerCase()) label = context.translation.inProgress;
|
|
|
|
|
if (label?.toLowerCase() == 'Completed'.toLowerCase()) label = context.translation.completed;
|
|
|
|
|
if (label?.toLowerCase() == 'Open'.toLowerCase()) label = context.translation.open;
|
|
|
|
|
if (label?.toLowerCase() == 'Closed'.toLowerCase()) label = context.translation.closed;
|
|
|
|
|
if (label?.toLowerCase() == 'Low'.toLowerCase()) label = context.translation.lowPriority;
|
|
|
|
|
if (label?.toLowerCase() == 'No'.toLowerCase()) label = context.translation.lowPriority;
|
|
|
|
|
if (label?.toLowerCase() == 'High'.toLowerCase()) label = context.translation.highPriority;
|
|
|
|
|
if (label?.toLowerCase() == 'Yes'.toLowerCase()) label = context.translation.highPriority;
|
|
|
|
|
if (label?.toLowerCase() == 'Waiting for quotation'.toLowerCase()) label = context.translation.waitingForQuotation;
|
|
|
|
|
|
|
|
|
|
return Container(
|
|
|
|
|
padding: const EdgeInsets.symmetric(vertical: 6, horizontal: 10),
|
|
|
|
|
alignment: labelInCenter ? Alignment.center : null,
|
|
|
|
|
alignment: labelInCenter ? Alignment.center: null,
|
|
|
|
|
decoration: ShapeDecoration(
|
|
|
|
|
color: backgroundColor,
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
|