From 6b228e6048c79d87c189964e1e6320125b506d42 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Mon, 31 Aug 2020 15:50:46 +0300 Subject: [PATCH] First step from add action sheet --- ios/Runner.xcodeproj/project.pbxproj | 2 + lib/app-icons/config.json | 84 ++++++++ lib/app-icons/driver_app_icons.dart | 28 ++- lib/app-icons/fonts/DriverApp.ttf | Bin 6964 -> 9256 bytes lib/main.dart | 2 +- lib/pages/dashboard/dashboard_screen.dart | 204 +++++++++--------- lib/pages/delivery/information_page.dart | 61 ++++++ lib/pages/orders/pending_orders_page.dart | 23 +- .../bottom_sheet/action_sheet_button.dart | 72 +++++++ .../bottom_sheet/custom_bottom_sheet.dart | 39 ++++ lib/widgets/others/app_scaffold_widget.dart | 67 +++--- lib/widgets/others/arrow_back.dart | 13 +- lib/widgets/others/network_base_view.dart | 2 +- 13 files changed, 444 insertions(+), 153 deletions(-) create mode 100644 lib/widgets/bottom_sheet/action_sheet_button.dart create mode 100644 lib/widgets/bottom_sheet/custom_bottom_sheet.dart diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index dd7be69..2f73b5c 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -242,6 +242,7 @@ "${BUILT_PRODUCTS_DIR}/image_cropper/image_cropper.framework", "${BUILT_PRODUCTS_DIR}/image_picker/image_picker.framework", "${BUILT_PRODUCTS_DIR}/local_auth/local_auth.framework", + "${BUILT_PRODUCTS_DIR}/map_launcher/map_launcher.framework", "${BUILT_PRODUCTS_DIR}/maps_launcher/maps_launcher.framework", "${BUILT_PRODUCTS_DIR}/shared_preferences/shared_preferences.framework", "${BUILT_PRODUCTS_DIR}/url_launcher/url_launcher.framework", @@ -263,6 +264,7 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/image_cropper.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/image_picker.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/local_auth.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/map_launcher.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/maps_launcher.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher.framework", diff --git a/lib/app-icons/config.json b/lib/app-icons/config.json index 331f146..dd751e6 100644 --- a/lib/app-icons/config.json +++ b/lib/app-icons/config.json @@ -89,6 +89,90 @@ "search": [ "qr" ] + }, + { + "uid": "35b36156ab3a35397939eacfb39a7ac4", + "css": "deliverd_icon", + "code": 59410, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M767.9 851L679.4 574.4A176.3 176.3 0 0 0 510.7 451.1H467.2V431.6A178.1 178.1 0 0 0 504.4 405.9 16.1 16.1 0 0 0 483.7 382.1 145.2 145.2 0 0 1 241.6 273.8V244.6A101.2 101.2 0 0 0 273.8 256.3C289.9 258.8 486 258.1 494.6 256.3 540.8 251.4 531.6 225.5 531.6 273.8A145.2 145.2 0 0 1 517.8 336.1 16.1 16.1 0 0 0 546.8 349.9 172.4 172.4 0 0 0 560.9 304.7 64.3 64.3 0 0 0 612.3 241.6 70.1 70.1 0 0 0 580.1 169.6 161.1 161.1 0 0 0 427.9 0.1Q423.6 0.1 419.2 0.1A299.9 299.9 0 0 0 292.4 12.7 16.1 16.1 0 0 0 305 42.3 270.1 270.1 0 0 1 419.2 32.4 128.8 128.8 0 0 1 547.1 145.1H226.8A127.7 127.7 0 0 1 259 75.9 16.1 16.1 0 0 0 235.2 54.3 159.1 159.1 0 0 0 193.7 169.9 70.1 70.1 0 0 0 161.4 241.9 64.5 64.5 0 0 0 212.5 304.9 177.5 177.5 0 0 0 306.5 431.9V451.4H263A176.2 176.2 0 0 0 94.3 574.6L88.6 592.3A16.1 16.1 0 0 0 119.2 602L124.9 584.2A145.2 145.2 0 0 1 263.2 483.5H313.5A80.6 80.6 0 0 0 461.1 483.5H511.4A145.2 145.2 0 0 1 649.7 584.2L738.2 860.9A80.6 80.6 0 0 1 687.4 962.9 90.4 90.4 0 0 1 677.6 965.5V870.5A96.8 96.8 0 0 0 597 775.3V741.7A16.1 16.1 0 0 0 564.8 741.7V886.9H210.3V580.8H323.1V661.4A16.1 16.1 0 0 0 339.3 677.5H436.1A16.1 16.1 0 0 0 452.2 661.4V580.8H564.9V677.6A16.1 16.1 0 0 0 597.2 677.6V564.8A16.1 16.1 0 0 0 581.1 548.7H194.4A16.2 16.2 0 0 0 178.2 564.8V775.8A96.8 96.8 0 0 0 97.7 870.9V965.9A81.5 81.5 0 0 1 35.1 869.1 77.1 77.1 0 0 1 37.1 861.3L78.6 730.6A16.1 16.1 0 0 0 48 721L6.5 851.6A113.8 113.8 0 0 0 80.4 994.5 111.6 111.6 0 0 0 113.8 999.9 1596.8 1596.8 0 0 0 274.9 998.4 96.8 96.8 0 0 0 353.7 920.3C353.7 918.7 349.6 919.3 421.1 919.3A96.8 96.8 0 0 0 453.3 975.9C489.2 1007.5 519.5 999.9 661.6 999.9A113.6 113.6 0 0 0 769 851.6ZM289.9 225.8A64.3 64.3 0 0 1 227.7 177.4C579.9 177.4 547.7 174.5 543.2 184.3 522.8 237.5 494.4 225.8 289.9 225.8ZM580 241.9A32.2 32.2 0 0 1 563.8 269.6C563.8 199.2 562.1 221.2 570.8 202.7A48.4 48.4 0 0 1 580 241.9ZM193.2 225.8A32.5 32.5 0 0 1 202.6 202.9C211.2 220.8 209.5 199.1 209.5 269.8 191.5 259.4 193.2 243.5 193.2 225.8ZM378.5 499.7A48.4 48.4 0 0 1 338.3 451.3V444.4A180.7 180.7 0 0 0 435.1 444.4V451.3A48.4 48.4 0 0 1 387.5 500.3 46.8 46.8 0 0 1 378.5 499.7ZM418.9 580.3V644.8H354.4V580.3ZM128.8 967V870.2A64.5 64.5 0 0 1 177.2 807.9V902.5A16.1 16.1 0 0 0 193.3 918.6H320A63.3 63.3 0 0 1 285.4 960.6C266.9 969.2 267 966.9 128.8 966.9ZM515.5 967A64.4 64.4 0 0 1 453.2 918.6H579.9A16.1 16.1 0 0 0 596 902.5V807.9A64.4 64.4 0 0 1 644.4 870.2V967Z", + "width": 773 + }, + "search": [ + "deliverd_icon" + ] + }, + { + "uid": "a5cfbb0e777b9764b5bef5a0694db0d4", + "css": "not_available", + "code": 59402, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M870.8 714.4A19.5 19.5 0 0 0 852.4 701.3 20.8 20.8 0 0 0 846 702.3 19.8 19.8 0 0 0 834.7 712.4 19.5 19.5 0 0 0 833.9 727.2H833.9A175.4 175.4 0 1 1 725.8 619.1 19 19 0 0 0 732.3 620.2 19.5 19.5 0 0 0 738.7 582.3 213.2 213.2 0 0 0 558 600.5L473.3 576.6 469.8 537.9A185.2 185.2 0 0 0 564.3 404.1 148.6 148.6 0 0 0 654.3 280.4 142.3 142.3 0 0 0 573.4 161.5 195.5 195.5 0 0 0 188.2 161.5 142.2 142.2 0 0 0 107.4 280.4 148.6 148.6 0 0 0 197.4 404.1 185.1 185.1 0 0 0 291.9 537.9L288.4 576.6 155.1 614.2A214.8 214.8 0 0 0 0 820.6V980.5A19.5 19.5 0 0 0 19.5 1000H742.2A19.5 19.5 0 0 0 761.6 980.5V978.5A215 215 0 0 0 870.8 714.4ZM615.2 280.3A97.5 97.5 0 0 1 567.8 355.8L575.3 210.7A93.2 93.2 0 0 1 614.9 280.3ZM267 88.1A156 156 0 0 1 536.8 203.7L535.7 224A351.4 351.4 0 0 1 417.2 159.2 19.6 19.6 0 0 0 391.4 159.2 372.8 372.8 0 0 1 226.8 241L224.8 203.8A153.4 153.4 0 0 1 267 88.3ZM146.5 280.3A93 93 0 0 1 186.1 210.7L193.6 355.8A97.7 97.7 0 0 1 146.5 280.3ZM234.4 384.3L228.9 280.3A416.1 416.1 0 0 0 404.4 199.3 376.7 376.7 0 0 0 533.6 264.1L527.2 384A146.7 146.7 0 0 1 234.4 384ZM380.8 560.9A187.5 187.5 0 0 0 431.9 553.4L434.8 584.6 380.8 639.2 326.9 584.6 329.7 553.4A187.5 187.5 0 0 0 380.8 560.9ZM39 820.9A176.5 176.5 0 0 1 165.8 652.2L300.8 614.1 366.9 680.9A19.5 19.5 0 0 0 394.7 680.9L460.8 614.1 519.2 630.6 516 633.6A214.8 214.8 0 0 0 516 937.4 217.8 217.8 0 0 0 544.4 961.3H200.2V830.4A19.5 19.5 0 1 0 161.1 830.4V961.3H39ZM406.3 453.5A19.5 19.5 0 1 0 433.4 425.4 76.4 76.4 0 0 0 328.2 425.4 19.5 19.5 0 1 0 355.3 453.5 37.2 37.2 0 0 1 406.3 453.5ZM740.3 712.7A19.5 19.5 0 0 0 712.7 712.7L668.1 757.3 623.5 712.7A19.5 19.5 0 1 0 595.9 740.4L640.4 785 595.9 829.5A19.5 19.5 0 0 0 623.5 857.2L668.1 812.6 712.7 857.2A19.7 19.7 0 0 0 726.5 862.9 19.5 19.5 0 0 0 740.3 829.5L695.7 785 740.3 740.4A19.5 19.5 0 0 0 740.3 712.7Z", + "width": 883 + }, + "search": [ + "not_available" + ] + }, + { + "uid": "57ec1e1b8ff3e469eb0b90d2ccf9a26e", + "css": "rejected_icon", + "code": 59403, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M628.1 683.9C628.1 591.2 628.1 293.6 628.1 290.7A74 74 0 0 0 554.8 214.7H554.8A75.5 75.5 0 0 0 511 228.7V160.9A75.8 75.8 0 0 0 489.4 107.3 74.5 74.5 0 0 0 436.2 84.9H436.2A74.8 74.8 0 0 0 392.8 98.7V76A75.7 75.7 0 0 0 317.4 0H317.4A76.2 76.2 0 0 0 241.1 75.5V97.8A74.8 74.8 0 0 0 197.9 83.9H197.9A76.3 76.3 0 0 0 121.2 159.3V327A75.5 75.5 0 0 0 77.6 312.9H77.6A75.9 75.9 0 0 0 1.9 388.4C1.9 390.5 2.3 597.4 1.9 685.8A15.3 15.3 0 0 0 1.9 688.5 315.2 315.2 0 0 0 317.4 1000 311.9 311.9 0 0 0 630.2 687.2 15.3 15.3 0 0 0 630.2 683.9ZM435.4 116.7A42.8 42.8 0 0 1 466 129.6 44.1 44.1 0 0 1 478.4 160.8V481.9L391.8 481.9V160.6A43.7 43.7 0 0 1 435.4 117ZM315.8 968.1A283.2 283.2 0 0 1 32.2 685.9 13.6 13.6 0 0 0 32.2 683.3C32.2 593.7 32.2 390.1 32.2 388.5A43.8 43.8 0 0 1 119.8 388.5V635A16.3 16.3 0 0 0 136.1 651.2 162.9 162.9 0 0 1 252.8 700.1 166.9 166.9 0 0 1 300.5 818.2 16.3 16.3 0 1 0 332.4 818.2 198.4 198.4 0 0 0 275.4 677.7 194.8 194.8 0 0 0 151.8 619.6V159.4A45 45 0 0 1 196.9 115.8 43.7 43.7 0 0 1 240.2 159.3V369.4A16.3 16.3 0 0 0 272.1 369.4V75.5A44.2 44.2 0 0 1 316.7 31.9 43.8 43.8 0 0 1 360.3 75.9V481.6L272.1 481.6V433.6A16.3 16.3 0 0 0 240.2 433.6V481.5H223.9A16.3 16.3 0 1 0 223.9 513.4L492.7 514.3H526.3A16.3 16.3 0 1 0 526.3 482.4H510V290.5A43.9 43.9 0 0 1 554.1 246.9 42.4 42.4 0 0 1 595.9 290.9C595.9 294 596.3 599.1 595.9 687.5A15.5 15.5 0 0 0 596.3 690.9 281.2 281.2 0 0 1 315.4 968.4Z", + "width": 629 + }, + "search": [ + "rejected_icon" + ] + }, + { + "uid": "14ccb0e941366cbce2cec8923259cc6c", + "css": "not_reachable_icon", + "code": 59404, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M597.6 421.8A19.5 19.5 0 1 1 578.1 402.3 19.5 19.5 0 0 1 597.6 421.8ZM5.8 994.2A19.4 19.4 0 0 0 33.4 994.2L328.6 698.9A1100.6 1100.6 0 0 0 644.1 913.3 193.3 193.3 0 0 0 859.1 871.7L943.6 787.3A19.6 19.6 0 0 0 943.6 759.6L736.5 552.5A19.6 19.6 0 0 0 708.9 552.5L616.9 644.4A38.5 38.5 0 0 1 569.5 650.6 722.3 722.3 0 0 1 461.6 566.4L530.4 497.6A19.5 19.5 0 0 0 502.8 470L434 538.8A730 730 0 0 1 348 429.4 38.3 38.3 0 0 1 354.3 381.9L446.1 290.1A19.5 19.5 0 0 0 446.1 262.5L239 55.3A19.6 19.6 0 0 0 211.3 55.3L127.9 138.8A194.8 194.8 0 0 0 87.9 357.2 1151.5 1151.5 0 0 0 301.2 671.2L5.8 966.6A19.5 19.5 0 0 0 5.8 994.2ZM548.2 683.6A77.4 77.4 0 0 0 644.2 672L722.3 593.9 901.8 773.4 831.1 844.1A154.1 154.1 0 0 1 660.2 877.7 1059.5 1059.5 0 0 1 356.3 671.4L433.7 594A761.7 761.7 0 0 0 548.2 683.6ZM123.4 340.8A155.5 155.5 0 0 1 155.5 166.4L225.2 96.7 404.6 276.3 326.6 354.3A77.4 77.4 0 0 0 315 450.4 765.3 765.3 0 0 0 405.9 566.4L328.5 643.8A1110.8 1110.8 0 0 1 123.4 340.8ZM654.1 373.6L994.3 33.4A19.5 19.5 0 0 0 966.6 5.8L626.5 345.9A19.5 19.5 0 1 0 654.1 373.6Z", + "width": 1000 + }, + "search": [ + "not_reachable_icon" + ] + }, + { + "uid": "2ebc420c0ce1444e7e86888285f9d5ea", + "css": "group-74", + "code": 59405, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M628.1 683.9C628.1 591.2 628.1 293.6 628.1 290.7A74 74 0 0 0 554.8 214.7H554.8A75.5 75.5 0 0 0 511 228.7V160.9A75.8 75.8 0 0 0 489.4 107.3 74.5 74.5 0 0 0 436.2 84.9H436.2A74.8 74.8 0 0 0 392.8 98.7V76A75.7 75.7 0 0 0 317.4 0H317.4A76.2 76.2 0 0 0 241.1 75.5V97.8A74.8 74.8 0 0 0 197.9 83.9H197.9A76.3 76.3 0 0 0 121.2 159.3V327A75.5 75.5 0 0 0 77.6 312.9H77.6A75.9 75.9 0 0 0 1.9 388.4C1.9 390.5 2.3 597.4 1.9 685.8A15.3 15.3 0 0 0 1.9 688.5 315.2 315.2 0 0 0 317.4 1000 311.9 311.9 0 0 0 630.2 687.2 15.3 15.3 0 0 0 630.2 683.9ZM435.4 116.7A42.8 42.8 0 0 1 466 129.6 44.1 44.1 0 0 1 478.4 160.8V481.9L391.8 481.9V160.6A43.7 43.7 0 0 1 435.4 117ZM315.8 968.1A283.2 283.2 0 0 1 32.2 685.9 13.6 13.6 0 0 0 32.2 683.3C32.2 593.7 32.2 390.1 32.2 388.5A43.8 43.8 0 0 1 119.8 388.5V635A16.3 16.3 0 0 0 136.1 651.2 162.9 162.9 0 0 1 252.8 700.1 166.9 166.9 0 0 1 300.5 818.2 16.3 16.3 0 1 0 332.4 818.2 198.4 198.4 0 0 0 275.4 677.7 194.8 194.8 0 0 0 151.8 619.6V159.4A45 45 0 0 1 196.9 115.8 43.7 43.7 0 0 1 240.2 159.3V369.4A16.3 16.3 0 0 0 272.1 369.4V75.5A44.2 44.2 0 0 1 316.7 31.9 43.8 43.8 0 0 1 360.3 75.9V481.6L272.1 481.6V433.6A16.3 16.3 0 0 0 240.2 433.6V481.5H223.9A16.3 16.3 0 1 0 223.9 513.4L492.7 514.3H526.3A16.3 16.3 0 1 0 526.3 482.4H510V290.5A43.9 43.9 0 0 1 554.1 246.9 42.4 42.4 0 0 1 595.9 290.9C595.9 294 596.3 599.1 595.9 687.5A15.5 15.5 0 0 0 596.3 690.9 281.2 281.2 0 0 1 315.4 968.4Z", + "width": 629 + }, + "search": [ + "group-74" + ] + }, + { + "uid": "3a5cc972b7f3f2ab8a20e22287b5598b", + "css": "group-169", + "code": 59412, + "src": "custom_icons", + "selected": false, + "svg": { + "path": "", + "width": 663 + }, + "search": [ + "group-169" + ] } ] } \ No newline at end of file diff --git a/lib/app-icons/driver_app_icons.dart b/lib/app-icons/driver_app_icons.dart index d6bbfb8..b8b3326 100644 --- a/lib/app-icons/driver_app_icons.dart +++ b/lib/app-icons/driver_app_icons.dart @@ -21,10 +21,26 @@ class DriverApp { static const _kFontFam = 'DriverApp'; static const _kFontPkg = null; - static const IconData logo = IconData(0xe801, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData closed_box = IconData(0xe803, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData location = IconData(0xe804, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData open_box = IconData(0xe805, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData phone_call = IconData(0xe806, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData qr = IconData(0xe807, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData logo = + IconData(0xe801, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData closed_box = + IconData(0xe803, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData location = + IconData(0xe804, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData open_box = + IconData(0xe805, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData phone_call = + IconData(0xe806, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData qr = + IconData(0xe807, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData not_available = + IconData(0xe80a, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData rejected_icon = + IconData(0xe80b, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData not_reachable_icon = + IconData(0xe80c, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData group_74 = + IconData(0xe80d, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData deliverd_icon = + IconData(0xe812, fontFamily: _kFontFam, fontPackage: _kFontPkg); } diff --git a/lib/app-icons/fonts/DriverApp.ttf b/lib/app-icons/fonts/DriverApp.ttf index 9b039c2d077be09003c85b5c5c10c8dcdfd19988..b00b39f71dea4a6b262215b2fb6bc5e10beb94db 100644 GIT binary patch delta 2727 zcmY*aX>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2 delta 432 zcmXv|JxD@f6utL-&-c`nM2EtpETbA+f^ZUC8p1Imq@`Z|5}HO9w$xlSXm4o@S|S<( z3mPOETpEIk3ZtQh2It5IhhFDB=!3(#=iGblcTZ+6BGr+d_!trI6VZIKpq0*_pSna6 zBwuIqTbc0T?*oyzC-Qyg(poC;IN{HE0ilkx5g*300r{Jq$Y2> zv0vOkdkR{m#P7;5`u)(sRjrUd8@Th16ZJJQ*QCp||Di?mrt}Mn(;a1hm~c-fWmTRUhOv-qWibbEsn0SfK@x&|5r_LemBa zAPmTu&sY(nCAeld40c++OjFPbrkJEQw^hR+0t=Jz7(K;e2^krip;$StN$iE~GH1xV u&U}h~B;p>ceB?Pk;Fjcfbn8*MsO&k^UOa(Kv}r} diff --git a/lib/main.dart b/lib/main.dart index 93879f9..84e790c 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -69,7 +69,7 @@ class MyApp extends StatelessWidget { iconTheme: IconThemeData(), dividerColor: Color.fromRGBO(112, 112, 112, 1.0), appBarTheme: AppBarTheme( - color: Colors.grey, + color: Colors.transparent, brightness: Brightness.light, elevation: 0.0, actionsIconTheme: IconThemeData( diff --git a/lib/pages/dashboard/dashboard_screen.dart b/lib/pages/dashboard/dashboard_screen.dart index 9f58d6c..3ca2e86 100644 --- a/lib/pages/dashboard/dashboard_screen.dart +++ b/lib/pages/dashboard/dashboard_screen.dart @@ -6,6 +6,7 @@ import 'package:driverapp/pages/orders/pending_orders_page.dart'; import 'package:driverapp/uitl/app_toast.dart'; import 'package:driverapp/uitl/utils.dart'; import 'package:driverapp/widgets/others/app_scaffold_widget.dart'; +import 'package:driverapp/widgets/others/network_base_view.dart'; import 'package:driverapp/widgets/others/rounded_container.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -372,126 +373,129 @@ class _DashboardScreenState extends State { ], ), onTap: () => Navigator.push( - context, - MaterialPageRoute( - builder: (context) => OrdersListScreen()), - )), + context, + MaterialPageRoute( + builder: (context) => OrdersListScreen()), + )), ], ), ], ), ), - Expanded( - child: ListView.builder( - shrinkWrap: true, - scrollDirection: Axis.vertical, - itemCount: //model.orders == null ? 0 : model.orders.length, - 3, - itemBuilder: (BuildContext context, int index) { - return Padding( - padding: EdgeInsets.symmetric(horizontal: 12.2), - child: InkWell( - child: RoundedContainer( - height: MediaQuery - .of(context) - .size - .height * 0.109, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Expanded( - flex: 1, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Padding( - padding: EdgeInsets.only( - left: 10.0, bottom: 5.0), - child: Image.asset( - 'assets/images/location.png', - height: - MediaQuery.of(context).size.height * - 0.06, - width: MediaQuery.of(context).size.width * - 0.05, - ), - ) - ], - ), - ), - if (model.orders.length != 0) + NetworkBaseView( + baseViewModel: model, + child: Expanded( + child: ListView.builder( + shrinkWrap: true, + scrollDirection: Axis.vertical, + itemCount: //model.orders == null ? 0 : model.orders.length, + 3, + itemBuilder: (BuildContext context, int index) { + return Padding( + padding: EdgeInsets.symmetric(horizontal: 12.2), + child: InkWell( + child: RoundedContainer( + height: MediaQuery.of(context).size.height * 0.109, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ Expanded( - flex: 3, + flex: 1, child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, children: [ Padding( - padding: EdgeInsets.only(top: 5.0), - child: Text( - model.orders[index].firstName + - ' ' + - model.orders[index].lastName, - style: TextStyle(fontSize: 18.0), - ), - ), - Text( - model.orders[index].mobileNumber, - style: TextStyle( - color: Color(0xff30B7B9), - fontWeight: FontWeight.w600, - fontSize: 15.0, - ), - ), - Expanded( - child: Text( - 'Olaya ST, Behind kfc next to king , ', - style: TextStyle(color: Colors.black45), + padding: EdgeInsets.only( + left: 10.0, bottom: 5.0), + child: Image.asset( + 'assets/images/location.png', + height: + MediaQuery.of(context).size.height * + 0.06, + width: + MediaQuery.of(context).size.width * + 0.05, ), - ), + ) ], ), ), - Padding( - padding: EdgeInsets.all(10.0), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: CircleAvatar( - backgroundColor: Colors.black45, - radius: 28.0, + if (model.orders.length != 0) + Expanded( + flex: 3, + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(top: 5.0), + child: Text( + model.orders[index].firstName + + ' ' + + model.orders[index].lastName, + style: TextStyle(fontSize: 18.0), + ), + ), + Text( + model.orders[index].mobileNumber, + style: TextStyle( + color: Color(0xff30B7B9), + fontWeight: FontWeight.w600, + fontSize: 15.0, + ), + ), + Expanded( + child: Text( + 'Olaya ST, Behind kfc next to king , ', + style: + TextStyle(color: Colors.black45), + ), + ), + ], + ), + ), + Padding( + padding: EdgeInsets.all(10.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Expanded( child: CircleAvatar( - backgroundColor: Colors.white, - maxRadius: 25.1, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Text( - '3 K.m \n away', - style: TextStyle( - color: Color(0xff30B7B9), - fontSize: 10.5, - fontWeight: FontWeight.w400), + backgroundColor: Colors.black45, + radius: 28.0, + child: CircleAvatar( + backgroundColor: Colors.white, + maxRadius: 25.1, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + '3 K.m \n away', + style: TextStyle( + color: Color(0xff30B7B9), + fontSize: 10.5, + fontWeight: FontWeight.w400), + ), ), ), ), - ), - ) - ], + ) + ], + ), ), - ), - ], + ], + ), ), + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + InformationPage(model.orders[index]))); + }, ), - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - InformationPage(model.orders[index]))); - }, - ), - ); - }, + ); + }, + ), ), ), ], diff --git a/lib/pages/delivery/information_page.dart b/lib/pages/delivery/information_page.dart index d6c6502..41436af 100644 --- a/lib/pages/delivery/information_page.dart +++ b/lib/pages/delivery/information_page.dart @@ -1,9 +1,14 @@ +import 'package:driverapp/app-icons/driver_app_icons.dart'; import 'package:driverapp/pages/delivery/delivery_confirmed_page.dart'; +import 'package:driverapp/widgets/bottom_sheet/action_sheet_button.dart'; +import 'package:driverapp/widgets/bottom_sheet/custom_bottom_sheet.dart'; +import 'package:driverapp/widgets/data_display/text.dart'; import 'package:driverapp/widgets/delivery/customer_brief_card.dart'; import 'package:driverapp/widgets/delivery/delivery_action_button.dart'; import 'package:driverapp/widgets/delivery/package_content.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; import '../../uitl/translations_delegate_base.dart'; import '../../widgets/others/app_scaffold_widget.dart'; @@ -276,6 +281,62 @@ class InformationPage extends StatelessWidget { ), ), ), + bottomSheet: CustomBottomSheet( + children: [ + SizedBox( + height: 10, + ), + Center( + child: Texts( + 'Select Action', + color: Colors.black, + fontSize: 22, + ), + ), + SizedBox( + height: 10, + ), + FractionallySizedBox( + widthFactor: 0.9, + child: Column( + children: [ + SizedBox( + height: 3, + child: Container( + color: Hexcolor("#D5D5D5"), + ), + ), + SizedBox( + height: 6, + ), + ActionSheetButton( + label: "Delivered", icon: DriverApp.deliverd_icon), + SizedBox( + height: 6, + ), + ActionSheetButton( + label: "Not Available", + icon: DriverApp.not_available, + ), + SizedBox( + height: 6, + ), + ActionSheetButton( + label: "Rejected", + icon: DriverApp.rejected_icon, + ), + SizedBox( + height: 6, + ), + ActionSheetButton( + label: "Not Reachable", + icon: DriverApp.not_reachable_icon, + ), + ], + ), + ), + ], + ), ); } } diff --git a/lib/pages/orders/pending_orders_page.dart b/lib/pages/orders/pending_orders_page.dart index 4d265b3..b01d301 100644 --- a/lib/pages/orders/pending_orders_page.dart +++ b/lib/pages/orders/pending_orders_page.dart @@ -1,10 +1,11 @@ -import 'package:flutter/material.dart'; -import 'package:driverapp/config/size_config.dart'; import 'package:driverapp/core/viewModels/orders_view_model.dart'; -import '../base/base_view.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:driverapp/widgets/others/rounded_container.dart'; import 'package:driverapp/pages/delivery/information_page.dart'; +import 'package:driverapp/widgets/others/app_scaffold_widget.dart'; +import 'package:driverapp/widgets/others/rounded_container.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +import '../base/base_view.dart'; class OrdersListScreen extends StatefulWidget { @override @@ -17,14 +18,10 @@ class _OrdersListScreenState extends State { return BaseView( onModelReady: (model) => model.getPendingOrders(), builder: (BuildContext context, OrdersViewModel model, Widget child) => - Scaffold( - appBar: AppBar( - centerTitle: true, - backgroundColor: Color(0xffF4F9FA), - title: Text( - 'Your Delivery Que', - ), - ), + AppScaffold( + isShowAppBar: true, + appBarTitle: 'Your Delivery Que', + titleColor: Colors.black, body: Column( children: [ Expanded( diff --git a/lib/widgets/bottom_sheet/action_sheet_button.dart b/lib/widgets/bottom_sheet/action_sheet_button.dart new file mode 100644 index 0000000..51c91f7 --- /dev/null +++ b/lib/widgets/bottom_sheet/action_sheet_button.dart @@ -0,0 +1,72 @@ +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; + +class ActionSheetButton extends StatelessWidget { + const ActionSheetButton({Key key, this.label, this.onTap, this.icon}) + : super(key: key); + final String label; + final Function onTap; + final IconData icon; + + @override + Widget build(BuildContext context) { + return InkWell( + onTap: onTap, + child: Container( + height: MediaQuery.of(context).size.height * 0.07, + decoration: BoxDecoration( + border: Border.all(color: Colors.blue), + borderRadius: BorderRadius.circular(6), + gradient: LinearGradient(colors: [ + Hexcolor('#DCE6E8'), + Hexcolor('#FFFFFF'), + ], begin: Alignment.topLeft), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Expanded( + flex: 1, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + width: 60, + height: 50, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Theme.of(context).primaryColor, + ), + child: Center( + child: Icon( + icon, + size: 30, + color: Colors.white, + ), + ), + ) + ], + ), + ), + Expanded( + flex: 3, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + padding: EdgeInsets.only(top: 5.0), + child: Text( + label, + style: TextStyle(fontSize: 18.0), + ), + ) + ], + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/widgets/bottom_sheet/custom_bottom_sheet.dart b/lib/widgets/bottom_sheet/custom_bottom_sheet.dart new file mode 100644 index 0000000..8131149 --- /dev/null +++ b/lib/widgets/bottom_sheet/custom_bottom_sheet.dart @@ -0,0 +1,39 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; + +class CustomBottomSheet extends StatelessWidget { + final List children; + + CustomBottomSheet({Key key, @required this.children}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Container( + padding: EdgeInsets.symmetric(vertical: 12.0), + decoration: BoxDecoration( + color: Hexcolor("#FEFEFE"), + borderRadius: BorderRadius.only( + topLeft: Radius.circular(30.0), + topRight: Radius.circular(30.0), + ), + ), + child: SafeArea( + top: false, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + decoration: BoxDecoration( + color: Hexcolor("#D5D5D5"), + borderRadius: BorderRadius.circular(3.0)), + width: 200, + height: 7.0, + ), + ...children + ], + ), + ), + ); + } +} diff --git a/lib/widgets/others/app_scaffold_widget.dart b/lib/widgets/others/app_scaffold_widget.dart index 3005588..f4d69a0 100644 --- a/lib/widgets/others/app_scaffold_widget.dart +++ b/lib/widgets/others/app_scaffold_widget.dart @@ -2,7 +2,6 @@ import 'package:driverapp/config/config.dart'; import 'package:driverapp/core/viewModels/base_view_model.dart'; import 'package:driverapp/widgets/progress_indicator/app_loader_widget.dart'; import 'package:flutter/material.dart'; -import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'arrow_back.dart'; import 'network_base_view.dart'; @@ -13,13 +12,19 @@ class AppScaffold extends StatelessWidget { final bool isLoading; final bool isShowAppBar; final BaseViewModel baseViewModel; + final Widget bottomSheet; + final Color titleColor; + final Color arrowColor; AppScaffold( {@required this.body, this.appBarTitle = '', this.isLoading = false, this.isShowAppBar = false, - this.baseViewModel}); + this.baseViewModel, + this.bottomSheet, + this.titleColor, + this.arrowColor}); @override Widget build(BuildContext context) { @@ -29,36 +34,40 @@ class AppScaffold extends StatelessWidget { backgroundColor: Theme.of(context).scaffoldBackgroundColor, appBar: isShowAppBar ? AppBar( - elevation: 0, - backgroundColor: Theme.of(context).appBarTheme.color, - textTheme: TextTheme( - headline6: - TextStyle(color: Colors.white, fontWeight: FontWeight.bold), - ), - title: Text(appBarTitle.toUpperCase()), - leading: Builder( - builder: (BuildContext context) { - return ArrowBack(); - }, - ), - centerTitle: true, - actions: [ - IconButton( - icon: Icon(FontAwesomeIcons.home), - color: Colors.white, - onPressed: () { - // TODO add navigator to home page - }, - ), - ], - ) + elevation: 0, + backgroundColor: Theme + .of(context) + .appBarTheme + .color, + textTheme: TextTheme( + headline6: TextStyle( + color: titleColor ?? Colors.white, + fontWeight: FontWeight.bold), + ), + title: Text(appBarTitle.toUpperCase()), + leading: Builder( + builder: (BuildContext context) { + return ArrowBack(arrowColor: arrowColor,); + }, + ), + centerTitle: true, +// actions: [ +// IconButton( +// icon: Icon(FontAwesomeIcons.home), +// color: Colors.white, +// onPressed: () { +// // TODO add navigator to home page +// }, +// ), +// ], + ) : null, body: baseViewModel != null ? NetworkBaseView( - child: buildBodyWidget(), - baseViewModel: baseViewModel, - ) - : buildBodyWidget(), + child: buildBodyWidget(), + baseViewModel: baseViewModel, + ) + : buildBodyWidget(), bottomSheet: bottomSheet, ), ); } diff --git a/lib/widgets/others/arrow_back.dart b/lib/widgets/others/arrow_back.dart index d22b5c1..219c2e5 100644 --- a/lib/widgets/others/arrow_back.dart +++ b/lib/widgets/others/arrow_back.dart @@ -1,19 +1,26 @@ -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; +import 'package:driverapp/core/viewModels/project_view_model.dart'; import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; class ArrowBack extends StatelessWidget { final Function onTap; + final Color arrowColor; - ArrowBack({Key key, this.onTap}) : super(key: key); + ArrowBack({Key key, this.onTap, this.arrowColor}) : super(key: key); @override Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); return GestureDetector( behavior: HitTestBehavior.opaque, onTap: Feedback.wrapForTap(() { onTap != null ? onTap() : Navigator.pop(context); }, context), - child: Icon(EvaIcons.arrowBack, color: Theme.of(context).primaryColor), + child: Icon( + projectViewModel.isArabic ? Icons.arrow_forward : Icons.arrow_back, + color: arrowColor ?? Theme.of(context).primaryColor, + size: 22, + ), ); } } diff --git a/lib/widgets/others/network_base_view.dart b/lib/widgets/others/network_base_view.dart index fe409bc..42bfde6 100644 --- a/lib/widgets/others/network_base_view.dart +++ b/lib/widgets/others/network_base_view.dart @@ -25,7 +25,7 @@ class NetworkBaseView extends StatelessWidget { return child; break; case ViewState.Busy: - return AppCircularProgressIndicator(); + return Expanded(child: AppCircularProgressIndicator()); break; case ViewState.Error: return Center(