This commit is contained in:
PhyoThandar
2020-06-01 14:45:32 +06:30
10 changed files with 1039 additions and 268 deletions

View File

@@ -1,6 +1,7 @@
import 'package:fcs/widget/label_widgets.dart';
import 'package:flutter/material.dart';
import 'package:flutter_colorpicker/flutter_colorpicker.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:logging/logging.dart';
import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
@@ -200,17 +201,11 @@ void showCommentDialog(BuildContext context, commentCallback(comment)) {
Widget getStatus(String status) {
return status == "Delivered"
? Chip(
backgroundColor: Colors.green,
avatar: Icon(
Icons.check,
color: Colors.white,
size: 14,
),
label: Text(
status,
style: TextStyle(color: Colors.white, fontSize: 12),
))
? Text(
status,
style: TextStyle(
color: primaryColor, fontSize: 18, fontWeight: FontWeight.bold),
)
: status == "rejected"
? Chip(
backgroundColor: Colors.red,
@@ -243,12 +238,14 @@ Widget getStatus(String status) {
fontSize: 18,
fontWeight: FontWeight.bold),
)
: status == "Pending" || status == "Rescheduled"
: status == "Pending" ||
status == "Rescheduled" ||
status == "Processing"
? Row(
children: <Widget>[
Padding(
padding: const EdgeInsets.all(8.0),
child: Icon(Icons.schedule),
child: Icon(Icons.schedule, color: primaryColor),
),
Text(
status,
@@ -259,12 +256,13 @@ Widget getStatus(String status) {
)
],
)
: status == "Assigned"
: status == "Ready to ship"
? Row(
children: <Widget>[
Padding(
padding: const EdgeInsets.all(8.0),
child: Icon(Icons.check),
child: Icon(Ionicons.ios_airplane,
color: primaryColor),
),
Text(
status,
@@ -275,26 +273,60 @@ Widget getStatus(String status) {
)
],
)
: status == "Canceled"
? Text(
status,
style: TextStyle(
color: primaryColor,
fontSize: 18,
fontWeight: FontWeight.bold),
)
: status == "Delivered"
? Text(
: status == "Received"
? Row(
children: <Widget>[
Padding(
padding: const EdgeInsets.all(8.0),
child: Icon(
MaterialCommunityIcons.package_down,
color: primaryColor)),
Text(
status,
style: TextStyle(
color: Colors.green, fontSize: 12),
color: primaryColor,
fontSize: 18,
fontWeight: FontWeight.bold),
)
: Chip(
avatar: Icon(
Icons.check,
size: 14,
),
label: Text(status));
],
)
: status == "Assigned"
? Row(
children: <Widget>[
Padding(
padding: const EdgeInsets.all(8.0),
child: Icon(Icons.check),
),
Text(
status,
style: TextStyle(
color: primaryColor,
fontSize: 18,
fontWeight: FontWeight.bold),
)
],
)
: status == "Canceled"
? Text(
status,
style: TextStyle(
color: primaryColor,
fontSize: 18,
fontWeight: FontWeight.bold),
)
: status == "Delivered"
? Text(
status,
style: TextStyle(
color: Colors.green,
fontSize: 12),
)
: Chip(
avatar: Icon(
Icons.check,
size: 14,
),
label: Text(status));
}
call(BuildContext context, String phone) {