2020-10-07 02:33:06 +06:30
|
|
|
import 'package:fcs/helpers/theme.dart';
|
|
|
|
|
import 'package:fcs/pages/main/model/main_model.dart';
|
|
|
|
|
import 'package:fcs/pages/widgets/display_text.dart';
|
|
|
|
|
import 'package:fcs/pages/widgets/fcs_id_icon.dart';
|
2024-01-25 17:40:35 +06:30
|
|
|
import 'package:fcs/pages/widgets/local_app_bar.dart';
|
2020-10-07 02:33:06 +06:30
|
|
|
import 'package:fcs/pages/widgets/local_text.dart';
|
2020-09-18 04:04:21 +06:30
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
class BuyingOnlinePage extends StatefulWidget {
|
|
|
|
|
@override
|
|
|
|
|
_BuyingOnlinePagetate createState() => _BuyingOnlinePagetate();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class _BuyingOnlinePagetate extends State<BuyingOnlinePage>
|
|
|
|
|
with SingleTickerProviderStateMixin {
|
2021-09-10 12:00:08 +06:30
|
|
|
late TabController _tabController;
|
2020-09-18 04:04:21 +06:30
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
void initState() {
|
|
|
|
|
_tabController = TabController(vsync: this, length: 2);
|
|
|
|
|
super.initState();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
MainModel mainModel = Provider.of<MainModel>(context);
|
|
|
|
|
|
|
|
|
|
final phoneNumberBox = DisplayText(
|
2021-09-10 15:15:20 +06:30
|
|
|
text: mainModel.user?.phone,
|
2020-10-17 01:40:24 +06:30
|
|
|
labelTextKey: "contact.phone",
|
2020-09-18 04:04:21 +06:30
|
|
|
iconData: Icons.location_on,
|
|
|
|
|
);
|
|
|
|
|
final nameBox = Center(
|
|
|
|
|
child: Text(
|
2021-09-10 15:15:20 +06:30
|
|
|
mainModel.user?.name ?? "",
|
2020-09-18 04:04:21 +06:30
|
|
|
style: TextStyle(fontSize: 18, color: primaryColor),
|
|
|
|
|
));
|
|
|
|
|
final fcsIdBox = DisplayText(
|
2021-09-10 15:15:20 +06:30
|
|
|
text: mainModel.user?.fcsID,
|
2020-10-17 01:40:24 +06:30
|
|
|
labelTextKey: "customer.fcs.id",
|
2020-09-18 04:04:21 +06:30
|
|
|
icon: FcsIDIcon(),
|
|
|
|
|
);
|
|
|
|
|
final shippingAddressBox = DisplayText(
|
2021-09-10 15:15:20 +06:30
|
|
|
text: mainModel.setting?.usaAddress,
|
2020-10-17 01:40:24 +06:30
|
|
|
labelTextKey: "profile.usa.shipping.address",
|
2020-09-18 04:04:21 +06:30
|
|
|
iconData: Icons.location_on,
|
|
|
|
|
);
|
|
|
|
|
final instructionBox = Container(
|
|
|
|
|
padding: EdgeInsets.only(left: 10, top: 30, bottom: 10),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Wrap(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
LocalText(
|
|
|
|
|
context,
|
|
|
|
|
'buy_online.buying_instruction',
|
|
|
|
|
color: labelColor,
|
|
|
|
|
fontSize: 15,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
return Scaffold(
|
2024-01-25 17:40:35 +06:30
|
|
|
appBar: LocalAppBar(
|
|
|
|
|
labelKey: "buy_online.title",
|
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
|
arrowColor: primaryColor,
|
|
|
|
|
labelColor: primaryColor),
|
2020-09-18 04:04:21 +06:30
|
|
|
body: ListView(
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
padding: EdgeInsets.only(top: 10, left: 10, right: 10),
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
nameBox,
|
|
|
|
|
phoneNumberBox,
|
|
|
|
|
fcsIdBox,
|
|
|
|
|
shippingAddressBox,
|
|
|
|
|
instructionBox,
|
|
|
|
|
new Container(
|
|
|
|
|
decoration: new BoxDecoration(color: Colors.white),
|
2024-01-25 17:40:35 +06:30
|
|
|
child: new TabBar.secondary(
|
|
|
|
|
labelPadding: EdgeInsets.all(7),
|
|
|
|
|
dividerColor: Colors.grey.shade200,
|
|
|
|
|
indicatorColor: primaryColor,
|
2020-09-18 04:04:21 +06:30
|
|
|
labelColor: primaryColor,
|
|
|
|
|
labelStyle: TextStyle(fontWeight: FontWeight.bold),
|
|
|
|
|
controller: _tabController,
|
|
|
|
|
tabs: [
|
2020-09-18 21:33:41 +06:30
|
|
|
LocalText(context, "buy_online.fullname", color: primaryColor),
|
|
|
|
|
LocalText(context, "buy_online.first.last",
|
|
|
|
|
color: primaryColor),
|
2020-09-18 04:04:21 +06:30
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
new Container(
|
|
|
|
|
padding: EdgeInsets.only(top: 10),
|
|
|
|
|
height: 500,
|
|
|
|
|
width: 500,
|
|
|
|
|
child: new TabBarView(
|
|
|
|
|
controller: _tabController,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
2020-10-07 02:33:06 +06:30
|
|
|
child: Image.asset('assets/buying_online_with_full_name.png',
|
|
|
|
|
fit: BoxFit.contain),
|
2020-09-18 04:04:21 +06:30
|
|
|
),
|
|
|
|
|
Container(
|
2020-10-07 02:33:06 +06:30
|
|
|
child: Image.asset(
|
|
|
|
|
'assets/buying_online_with_first_last_name.png',
|
2020-09-18 04:04:21 +06:30
|
|
|
fit: BoxFit.contain),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 10)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|