add package list

This commit is contained in:
2020-06-01 11:52:12 +06:30
parent cb88e7b65c
commit a0d474a269
10 changed files with 1043 additions and 272 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) {
@@ -400,7 +432,7 @@ Widget phoneWidget(BuildContext context, String phone) {
}
Widget fcsInput(String label, IconData iconData,
{TextEditingController controller,String value}) {
{TextEditingController controller, String value}) {
return Row(
children: <Widget>[
Padding(
@@ -413,7 +445,7 @@ Widget fcsInput(String label, IconData iconData,
child: Row(children: <Widget>[
Expanded(
child: TextFormField(
initialValue: value,
initialValue: value,
controller: controller,
cursorColor: primaryColor,
textAlign: TextAlign.left,
@@ -473,7 +505,7 @@ Widget _dropDown() {
);
}
Widget fcsButton(BuildContext context, String text,{Function callack}) {
Widget fcsButton(BuildContext context, String text, {Function callack}) {
return Container(
padding: EdgeInsets.only(left: 10, right: 10, top: 10),
child: Container(