update main model

This commit is contained in:
tzw
2021-09-10 15:15:20 +06:30
parent 51a5fe0740
commit 3eacbef117
11 changed files with 68 additions and 70 deletions

View File

@@ -1,6 +1,5 @@
import 'package:fcs/helpers/theme.dart';
import 'package:fcs/pages/main/model/main_model.dart';
import 'package:fcs/pages/main/util.dart';
import 'package:fcs/pages/widgets/display_text.dart';
import 'package:fcs/pages/widgets/fcs_id_icon.dart';
import 'package:fcs/pages/widgets/local_text.dart';
@@ -28,22 +27,22 @@ class _BuyingOnlinePagetate extends State<BuyingOnlinePage>
MainModel mainModel = Provider.of<MainModel>(context);
final phoneNumberBox = DisplayText(
text: mainModel.user.phone,
text: mainModel.user?.phone,
labelTextKey: "contact.phone",
iconData: Icons.location_on,
);
final nameBox = Center(
child: Text(
mainModel.user.name,
mainModel.user?.name ?? "",
style: TextStyle(fontSize: 18, color: primaryColor),
));
final fcsIdBox = DisplayText(
text: mainModel.user.fcsID,
text: mainModel.user?.fcsID,
labelTextKey: "customer.fcs.id",
icon: FcsIDIcon(),
);
final shippingAddressBox = DisplayText(
text: mainModel.setting.usaAddress,
text: mainModel.setting?.usaAddress,
labelTextKey: "profile.usa.shipping.address",
iconData: Icons.location_on,
);