add shipment in processing, update package, processing and receiving
This commit is contained in:
@@ -76,12 +76,6 @@ class _ProfileState extends State<Profile> {
|
||||
buildLanguage(languageModel);
|
||||
var deliveryAddressModel = Provider.of<DeliveryAddressModel>(context);
|
||||
|
||||
final namebox = DisplayText(
|
||||
text: "${user.name ?? ''}" + " (${user.status ?? ''})",
|
||||
labelTextKey: "profile.name",
|
||||
iconData: Icons.person,
|
||||
);
|
||||
|
||||
final currencyBox = Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
@@ -104,24 +98,6 @@ class _ProfileState extends State<Profile> {
|
||||
iconData: MaterialCommunityIcons.account_remove,
|
||||
);
|
||||
|
||||
final phonenumberBox = Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: DisplayText(
|
||||
text: user.phone,
|
||||
labelTextKey: "profile.phone",
|
||||
iconData: Icons.phone),
|
||||
),
|
||||
// IconButton(
|
||||
// icon: Icon(Icons.edit, color: Colors.grey),
|
||||
// onPressed: () {
|
||||
// Navigator.of(context, rootNavigator: true).push(
|
||||
// CupertinoPageRoute(
|
||||
// builder: (context) => ChangePhoneNumber(user: user)));
|
||||
// })
|
||||
],
|
||||
);
|
||||
|
||||
final fcsIDBox = Row(
|
||||
children: [
|
||||
Expanded(
|
||||
@@ -187,31 +163,48 @@ class _ProfileState extends State<Profile> {
|
||||
})
|
||||
],
|
||||
);
|
||||
|
||||
final titleBox = Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
user.name ?? "",
|
||||
style: TextStyle(fontSize: 18, color: Colors.black),
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
InkResponse(
|
||||
radius: 20,
|
||||
onTap: _editName,
|
||||
child: Icon(Icons.edit, color: Colors.grey, size: 23))
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 1),
|
||||
Text(
|
||||
user.phone,
|
||||
style: TextStyle(fontSize: 15, color: labelColor),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
return LocalProgress(
|
||||
inAsyncCall: _isLoading,
|
||||
child: Scaffold(
|
||||
key: key,
|
||||
appBar: LocalAppBar(
|
||||
labelKey: "profile.title",
|
||||
backgroundColor: Colors.white,
|
||||
labelColor: primaryColor,
|
||||
arrowColor: primaryColor),
|
||||
backgroundColor: Colors.white,
|
||||
labelColor: primaryColor,
|
||||
arrowColor: primaryColor,
|
||||
titleWidget: titleBox
|
||||
),
|
||||
body: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: ListView(
|
||||
children: <Widget>[
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(child: namebox),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 0),
|
||||
child: IconButton(
|
||||
icon: Icon(Icons.edit, color: Colors.grey),
|
||||
onPressed: _editName),
|
||||
)
|
||||
],
|
||||
),
|
||||
phonenumberBox,
|
||||
const SizedBox(height: 5),
|
||||
fcsIDBox,
|
||||
usaShippingAddressBox,
|
||||
currencyBox,
|
||||
@@ -327,13 +320,13 @@ class _ProfileState extends State<Profile> {
|
||||
if (user == null || user.isCustomer()) return Container();
|
||||
|
||||
List<Privilege> privileges = [];
|
||||
user.privileges.forEach((e) {
|
||||
for (var e in user.privileges) {
|
||||
Privilege? p = _privileges.firstWhereOrNull((p) => p.id == e);
|
||||
|
||||
if (p != null) {
|
||||
privileges.add(p);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return privileges.isEmpty
|
||||
? const SizedBox()
|
||||
@@ -373,10 +366,9 @@ class _ProfileState extends State<Profile> {
|
||||
children: [
|
||||
Text("${p.name}",
|
||||
style: TextStyle(
|
||||
fontSize: 16.0,
|
||||
fontStyle: FontStyle.normal,
|
||||
color: primaryColor,
|
||||
)),
|
||||
fontSize: 16.0,
|
||||
fontStyle: FontStyle.normal,
|
||||
color: primaryColor)),
|
||||
Text(
|
||||
"${p.desc}",
|
||||
style: TextStyle(
|
||||
@@ -401,9 +393,7 @@ class _ProfileState extends State<Profile> {
|
||||
_showToast(String title) {
|
||||
ScaffoldMessengerState? scaffold = key.currentState;
|
||||
|
||||
if (scaffold == null) {
|
||||
scaffold = ScaffoldMessenger.of(context);
|
||||
}
|
||||
scaffold ??= ScaffoldMessenger.of(context);
|
||||
|
||||
scaffold.showSnackBar(
|
||||
SnackBar(
|
||||
|
||||
Reference in New Issue
Block a user