diff --git a/lib/pages/box/box_editor.dart b/lib/pages/box/box_editor.dart index edf261b..b76e377 100644 --- a/lib/pages/box/box_editor.dart +++ b/lib/pages/box/box_editor.dart @@ -23,6 +23,7 @@ import 'package:fcs/pages/widgets/local_text.dart'; import 'package:fcs/pages/widgets/my_data_table.dart'; import 'package:fcs/pages/widgets/progress.dart'; import 'package:fcs/pages/widgets/title_with_add_button.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; @@ -336,7 +337,8 @@ class _BoxEditorState extends State { onTap: () { Navigator.push( context, - BottomUpPageRoute(CargoTypeEditor(cargo: c.value)), + CupertinoPageRoute( + builder: (context) => CargoTypeEditor(cargo: c.value)), ); }, child: Container( @@ -475,7 +477,7 @@ class _BoxEditorState extends State { appBar: AppBar( centerTitle: true, leading: new IconButton( - icon: new Icon(Icons.close, color: primaryColor, size: 30), + icon: new Icon(CupertinoIcons.back, color: primaryColor, size: 30), onPressed: () => Navigator.of(context).pop(), ), shadowColor: Colors.transparent, @@ -552,7 +554,9 @@ class _BoxEditorState extends State { titleKey: "box.cargo_type", onTap: () async { Cargo cargo = await Navigator.push( - context, BottomUpPageRoute(CargoTypeEditor())); + context, + CupertinoPageRoute( + builder: (context) => CargoTypeEditor())); if (cargo != null) { setState(() { _box.cargoTypes.add(cargo); @@ -599,9 +603,10 @@ class _BoxEditorState extends State { onTap: () async { DeliveryAddress d = await Navigator.push( context, - BottomUpPageRoute(DeliveryAddressSelection( - deliveryAddress: _deliveryAddress, - )), + CupertinoPageRoute( + builder: (context) => DeliveryAddressSelection( + deliveryAddress: _deliveryAddress, + )), ); if (d == null) return; setState(() { diff --git a/lib/pages/box/box_list.dart b/lib/pages/box/box_list.dart index 3447982..063bbe2 100644 --- a/lib/pages/box/box_list.dart +++ b/lib/pages/box/box_list.dart @@ -86,7 +86,7 @@ class _BoxListState extends State { _newPickup() { Navigator.push( context, - BottomUpPageRoute(BoxEditor()), + CupertinoPageRoute(builder: (context) => BoxEditor()), ); } diff --git a/lib/pages/box/box_list_row.dart b/lib/pages/box/box_list_row.dart index 5b4d7a1..a7a6e6a 100644 --- a/lib/pages/box/box_list_row.dart +++ b/lib/pages/box/box_list_row.dart @@ -1,6 +1,7 @@ import 'package:fcs/domain/entities/box.dart'; import 'package:fcs/pages/main/util.dart'; import 'package:fcs/pages/widgets/bottom_up_page_route.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; @@ -35,12 +36,12 @@ class _BoxListRowState extends State { if (widget.isReadOnly) { // Navigator.push( // context, - // BottomUpPageRoute(PackageInfo(package: _box)), + // CupertinoPageRoute(builder: (context) => PackageInfo(package: _box)), // ); } else { Navigator.push( context, - BottomUpPageRoute(BoxEditor(box: _box)), + CupertinoPageRoute(builder: (context) => BoxEditor(box: _box)), ); } }, diff --git a/lib/pages/box/cargo_type_editor.dart b/lib/pages/box/cargo_type_editor.dart index fe82800..2cba854 100644 --- a/lib/pages/box/cargo_type_editor.dart +++ b/lib/pages/box/cargo_type_editor.dart @@ -6,6 +6,7 @@ import 'package:fcs/pages/widgets/input_text.dart'; import 'package:fcs/pages/widgets/local_dropdown.dart'; import 'package:fcs/pages/widgets/local_text.dart'; import 'package:fcs/pages/widgets/progress.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:provider/provider.dart'; @@ -81,7 +82,8 @@ class _CargoTypeEditorState extends State { appBar: AppBar( centerTitle: true, leading: new IconButton( - icon: new Icon(Icons.close, color: primaryColor, size: 30), + icon: + new Icon(CupertinoIcons.back, color: primaryColor, size: 30), onPressed: () => Navigator.of(context).pop(), ), shadowColor: Colors.transparent, diff --git a/lib/pages/buying_instruction/buying_online.dart b/lib/pages/buying_instruction/buying_online.dart index b029846..fbbbc00 100644 --- a/lib/pages/buying_instruction/buying_online.dart +++ b/lib/pages/buying_instruction/buying_online.dart @@ -4,6 +4,7 @@ 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'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -67,7 +68,7 @@ class _BuyingOnlinePagetate extends State centerTitle: true, leading: new IconButton( icon: new Icon( - Icons.close, + CupertinoIcons.back, color: primaryColor, ), onPressed: () => Navigator.of(context).pop(), diff --git a/lib/pages/chat/message_detail.dart b/lib/pages/chat/message_detail.dart index 14f884b..0cd5221 100644 --- a/lib/pages/chat/message_detail.dart +++ b/lib/pages/chat/message_detail.dart @@ -176,7 +176,8 @@ class MessageDetail extends StatelessWidget { Provider.of(context, listen: false); Package p = await packageModel.getPackage(message.messageID); if (p == null) return; - Navigator.push(context, BottomUpPageRoute(PackageInfo(package: p))); + Navigator.push(context, + CupertinoPageRoute(builder: (context) => PackageInfo(package: p))); } if (message.messageType == message_type_profile && message.messageID != null && @@ -184,13 +185,14 @@ class MessageDetail extends StatelessWidget { MainModel mainModel = Provider.of(context, listen: false); if (mainModel.user.isCustomer()) { - Navigator.push(context, BottomUpPageRoute(Profile())); + Navigator.push( + context, CupertinoPageRoute(builder: (context) => Profile())); } else { CustomerModel customerModel = Provider.of(context, listen: false); User user = await customerModel.getUser(message.messageID); - Navigator.of(context) - .push(BottomUpPageRoute(CustomerEditor(customer: user))); + Navigator.of(context).push(CupertinoPageRoute( + builder: (context) => CustomerEditor(customer: user))); } } } diff --git a/lib/pages/contact/contact_page.dart b/lib/pages/contact/contact_page.dart index 9ae62cf..e63e971 100644 --- a/lib/pages/contact/contact_page.dart +++ b/lib/pages/contact/contact_page.dart @@ -30,7 +30,7 @@ class _ContactPageState extends State { centerTitle: true, leading: new IconButton( icon: new Icon( - Icons.close, + CupertinoIcons.back, color: primaryColor, ), onPressed: () => Navigator.of(context).pop(), diff --git a/lib/pages/customer/customer_editor.dart b/lib/pages/customer/customer_editor.dart index 4a64df0..141866c 100644 --- a/lib/pages/customer/customer_editor.dart +++ b/lib/pages/customer/customer_editor.dart @@ -5,6 +5,7 @@ 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/progress.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -51,7 +52,7 @@ class _CustomerEditorState extends State { centerTitle: true, leading: new IconButton( icon: new Icon( - Icons.close, + CupertinoIcons.back, color: primaryColor, size: 30, ), diff --git a/lib/pages/customer/customer_list.dart b/lib/pages/customer/customer_list.dart index d1321cd..d3dcefa 100644 --- a/lib/pages/customer/customer_list.dart +++ b/lib/pages/customer/customer_list.dart @@ -59,7 +59,7 @@ class _CustomerListState extends State { ), floatingActionButton: FloatingActionButton.extended( onPressed: () { - Navigator.of(context).push(BottomUpPageRoute(InvitationCreate())); + Navigator.of(context).push(CupertinoPageRoute(builder: (context) => InvitationCreate())); }, icon: Icon(Icons.add), label: LocalText(context, "invitation.new", color: Colors.white), @@ -204,7 +204,7 @@ class _CustomerListState extends State { _select(User customer) { Navigator.of(context) - .push(BottomUpPageRoute(CustomerEditor(customer: customer))); + .push(CupertinoPageRoute(builder: (context) => CustomerEditor(customer: customer))); } _gotoMsg(User customer) { @@ -212,7 +212,7 @@ class _CustomerListState extends State { Provider.of(context, listen: false); messageModel.initQuery(customer.id); Navigator.of(context) - .push(BottomUpPageRoute(MessageDetail( + .push(CupertinoPageRoute(builder: (context) => MessageDetail( receiverID: customer.id, receiverName: customer.name, messageModel: messageModel, diff --git a/lib/pages/customer/invitation_create.dart b/lib/pages/customer/invitation_create.dart index 36a4e65..b1b434e 100644 --- a/lib/pages/customer/invitation_create.dart +++ b/lib/pages/customer/invitation_create.dart @@ -5,6 +5,7 @@ import 'package:fcs/pages/main/util.dart'; import 'package:fcs/pages/widgets/input_text.dart'; import 'package:fcs/pages/widgets/local_text.dart'; import 'package:fcs/pages/widgets/progress.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -47,7 +48,7 @@ class _InvitationCreateState extends State { centerTitle: true, leading: new IconButton( icon: new Icon( - Icons.close, + CupertinoIcons.back, color: primaryColor, ), onPressed: () => Navigator.of(context).pop(), diff --git a/lib/pages/customer/invitation_editor.dart b/lib/pages/customer/invitation_editor.dart index 6c333c2..837f704 100644 --- a/lib/pages/customer/invitation_editor.dart +++ b/lib/pages/customer/invitation_editor.dart @@ -4,6 +4,7 @@ import 'package:fcs/pages/customer/model/customer_model.dart'; import 'package:fcs/pages/main/util.dart'; import 'package:fcs/pages/widgets/display_text.dart'; import 'package:fcs/pages/widgets/progress.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -49,7 +50,7 @@ class _InvitationEditorState extends State { centerTitle: true, leading: new IconButton( icon: new Icon( - Icons.close, + CupertinoIcons.back, color: primaryColor, size: 30, ), diff --git a/lib/pages/delivery/delivery_list_row.dart b/lib/pages/delivery/delivery_list_row.dart index ac18963..0941bbf 100644 --- a/lib/pages/delivery/delivery_list_row.dart +++ b/lib/pages/delivery/delivery_list_row.dart @@ -2,6 +2,7 @@ import 'package:fcs/domain/entities/box.dart'; import 'package:fcs/pages/box/box_editor.dart'; import 'package:fcs/pages/main/util.dart'; import 'package:fcs/pages/widgets/bottom_up_page_route.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; @@ -34,12 +35,12 @@ class _DeliveryListRowState extends State { if (widget.isReadOnly) { // Navigator.push( // context, - // BottomUpPageRoute(PackageInfo(package: _box)), + // CupertinoPageRoute(builder: (context) => PackageInfo(package: _box)), // ); } else { Navigator.push( context, - BottomUpPageRoute(BoxEditor(box: _box)), + CupertinoPageRoute(builder: (context) => BoxEditor(box: _box)), ); } }, diff --git a/lib/pages/delivery_address/delivery_address_editor.dart b/lib/pages/delivery_address/delivery_address_editor.dart index 7c29891..234671b 100644 --- a/lib/pages/delivery_address/delivery_address_editor.dart +++ b/lib/pages/delivery_address/delivery_address_editor.dart @@ -5,6 +5,7 @@ import 'package:fcs/pages/main/util.dart'; import 'package:fcs/pages/widgets/input_text.dart'; import 'package:fcs/pages/widgets/local_text.dart'; import 'package:fcs/pages/widgets/progress.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -104,7 +105,7 @@ class _DeliveryAddressEditorState extends State { appBar: AppBar( centerTitle: true, leading: new IconButton( - icon: new Icon(Icons.close), + icon: new Icon(CupertinoIcons.back), onPressed: () => Navigator.of(context).pop(), ), backgroundColor: primaryColor, diff --git a/lib/pages/delivery_address/delivery_address_list.dart b/lib/pages/delivery_address/delivery_address_list.dart index ba569df..7684067 100644 --- a/lib/pages/delivery_address/delivery_address_list.dart +++ b/lib/pages/delivery_address/delivery_address_list.dart @@ -5,6 +5,7 @@ import 'package:fcs/pages/main/util.dart'; import 'package:fcs/pages/widgets/bottom_up_page_route.dart'; import 'package:fcs/pages/widgets/local_text.dart'; import 'package:fcs/pages/widgets/progress.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -40,7 +41,7 @@ class _DeliveryAddressListState extends State { appBar: AppBar( centerTitle: true, leading: new IconButton( - icon: new Icon(Icons.close), + icon: new Icon(CupertinoIcons.back), onPressed: () => Navigator.pop(context), ), backgroundColor: primaryColor, @@ -53,8 +54,8 @@ class _DeliveryAddressListState extends State { ), floatingActionButton: FloatingActionButton.extended( onPressed: () { - Navigator.of(context) - .push(BottomUpPageRoute(DeliveryAddressEditor())); + Navigator.of(context).push(CupertinoPageRoute( + builder: (context) => DeliveryAddressEditor())); }, icon: Icon(Icons.add), label: LocalText(context, "delivery_address.new_address", @@ -100,8 +101,9 @@ class _DeliveryAddressListState extends State { _edit(BuildContext context, DeliveryAddress deliveryAddress) { Navigator.push( context, - BottomUpPageRoute( - DeliveryAddressEditor(deliveryAddress: deliveryAddress)), + CupertinoPageRoute( + builder: (context) => + DeliveryAddressEditor(deliveryAddress: deliveryAddress)), ); } diff --git a/lib/pages/discount/discount_editor.dart b/lib/pages/discount/discount_editor.dart index 454e823..65a0967 100644 --- a/lib/pages/discount/discount_editor.dart +++ b/lib/pages/discount/discount_editor.dart @@ -5,6 +5,7 @@ import 'package:fcs/pages/main/util.dart'; import 'package:fcs/pages/widgets/display_text.dart'; import 'package:fcs/pages/widgets/input_text.dart'; import 'package:fcs/pages/widgets/progress.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; @@ -72,7 +73,7 @@ class _DiscountEditorState extends State { AppTranslations.of(context).text("discount.form"), ), leading: new IconButton( - icon: new Icon(Icons.close), + icon: new Icon(CupertinoIcons.back), onPressed: () => Navigator.of(context).pop(), ), backgroundColor: primaryColor, diff --git a/lib/pages/discount/discount_list.dart b/lib/pages/discount/discount_list.dart index e9e636a..2220c87 100644 --- a/lib/pages/discount/discount_list.dart +++ b/lib/pages/discount/discount_list.dart @@ -52,9 +52,10 @@ class _DiscountListState extends State { onTap: () { Navigator.push( context, - BottomUpPageRoute(DiscountEditor( - discount: discount, - )), + CupertinoPageRoute( + builder: (context) => DiscountEditor( + discount: discount, + )), ); }, child: Padding( @@ -119,7 +120,7 @@ class _DiscountListState extends State { onPressed: () { Navigator.push( context, - BottomUpPageRoute(DiscountEditor()), + CupertinoPageRoute(builder: (context) => DiscountEditor()), ); }, icon: Icon(Icons.add), diff --git a/lib/pages/faq/faq_list_page.dart b/lib/pages/faq/faq_list_page.dart index d546784..a515677 100644 --- a/lib/pages/faq/faq_list_page.dart +++ b/lib/pages/faq/faq_list_page.dart @@ -46,7 +46,8 @@ class _FAQListPageState extends State floatingActionButton: isEditable ? FloatingActionButton.extended( onPressed: () { - Navigator.of(context).push(BottomUpPageRoute(FAQEditor())); + Navigator.of(context).push( + CupertinoPageRoute(builder: (context) => FAQEditor())); }, icon: Icon(Icons.add), label: LocalText(context, "faq.add.title", color: Colors.white), @@ -171,9 +172,11 @@ class _FAQListPageState extends State _selectLinkPage(String linkPage) { if (linkPage == page_payment_methods) { - Navigator.of(context).push(BottomUpPageRoute(PaymentMethodPage())); + Navigator.of(context) + .push(CupertinoPageRoute(builder: (context) => PaymentMethodPage())); } else if (linkPage == page_buying_instructions) { - Navigator.of(context).push(BottomUpPageRoute(BuyingOnlinePage())); + Navigator.of(context) + .push(CupertinoPageRoute(builder: (context) => BuyingOnlinePage())); } } } diff --git a/lib/pages/fcs_shipment/fcs_shipment_editor.dart b/lib/pages/fcs_shipment/fcs_shipment_editor.dart index c221035..4d700bf 100644 --- a/lib/pages/fcs_shipment/fcs_shipment_editor.dart +++ b/lib/pages/fcs_shipment/fcs_shipment_editor.dart @@ -11,6 +11,7 @@ import 'package:fcs/pages/widgets/local_button.dart'; import 'package:fcs/pages/widgets/local_text.dart'; import 'package:fcs/pages/widgets/popupmenu.dart'; import 'package:fcs/pages/widgets/progress.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; @@ -89,7 +90,7 @@ class _FcsShipmentEditorState extends State { centerTitle: true, shadowColor: Colors.transparent, leading: new IconButton( - icon: new Icon(Icons.close, color: primaryColor), + icon: new Icon(CupertinoIcons.back, color: primaryColor), onPressed: () => Navigator.of(context).pop(), ), backgroundColor: Colors.white, diff --git a/lib/pages/fcs_shipment/fcs_shipment_list.dart b/lib/pages/fcs_shipment/fcs_shipment_list.dart index 28396aa..8303721 100644 --- a/lib/pages/fcs_shipment/fcs_shipment_list.dart +++ b/lib/pages/fcs_shipment/fcs_shipment_list.dart @@ -77,6 +77,7 @@ class _FcsShipmentListState extends State { } _newShipment() { - Navigator.of(context).push(BottomUpPageRoute(FcsShipmentEditor())); + Navigator.of(context) + .push(CupertinoPageRoute(builder: (context) => FcsShipmentEditor())); } } diff --git a/lib/pages/fcs_shipment/fcs_shipment_list_row.dart b/lib/pages/fcs_shipment/fcs_shipment_list_row.dart index 5c5c14e..9d0495e 100644 --- a/lib/pages/fcs_shipment/fcs_shipment_list_row.dart +++ b/lib/pages/fcs_shipment/fcs_shipment_list_row.dart @@ -2,6 +2,7 @@ import 'package:fcs/domain/entities/fcs_shipment.dart'; import 'package:fcs/helpers/theme.dart'; import 'package:fcs/pages/main/util.dart'; import 'package:fcs/pages/widgets/bottom_up_page_route.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:intl/intl.dart'; @@ -19,8 +20,8 @@ class FcsShipmentListRow extends StatelessWidget { padding: EdgeInsets.only(left: 15, right: 15), child: InkWell( onTap: () { - Navigator.of(context) - .push(BottomUpPageRoute(FcsShipmentEditor(shipment: shipment))); + Navigator.of(context).push(CupertinoPageRoute( + builder: (context) => FcsShipmentEditor(shipment: shipment))); }, child: Row( children: [ diff --git a/lib/pages/invoice/box_addition.dart b/lib/pages/invoice/box_addition.dart index f577288..4a8aef5 100644 --- a/lib/pages/invoice/box_addition.dart +++ b/lib/pages/invoice/box_addition.dart @@ -3,6 +3,7 @@ import 'package:fcs/helpers/theme.dart'; import 'package:fcs/localization/app_translations.dart'; import 'package:fcs/pages/box/model/box_model.dart'; import 'package:fcs/pages/widgets/progress.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -40,7 +41,7 @@ class _BoxAdditionState extends State { appBar: AppBar( centerTitle: true, leading: new IconButton( - icon: new Icon(Icons.close), + icon: new Icon(CupertinoIcons.back), onPressed: () => Navigator.of(context).pop(), ), backgroundColor: primaryColor, diff --git a/lib/pages/invoice/invoce_list.dart b/lib/pages/invoice/invoce_list.dart index 4ae1884..7953a26 100644 --- a/lib/pages/invoice/invoce_list.dart +++ b/lib/pages/invoice/invoce_list.dart @@ -92,7 +92,8 @@ class _InvoiceListState extends State { } _newInvoice() { - Navigator.of(context).push(BottomUpPageRoute(InvoiceEditor())); + Navigator.of(context) + .push(CupertinoPageRoute(builder: (context) => InvoiceEditor())); } Widget _pending() { diff --git a/lib/pages/invoice/invoice_editor.dart b/lib/pages/invoice/invoice_editor.dart index c8adcf2..66e900c 100644 --- a/lib/pages/invoice/invoice_editor.dart +++ b/lib/pages/invoice/invoice_editor.dart @@ -22,6 +22,7 @@ import 'package:fcs/pages/widgets/multi_img_controller.dart'; import 'package:fcs/pages/widgets/multi_img_file.dart'; import 'package:fcs/pages/widgets/my_data_table.dart'; import 'package:fcs/pages/widgets/progress.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; @@ -188,7 +189,7 @@ class _InvoiceEditorState extends State { appBar: AppBar( centerTitle: true, leading: new IconButton( - icon: new Icon(Icons.close, color: primaryColor), + icon: new Icon(CupertinoIcons.back, color: primaryColor), onPressed: () => Navigator.of(context).pop(), ), backgroundColor: Colors.white, diff --git a/lib/pages/invoice/invoice_list_row.dart b/lib/pages/invoice/invoice_list_row.dart index 2015c07..525cb7e 100644 --- a/lib/pages/invoice/invoice_list_row.dart +++ b/lib/pages/invoice/invoice_list_row.dart @@ -78,12 +78,13 @@ class _InvoiceListRowState extends State { child: InkWell( onTap: () { owner - ? Navigator.of(context).push( - BottomUpPageRoute(InvoiceEditor(invoice: _invoice))) - : Navigator.of(context) - .push(BottomUpPageRoute(PaymentPDFScreen( - path: pdfPath, - ))); + ? Navigator.of(context).push(CupertinoPageRoute( + builder: (context) => + InvoiceEditor(invoice: _invoice))) + : Navigator.of(context).push(CupertinoPageRoute( + builder: (context) => PaymentPDFScreen( + path: pdfPath, + ))); }, child: new Row( children: [ @@ -147,8 +148,9 @@ class _InvoiceListRowState extends State { ], ), onPressed: () { - Navigator.of(context).push( - BottomUpPageRoute(PaymentPage(invoice: _invoice))); + Navigator.of(context).push(CupertinoPageRoute( + builder: (context) => + PaymentPage(invoice: _invoice))); }, )), ) diff --git a/lib/pages/invoice/payment_page.dart b/lib/pages/invoice/payment_page.dart index 78c8adc..54fd325 100644 --- a/lib/pages/invoice/payment_page.dart +++ b/lib/pages/invoice/payment_page.dart @@ -8,6 +8,7 @@ import 'package:fcs/pages/widgets/multi_img_file.dart'; import 'package:fcs/pages/widgets/my_data_table.dart'; import 'package:fcs/pages/widgets/number_cell.dart'; import 'package:fcs/pages/widgets/progress.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; @@ -66,7 +67,7 @@ class _PaymentPageState extends State { appBar: AppBar( centerTitle: true, leading: new IconButton( - icon: new Icon(Icons.close), + icon: new Icon(CupertinoIcons.back), onPressed: () => Navigator.of(context).pop(), ), backgroundColor: primaryColor, diff --git a/lib/pages/invoice/payment_pdf_screen.dart b/lib/pages/invoice/payment_pdf_screen.dart index 2d59119..bd2ccc7 100644 --- a/lib/pages/invoice/payment_pdf_screen.dart +++ b/lib/pages/invoice/payment_pdf_screen.dart @@ -30,6 +30,11 @@ class _PaymentPDFScreenState extends State appBar: AppBar( backgroundColor: primaryColor, title: Text("Invoice File"), + leading: new IconButton( + icon: new Icon(CupertinoIcons.back), + onPressed: () { + Navigator.of(context).pop(); + }), actions: [ IconButton( icon: Icon(Icons.share), diff --git a/lib/pages/main/home_page.dart b/lib/pages/main/home_page.dart index e204808..33b4c32 100644 --- a/lib/pages/main/home_page.dart +++ b/lib/pages/main/home_page.dart @@ -256,8 +256,9 @@ class _HomePageState extends State { final shipmentCostBtn = TaskButton("rate", icon: FontAwesomeIcons.calculator, - btnCallback: () => - Navigator.of(context).push(BottomUpPageRoute(ShipmentRates()))); + btnCallback: () => Navigator.of(context).push(CupertinoPageRoute( + builder: (context) => ShipmentRates(), + ))); final fcsShipmentBtn = TaskButton("FCSshipment.title", icon: Ionicons.ios_airplane, @@ -373,7 +374,7 @@ class _HomePageState extends State { ); final signinBtn = FlatButton( onPressed: () { - Navigator.of(context).push(BottomUpPageRoute(SigninPage())); + Navigator.of(context).push(CupertinoPageRoute(builder: (context) => SigninPage())); }, child: Text( "Sign In", @@ -530,10 +531,11 @@ class _HomePageState extends State { } Navigator.push( context, - BottomUpPageRoute(PackageInfo( - package: package, - isSearchResult: true, - )), + CupertinoPageRoute( + builder: (context) => PackageInfo( + package: package, + isSearchResult: true, + )), ); } catch (e) { showMsgDialog(context, "Error", e.toString()); diff --git a/lib/pages/main/welcome_page.dart b/lib/pages/main/welcome_page.dart index 0098891..1e3c769 100644 --- a/lib/pages/main/welcome_page.dart +++ b/lib/pages/main/welcome_page.dart @@ -86,8 +86,8 @@ class _WelcomePageState extends State { ), FlatButton( onPressed: () { - Navigator.of(context) - .push(BottomUpPageRoute(SigninPage())); + Navigator.of(context).push(CupertinoPageRoute( + builder: (context) => SigninPage())); }, child: Text( getLocalString(context, "welcome.signin"), diff --git a/lib/pages/market/market_editor.dart b/lib/pages/market/market_editor.dart index a54097c..9ab9717 100644 --- a/lib/pages/market/market_editor.dart +++ b/lib/pages/market/market_editor.dart @@ -5,6 +5,7 @@ import 'package:fcs/pages/main/util.dart'; import 'package:fcs/pages/widgets/input_text.dart'; import 'package:fcs/pages/widgets/local_text.dart'; import 'package:fcs/pages/widgets/progress.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -60,7 +61,7 @@ class _MarketEditorState extends State { appBar: AppBar( centerTitle: true, leading: new IconButton( - icon: new Icon(Icons.close, color: primaryColor, size: 30), + icon: new Icon(CupertinoIcons.back, color: primaryColor, size: 30), onPressed: () => Navigator.of(context).pop(), ), shadowColor: Colors.transparent, diff --git a/lib/pages/package/package_editor.dart b/lib/pages/package/package_editor.dart index 06bbf07..d54a79b 100644 --- a/lib/pages/package/package_editor.dart +++ b/lib/pages/package/package_editor.dart @@ -13,6 +13,7 @@ import 'package:fcs/pages/widgets/local_text.dart'; import 'package:fcs/pages/widgets/multi_img_controller.dart'; import 'package:fcs/pages/widgets/multi_img_file.dart'; import 'package:fcs/pages/widgets/progress.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:intl/intl.dart'; @@ -90,7 +91,7 @@ class _PackageEditorPageState extends State { appBar: AppBar( centerTitle: true, leading: new IconButton( - icon: new Icon(Icons.close, color: primaryColor, size: 30), + icon: new Icon(CupertinoIcons.back, color: primaryColor, size: 30), onPressed: () => Navigator.of(context).pop(), ), shadowColor: Colors.transparent, @@ -210,7 +211,7 @@ class _PackageEditorPageState extends State { _manageMarket() { Navigator.push( context, - BottomUpPageRoute(MarketEditor()), + CupertinoPageRoute(builder: (context) => MarketEditor()), ); } diff --git a/lib/pages/package/package_info.dart b/lib/pages/package/package_info.dart index d28b718..54bde2b 100644 --- a/lib/pages/package/package_info.dart +++ b/lib/pages/package/package_info.dart @@ -15,6 +15,7 @@ import 'package:fcs/pages/widgets/multi_img_controller.dart'; import 'package:fcs/pages/widgets/multi_img_file.dart'; import 'package:fcs/pages/widgets/progress.dart'; import 'package:fcs/pages/widgets/status_tree.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:intl/intl.dart'; @@ -115,9 +116,10 @@ class _PackageInfoState extends State { ? () async { DeliveryAddress d = await Navigator.push( context, - BottomUpPageRoute(DeliveryAddressSelection( - deliveryAddress: _deliveryAddress, - )), + CupertinoPageRoute( + builder: (context) => DeliveryAddressSelection( + deliveryAddress: _deliveryAddress, + )), ); if (d == null) return; _changeDeliverayAddress(d); @@ -131,7 +133,7 @@ class _PackageInfoState extends State { appBar: AppBar( centerTitle: true, leading: new IconButton( - icon: new Icon(Icons.close, color: primaryColor, size: 30), + icon: new Icon(CupertinoIcons.back, color: primaryColor, size: 30), onPressed: () => Navigator.of(context).pop(), ), shadowColor: Colors.transparent, diff --git a/lib/pages/package/package_list.dart b/lib/pages/package/package_list.dart index 55db795..8bce68e 100644 --- a/lib/pages/package/package_list.dart +++ b/lib/pages/package/package_list.dart @@ -137,7 +137,7 @@ class _PackageListState extends State { if (_package == null) return; Navigator.push( context, - BottomUpPageRoute(PackageInfo(package: _package)), + CupertinoPageRoute(builder: (context) => PackageInfo(package: _package)), ); } } diff --git a/lib/pages/package/package_list_row.dart b/lib/pages/package/package_list_row.dart index 89ba4a2..c8908f7 100644 --- a/lib/pages/package/package_list_row.dart +++ b/lib/pages/package/package_list_row.dart @@ -2,6 +2,7 @@ import 'package:fcs/domain/entities/package.dart'; import 'package:fcs/pages/package/package_info.dart'; import 'package:fcs/pages/main/util.dart'; import 'package:fcs/pages/widgets/bottom_up_page_route.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; @@ -28,7 +29,7 @@ class PackageListRow extends StatelessWidget { } Navigator.push( context, - BottomUpPageRoute(PackageInfo(package: package)), + CupertinoPageRoute(builder: (context) => PackageInfo(package: package)), ); }, child: Row( diff --git a/lib/pages/package/package_new.dart b/lib/pages/package/package_new.dart index 664db99..8bda98b 100644 --- a/lib/pages/package/package_new.dart +++ b/lib/pages/package/package_new.dart @@ -10,6 +10,7 @@ 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'; import 'package:fcs/pages/widgets/progress.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -81,7 +82,7 @@ class _PackageNewState extends State { appBar: AppBar( centerTitle: true, leading: new IconButton( - icon: new Icon(Icons.close, color: primaryColor, size: 30), + icon: new Icon(CupertinoIcons.back, color: primaryColor, size: 30), onPressed: () => Navigator.of(context).pop(), ), shadowColor: Colors.transparent, @@ -171,7 +172,7 @@ class _PackageNewState extends State { _addPackage() async { Package package = await Navigator.push( context, - BottomUpPageRoute(TrackingIDPage()), + CupertinoPageRoute(builder: (context) => TrackingIDPage()), ); if (package != null) { diff --git a/lib/pages/package/tracking_id_page.dart b/lib/pages/package/tracking_id_page.dart index 2918b5e..26db8ae 100644 --- a/lib/pages/package/tracking_id_page.dart +++ b/lib/pages/package/tracking_id_page.dart @@ -10,6 +10,7 @@ import 'package:fcs/pages/widgets/bottom_up_page_route.dart'; import 'package:fcs/pages/widgets/input_text.dart'; import 'package:fcs/pages/widgets/local_text.dart'; import 'package:fcs/pages/widgets/progress.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:permission_handler/permission_handler.dart'; @@ -146,7 +147,7 @@ class _TrackingIDPageState extends State { _manageMarket() { Navigator.push( context, - BottomUpPageRoute(MarketEditor()), + CupertinoPageRoute(builder: (context) => MarketEditor()), ); } diff --git a/lib/pages/payment_methods/payment_method_editor.dart b/lib/pages/payment_methods/payment_method_editor.dart index 1f1bba2..c092dd6 100644 --- a/lib/pages/payment_methods/payment_method_editor.dart +++ b/lib/pages/payment_methods/payment_method_editor.dart @@ -6,6 +6,7 @@ import 'package:fcs/pages/main/util.dart'; import 'package:fcs/pages/widgets/input_text.dart'; import 'package:fcs/pages/widgets/local_text.dart'; import 'package:fcs/pages/widgets/progress.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:provider/provider.dart'; @@ -58,7 +59,7 @@ class _PaymentMethodEditorState extends State { appBar: AppBar( centerTitle: true, leading: new IconButton( - icon: new Icon(Icons.close, color: primaryColor), + icon: new Icon(CupertinoIcons.back, color: primaryColor), onPressed: () => Navigator.of(context).pop(), ), title: LocalText( diff --git a/lib/pages/payment_methods/payment_method_page.dart b/lib/pages/payment_methods/payment_method_page.dart index 09e3807..7598793 100644 --- a/lib/pages/payment_methods/payment_method_page.dart +++ b/lib/pages/payment_methods/payment_method_page.dart @@ -9,6 +9,7 @@ import 'package:fcs/pages/widgets/bottom_up_page_route.dart'; import 'package:fcs/pages/widgets/display_text.dart'; import 'package:fcs/pages/widgets/local_text.dart'; import 'package:fcs/pages/widgets/progress.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_icons/flutter_icons.dart'; @@ -35,7 +36,7 @@ class _PaymentMethodPageState extends State { appBar: AppBar( leading: new IconButton( icon: new Icon( - Icons.close, + CupertinoIcons.back, color: primaryColor, ), onPressed: () => Navigator.of(context).pop(), @@ -69,7 +70,8 @@ class _PaymentMethodPageState extends State { onPressed: () { Navigator.push( context, - BottomUpPageRoute(PaymentMethodEditor()), + CupertinoPageRoute( + builder: (context) => PaymentMethodEditor()), ); }, icon: Icon(Icons.add), @@ -95,9 +97,10 @@ class _PaymentMethodPageState extends State { ? () { Navigator.push( context, - BottomUpPageRoute(PaymentMethodEditor( - paymentMethod: method, - )), + CupertinoPageRoute( + builder: (context) => PaymentMethodEditor( + paymentMethod: method, + )), ); } : null, diff --git a/lib/pages/processing/processing_editor.dart b/lib/pages/processing/processing_editor.dart index cdcb374..e521dc3 100644 --- a/lib/pages/processing/processing_editor.dart +++ b/lib/pages/processing/processing_editor.dart @@ -16,6 +16,7 @@ import 'package:fcs/pages/widgets/local_text.dart'; import 'package:fcs/pages/widgets/multi_img_controller.dart'; import 'package:fcs/pages/widgets/multi_img_file.dart'; import 'package:fcs/pages/widgets/progress.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:intl/intl.dart'; @@ -116,7 +117,7 @@ class _ProcessingEditorState extends State { appBar: AppBar( centerTitle: true, leading: new IconButton( - icon: new Icon(Icons.close, color: primaryColor, size: 30), + icon: new Icon(CupertinoIcons.back, color: primaryColor, size: 30), onPressed: () => Navigator.of(context).pop(), ), shadowColor: Colors.transparent, @@ -223,7 +224,7 @@ class _ProcessingEditorState extends State { _manageMarket() { Navigator.push( context, - BottomUpPageRoute(MarketEditor()), + CupertinoPageRoute(builder: (context) => MarketEditor()), ); } diff --git a/lib/pages/processing/processing_info.dart b/lib/pages/processing/processing_info.dart index aa748e7..9e4104d 100644 --- a/lib/pages/processing/processing_info.dart +++ b/lib/pages/processing/processing_info.dart @@ -10,6 +10,7 @@ import 'package:fcs/pages/widgets/multi_img_controller.dart'; import 'package:fcs/pages/widgets/multi_img_file.dart'; import 'package:fcs/pages/widgets/progress.dart'; import 'package:fcs/pages/widgets/status_tree.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:intl/intl.dart'; @@ -100,7 +101,7 @@ class _ProcessingInfoState extends State { appBar: AppBar( centerTitle: true, leading: new IconButton( - icon: new Icon(Icons.close, color: primaryColor, size: 30), + icon: new Icon(CupertinoIcons.back, color: primaryColor, size: 30), onPressed: () => Navigator.of(context).pop(), ), shadowColor: Colors.transparent, @@ -177,9 +178,10 @@ class _ProcessingInfoState extends State { _gotoEditor() async { bool deleted = await Navigator.push( context, - BottomUpPageRoute(ProcessingEditor( - package: widget.package, - ))); + CupertinoPageRoute( + builder: (context) => ProcessingEditor( + package: widget.package, + ))); if (deleted ?? false) { Navigator.pop(context); } else { diff --git a/lib/pages/processing/processing_list.dart b/lib/pages/processing/processing_list.dart index c6e79db..61517eb 100644 --- a/lib/pages/processing/processing_list.dart +++ b/lib/pages/processing/processing_list.dart @@ -90,7 +90,8 @@ class _ProcessingListState extends State { if (_package == null) return; Navigator.push( context, - BottomUpPageRoute(ProcessingInfo(package: _package)), + CupertinoPageRoute( + builder: (context) => ProcessingInfo(package: _package)), ); } } diff --git a/lib/pages/processing/processing_list_row.dart b/lib/pages/processing/processing_list_row.dart index 7a1f299..9f1f414 100644 --- a/lib/pages/processing/processing_list_row.dart +++ b/lib/pages/processing/processing_list_row.dart @@ -2,6 +2,7 @@ import 'package:fcs/domain/entities/package.dart'; import 'package:fcs/pages/package/package_info.dart'; import 'package:fcs/pages/main/util.dart'; import 'package:fcs/pages/widgets/bottom_up_page_route.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; @@ -30,7 +31,8 @@ class ProcessingListRow extends StatelessWidget { } Navigator.push( context, - BottomUpPageRoute(ProcessingInfo(package: package)), + CupertinoPageRoute( + builder: (context) => ProcessingInfo(package: package)), ); }, child: Row( diff --git a/lib/pages/profile/profile_page.dart b/lib/pages/profile/profile_page.dart index 306d6e6..398739b 100644 --- a/lib/pages/profile/profile_page.dart +++ b/lib/pages/profile/profile_page.dart @@ -182,7 +182,9 @@ class _ProfileState extends State { deliveryAddress: deliveryAddressModel.defalutAddress, onTap: () { Navigator.push( - context, BottomUpPageRoute(DeliveryAddressList())); + context, + CupertinoPageRoute( + builder: (context) => DeliveryAddressList())); }, ), getPrivilegeBox(context), diff --git a/lib/pages/rates/cargo_editor.dart b/lib/pages/rates/cargo_editor.dart index e050f61..b100f59 100644 --- a/lib/pages/rates/cargo_editor.dart +++ b/lib/pages/rates/cargo_editor.dart @@ -4,6 +4,7 @@ import 'package:fcs/localization/app_translations.dart'; import 'package:fcs/pages/main/util.dart'; import 'package:fcs/pages/widgets/input_text.dart'; import 'package:fcs/pages/widgets/progress.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; class CargoEditor extends StatefulWidget { @@ -52,9 +53,7 @@ class _CargoEditorState extends State { appBar: AppBar( centerTitle: true, leading: new IconButton( - icon: new Icon( - Icons.close, - ), + icon: new Icon(CupertinoIcons.back), onPressed: () => Navigator.of(context).pop(), ), backgroundColor: primaryColor, diff --git a/lib/pages/rates/custom_editor.dart b/lib/pages/rates/custom_editor.dart index e8ba5b8..afeb965 100644 --- a/lib/pages/rates/custom_editor.dart +++ b/lib/pages/rates/custom_editor.dart @@ -4,6 +4,7 @@ import 'package:fcs/localization/app_translations.dart'; import 'package:fcs/pages/main/util.dart'; import 'package:fcs/pages/widgets/input_text.dart'; import 'package:fcs/pages/widgets/progress.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; @@ -54,7 +55,7 @@ class _CustomEditorState extends State { centerTitle: true, leading: new IconButton( icon: new Icon( - Icons.close, + CupertinoIcons.back, ), onPressed: () => Navigator.of(context).pop(), ), diff --git a/lib/pages/rates/discount_by_weight_editor.dart b/lib/pages/rates/discount_by_weight_editor.dart index f7edf0a..ffc59c1 100644 --- a/lib/pages/rates/discount_by_weight_editor.dart +++ b/lib/pages/rates/discount_by_weight_editor.dart @@ -4,6 +4,7 @@ import 'package:fcs/localization/app_translations.dart'; import 'package:fcs/pages/main/util.dart'; import 'package:fcs/pages/widgets/input_text.dart'; import 'package:fcs/pages/widgets/progress.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; @@ -39,8 +40,7 @@ class _DiscountByWeightEditorState extends State { @override Widget build(BuildContext context) { - - final weightBox = InputText( + final weightBox = InputText( labelTextKey: 'rate.discount.weight', iconData: FontAwesomeIcons.weightHanging, controller: _weightController); @@ -55,9 +55,7 @@ class _DiscountByWeightEditorState extends State { appBar: AppBar( centerTitle: true, leading: new IconButton( - icon: new Icon( - Icons.close, - ), + icon: new Icon(CupertinoIcons.back), onPressed: () => Navigator.of(context).pop(), ), backgroundColor: primaryColor, diff --git a/lib/pages/rates/shipment_rates.dart b/lib/pages/rates/shipment_rates.dart index 64659bd..b562e4a 100644 --- a/lib/pages/rates/shipment_rates.dart +++ b/lib/pages/rates/shipment_rates.dart @@ -7,6 +7,7 @@ import 'package:fcs/pages/rates/model/shipment_rate_model.dart'; import 'package:fcs/pages/widgets/bottom_up_page_route.dart'; import 'package:fcs/pages/widgets/local_text.dart'; import 'package:fcs/pages/widgets/progress.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -44,9 +45,7 @@ class _ShipmentRatesState extends State { appBar: AppBar( centerTitle: true, leading: new IconButton( - icon: new Icon( - Icons.close, - ), + icon: new Icon(CupertinoIcons.back), onPressed: () => Navigator.of(context).pop(), ), backgroundColor: primaryColor, @@ -129,12 +128,12 @@ class _ShipmentRatesState extends State { // .push(MaterialPageRoute(builder: (_) => Term())); // }), fcsButton(context, "Estimate shipping cost", callack: () { - Navigator.of(context) - .push(BottomUpPageRoute(ShipmentRatesCal())); + Navigator.of(context).push(CupertinoPageRoute( + builder: (context) => ShipmentRatesCal())); }), fcsButton(context, "Edit", callack: () { - Navigator.of(context) - .push(BottomUpPageRoute(ShipmentRatesEdit())); + Navigator.of(context).push(CupertinoPageRoute( + builder: (context) => ShipmentRatesEdit())); }), SizedBox(height: 10) ], diff --git a/lib/pages/rates/shipment_rates_calculate.dart b/lib/pages/rates/shipment_rates_calculate.dart index 1b8eac0..202426b 100644 --- a/lib/pages/rates/shipment_rates_calculate.dart +++ b/lib/pages/rates/shipment_rates_calculate.dart @@ -2,6 +2,7 @@ import 'package:fcs/helpers/theme.dart'; import 'package:fcs/localization/app_translations.dart'; import 'package:fcs/pages/rates/model/shipment_rate_model.dart'; import 'package:fcs/pages/widgets/progress.dart'; +import 'package:flutter/cupertino.dart'; import 'package:provider/provider.dart'; import 'package:flutter/material.dart'; @@ -37,9 +38,7 @@ class _ShipmentRatesCalState extends State { appBar: AppBar( centerTitle: true, leading: new IconButton( - icon: new Icon( - Icons.close, - ), + icon: new Icon(CupertinoIcons.back), onPressed: () => Navigator.of(context).pop(), ), backgroundColor: primaryColor, diff --git a/lib/pages/rates/shipment_rates_edit.dart b/lib/pages/rates/shipment_rates_edit.dart index 70afcfe..51d119e 100644 --- a/lib/pages/rates/shipment_rates_edit.dart +++ b/lib/pages/rates/shipment_rates_edit.dart @@ -9,6 +9,7 @@ import 'package:fcs/pages/widgets/bottom_up_page_route.dart'; import 'package:fcs/pages/widgets/input_text.dart'; import 'package:fcs/pages/widgets/my_data_table.dart'; import 'package:fcs/pages/widgets/progress.dart'; +import 'package:flutter/cupertino.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:provider/provider.dart'; @@ -69,7 +70,7 @@ class _ShipmentRatesEditState extends State { centerTitle: true, leading: new IconButton( icon: new Icon( - Icons.close, + CupertinoIcons.back, ), onPressed: () => Navigator.of(context).pop(), ), @@ -136,7 +137,8 @@ class _ShipmentRatesEditState extends State { onPressed: () { Navigator.push( context, - BottomUpPageRoute(CargoEditor()), + CupertinoPageRoute( + builder: (context) => CargoEditor()), ); }, label: Text( @@ -199,7 +201,8 @@ class _ShipmentRatesEditState extends State { onPressed: () { Navigator.push( context, - BottomUpPageRoute(CustomEditor()), + CupertinoPageRoute( + builder: (context) => CustomEditor()), ); }, label: Text( @@ -263,7 +266,9 @@ class _ShipmentRatesEditState extends State { onPressed: () { Navigator.push( context, - BottomUpPageRoute(DiscountByWeightEditor()), + CupertinoPageRoute( + builder: (context) => + DiscountByWeightEditor()), ); }, label: Text( @@ -297,7 +302,7 @@ class _ShipmentRatesEditState extends State { onSelectChanged: (selected) { Navigator.push( context, - BottomUpPageRoute(CargoEditor(rate: r)), + CupertinoPageRoute(builder: (context) => CargoEditor(rate: r)), ); }, cells: [ @@ -325,7 +330,7 @@ class _ShipmentRatesEditState extends State { onSelectChanged: (selected) { Navigator.push( context, - BottomUpPageRoute(CustomEditor(custom: c)), + CupertinoPageRoute(builder: (context) => CustomEditor(custom: c)), ); }, cells: [ @@ -353,7 +358,7 @@ class _ShipmentRatesEditState extends State { onSelectChanged: (selected) { // Navigator.push( // context, - // BottomUpPageRoute(CargoEditor(rate: r)), + // CupertinoPageRoute(builder: (context) => CargoEditor(rate: r)), // ); }, cells: [ diff --git a/lib/pages/receiving/receiving_editor.dart b/lib/pages/receiving/receiving_editor.dart index 3cb8514..5264677 100644 --- a/lib/pages/receiving/receiving_editor.dart +++ b/lib/pages/receiving/receiving_editor.dart @@ -13,6 +13,7 @@ import 'package:fcs/pages/widgets/local_text.dart'; import 'package:fcs/pages/widgets/multi_img_controller.dart'; import 'package:fcs/pages/widgets/multi_img_file.dart'; import 'package:fcs/pages/widgets/progress.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:permission_handler/permission_handler.dart'; @@ -136,7 +137,7 @@ class _ReceivingEditorState extends State { appBar: AppBar( centerTitle: true, leading: new IconButton( - icon: new Icon(Icons.close, color: primaryColor, size: 30), + icon: new Icon(CupertinoIcons.back, color: primaryColor, size: 30), onPressed: () => Navigator.of(context).pop(), ), shadowColor: Colors.transparent, diff --git a/lib/pages/receiving/receiving_info.dart b/lib/pages/receiving/receiving_info.dart index 916bd74..67eda8d 100644 --- a/lib/pages/receiving/receiving_info.dart +++ b/lib/pages/receiving/receiving_info.dart @@ -12,6 +12,7 @@ import 'package:fcs/pages/widgets/multi_img_controller.dart'; import 'package:fcs/pages/widgets/multi_img_file.dart'; import 'package:fcs/pages/widgets/progress.dart'; import 'package:fcs/pages/widgets/status_tree.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:intl/intl.dart'; @@ -90,7 +91,7 @@ class _ReceivingInfoState extends State { appBar: AppBar( centerTitle: true, leading: new IconButton( - icon: new Icon(Icons.close, color: primaryColor, size: 30), + icon: new Icon(CupertinoIcons.back, color: primaryColor, size: 30), onPressed: () => Navigator.of(context).pop(), ), shadowColor: Colors.transparent, @@ -144,9 +145,10 @@ class _ReceivingInfoState extends State { _edit() async { await Navigator.push( context, - BottomUpPageRoute(ReceivingEditor( - package: widget.package, - )), + CupertinoPageRoute( + builder: (context) => ReceivingEditor( + package: widget.package, + )), ); PackageModel packageModel = Provider.of(context, listen: false); diff --git a/lib/pages/receiving/receiving_list.dart b/lib/pages/receiving/receiving_list.dart index 733f04a..7bd2c02 100644 --- a/lib/pages/receiving/receiving_list.dart +++ b/lib/pages/receiving/receiving_list.dart @@ -98,7 +98,7 @@ class _ReceivingListState extends State { _newReceiving() { Navigator.push( context, - BottomUpPageRoute(ReceivingEditor()), + CupertinoPageRoute(builder: (context) => ReceivingEditor()), ); } @@ -108,7 +108,8 @@ class _ReceivingListState extends State { if (_package == null) return; Navigator.push( context, - BottomUpPageRoute(ReceivingInfo(package: _package)), + CupertinoPageRoute( + builder: (context) => ReceivingInfo(package: _package)), ); } } diff --git a/lib/pages/receiving/receiving_list_row.dart b/lib/pages/receiving/receiving_list_row.dart index 5f8812c..a6ab0b0 100644 --- a/lib/pages/receiving/receiving_list_row.dart +++ b/lib/pages/receiving/receiving_list_row.dart @@ -1,6 +1,7 @@ import 'package:fcs/domain/entities/package.dart'; import 'package:fcs/pages/main/util.dart'; import 'package:fcs/pages/widgets/bottom_up_page_route.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; @@ -29,7 +30,8 @@ class ReceivingListRow extends StatelessWidget { } Navigator.push( context, - BottomUpPageRoute(ReceivingInfo(package: package)), + CupertinoPageRoute( + builder: (context) => ReceivingInfo(package: package)), ); }, child: Row( diff --git a/lib/pages/shipment/shipment_box_editor.dart b/lib/pages/shipment/shipment_box_editor.dart index 9bfa4fb..6282ae7 100644 --- a/lib/pages/shipment/shipment_box_editor.dart +++ b/lib/pages/shipment/shipment_box_editor.dart @@ -15,6 +15,7 @@ import 'package:fcs/pages/widgets/local_text.dart'; import 'package:fcs/pages/widgets/local_title.dart'; import 'package:fcs/pages/widgets/my_data_table.dart'; import 'package:fcs/pages/widgets/progress.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:provider/provider.dart'; @@ -119,7 +120,7 @@ class _ShipmentBoxEditorState extends State { centerTitle: true, leading: new IconButton( icon: new Icon( - Icons.close, + CupertinoIcons.back, color: primaryColor, ), onPressed: () => Navigator.of(context).pop(), @@ -146,7 +147,9 @@ class _ShipmentBoxEditorState extends State { ), onPressed: () async { Cargo cargo = await Navigator.push( - context, BottomUpPageRoute(CargoTypeEditor())); + context, + CupertinoPageRoute( + builder: (context) => CargoTypeEditor())); _addCargo(cargo); }), ), @@ -182,9 +185,10 @@ class _ShipmentBoxEditorState extends State { onTap: () async { DeliveryAddress d = await Navigator.push( context, - BottomUpPageRoute(DeliveryAddressSelection( - deliveryAddress: _deliveryAddress, - )), + CupertinoPageRoute( + builder: (context) => DeliveryAddressSelection( + deliveryAddress: _deliveryAddress, + )), ); if (d == null) return; setState(() { @@ -210,9 +214,10 @@ class _ShipmentBoxEditorState extends State { onSelectChanged: (bool selected) async { Cargo cargo = await Navigator.push( context, - BottomUpPageRoute(CargoTypeEditor( - cargo: c, - ))); + CupertinoPageRoute( + builder: (context) => CargoTypeEditor( + cargo: c, + ))); _addCargo(cargo); }, cells: [ diff --git a/lib/pages/shipment/shipment_editor.dart b/lib/pages/shipment/shipment_editor.dart index 201261f..03d9e8e 100644 --- a/lib/pages/shipment/shipment_editor.dart +++ b/lib/pages/shipment/shipment_editor.dart @@ -22,6 +22,7 @@ import 'package:fcs/pages/widgets/local_title.dart'; import 'package:fcs/pages/widgets/multi_img_controller.dart'; import 'package:fcs/pages/widgets/progress.dart'; import 'package:fcs/pages/widgets/title_with_add_button.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; @@ -154,9 +155,10 @@ class _ShipmentEditorState extends State { onTap: () async { DeliveryAddress d = await Navigator.push( context, - BottomUpPageRoute(DeliveryAddressSelection( - deliveryAddress: _pickupAddress, - )), + CupertinoPageRoute( + builder: (context) => DeliveryAddressSelection( + deliveryAddress: _pickupAddress, + )), ); if (d == null) return; setState(() { @@ -187,7 +189,7 @@ class _ShipmentEditorState extends State { centerTitle: true, leading: new IconButton( icon: new Icon( - Icons.close, + CupertinoIcons.back, color: primaryColor, ), onPressed: () => Navigator.of(context).pop(), @@ -234,7 +236,8 @@ class _ShipmentEditorState extends State { onPressed: () { Navigator.push( context, - BottomUpPageRoute(ShipmentBoxEditor()), + CupertinoPageRoute( + builder: (context) => ShipmentBoxEditor()), ); }, ), @@ -257,8 +260,8 @@ class _ShipmentEditorState extends State { return boxes.asMap().entries.map((_box) { return InkWell( onTap: () { - Navigator.of(context) - .push(BottomUpPageRoute(ShipmentBoxEditor(box: _box.value))); + Navigator.of(context).push(CupertinoPageRoute( + builder: (context) => ShipmentBoxEditor(box: _box.value))); }, child: BoxRow(box: _box.value), ); diff --git a/lib/pages/shipment/shipment_list.dart b/lib/pages/shipment/shipment_list.dart index 60d8bae..ec766db 100644 --- a/lib/pages/shipment/shipment_list.dart +++ b/lib/pages/shipment/shipment_list.dart @@ -83,6 +83,7 @@ class _ShipmentListState extends State { } _newPickup() { - Navigator.of(context).push(BottomUpPageRoute(ShipmentEditor())); + Navigator.of(context) + .push(CupertinoPageRoute(builder: (context) => ShipmentEditor())); } } diff --git a/lib/pages/shipment/shipment_list_row.dart b/lib/pages/shipment/shipment_list_row.dart index 0a0046c..4f167a3 100644 --- a/lib/pages/shipment/shipment_list_row.dart +++ b/lib/pages/shipment/shipment_list_row.dart @@ -1,6 +1,7 @@ import 'package:fcs/domain/entities/pickup.dart'; import 'package:fcs/helpers/theme.dart'; import 'package:fcs/pages/widgets/bottom_up_page_route.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_icons/flutter_icons.dart'; @@ -41,7 +42,7 @@ class _ShipmentListRowState extends State { child: InkWell( onTap: () { Navigator.of(context) - .push(BottomUpPageRoute(ShipmentEditor(shipment: _pickUp))); + .push(CupertinoPageRoute(builder: (context) => ShipmentEditor(shipment: _pickUp))); }, child: Row( children: [ diff --git a/lib/pages/signin/invitation_request_page.dart b/lib/pages/signin/invitation_request_page.dart index ddbc5f5..5e94f6d 100644 --- a/lib/pages/signin/invitation_request_page.dart +++ b/lib/pages/signin/invitation_request_page.dart @@ -2,6 +2,7 @@ import 'package:fcs/pages/main/model/main_model.dart'; import 'package:fcs/pages/main/util.dart'; import 'package:fcs/pages/widgets/local_text.dart'; import 'package:fcs/pages/widgets/progress.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:provider/provider.dart'; @@ -31,7 +32,7 @@ class _RequestInvitationPageState extends State { appBar: AppBar( centerTitle: true, leading: new IconButton( - icon: new Icon(Icons.close), + icon: new Icon(CupertinoIcons.back), onPressed: () => Navigator.of(context).pop(), ), backgroundColor: primaryColor, diff --git a/lib/pages/signin/signin_logic.dart b/lib/pages/signin/signin_logic.dart index ec3b891..bdde97a 100644 --- a/lib/pages/signin/signin_logic.dart +++ b/lib/pages/signin/signin_logic.dart @@ -4,6 +4,7 @@ import 'package:fcs/pages/main/model/main_model.dart'; import 'package:fcs/pages/signin/invitation_request_page.dart'; import 'package:fcs/pages/signin/signup_page.dart'; import 'package:fcs/pages/widgets/bottom_up_page_route.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/widgets.dart'; import 'package:provider/provider.dart'; @@ -21,11 +22,12 @@ navigateAfterAuthVerified(BuildContext context) async { await Provider.of(context, listen: false).hasInvite(); if (!invited) { await Navigator.of(context).pushAndRemoveUntil( - BottomUpPageRoute(RequestInvitationPage()), (r) => false); + CupertinoPageRoute(builder: (context) => RequestInvitationPage()), + (r) => false); return; } } - await Navigator.of(context) - .pushAndRemoveUntil(BottomUpPageRoute(SignupPage()), (r) => false); + await Navigator.of(context).pushAndRemoveUntil( + CupertinoPageRoute(builder: (context) => SignupPage()), (r) => false); } } diff --git a/lib/pages/signin/signin_page.dart b/lib/pages/signin/signin_page.dart index 0b78445..3e3470d 100644 --- a/lib/pages/signin/signin_page.dart +++ b/lib/pages/signin/signin_page.dart @@ -6,6 +6,7 @@ import 'package:fcs/pages/signin/signin_logic.dart'; import 'package:fcs/pages/widgets/bottom_up_page_route.dart'; import 'package:fcs/pages/widgets/local_text.dart'; import 'package:fcs/pages/widgets/progress.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; @@ -44,7 +45,7 @@ class _SigninPageState extends State { appBar: AppBar( centerTitle: true, leading: new IconButton( - icon: new Icon(Icons.close), + icon: new Icon(CupertinoIcons.back), onPressed: () => Navigator.of(context).pop(), ), backgroundColor: primaryColor, @@ -174,8 +175,8 @@ class _SigninPageState extends State { AuthResult auth = await context.read().sendSms(phoneNumber); if (auth.authStatus == AuthStatus.SMS_SENT) { - await Navigator.of(context) - .push(BottomUpPageRoute(SmsCodePage(phoneNumber: phoneNumber))); + await Navigator.of(context).push(CupertinoPageRoute( + builder: (context) => SmsCodePage(phoneNumber: phoneNumber))); Navigator.pop(context); } else if (auth.authStatus == AuthStatus.AUTH_VERIFIED) { await navigateAfterAuthVerified(context); diff --git a/lib/pages/signin/signup_page.dart b/lib/pages/signin/signup_page.dart index 725349e..4f96e6e 100644 --- a/lib/pages/signin/signup_page.dart +++ b/lib/pages/signin/signup_page.dart @@ -2,6 +2,7 @@ import 'package:fcs/pages/main/model/main_model.dart'; import 'package:fcs/pages/main/util.dart'; import 'package:fcs/pages/widgets/local_text.dart'; import 'package:fcs/pages/widgets/progress.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; @@ -32,7 +33,9 @@ class _SignupPageState extends State { appBar: AppBar( centerTitle: true, leading: new IconButton( - icon: new Icon(Icons.close), + icon: new Icon( + CupertinoIcons.back, + ), onPressed: () => Navigator.of(context).pop(), ), backgroundColor: primaryColor, diff --git a/lib/pages/signin/sms_code_page.dart b/lib/pages/signin/sms_code_page.dart index 073d899..dfe677c 100644 --- a/lib/pages/signin/sms_code_page.dart +++ b/lib/pages/signin/sms_code_page.dart @@ -7,6 +7,7 @@ import 'package:fcs/pages/signin/signin_logic.dart'; import 'package:fcs/pages/main/util.dart'; import 'package:fcs/pages/widgets/local_text.dart'; import 'package:fcs/pages/widgets/progress.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:pin_input_text_field/pin_input_text_field.dart'; import 'package:provider/provider.dart'; @@ -68,7 +69,7 @@ class _SmsCodePageState extends State { appBar: AppBar( centerTitle: true, leading: new IconButton( - icon: new Icon(Icons.close), + icon: new Icon(CupertinoIcons.back), onPressed: () => Navigator.of(context).pop(), ), backgroundColor: primaryColor, diff --git a/lib/pages/staff/staff_editor.dart b/lib/pages/staff/staff_editor.dart index b86baf0..c21bd1d 100644 --- a/lib/pages/staff/staff_editor.dart +++ b/lib/pages/staff/staff_editor.dart @@ -8,6 +8,7 @@ import 'package:fcs/pages/staff/model/staff_model.dart'; import 'package:fcs/pages/widgets/display_text.dart'; import 'package:fcs/pages/widgets/local_text.dart'; import 'package:fcs/pages/widgets/progress.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -170,7 +171,8 @@ class _StaffEditorState extends State { appBar: AppBar( centerTitle: true, leading: new IconButton( - icon: new Icon(Icons.close, color: primaryColor, size: 30), + icon: + new Icon(CupertinoIcons.back, color: primaryColor, size: 30), onPressed: () => Navigator.of(context).pop(), ), shadowColor: Colors.transparent, diff --git a/lib/pages/staff/staff_list.dart b/lib/pages/staff/staff_list.dart index fbae2b2..a799876 100644 --- a/lib/pages/staff/staff_list.dart +++ b/lib/pages/staff/staff_list.dart @@ -45,7 +45,8 @@ class _StaffListState extends State { ), floatingActionButton: FloatingActionButton.extended( onPressed: () { - Navigator.of(context).push(BottomUpPageRoute(StaffEditor())); + Navigator.of(context) + .push(CupertinoPageRoute(builder: (context) => StaffEditor())); }, icon: Icon(Icons.add), label: LocalText(context, "staff.new", color: Colors.white), @@ -72,8 +73,8 @@ class _StaffListState extends State { children: [ InkWell( onTap: () { - Navigator.of(context) - .push(BottomUpPageRoute(StaffEditor(staff: user))); + Navigator.of(context).push(CupertinoPageRoute( + builder: (context) => StaffEditor(staff: user))); }, child: Row( children: [ diff --git a/lib/pages/term/term_page.dart b/lib/pages/term/term_page.dart index b95c6c4..b8913b3 100644 --- a/lib/pages/term/term_page.dart +++ b/lib/pages/term/term_page.dart @@ -59,7 +59,7 @@ class _TermPageState extends State { centerTitle: true, leading: new IconButton( icon: new Icon( - Icons.close, + CupertinoIcons.back, color: primaryColor, ), onPressed: () => Navigator.of(context).pop(), diff --git a/lib/pages/widgets/bottom_widgets.dart b/lib/pages/widgets/bottom_widgets.dart index 94c6805..e5c9710 100644 --- a/lib/pages/widgets/bottom_widgets.dart +++ b/lib/pages/widgets/bottom_widgets.dart @@ -15,14 +15,16 @@ class BottomWidgets extends StatelessWidget { children: [ InkWell( onTap: () { - Navigator.of(context).push(BottomUpPageRoute(ContactPage())); + Navigator.of(context) + .push(CupertinoPageRoute(builder: (context) => ContactPage())); }, child: _buildSmallButton( context, "contact.btn", SimpleLineIcons.support), ), InkWell( onTap: () { - Navigator.of(context).push(BottomUpPageRoute(TermPage())); + Navigator.of(context) + .push(CupertinoPageRoute(builder: (context) => TermPage())); }, child: _buildSmallButton(context, "term.btn", Icons.info_outline), ), diff --git a/lib/pages/widgets/delivery_address_selection.dart b/lib/pages/widgets/delivery_address_selection.dart index 54cd4cc..73d5fb8 100644 --- a/lib/pages/widgets/delivery_address_selection.dart +++ b/lib/pages/widgets/delivery_address_selection.dart @@ -5,6 +5,7 @@ import 'package:fcs/pages/delivery_address/delivery_address_row.dart'; import 'package:fcs/pages/delivery_address/model/delivery_address_model.dart'; import 'package:fcs/pages/widgets/bottom_up_page_route.dart'; import 'package:fcs/pages/widgets/local_text.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -22,7 +23,7 @@ class DeliveryAddressSelection extends StatelessWidget { appBar: AppBar( centerTitle: true, leading: new IconButton( - icon: new Icon(Icons.close), + icon: new Icon(CupertinoIcons.back), onPressed: () => Navigator.pop(context), ), backgroundColor: primaryColor, @@ -35,8 +36,8 @@ class DeliveryAddressSelection extends StatelessWidget { ), floatingActionButton: FloatingActionButton.extended( onPressed: () { - Navigator.of(context) - .push(BottomUpPageRoute(DeliveryAddressEditor())); + Navigator.of(context).push(CupertinoPageRoute( + builder: (context) => DeliveryAddressEditor())); }, icon: Icon(Icons.add), label: LocalText(context, "delivery_address.new_address",