├── .gitignore ├── .metadata ├── README.md ├── android ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── flutterenterpriseapplication │ │ │ │ └── MainActivity.java │ │ └── res │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── key.properties └── settings.gradle ├── assets ├── examples │ ├── app-release.apk │ ├── exa16.jpg │ ├── example1.jpg │ ├── example10.jpg │ ├── example11.jpg │ ├── example12.jpg │ ├── example13.jpg │ ├── example14.jpg │ ├── example15.jpg │ ├── example2.jpg │ ├── example3.jpg │ ├── example4.jpg │ ├── example5.jpg │ ├── example6.jpg │ ├── example7.jpg │ ├── example8.jpg │ └── example9.jpg └── images │ ├── arrow.png │ ├── arrowDown.png │ ├── arrows.png │ ├── banner.png │ ├── bg_mine.jpg │ ├── car.png │ ├── certifiedDriver.png │ ├── certifiedTruck.png │ ├── chart.png │ ├── close.png │ ├── confirm-order.png │ ├── delete.png │ ├── directCar.png │ ├── driver.png │ ├── driverList.png │ ├── dsj.png │ ├── f.png │ ├── fahuo.png │ ├── fdriver.png │ ├── goodsList.png │ ├── icon_search.png │ ├── invitingMotivation.png │ ├── location.png │ ├── logistics.png │ ├── logo.png │ ├── me.png │ ├── mineList.png │ ├── modify.png │ ├── orderList.png │ ├── password.png │ ├── pic.png │ ├── receiptList.png │ ├── releaseResource.png │ ├── sb.png │ ├── shippingList.png │ ├── shouhuo.png │ ├── splash.png │ ├── tel.png │ ├── tipsImage.png │ ├── toTop.png │ ├── transportList.png │ ├── truckList.png │ ├── users.png │ ├── verficition.png │ ├── wdb.png │ ├── workspace.png │ ├── workspace2.png │ └── z.png ├── flutter_enterprise_application_test.zip ├── ios ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ └── contents.xcworkspacedata └── Runner │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-1024x1024@1x.png │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ └── Icon-App-83.5x83.5@2x.png │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── main.m ├── lib ├── common │ ├── service_method.dart │ ├── splash_screen.dart │ └── utils.dart ├── components │ ├── city_picker.dart │ ├── componentsModel.dart │ ├── date_picker.dart │ ├── full_screen_wrapper.dart │ ├── multiple_picker.dart │ ├── progressDialog.dart │ ├── search_bar.dart │ ├── select_button.dart │ ├── show_modal.dart │ ├── single_picker.dart │ └── toast.dart ├── config │ ├── search_page_config.dart │ └── service_url.dart ├── main.dart ├── pages │ ├── build_waybill_page.dart │ ├── change_password_page.dart │ ├── change_phone_page.dart │ ├── collection_and_delivery_page.dart │ ├── condition_search_page │ │ ├── cert_driver_search_bar_page.dart │ │ ├── cert_truck_search_bar_page.dart │ │ ├── condition_search_model.dart │ │ ├── driver_list_search_bar_page.dart │ │ ├── logistics_search_bar_page.dart │ │ ├── resource_search_bar_page.dart │ │ ├── truck_list_search_bar_page.dart │ │ └── waybill_search_bar_page.dart │ ├── driver_certification_detail_page.dart │ ├── driver_certification_page.dart │ ├── driver_detail_page.dart │ ├── driver_list_page.dart │ ├── freight_accept_redcord_page.dart │ ├── index_page.dart │ ├── login_page.dart │ ├── logistics_detail_page.dart │ ├── logistics_list_page.dart │ ├── mine_page.dart │ ├── release_resource_page.dart │ ├── resource_detail_page.dart │ ├── resource_list_page.dart │ ├── search_customer_page.dart │ ├── search_driver_page.dart │ ├── search_route_line_page.dart │ ├── search_truck_page.dart │ ├── truck_detail_page.dart │ ├── truck_list_page.dart │ ├── vehicle_certification_detail_page.dart │ ├── vehicle_certification_page.dart │ ├── waybill_detail_page.dart │ ├── waybill_list_page.dart │ └── work_bench_page.dart └── widget │ ├── agreement_widget.dart │ ├── city_select_widget.dart │ ├── common_button_widget.dart │ ├── common_input_select_button_widget.dart │ ├── common_input_widget.dart │ ├── common_row_widget.dart │ ├── date_select_widget.dart │ ├── detailPageWidget │ ├── bottom_button_list_widget.dart │ ├── company_block_widget.dart │ ├── content_block_widget.dart │ └── preview_image_list.dart │ ├── header_title_widget.dart │ ├── image_title_widget.dart │ ├── input.dart │ ├── input_widget.dart │ ├── mini_button_widget.dart │ ├── multiple_select_widget.dart │ ├── radio_widget.dart │ ├── searchPageWidget │ ├── bottomButtomWidget.dart │ ├── common_refresh_list_widget.dart │ └── searchBar_widget.dart │ ├── search_widget.dart │ ├── single_select_widget.dart │ ├── textWidget │ ├── text1.dart │ ├── text2.dart │ └── text_model.dart │ └── widget_model.dart ├── pubspec.lock ├── pubspec.yaml └── test └── widget_test.dart /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # Visual Studio Code related 19 | .vscode/ 20 | 21 | # Flutter/Dart/Pub related 22 | **/doc/api/ 23 | .dart_tool/ 24 | .flutter-plugins 25 | .packages 26 | .pub-cache/ 27 | .pub/ 28 | build/ 29 | 30 | # Android related 31 | **/android/**/gradle-wrapper.jar 32 | **/android/.gradle 33 | **/android/captures/ 34 | **/android/gradlew 35 | **/android/gradlew.bat 36 | **/android/local.properties 37 | **/android/**/GeneratedPluginRegistrant.java 38 | 39 | # iOS/XCode related 40 | **/ios/**/*.mode1v3 41 | **/ios/**/*.mode2v3 42 | **/ios/**/*.moved-aside 43 | **/ios/**/*.pbxuser 44 | **/ios/**/*.perspectivev3 45 | **/ios/**/*sync/ 46 | **/ios/**/.sconsign.dblite 47 | **/ios/**/.tags* 48 | **/ios/**/.vagrant/ 49 | **/ios/**/DerivedData/ 50 | **/ios/**/Icon? 51 | **/ios/**/Pods/ 52 | **/ios/**/.symlinks/ 53 | **/ios/**/profile 54 | **/ios/**/xcuserdata 55 | **/ios/.generated/ 56 | **/ios/Flutter/App.framework 57 | **/ios/Flutter/Flutter.framework 58 | **/ios/Flutter/Generated.xcconfig 59 | **/ios/Flutter/app.flx 60 | **/ios/Flutter/app.zip 61 | **/ios/Flutter/flutter_assets/ 62 | **/ios/ServiceDefinitions.json 63 | **/ios/Runner/GeneratedPluginRegistrant.* 64 | 65 | # Exceptions to above rules. 66 | !**/ios/**/default.mode1v3 67 | !**/ios/**/default.mode2v3 68 | !**/ios/**/default.pbxuser 69 | !**/ios/**/default.perspectivev3 70 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 71 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 06b979c4d5e1b499745422269f01a00341257058 8 | channel: dev 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 项目部分截图 2 | 3 |
4 | 图片名称 5 | 6 | 图片名称 7 |


8 |
9 | 图片名称 10 | 图片名称 11 |


12 |
13 | 图片名称 14 | 图片名称 15 |


16 |
17 | 图片名称 18 | 图片名称 19 |


20 |
21 | 图片名称 22 | 图片名称 23 |


24 |
25 | 图片名称 26 | 图片名称 27 |


28 |
29 | 图片名称 30 | 图片名称 31 |


32 |
33 | 图片名称 34 |
35 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 | def keystorePropertiesFile = rootProject.file("key.properties") 27 | def keystoreProperties = new Properties() 28 | keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) 29 | 30 | android { 31 | compileSdkVersion 29 32 | 33 | lintOptions { 34 | disable 'InvalidPackage' 35 | } 36 | 37 | defaultConfig { 38 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 39 | applicationId "com.example.flutterenterpriseapplication" 40 | minSdkVersion 16 41 | targetSdkVersion 29 42 | versionCode flutterVersionCode.toInteger() 43 | versionName flutterVersionName 44 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 45 | manifestPlaceholders = [ 46 | AMAP_KEY : "e3972ab10267680027cff8d2fb03e762", /// 高德地图key 47 | ] 48 | multiDexEnabled true 49 | } 50 | signingConfigs { 51 | release { 52 | keyAlias keystoreProperties['keyAlias'] 53 | keyPassword keystoreProperties['keyPassword'] 54 | storeFile file(keystoreProperties['storeFile']) 55 | storePassword keystoreProperties['storePassword'] 56 | } 57 | } 58 | 59 | buildTypes { 60 | release { 61 | // TODO: Add your own signing config for the release build. 62 | // Signing with the debug keys for now, so `flutter run --release` works. 63 | signingConfig signingConfigs.debug 64 | } 65 | } 66 | } 67 | 68 | flutter { 69 | source '../..' 70 | } 71 | 72 | dependencies { 73 | implementation 'com.amap.api:location:latest.integration' 74 | testImplementation 'junit:junit:4.12' 75 | androidTestImplementation 'androidx.test:runner:1.1.1' 76 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' 77 | } 78 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 11 | 15 | 22 | 26 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/example/flutterenterpriseapplication/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.flutterenterpriseapplication; 2 | 3 | import android.os.Bundle; 4 | import io.flutter.app.FlutterActivity; 5 | import io.flutter.plugins.GeneratedPluginRegistrant; 6 | 7 | public class MainActivity extends FlutterActivity { 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | GeneratedPluginRegistrant.registerWith(this); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.3.0' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableJetifier=true 3 | android.useAndroidX=true -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Jul 18 17:44:19 CST 2019 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip 7 | -------------------------------------------------------------------------------- /android/key.properties: -------------------------------------------------------------------------------- 1 | storePassword=mayangyang 2 | keyPassword=mayangyang 3 | keyAlias=key 4 | storeFile=D:/key.jks -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /assets/examples/app-release.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/examples/app-release.apk -------------------------------------------------------------------------------- /assets/examples/exa16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/examples/exa16.jpg -------------------------------------------------------------------------------- /assets/examples/example1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/examples/example1.jpg -------------------------------------------------------------------------------- /assets/examples/example10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/examples/example10.jpg -------------------------------------------------------------------------------- /assets/examples/example11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/examples/example11.jpg -------------------------------------------------------------------------------- /assets/examples/example12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/examples/example12.jpg -------------------------------------------------------------------------------- /assets/examples/example13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/examples/example13.jpg -------------------------------------------------------------------------------- /assets/examples/example14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/examples/example14.jpg -------------------------------------------------------------------------------- /assets/examples/example15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/examples/example15.jpg -------------------------------------------------------------------------------- /assets/examples/example2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/examples/example2.jpg -------------------------------------------------------------------------------- /assets/examples/example3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/examples/example3.jpg -------------------------------------------------------------------------------- /assets/examples/example4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/examples/example4.jpg -------------------------------------------------------------------------------- /assets/examples/example5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/examples/example5.jpg -------------------------------------------------------------------------------- /assets/examples/example6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/examples/example6.jpg -------------------------------------------------------------------------------- /assets/examples/example7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/examples/example7.jpg -------------------------------------------------------------------------------- /assets/examples/example8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/examples/example8.jpg -------------------------------------------------------------------------------- /assets/examples/example9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/examples/example9.jpg -------------------------------------------------------------------------------- /assets/images/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/arrow.png -------------------------------------------------------------------------------- /assets/images/arrowDown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/arrowDown.png -------------------------------------------------------------------------------- /assets/images/arrows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/arrows.png -------------------------------------------------------------------------------- /assets/images/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/banner.png -------------------------------------------------------------------------------- /assets/images/bg_mine.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/bg_mine.jpg -------------------------------------------------------------------------------- /assets/images/car.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/car.png -------------------------------------------------------------------------------- /assets/images/certifiedDriver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/certifiedDriver.png -------------------------------------------------------------------------------- /assets/images/certifiedTruck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/certifiedTruck.png -------------------------------------------------------------------------------- /assets/images/chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/chart.png -------------------------------------------------------------------------------- /assets/images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/close.png -------------------------------------------------------------------------------- /assets/images/confirm-order.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/confirm-order.png -------------------------------------------------------------------------------- /assets/images/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/delete.png -------------------------------------------------------------------------------- /assets/images/directCar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/directCar.png -------------------------------------------------------------------------------- /assets/images/driver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/driver.png -------------------------------------------------------------------------------- /assets/images/driverList.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/driverList.png -------------------------------------------------------------------------------- /assets/images/dsj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/dsj.png -------------------------------------------------------------------------------- /assets/images/f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/f.png -------------------------------------------------------------------------------- /assets/images/fahuo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/fahuo.png -------------------------------------------------------------------------------- /assets/images/fdriver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/fdriver.png -------------------------------------------------------------------------------- /assets/images/goodsList.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/goodsList.png -------------------------------------------------------------------------------- /assets/images/icon_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/icon_search.png -------------------------------------------------------------------------------- /assets/images/invitingMotivation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/invitingMotivation.png -------------------------------------------------------------------------------- /assets/images/location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/location.png -------------------------------------------------------------------------------- /assets/images/logistics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/logistics.png -------------------------------------------------------------------------------- /assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/logo.png -------------------------------------------------------------------------------- /assets/images/me.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/me.png -------------------------------------------------------------------------------- /assets/images/mineList.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/mineList.png -------------------------------------------------------------------------------- /assets/images/modify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/modify.png -------------------------------------------------------------------------------- /assets/images/orderList.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/orderList.png -------------------------------------------------------------------------------- /assets/images/password.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/password.png -------------------------------------------------------------------------------- /assets/images/pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/pic.png -------------------------------------------------------------------------------- /assets/images/receiptList.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/receiptList.png -------------------------------------------------------------------------------- /assets/images/releaseResource.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/releaseResource.png -------------------------------------------------------------------------------- /assets/images/sb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/sb.png -------------------------------------------------------------------------------- /assets/images/shippingList.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/shippingList.png -------------------------------------------------------------------------------- /assets/images/shouhuo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/shouhuo.png -------------------------------------------------------------------------------- /assets/images/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/splash.png -------------------------------------------------------------------------------- /assets/images/tel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/tel.png -------------------------------------------------------------------------------- /assets/images/tipsImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/tipsImage.png -------------------------------------------------------------------------------- /assets/images/toTop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/toTop.png -------------------------------------------------------------------------------- /assets/images/transportList.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/transportList.png -------------------------------------------------------------------------------- /assets/images/truckList.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/truckList.png -------------------------------------------------------------------------------- /assets/images/users.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/users.png -------------------------------------------------------------------------------- /assets/images/verficition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/verficition.png -------------------------------------------------------------------------------- /assets/images/wdb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/wdb.png -------------------------------------------------------------------------------- /assets/images/workspace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/workspace.png -------------------------------------------------------------------------------- /assets/images/workspace2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/workspace2.png -------------------------------------------------------------------------------- /assets/images/z.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/assets/images/z.png -------------------------------------------------------------------------------- /flutter_enterprise_application_test.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/flutter_enterprise_application_test.zip -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 56 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 75 | 77 | 83 | 84 | 85 | 86 | 88 | 89 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #include "AppDelegate.h" 2 | #include "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application 7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 8 | [GeneratedPluginRegistrant registerWithRegistry:self]; 9 | // Override point for customization after application launch. 10 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayangyang1/flutter-application/91a182e6ee21321c3525cbabc90626ec2930fdaa/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | flutter_enterprise_application 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/common/service_method.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'dart:async'; 3 | import 'dart:io'; 4 | import '../config/service_url.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:shared_preferences/shared_preferences.dart'; 7 | import '../components/toast.dart'; 8 | 9 | Future getAjax(url, stringParams, context) async{ 10 | SharedPreferences prefs = await SharedPreferences.getInstance(); 11 | String cookies = 'JSESSIONID=${prefs.get('cookies')}'; 12 | // String cookies = 'JSESSIONID=9b2c3610-38fe-4541-8459-198333436af2'; 13 | try { 14 | Response response; 15 | Dio dio = new Dio(); 16 | 17 | // (dio.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate = (client) { 18 | // client.findProxy = (uri) { 19 | // return "PROXY 192.168.10.120:8888"; 20 | // }; 21 | // client.badCertificateCallback = 22 | // (X509Certificate cert, String host, int port) { 23 | // return true; 24 | // }; 25 | // }; 26 | 27 | String reqUrl; 28 | dio.options.baseUrl = serviceUrl; 29 | dio.options.contentType = ContentType.parse("application/x-www-form-urlencoded"); 30 | dio.options.headers['Cookie'] = cookies; 31 | if(stringParams == ''){ 32 | reqUrl = servicePath[url]; 33 | }else{ 34 | reqUrl = servicePath[url] + stringParams; 35 | } 36 | print(reqUrl); 37 | response = await dio.get(reqUrl); 38 | print(response); 39 | if(response.data == null || response.data == ''){ 40 | return null; 41 | } 42 | if(response.data['code'] == 500) { 43 | Future.delayed(Duration(milliseconds: 10),(){ 44 | Toast.toast(context, response.data['content']); 45 | }); 46 | }else if(response.data['code'] == 401) { 47 | Navigator.pushNamedAndRemoveUntil(context, '/login', (route)=>false); 48 | }else { 49 | return response.data; 50 | } 51 | }on DioError catch (e) { 52 | if (e.response != null && e.response.data['code'] == 401) { 53 | Navigator.pushNamedAndRemoveUntil(context, '/login', (route)=>false); 54 | } 55 | } 56 | } 57 | 58 | Future postAjax(String url, Mapparams, BuildContext context) async { 59 | SharedPreferences prefs = await SharedPreferences.getInstance(); 60 | String cookies = 'JSESSIONID=' + prefs.get('cookies'); 61 | try { 62 | print('获取数据'); 63 | print(url); 64 | print(params); 65 | Response response; 66 | Dio dio = new Dio(); 67 | dio.options.baseUrl = serviceUrl; 68 | dio.options.contentType = ContentType.parse("application/x-www-form-urlencoded"); 69 | dio.options.headers['Cookie'] = cookies; 70 | response = await dio.post(servicePath[url], data:params); 71 | if(response.data == null || response.data == ''){ 72 | return null; 73 | } 74 | if(response.data['code'] == 500) { 75 | Future.delayed(Duration(milliseconds: 10),(){ 76 | Toast.toast(context, response.data['content']); 77 | }); 78 | }else if(response.data['code'] == 401) { 79 | Navigator.pushNamedAndRemoveUntil(context, '/login', (route)=>false); 80 | }else{ 81 | return response.data; 82 | } 83 | 84 | } on DioError catch (e) { 85 | if (e.response != null && e.response.data['code'] == 401) { 86 | Navigator.pushNamedAndRemoveUntil(context, '/login', (route)=>false); 87 | } 88 | } 89 | } 90 | 91 | Future getAjaxStr(url, stringParams, context) async{ 92 | SharedPreferences prefs = await SharedPreferences.getInstance(); 93 | String cookies = 'JSESSIONID=' + prefs.get('cookies'); 94 | try { 95 | Response response; 96 | Dio dio = new Dio(); 97 | String reqUrl; 98 | dio.options.baseUrl = serviceUrl; 99 | dio.options.contentType = ContentType.parse("application/x-www-form-urlencoded"); 100 | dio.options.headers['Cookie'] = cookies; 101 | if(stringParams == ''){ 102 | reqUrl = url; 103 | }else{ 104 | reqUrl = url + stringParams; 105 | } 106 | print(reqUrl); 107 | response = await dio.get(reqUrl); 108 | print(response.data); 109 | if(response.data == null || response.data == ''){ 110 | return null; 111 | } 112 | if(response.data['code'] == 500) { 113 | Future.delayed(Duration(milliseconds: 10),(){ 114 | Toast.toast(context, response.data['content']); 115 | }); 116 | }else if(response.data['code'] == 401) { 117 | Navigator.pushNamedAndRemoveUntil(context, '/login', (route)=>false); 118 | }else{ 119 | return response.data; 120 | } 121 | 122 | 123 | }on DioError catch (e) { 124 | if (e.response.data['code'] == 401) { 125 | Navigator.pushNamedAndRemoveUntil(context, '/login', (route)=>false); 126 | } 127 | } 128 | } 129 | 130 | Future postAjaxStr(url, params, context) async { 131 | SharedPreferences prefs = await SharedPreferences.getInstance(); 132 | String cookies = 'JSESSIONID=' + prefs.get('cookies'); 133 | try { 134 | Response response; 135 | Dio dio = new Dio(); 136 | dio.options.baseUrl = serviceUrl; 137 | dio.options.contentType = ContentType.parse("application/x-www-form-urlencoded"); 138 | dio.options.headers['Cookie'] = cookies; 139 | response = await dio.post(url, data:params); 140 | if(response.data == null || response.data == ''){ 141 | return null; 142 | } 143 | if(response.data['code'] == 500) { 144 | Future.delayed(Duration(milliseconds: 10),(){ 145 | Toast.toast(context, response.data['content']); 146 | }); 147 | }else if(response.data['code'] == 401) { 148 | Navigator.pushNamedAndRemoveUntil(context, '/login', (route)=>false); 149 | }else{ 150 | return response.data; 151 | } 152 | 153 | } on DioError catch (e) { 154 | if (e.response != null && e.response.data['code'] == 401) { 155 | Navigator.pushNamedAndRemoveUntil(context, '/login', (route)=>false); 156 | } 157 | } 158 | } 159 | 160 | Future uploaFile(url, FormData formData, context) async { 161 | SharedPreferences prefs = await SharedPreferences.getInstance(); 162 | String cookies = 'JSESSIONID=' + prefs.get('cookies'); 163 | try { 164 | Response response; 165 | Dio dio = new Dio(); 166 | dio.options.baseUrl = serviceUrl; 167 | dio.options.contentType = ContentType.parse("application/x-www-form-urlencoded"); 168 | dio.options.headers['Cookie'] = cookies; 169 | response = await dio.post(servicePath[url], data:formData); 170 | if(response.data == null || response.data == ''){ 171 | return null; 172 | } 173 | if(response.data['code'] == 500) { 174 | Future.delayed(Duration(milliseconds: 10),(){ 175 | Toast.toast(context, response.data['content']); 176 | }); 177 | }else if(response.data['code'] == 401) { 178 | Navigator.pushNamedAndRemoveUntil(context, '/login', (route)=>false); 179 | }else{ 180 | return response.data; 181 | } 182 | 183 | } on DioError catch (e) { 184 | if (e.response != null && e.response.data['code'] == 401) { 185 | Navigator.pushNamedAndRemoveUntil(context, '/login', (route)=>false); 186 | } 187 | } 188 | } 189 | 190 | Widget commonFutureBuilder( Future _fecth, Widget pageWidget) { 191 | return FutureBuilder( 192 | future: _fecth, 193 | builder: (BuildContext context, AsyncSnapshot snapshot) { 194 | print(snapshot.connectionState); 195 | switch (snapshot.connectionState) { 196 | case ConnectionState.none://-------请求态 197 | return loadingWidget(); 198 | case ConnectionState.waiting://-------请求态 199 | print('waiting'); 200 | return loadingWidget(); 201 | case ConnectionState.done : //完成态 202 | print('done'); 203 | return pageWidget; 204 | break; 205 | default: 206 | break; 207 | } 208 | return Container(); 209 | }, 210 | ); 211 | } 212 | 213 | Widget loadingWidget() { 214 | return Stack( 215 | children: [ 216 | Opacity( 217 | opacity: 0.3, 218 | child: new ModalBarrier(color: Colors.black87), 219 | ), 220 | Center( 221 | child: CircularProgressIndicator(), 222 | ) 223 | ], 224 | ); 225 | } 226 | -------------------------------------------------------------------------------- /lib/common/splash_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../pages/index_page.dart'; 3 | 4 | class SplashScreen extends StatefulWidget { 5 | _SplashScreenState createState() => _SplashScreenState(); 6 | } 7 | 8 | class _SplashScreenState extends State with SingleTickerProviderStateMixin { 9 | 10 | AnimationController _controller; 11 | Animation _animation; 12 | 13 | void initState() { 14 | super.initState(); 15 | _controller = AnimationController(vsync:this,duration:Duration(milliseconds:3000)); 16 | _animation = Tween(begin: 0.0,end:1.0).animate(_controller); 17 | 18 | 19 | 20 | //播放动画 21 | _controller.forward(); 22 | /*动画事件监听器, 23 | 它可以监听到动画的执行状态, 24 | 我们这里只监听动画是否结束, 25 | 如果结束则执行页面跳转动作。 */ 26 | _animation.addStatusListener((status){ 27 | if(status == AnimationStatus.completed){ 28 | Navigator.of(context).pushAndRemoveUntil( 29 | MaterialPageRoute(builder: (context)=>IndexPage()), 30 | (route)=> route==null); 31 | } 32 | }); 33 | 34 | } 35 | 36 | @override 37 | void dispose() { 38 | _controller.dispose(); 39 | super.dispose(); 40 | } 41 | 42 | 43 | @override 44 | Widget build(BuildContext context) { 45 | return FadeTransition( //透明度动画组件 46 | opacity: _animation, //执行动画 47 | child: Image.asset( //网络图片 48 | 'assets/images/splash.png', 49 | scale: 2.0, //进行缩放 50 | fit:BoxFit.cover // 充满父容器 51 | ), 52 | ); 53 | } 54 | } -------------------------------------------------------------------------------- /lib/common/utils.dart: -------------------------------------------------------------------------------- 1 | import 'package:shared_preferences/shared_preferences.dart'; 2 | import 'dart:convert'; 3 | 4 | getCookieAndSaveInStorage (res){ 5 | String cookies; 6 | var cookiestr = res.headers['set-cookie'].join(';'); 7 | List cookiesarr = cookiestr.split(';'); 8 | print('cookiestr'); 9 | print(cookiesarr); 10 | cookiesarr.forEach((item){ 11 | if(item.indexOf('JSESSIONID') != -1){ 12 | var itemar = item.split('='); 13 | cookies = itemar[itemar.length - 1]; 14 | } 15 | }); 16 | return cookies; 17 | } 18 | 19 | checkedPermission (value) async{//权限校验 20 | bool _values = false; 21 | SharedPreferences prefs = await SharedPreferences.getInstance(); 22 | if(prefs.getString('roleInfo') != null){ 23 | var roleInfo = json.decode(prefs.getString('roleInfo')); 24 | List permissionList = roleInfo['permissionCodeList'] ?? []; 25 | permissionList.forEach((item){ 26 | if(item == value){ 27 | _values = true; 28 | } 29 | }); 30 | } 31 | return _values; 32 | } 33 | 34 | Map configLicensePlate = { 35 | '01': '大型汽车号牌', 36 | '02': '小型汽车号牌', 37 | '99': '其他号牌' 38 | }; 39 | Map configTruckModel = { 40 | 'H01': '普通货车', 41 | 'H02': '厢式货车', 42 | 'H04': '罐式货车', 43 | 'Q00': '牵引车', 44 | 'G01': '普通挂车', 45 | 'G03': '罐式挂车', 46 | 'G05': '集装箱挂车', 47 | 'H09': '仓栅式货车', 48 | 'H03': '封闭货车', 49 | 'H05': '平板货车', 50 | 'H06': '集装箱车', 51 | 'H07': '自卸货车', 52 | 'H08': '特殊结构货车', 53 | 'Z00': '专项作业车', 54 | 'G02': '厢式挂车', 55 | 'G07': '仓栅式挂车', 56 | 'G04': '平板挂车', 57 | 'G06': '自卸挂车', 58 | 'G09': '专项作业挂车', 59 | 'X91': '车辆运输车', 60 | 'X92': '车辆运输车(单排)' 61 | }; 62 | 63 | Map configGender = { 64 | 'male': '男', 65 | 'female': '女' 66 | }; 67 | Map configFreightStatus = { 68 | 'pushling': '发布中', 69 | 'received': '已接单', 70 | 'finished': '已结束' 71 | }; 72 | Map driverAcceptStatus = { 73 | 'undispatched': '待派车', 74 | 'dispatched': '已派车', 75 | 'ignored': '已忽略' 76 | }; 77 | Map configSettleMethod = { 78 | 'loadingweight': '按发货货量', 79 | 'unloadingweight': '按收货货量', 80 | 'smaller': '发货与收货两者取小', 81 | 'bigger': '发货与收货两者取大', 82 | 'trucknumber': '按车次' 83 | }; 84 | Map configPayStatus = { 85 | 'uncreated': '待支付', 86 | 'pend': '待支付', 87 | 'paid': '已支付', 88 | 'failed': '支付失败' 89 | }; 90 | Map configPayChannel = { 91 | 'offline': '线下支付', 92 | 'ljs': '炼金师支付', 93 | 'icbc': '工商银行支付', 94 | 'bsb': '包商银行支付', 95 | }; 96 | Map configWaybillStatus = { 97 | 'unloading': '待装货', 98 | 'going': '运输中', 99 | 'finish': '运输完成', 100 | 'cancel': '运单取消' 101 | }; 102 | Map configLogisticsStatus = { 103 | 'todo': '待执行', 104 | 'doing': '执行中', 105 | 'finish': '订单完成' 106 | }; 107 | Map configBusinessTypeCode = { 108 | '1002996': '干线普货运输', 109 | '1003997': '城市配送', 110 | '1003998': '农村配送', 111 | '1002998': '集装箱运输', 112 | '1003999': '其他', 113 | }; 114 | Map configCertTruckStatus = { 115 | 'authenticating': '待认证', 116 | 'unauthenticated': '未提交', 117 | 'authenticated': '认证通过', 118 | 'failed': '认证不通过', 119 | }; 120 | Map configResourceTruckStatus = { 121 | 'authenticating': '认证中', 122 | 'unauthenticated': '未认证', 123 | 'authenticated': '已认证', 124 | 'failed': '认证失败', 125 | }; 126 | Map configMeterageType = { 127 | 'ton' : '吨', 128 | 'cube' : '方', 129 | 'item' : '件', 130 | }; 131 | Map configPowerTypeMap = { 132 | 'gas': '气车', 133 | 'oil': '油车' 134 | }; 135 | Map configGoodsType = { 136 | '90': '电子产品', 137 | '92': '商品汽车', 138 | '93': '冷藏货物', 139 | '94': '大宗货物', 140 | '95': '快速消费品', 141 | '96': '农产品', 142 | '999': '其他', 143 | }; 144 | Map configGoodsLossMethod = { 145 | 'goods.loss.ration': '按系数', 146 | 'goods.loss': '按量' 147 | }; 148 | Map configGoodsLossUnitCode = { 149 | 'percent': '‰', 150 | 'ton': '吨/车', 151 | 'cube': '方/车', 152 | 'item': '件/车' 153 | }; 154 | Map unit = { 155 | 'cube': { 156 | 'carrier.price': { 157 | 'yuanpersquare': '元/方', 158 | 'yuanpertruck': '元/车', 159 | }, 160 | 'driver.prices': { 161 | 'yuanpercube': '元/方', 162 | 'yuanpertruck': '元/车' 163 | }, 164 | 'driver.price': [ 165 | { 'name': '元/方', 'id': 'yuanpercube' }, 166 | { 'name': '元/车', 'id':'yuanpertruck'} 167 | ], 168 | 'goods.loss': { 169 | 'cube': '方/车' 170 | }, 171 | 'goods.price': { 172 | 'name': '元/方', 173 | 'id': 'yuanpercube' 174 | }, 175 | 'goods.volume': { 176 | 'cube': '方' 177 | }, 178 | 'settle.volume.unit': { 179 | 'cube': '方' 180 | }, 181 | 'truck.cubage': { 182 | 'cube': '方' 183 | } 184 | }, 185 | 'day': { 186 | 'route.duration': { 187 | 'day': '天' 188 | } 189 | }, 190 | 'hour': { 191 | 'route.duration': { 192 | 'hour': '小时' 193 | } 194 | }, 195 | 'item': { 196 | 'carrier.price': { 197 | 'yuanperitem': '元/件', 198 | 'yuanpertruck': '元/车' 199 | }, 200 | 'driver.prices': { 201 | 'yuanperitem': '元/件', 202 | 'yuanpertruck': '元/车' 203 | }, 204 | 'driver.price': [ 205 | { 'name': '元/件', 'id': 'yuanperitem' }, 206 | { 'name': '元/车', 'id': 'yuanpertruck'} 207 | ], 208 | 'goods.loss': { 209 | 'item': '件/车' 210 | }, 211 | 'goods.number': { 212 | 'item': '件' 213 | }, 214 | 'goods.price': { 215 | 'name': '元/件', 216 | 'id': 'yuanperitem' 217 | }, 218 | 'settle.volume.unit': { 219 | 'item': '件' 220 | } 221 | }, 222 | 'km': { 223 | 'mileage.number': { 224 | 'km': '公里' 225 | }, 226 | 'standard.distance': { 227 | 'km': '公里' 228 | } 229 | }, 230 | 'liang': { 231 | 'truckqty.number': { 232 | 'liang': '辆' 233 | } 234 | }, 235 | 'meter': { 236 | 'truck.size': { 237 | 'meter': '米' 238 | } 239 | }, 240 | 'millimetre': { 241 | 'truck.size': { 242 | 'millimetre': '毫米' 243 | } 244 | }, 245 | 'mm': { 246 | 'tyrewrinkles.number': { 247 | 'mm': '毫米' 248 | } 249 | }, 250 | 'percent': { 251 | 'goods.loss.ration': { 252 | 'percent': '%' 253 | } 254 | }, 255 | 'ton': { 256 | 'carrier.price': { 257 | 'yuanperton': '元/吨', 258 | 'yuanpertruck': '元/车' 259 | }, 260 | 'driver.prices': { 261 | 'yuanperton': '元/吨', 262 | 'yuanpertruck': '元/车' 263 | }, 264 | 'driver.price': [ 265 | { 'name': '元/吨', 'id': 'yuanperton' }, 266 | { 'name': '元/车', 'id': 'yuanpertruck'} 267 | ], 268 | 'goods.loss': { 269 | 'ton': '吨/车' 270 | }, 271 | 'goods.price': { 272 | 'name': '元/吨', 273 | 'id': 'yuanperton' 274 | }, 275 | 'goods.weight': { 276 | 'ton': '吨' 277 | }, 278 | 'settle.volume.unit': { 279 | 'ton': '吨' 280 | }, 281 | 'truck.carry': { 282 | 'ton': '吨' 283 | }, 284 | }, 285 | 'yuan': { 286 | 'price.unit': { 287 | 'yuan': '元' 288 | } 289 | } 290 | }; 291 | 292 | List carTypes = ["请选择","A1", "A2", "A3", "B1", "B2", "C1", "C2"]; 293 | 294 | const List attachList = ['cardFront', 'cardAfter', 'driverOne', 'driverTwo', 'qualificationCertificateResourceCodeOne', 'qualificationCertificateResourceCodeTwo']; 295 | Map attachments = { 296 | 'cardFront': { 'name': '身份证正面', 'value': 'assets/images/pic.png', 'status': 'hidden', 'resourceCode': '' }, 297 | 'cardAfter': { 'name': '身份证反面', 'value': 'assets/images/pic.png', 'status': 'hidden', 'resourceCode': '' }, 298 | 'driverOne': { 'name': '驾驶证第一联照片', 'value': 'assets/images/pic.png', 'status': 'hidden', 'resourceCode': '' }, 299 | 'driverTwo': { 'name': '驾驶证第二联照片', 'value': 'assets/images/pic.png', 'status': 'hidden', 'resourceCode': '' }, 300 | 'qualificationCertificateResourceCodeOne': { 'name': '从业资格证照片一', 'value': 'assets/images/pic.png', 'status': 'hidden', 'resourceCode': '' }, 301 | 'qualificationCertificateResourceCodeTwo': { 'name': '从业资格证照片二', 'value': 'assets/images/pic.png', 'status': 'hidden', 'resourceCode': '' }, 302 | }; 303 | 304 | // --------常用正则---start ------------------// 305 | //手机号 RegExp mobile = new RegExp(r"1[0-9]\d{9}$"); 306 | //登录密码:6~16位数字和字符组合 RegExp mobile = new RegExp(r"(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$"); 307 | //登录密码:6位数字验证码 RegExp mobile = new RegExp(r"\d{6}$"); 308 | // 忽略特殊字符 const _regExp=r"^[\u4E00-\u9FA5A-Za-z0-9_]+$"; 309 | // 只能输数字和小写字母 const _regExp=r"^[Za-z0-9_]+$"; 310 | // 只能输数字和字母 const _regExp=r"^[ZA-ZZa-z0-9_]+$"; 311 | //可以带最多四位小数的数字 RegExp = _number = new RegExp(r"^[0-9]+(.[0-9]{0,4})?$"); 312 | 313 | // --------常用正则---end ------------------// 314 | -------------------------------------------------------------------------------- /lib/components/componentsModel.dart: -------------------------------------------------------------------------------- 1 | export './city_picker.dart'; 2 | export './date_picker.dart'; 3 | export './progressDialog.dart'; 4 | export './show_modal.dart'; 5 | export './toast.dart'; 6 | export './progressDialog.dart'; 7 | export './date_picker.dart'; -------------------------------------------------------------------------------- /lib/components/full_screen_wrapper.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:photo_view/photo_view.dart'; 3 | class FullScreenWrapper extends StatelessWidget { 4 | const FullScreenWrapper( 5 | {this.imageProvider, 6 | this.loadingChild, 7 | this.backgroundDecoration, 8 | this.minScale, 9 | this.maxScale, 10 | this.initialScale, 11 | this.basePosition = Alignment.center}); 12 | 13 | final ImageProvider imageProvider; 14 | final Widget loadingChild; 15 | final Decoration backgroundDecoration; 16 | final dynamic minScale; 17 | final dynamic maxScale; 18 | final dynamic initialScale; 19 | final Alignment basePosition; 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return Container( 24 | constraints: BoxConstraints.expand( 25 | height: MediaQuery.of(context).size.height, 26 | ), 27 | child: PhotoView( 28 | imageProvider: imageProvider, 29 | loadingChild: loadingChild, 30 | backgroundDecoration: backgroundDecoration, 31 | minScale: minScale, 32 | maxScale: maxScale, 33 | initialScale: initialScale, 34 | basePosition: basePosition, 35 | )); 36 | } 37 | } -------------------------------------------------------------------------------- /lib/components/multiple_picker.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | mulitiplePicker(BuildContext context, List truckLengthRequireList,String value, Function success) { 4 | showDialog( 5 | context: context, 6 | builder: (BuildContext context){ 7 | return MultiplePickerDialog(list:truckLengthRequireList,value:value,success: success,); 8 | } 9 | ); 10 | } 11 | class MultiplePickerDialog extends StatefulWidget{ 12 | final List list; 13 | final String value; 14 | final Function success; 15 | MultiplePickerDialog({Key key, this.list,this.value, this.success}) : super(key: key); 16 | @override 17 | _MultiplePickerDialogState createState() => _MultiplePickerDialogState(); 18 | } 19 | 20 | class _MultiplePickerDialogState extends State { 21 | List commonList; 22 | @override 23 | void initState() { 24 | super.initState(); 25 | commonList = widget.list; 26 | _getCheckedItem(); 27 | } 28 | @override 29 | Widget build(BuildContext context) { 30 | return Material( 31 | type: MaterialType.transparency, 32 | child: Container( 33 | child: Stack( 34 | children: [ 35 | Positioned( 36 | bottom: 0, 37 | left: 0, 38 | child: Container( 39 | width: MediaQuery.of(context).size.width, 40 | padding: EdgeInsets.only(bottom: 14), 41 | color: Colors.white, 42 | child: Container( 43 | child: Column( 44 | children: [ 45 | Container( 46 | padding: EdgeInsets.only(left: 10), 47 | height: ScreenUtil().setHeight(100), 48 | alignment: Alignment.centerLeft, 49 | color: Theme.of(context).primaryColor, 50 | child: Text('选择车长',style: TextStyle(color: Colors.white),), 51 | ), 52 | Container( 53 | margin: EdgeInsets.only(bottom: 10), 54 | padding: EdgeInsets.only(bottom: 10), 55 | decoration: BoxDecoration( 56 | border: Border( 57 | bottom: BorderSide( 58 | width: 1, 59 | color: Color(0xFFCCCCCC) 60 | ) 61 | ) 62 | ), 63 | child: Wrap( 64 | children: commonList.length > 0 65 | ? commonList.map((item){ 66 | return itemModel(context,item); 67 | }).toList() 68 | : [Text('')] 69 | ), 70 | ), 71 | Row( 72 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 73 | children: [ 74 | InkWell( 75 | child: Container( 76 | width: ScreenUtil().setWidth(200), 77 | height: ScreenUtil().setHeight(100), 78 | margin: EdgeInsets.only(left:10), 79 | decoration: BoxDecoration( 80 | border: Border.all( 81 | width: 1, 82 | color: Color(0xFFCCCCCC) 83 | ), 84 | borderRadius: BorderRadius.circular(5) 85 | ), 86 | child: Center( 87 | child: Text('取消',style: TextStyle( 88 | color: Color(0xFF666666) 89 | ),), 90 | ), 91 | ), 92 | onTap: (){ 93 | Navigator.of(context).pop('cancel'); 94 | }, 95 | ), 96 | InkWell( 97 | child: Container( 98 | margin: EdgeInsets.only(right: 10), 99 | width: ScreenUtil().setWidth(200), 100 | height: ScreenUtil().setHeight(100), 101 | decoration: BoxDecoration( 102 | borderRadius: BorderRadius.circular(5), 103 | color: Theme.of(context).primaryColor, 104 | ), 105 | child: Center( 106 | child: Text('确认',style: TextStyle( 107 | color: Colors.white 108 | ),), 109 | ), 110 | ), 111 | onTap: (){ 112 | Navigator.of(context).pop('confirm'); 113 | _selectItem(); 114 | }, 115 | ) 116 | ], 117 | ) 118 | ], 119 | ), 120 | ), 121 | ), 122 | ) 123 | ], 124 | ), 125 | ), 126 | ); 127 | } 128 | Widget itemModel( BuildContext context, Map item,){ 129 | return InkWell( 130 | child: Container( 131 | margin: EdgeInsets.fromLTRB(10, 5, 10, 5), 132 | width: MediaQuery.of(context).size.width/3-20, 133 | height: ScreenUtil().setHeight(100), 134 | decoration: BoxDecoration( 135 | border: Border.all( 136 | width: 1, 137 | color: Color(0xFFCCCCCC) 138 | ), 139 | borderRadius: BorderRadius.circular(5), 140 | color: item['check']? Theme.of(context).primaryColor : Colors.white 141 | ), 142 | child: Center( 143 | child: Text(item['value'],style: TextStyle( 144 | color: item['check']? Colors.white : Color(0xFF454545) 145 | ),), 146 | ), 147 | ), 148 | onTap: (){ 149 | setState((){ 150 | item['check'] = !item['check']; 151 | }); 152 | }, 153 | ); 154 | } 155 | _getCheckedItem() { 156 | if(widget.value == '' || widget.value == '请选择'){ 157 | return; 158 | } 159 | List checkList = widget.value.split(','); 160 | commonList.forEach((items){ 161 | items['check'] = false; 162 | }); 163 | commonList.forEach((items){ 164 | checkList.forEach((item){ 165 | if(item == items['value']){ 166 | setState(() { 167 | items['check'] = true; 168 | }); 169 | } 170 | }); 171 | }); 172 | } 173 | _selectItem() { 174 | List list = []; 175 | String checkValue = ''; 176 | commonList.forEach((item){ 177 | if(item['check']){ 178 | list.add(item['value']); 179 | } 180 | }); 181 | checkValue = list.join(','); 182 | widget.success(checkValue); 183 | } 184 | @override 185 | void dispose() { 186 | super.dispose(); 187 | commonList = []; 188 | } 189 | } 190 | -------------------------------------------------------------------------------- /lib/components/progressDialog.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ProgressDialog extends StatelessWidget { 4 | //子布局 5 | final Widget child; 6 | 7 | //加载中是否显示 8 | final bool loading; 9 | 10 | //进度提醒内容 11 | final String msg; 12 | 13 | //加载中动画 14 | final Widget progress; 15 | 16 | //背景透明度 17 | final double alpha; 18 | 19 | //字体颜色 20 | final Color textColor; 21 | 22 | ProgressDialog( 23 | {Key key, 24 | @required this.loading, 25 | this.msg, 26 | this.progress = const CircularProgressIndicator(), 27 | this.alpha = 0.3, 28 | this.textColor = Colors.white, 29 | @required this.child}) 30 | : assert(child != null), 31 | assert(loading != null), 32 | super(key: key); 33 | 34 | @override 35 | Widget build(BuildContext context) { 36 | List widgetList = []; 37 | widgetList.add(child); 38 | if (loading) { 39 | Widget layoutProgress; 40 | if (msg == null) { 41 | layoutProgress = Center( 42 | child: progress, 43 | ); 44 | } else { 45 | layoutProgress = Center( 46 | child: Container( 47 | padding: const EdgeInsets.all(20.0), 48 | decoration: BoxDecoration( 49 | color: Colors.black87, 50 | borderRadius: BorderRadius.circular(4.0)), 51 | child: Column( 52 | mainAxisAlignment: MainAxisAlignment.center, 53 | crossAxisAlignment: CrossAxisAlignment.center, 54 | mainAxisSize: MainAxisSize.min, 55 | children: [ 56 | progress, 57 | Container( 58 | padding: const EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0), 59 | child: Text( 60 | msg, 61 | style: TextStyle(color: textColor, fontSize: 16.0), 62 | ), 63 | ) 64 | ], 65 | ), 66 | ), 67 | ); 68 | } 69 | widgetList.add(Opacity( 70 | opacity: alpha, 71 | child: new ModalBarrier(color: Colors.black87), 72 | )); 73 | widgetList.add(layoutProgress); 74 | } 75 | return Stack( 76 | children: widgetList, 77 | ); 78 | } 79 | } -------------------------------------------------------------------------------- /lib/components/search_bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import './single_picker.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | import '../config/search_page_config.dart'; 5 | 6 | Widget searchBar(BuildContext context, String type, List singlePickerList, int index, Function searchChange, Function change,{bool disabledEditeStatus}) { 7 | return Container( 8 | height: ScreenUtil().setHeight(120), 9 | padding: EdgeInsets.all(10.0), 10 | decoration: BoxDecoration( 11 | border: Border(bottom: BorderSide(width: 1.0,color: Colors.black26)), 12 | color: Colors.black12, 13 | ), 14 | child: Row( 15 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 16 | children: [ 17 | Expanded( 18 | flex: 1, 19 | child: InkWell( 20 | child: Container( 21 | height: ScreenUtil().setHeight(75), 22 | padding: EdgeInsets.only(left: 10.0), 23 | decoration: BoxDecoration( 24 | borderRadius: BorderRadius.circular(5.0), 25 | color: Colors.white 26 | ), 27 | child: Row( 28 | mainAxisAlignment: MainAxisAlignment.start, 29 | crossAxisAlignment: CrossAxisAlignment.center, 30 | children: [ 31 | Icon(Icons.search), 32 | Text('搜索',style: TextStyle(fontSize: ScreenUtil().setSp(28)),) 33 | ], 34 | ), 35 | 36 | ), 37 | onTap: (){ 38 | Navigator.push(context, MaterialPageRoute(builder: (BuildContext context){ 39 | return searchPageConfig(type,(res){ 40 | searchChange(res); 41 | }); 42 | })); 43 | }, 44 | ) 45 | ), 46 | Container( 47 | margin:EdgeInsets.only(left: 10.0), 48 | padding: EdgeInsets.only(left: 5), 49 | width: ScreenUtil().setWidth(190), 50 | height: ScreenUtil().setHeight(75), 51 | decoration: BoxDecoration( 52 | color: Colors.white, 53 | borderRadius: BorderRadius.circular(5.0) 54 | ), 55 | child: InkWell( 56 | child: Row( 57 | mainAxisAlignment: MainAxisAlignment.spaceAround, 58 | children: [ 59 | Expanded( 60 | child: Text(singlePickerList[index]['key'], style: TextStyle(fontSize: ScreenUtil().setSp(26)), overflow: TextOverflow.ellipsis,textAlign: TextAlign.center,), 61 | ), 62 | Offstage( 63 | offstage: disabledEditeStatus != null && disabledEditeStatus == true ? true : false, 64 | child: Icon(Icons.arrow_drop_down), 65 | ) 66 | 67 | ], 68 | ), 69 | onTap: (){ 70 | if(disabledEditeStatus != null && disabledEditeStatus == true){ 71 | return; 72 | } 73 | singlePicker(context, singlePickerList, index,(res){ 74 | if(res['key'] == 'confirm') { 75 | change(res); 76 | }else if(res['key'] == 'cancel') { 77 | change(res); 78 | } 79 | }); 80 | }, 81 | ) 82 | ) 83 | 84 | ], 85 | ), 86 | ); 87 | } 88 | -------------------------------------------------------------------------------- /lib/components/select_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | 4 | selectButton( List commonList, String selectValue, Function result) { 5 | return StatefulBuilder( 6 | builder: (BuildContext context, setState) { 7 | return Container( 8 | width: ScreenUtil().setWidth(200), 9 | height: ScreenUtil().setHeight(100), 10 | padding: EdgeInsets.only(left: 6), 11 | decoration: BoxDecoration( 12 | border: Border.all( 13 | width: 1, 14 | color: Color(0xFFcccccc) 15 | ), 16 | borderRadius: BorderRadius.circular(5) 17 | ), 18 | child: DropdownButtonFormField( 19 | decoration: InputDecoration( 20 | enabledBorder: UnderlineInputBorder( 21 | borderSide: BorderSide(color: Colors.white)) 22 | ), 23 | value: selectValue, 24 | onChanged: (value){ 25 | setState(() { 26 | selectValue = value; 27 | }); 28 | result(value); 29 | }, 30 | items: commonList.map((item){ 31 | return DropdownMenuItem( 32 | value: item['id'], 33 | child: Text(item['name']), 34 | ); 35 | }).toList(), 36 | ), 37 | ); 38 | }, 39 | ); 40 | } 41 | 42 | // class SelectButton extends StatefulWidget { 43 | // final List commonList; 44 | // final String selectValue; 45 | // final Function result; 46 | // SelectButton({Key key, this.commonList, this.selectValue,this.result}); 47 | // @override 48 | // _SelectButtonState createState() => _SelectButtonState(); 49 | // } 50 | 51 | // class _SelectButtonState extends State { 52 | // String values; 53 | // @override 54 | // void initState() { 55 | // super.initState(); 56 | // values = widget.selectValue; 57 | // } 58 | // @override 59 | // Widget build(BuildContext context) { 60 | // return Container( 61 | // width: ScreenUtil().setWidth(200), 62 | // height: ScreenUtil().setHeight(100), 63 | // padding: EdgeInsets.only(left: 6), 64 | // decoration: BoxDecoration( 65 | // border: Border.all( 66 | // width: 1, 67 | // color: Color(0xFFcccccc) 68 | // ), 69 | // borderRadius: BorderRadius.circular(5) 70 | // ), 71 | // child: DropdownButtonFormField( 72 | // decoration: InputDecoration( 73 | // enabledBorder: UnderlineInputBorder( 74 | // borderSide: BorderSide(color: Colors.white)) 75 | // ), 76 | // value: values, 77 | // onChanged: (value){ 78 | // setState(() { 79 | // values = value; 80 | // }); 81 | // widget.result(value); 82 | // }, 83 | // items: widget.commonList.map((item){ 84 | // return DropdownMenuItem( 85 | // value: item['id'], 86 | // child: Text(item['name']), 87 | // ); 88 | // }).toList(), 89 | // ), 90 | // ); 91 | // } 92 | // } -------------------------------------------------------------------------------- /lib/components/show_modal.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | showMyCupertinoDialog(BuildContext context, String title, String content, Function success) { 5 | showCupertinoDialog( 6 | context: context, 7 | builder: (context) { 8 | return new CupertinoAlertDialog( 9 | title: new Text(title), 10 | content: Padding(child: Text(content),padding: EdgeInsets.only(top: 10),), 11 | actions: [ 12 | new FlatButton( 13 | onPressed: () { 14 | Navigator.of(context).pop("点击了取消"); 15 | success('cancel'); 16 | }, 17 | child: new Text("取消"), 18 | ), 19 | new FlatButton( 20 | onPressed: () { 21 | Navigator.of(context).pop("点击了确定"); 22 | success('confirm'); 23 | }, 24 | child: new Text("确认"), 25 | ), 26 | ], 27 | ); 28 | }); 29 | } -------------------------------------------------------------------------------- /lib/components/single_picker.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | 5 | singlePicker(BuildContext context, List singlePickerList, int _index, Function success) { 6 | return showCupertinoModalPopup( 7 | context: context, 8 | builder: (BuildContext context) { 9 | return CommonPicker(singlePickerList: singlePickerList, index:_index, success: success,); 10 | }, 11 | ); 12 | } 13 | 14 | class CommonPicker extends StatefulWidget { 15 | final List singlePickerList; 16 | final Function success; 17 | final int index; 18 | CommonPicker({Key key, this.singlePickerList, this.index, this.success}) : super(key: key); 19 | 20 | _CommonPickerState createState() => _CommonPickerState(); 21 | } 22 | 23 | class _CommonPickerState extends State { 24 | FixedExtentScrollController siglePickerController = FixedExtentScrollController(); //单选框控制器 25 | int value = 0; 26 | @override 27 | void initState() { 28 | value = widget.index; 29 | Future.delayed(Duration(milliseconds: 10), (){ 30 | siglePickerController.jumpToItem(widget.index); 31 | }); 32 | 33 | super.initState(); 34 | } 35 | @override 36 | Widget build(BuildContext context) { 37 | return Container( 38 | height: ScreenUtil().setHeight(580), 39 | child: DefaultTextStyle( 40 | style: TextStyle( 41 | fontSize: ScreenUtil().setSp(36), 42 | color: Color(0xFF454545) 43 | ), 44 | child: Column( 45 | children: [ 46 | Expanded( 47 | flex: 1, 48 | child: Container( 49 | color: Colors.white, 50 | padding: EdgeInsets.all(6.0), 51 | child: Row( 52 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 53 | children: [ 54 | FlatButton ( 55 | child: Text('取消',style: TextStyle(fontSize: ScreenUtil().setSp(36)),), 56 | onPressed: (){ 57 | Navigator.of(context).pop('取消'); 58 | Map res = {'key': 'cancel', 'value': value}; 59 | widget.success(res); 60 | }, 61 | ), 62 | FlatButton ( 63 | child: Text('确认',style: TextStyle(fontSize: ScreenUtil().setSp(36),color: Theme.of(context).primaryColor)), 64 | onPressed: (){ 65 | Navigator.of(context).pop('确认'); 66 | Map res = {'key': 'confirm', 'value': value}; 67 | widget.success(res); 68 | }, 69 | ) 70 | ], 71 | ), 72 | ) 73 | ), 74 | Expanded( 75 | flex:5, 76 | child: Row( 77 | children: [ 78 | Expanded( 79 | child: commonPicker(widget.singlePickerList), 80 | ), 81 | ], 82 | ) 83 | ) 84 | ], 85 | ) 86 | ) 87 | ); 88 | } 89 | 90 | Widget commonPicker(List singlePickerList) { 91 | return CupertinoPicker( 92 | children: singlePickerList.length > 0 93 | ? singlePickerList.map((v){ 94 | return Center(child: Text(v['key']),); 95 | }).toList() 96 | : [ Center(child: Text('暂无数据'),)], 97 | itemExtent: 38.0, 98 | backgroundColor: Colors.white, 99 | diameterRatio: 38.0, 100 | // offAxisFraction: 1.0, 101 | scrollController: siglePickerController, 102 | onSelectedItemChanged: (index){ 103 | setState(() { 104 | value = index; 105 | }); 106 | }, 107 | ); 108 | } 109 | } 110 | 111 | -------------------------------------------------------------------------------- /lib/components/toast.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Toast { 4 | static OverlayEntry _overlayEntry; //toast靠它加到屏幕上 5 | static bool _showing = false; //toast是否正在showing 6 | static DateTime _startedTime; //开启一个新toast的当前时间,用于对比是否已经展示了足够时间 7 | static String _msg; 8 | static void toast( 9 | BuildContext context, 10 | String msg, 11 | ) async { 12 | assert(msg != null); 13 | _msg = msg; 14 | _startedTime = DateTime.now(); 15 | //获取OverlayState 16 | OverlayState overlayState = Overlay.of(context); 17 | _showing = true; 18 | if (_overlayEntry == null) { 19 | _overlayEntry = OverlayEntry( 20 | builder: (BuildContext context) => Positioned( 21 | //top值,可以改变这个值来改变toast在屏幕中的位置 22 | top: MediaQuery.of(context).size.height * 1 / 3, 23 | child: Container( 24 | alignment: Alignment.center, 25 | width: MediaQuery.of(context).size.width, 26 | child: Padding( 27 | padding: EdgeInsets.symmetric(horizontal: 80.0), 28 | child: AnimatedOpacity( 29 | opacity: _showing ? 1.0 : 0.0, //目标透明度 30 | duration: _showing 31 | ? Duration(milliseconds: 100) 32 | : Duration(milliseconds: 400), 33 | child: _buildToastWidget(), 34 | ), 35 | )), 36 | )); 37 | overlayState.insert(_overlayEntry); 38 | } else { 39 | //重新绘制UI,类似setState 40 | _overlayEntry.markNeedsBuild(); 41 | } 42 | await Future.delayed(Duration(milliseconds: 2000)); //等待两秒 43 | 44 | //2秒后 到底消失不消失 45 | if (DateTime.now().difference(_startedTime).inMilliseconds >= 2000) { 46 | _showing = false; 47 | _overlayEntry.remove(); 48 | _overlayEntry = null; 49 | } 50 | } 51 | 52 | //toast绘制 53 | static _buildToastWidget() { 54 | return Center( 55 | child: Card( 56 | color: Colors.black26, 57 | child: Padding( 58 | padding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 16.0), 59 | child: Text( 60 | _msg, 61 | style: TextStyle( 62 | fontSize: 14.0, 63 | color: Colors.white, 64 | ), 65 | ), 66 | ), 67 | ), 68 | ); 69 | } 70 | } -------------------------------------------------------------------------------- /lib/config/search_page_config.dart: -------------------------------------------------------------------------------- 1 | import '../pages/condition_search_page/condition_search_model.dart'; 2 | searchPageConfig(String type, Function success){ 3 | switch (type) { 4 | case 'logisticsSearchPage': 5 | return LogisticsSearchBarPage(success: success,); 6 | break; 7 | case 'resourceSearchPage': 8 | return ResourceSearchBarPage(success: success,); 9 | break; 10 | case 'waybillSearchBarPage': 11 | return WaybillSearchBarPage(success: success,); 12 | break; 13 | case 'certTruckList': 14 | return CertTruckSearchBarPage(success: success,); 15 | break; 16 | case 'certDriverList': 17 | return CertDriverSearchBarPage(success: success,); 18 | break; 19 | case 'truckListPage': 20 | return TruckListSearchBarPage(success: success,); 21 | break; 22 | case 'driverListPage': 23 | return DriverListSearchBarPage(success: success,); 24 | break; 25 | default: 26 | } 27 | } -------------------------------------------------------------------------------- /lib/config/service_url.dart: -------------------------------------------------------------------------------- 1 | const serviceUrl = 'https://rltx2-yfb-gateway.rltx.com'; 2 | 3 | const servicePath = { 4 | 'apiFreightlist' : '$serviceUrl/freight/freight/list', //货源列表 5 | 'accountLogin' : '$serviceUrl/account/login', //账户登录 6 | 'selfInfo' : '$serviceUrl/person/person/self/info', //用户信息 7 | 'editeSelfInfo' : '$serviceUrl/person/person/self/edit', //编辑用户信息 8 | 'loginOut' : '$serviceUrl/account/logout', //退出登录 9 | 'verifyCode' : '$serviceUrl/account/account/send/verify_code', //获取验证码 10 | 'modifyAccount' : '$serviceUrl/account/account/modify_login_account',//修改手机号 11 | 'modifyPassword' : '$serviceUrl/account/account/modify_password', //修改密码 12 | 'partnerList' : '$serviceUrl/org/partner/list', //伙伴列表 13 | 'transportList' : '$serviceUrl/transport/transport/list', //获取主车列表 14 | 'trailerList' : '$serviceUrl/truck/trailer/list', //获取挂车列表 15 | 'driverList' : '$serviceUrl/person/person/driver/list', //获取司机列表 16 | 'routeLineList' : '$serviceUrl/resource/resource/route/list',//获取线路列表 17 | 'provinceList' : '$serviceUrl/org-config/org-config/province/list', //省列表 18 | 'cityList' : '$serviceUrl/org-config/org-config/city/list', //市列表 19 | 'countyList' : '$serviceUrl/org-config/org-config/county/list', //区列表 20 | 'otherConfig' : '$serviceUrl/platform/platform/core/config/other', //获取登录用户配置信息 21 | 'areaInfo' : '$serviceUrl/person/area/map/get',//获取省市区数据 22 | 'freightAdd' : '$serviceUrl/freight/freight/add',//发布货源 23 | 'orgSelf' : '$serviceUrl/org/org/self', //获取用户信息 24 | 'driverGet' : '$serviceUrl/person/person/driver/null/get',//获取司机信息 25 | 'waybillAdd' : '$serviceUrl/waybill/waybill/add',//新建运单 26 | 'logisticsList' : '$serviceUrl/logistics/logistics/list',//获取订单列表 27 | 'freightList' : '$serviceUrl/freight/freight/list',//获取货源列表 28 | 'waybillList' : '$serviceUrl/waybill/waybill/list',// 货物运单列表 29 | 'updateImage' : '$serviceUrl/waybill/fw/image/update',//上传运单附件 30 | 'freigthAcceptRecord' : '$serviceUrl/freight/freight_accept_record/list',//货源接货记录 31 | 'certTruckList' : '$serviceUrl/platform/cert_truck/list',//认证车辆列表 32 | 'certDriverList' : '$serviceUrl//platform/cert_person/list',//认证司机列表 33 | 'truckList' : '$serviceUrl/transport/transport/list',//资源库车辆列表 34 | 'certTruckApprove' : '$serviceUrl/platform/cert_truck/approve',//车辆认证 35 | 'certDriverApprove' : '$serviceUrl/platform/cert_person/approve',//司机认证 36 | 37 | }; -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import './common/splash_screen.dart'; 3 | import './pages/login_page.dart'; 4 | import './pages/index_page.dart'; 5 | 6 | void main() => runApp(MyApp()); 7 | 8 | class MyApp extends StatelessWidget { 9 | // This widget is the root of your application. 10 | @override 11 | Widget build(BuildContext context) { 12 | return MaterialApp( 13 | title: 'Flutter Demo', 14 | debugShowCheckedModeBanner: false, 15 | theme: ThemeData( 16 | 17 | // This is the theme of your application. 18 | // 19 | // Try running your application with "flutter run". You'll see the 20 | // application has a blue toolbar. Then, without quitting the app, try 21 | // changing the primarySwatch below to Colors.green and then invoke 22 | // "hot reload" (press "r" in the console where you ran "flutter run", 23 | // or simply save your changes to "hot reload" in a Flutter IDE). 24 | // Notice that the counter didn't reset back to zero; the application 25 | // is not restarted. 26 | primarySwatch: Colors.blueGrey, 27 | // primaryColor: Colors.orangeAccent[700] 28 | ), 29 | routes: { 30 | '/login': (BuildContext context) => LoginPage(), 31 | '/workBench': (BuildContext context) => IndexPage(), 32 | }, 33 | home: SplashScreen(), 34 | ); 35 | } 36 | } -------------------------------------------------------------------------------- /lib/pages/change_password_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../widget/widget_model.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | import '../common/service_method.dart'; 5 | import '../components/componentsModel.dart'; 6 | 7 | class ChangePasswordPage extends StatefulWidget { 8 | @override 9 | _ChangePasswordPageState createState() => _ChangePasswordPageState(); 10 | } 11 | 12 | class _ChangePasswordPageState extends State { 13 | TextEditingController oldPasswordController = TextEditingController(); 14 | TextEditingController newPasswordController = TextEditingController(); 15 | TextEditingController sureNewPasswordController = TextEditingController(); 16 | @override 17 | Widget build(BuildContext context) { 18 | return Scaffold( 19 | appBar: AppBar(title: Text('修改登录密码'),), 20 | body: Container( 21 | color: Color(0xFFF2F2F2), 22 | child: Column( 23 | children: [ 24 | Padding( 25 | child: null, 26 | padding: EdgeInsets.only(top: 10), 27 | ), 28 | inputModel('原 密 码:', oldPasswordController), 29 | Padding( 30 | child: null, 31 | padding: EdgeInsets.only(top: 10), 32 | ), 33 | inputModel('新 密 码:', newPasswordController), 34 | inputModel('确认密码:', sureNewPasswordController), 35 | Padding( 36 | child: null, 37 | padding: EdgeInsets.only(top: 20), 38 | ), 39 | commonBtnWidget(context, '确认', _changePassword) 40 | ], 41 | ), 42 | ) 43 | ); 44 | } 45 | Widget inputModel(String title, TextEditingController controller) { 46 | return Container( 47 | padding: EdgeInsets.only(left: 10,right:10), 48 | height: ScreenUtil().setHeight(100), 49 | decoration: BoxDecoration( 50 | border: Border( 51 | bottom: BorderSide( 52 | width: 1, 53 | color: Color(0xFFCCCCCC) 54 | ) 55 | ), 56 | color: Colors.white 57 | ), 58 | child: Row( 59 | children: [ 60 | Container( 61 | width: ScreenUtil().setWidth(200), 62 | child: Text(title,style: TextStyle( 63 | fontSize: ScreenUtil().setSp(32) 64 | )), 65 | ), 66 | Expanded( 67 | flex: 1, 68 | child: Container( 69 | child: inputWidget(controller, '请输入手机号', (res){},border: false,obscureText: true), 70 | ), 71 | ), 72 | ], 73 | ), 74 | ); 75 | } 76 | _changePassword() { 77 | if(newPasswordController.text.trim() == ''){ 78 | return Toast.toast(context, '请输入新密码'); 79 | } 80 | if(oldPasswordController.text.trim() == '') { 81 | return Toast.toast(context, '请输入原密码'); 82 | } 83 | if(sureNewPasswordController.text.trim() == '') { 84 | return Toast.toast(context, '请输入确认密码'); 85 | } 86 | Mapparams = {}; 87 | params['oldPassword'] = oldPasswordController.text.trim(); 88 | params['newPassword'] = newPasswordController.text.trim(); 89 | postAjax('modifyPassword', params, context).then((res){ 90 | if(res['code'] == 200) { 91 | Toast.toast(context, '修改成功'); 92 | Future.delayed(Duration(milliseconds:1000),(){ 93 | Navigator.of(context).pop(); 94 | }); 95 | } 96 | }); 97 | 98 | } 99 | } -------------------------------------------------------------------------------- /lib/pages/condition_search_page/cert_driver_search_bar_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../../widget/input.dart'; 3 | class CertDriverSearchBarPage extends StatefulWidget { 4 | final Function success; 5 | 6 | CertDriverSearchBarPage({Key key, this.success}) : super(key: key); 7 | _CertDriverSearchBarPageState createState() => _CertDriverSearchBarPageState(); 8 | } 9 | 10 | class _CertDriverSearchBarPageState extends State { 11 | TextEditingController fullNameController = TextEditingController(); 12 | String fullName = ''; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Scaffold( 17 | appBar: AppBar(title: Text('搜索'),), 18 | body: Container( 19 | color: Colors.white, 20 | child: Column( 21 | mainAxisAlignment: MainAxisAlignment.start, 22 | crossAxisAlignment: CrossAxisAlignment.center, 23 | children: [ 24 | input(fullNameController, '请输入司机姓名', true,(val){ 25 | setState(() { 26 | fullName = val; 27 | }); 28 | }), 29 | InkWell( 30 | child: Container( 31 | width: 200.0, 32 | height: 50.0, 33 | margin: EdgeInsets.only(top: 20.0), 34 | decoration: BoxDecoration( 35 | color: Theme.of(context).primaryColor, 36 | borderRadius: BorderRadius.circular(5.0) 37 | ), 38 | child: Center( 39 | child: Text('搜索',style: TextStyle(color: Colors.white,fontSize: 16.0),), 40 | ) 41 | ), 42 | onTap: (){ 43 | Navigator.of(context).pop(); 44 | Map result = { 'fullName':fullName}; 45 | widget.success(result); 46 | }, 47 | ) 48 | ], 49 | ) 50 | ), 51 | ); 52 | } 53 | } -------------------------------------------------------------------------------- /lib/pages/condition_search_page/cert_truck_search_bar_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../../widget/input.dart'; 3 | class CertTruckSearchBarPage extends StatefulWidget { 4 | final Function success; 5 | 6 | CertTruckSearchBarPage({Key key, this.success}) : super(key: key); 7 | _CertTruckSearchBarPageState createState() => _CertTruckSearchBarPageState(); 8 | } 9 | 10 | class _CertTruckSearchBarPageState extends State { 11 | TextEditingController truckLicenseNoController = TextEditingController(); 12 | String truckLicenseNo = ''; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Scaffold( 17 | appBar: AppBar(title: Text('搜索'),), 18 | body: Container( 19 | color: Colors.white, 20 | child: Column( 21 | mainAxisAlignment: MainAxisAlignment.start, 22 | crossAxisAlignment: CrossAxisAlignment.center, 23 | children: [ 24 | input(truckLicenseNoController, '请输入车牌号', true,(val){ 25 | setState(() { 26 | truckLicenseNo = val; 27 | }); 28 | }), 29 | InkWell( 30 | child: Container( 31 | width: 200.0, 32 | height: 50.0, 33 | margin: EdgeInsets.only(top: 20.0), 34 | decoration: BoxDecoration( 35 | color: Theme.of(context).primaryColor, 36 | borderRadius: BorderRadius.circular(5.0) 37 | ), 38 | child: Center( 39 | child: Text('搜索',style: TextStyle(color: Colors.white,fontSize: 16.0),), 40 | ) 41 | ), 42 | onTap: (){ 43 | Navigator.of(context).pop(); 44 | Map result = { 'truckLicenseNo':truckLicenseNo}; 45 | widget.success(result); 46 | }, 47 | ) 48 | ], 49 | ) 50 | ), 51 | ); 52 | } 53 | } -------------------------------------------------------------------------------- /lib/pages/condition_search_page/condition_search_model.dart: -------------------------------------------------------------------------------- 1 | export './logistics_search_bar_page.dart'; 2 | export './resource_search_bar_page.dart'; 3 | export './waybill_search_bar_page.dart'; 4 | export './cert_truck_search_bar_page.dart'; 5 | export './cert_driver_search_bar_page.dart'; 6 | export './truck_list_search_bar_page.dart'; 7 | export './driver_list_search_bar_page.dart'; -------------------------------------------------------------------------------- /lib/pages/condition_search_page/driver_list_search_bar_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../../widget/input.dart'; 3 | import '../../components/single_picker.dart'; 4 | class DriverListSearchBarPage extends StatefulWidget { 5 | final Function success; 6 | 7 | DriverListSearchBarPage({Key key, this.success}) : super(key: key); 8 | _DriverListSearchBarPageState createState() => _DriverListSearchBarPageState(); 9 | } 10 | 11 | class _DriverListSearchBarPageState extends State { 12 | TextEditingController fullNameController = TextEditingController(); 13 | TextEditingController phoneController = TextEditingController(); 14 | TextEditingController userStatusController = TextEditingController(); 15 | String fullName = ''; 16 | String phone = ''; 17 | List singlePickerList = [ 18 | {'key':'', 'id': ''}, 19 | {'key':'已激活', 'id': 'activated'}, 20 | {'key':'未激活', 'id': 'inactivated'}, 21 | ]; 22 | int _index = 0; 23 | @override 24 | void initState() { 25 | super.initState(); 26 | userStatusController.text = singlePickerList[_index]['key']; 27 | } 28 | @override 29 | Widget build(BuildContext context) { 30 | return Scaffold( 31 | appBar: AppBar(title: Text('搜索'),), 32 | body: Container( 33 | color: Colors.white, 34 | child: Column( 35 | mainAxisAlignment: MainAxisAlignment.start, 36 | crossAxisAlignment: CrossAxisAlignment.center, 37 | children: [ 38 | input(fullNameController, '请输入司机姓名', true,(val){ 39 | setState(() { 40 | fullName = val; 41 | }); 42 | }), 43 | input(phoneController, '请输入手机号', true,(val){ 44 | setState(() { 45 | phone = val; 46 | }); 47 | }), 48 | InkWell( 49 | child: input(userStatusController, '请选择激活状态', false,(val){}), 50 | onTap: (){ 51 | singlePicker(context, singlePickerList, _index, (val){ 52 | if(val['key'] == 'confirm'){ 53 | setState(() { 54 | _index = val['value']; 55 | userStatusController.text = singlePickerList[_index]['key']; 56 | }); 57 | } 58 | }); 59 | }, 60 | ), 61 | 62 | InkWell( 63 | child: Container( 64 | width: 200.0, 65 | height: 50.0, 66 | margin: EdgeInsets.only(top: 20.0), 67 | decoration: BoxDecoration( 68 | color: Theme.of(context).primaryColor, 69 | borderRadius: BorderRadius.circular(5.0) 70 | ), 71 | child: Center( 72 | child: Text('搜索',style: TextStyle(color: Colors.white,fontSize: 16.0),), 73 | ) 74 | ), 75 | onTap: (){ 76 | Navigator.of(context).pop(); 77 | Map result = { 'fullName':fullName, 'phone': phone, 'userStatus': singlePickerList[_index]['id']}; 78 | widget.success(result); 79 | }, 80 | ) 81 | ], 82 | ) 83 | ), 84 | ); 85 | } 86 | } -------------------------------------------------------------------------------- /lib/pages/condition_search_page/logistics_search_bar_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../../components/city_picker.dart'; 3 | import '../../widget/input.dart'; 4 | class LogisticsSearchBarPage extends StatefulWidget { 5 | final Function success; 6 | 7 | LogisticsSearchBarPage({Key key, this.success}) : super(key: key); 8 | _LogisticsSearchBarPageState createState() => _LogisticsSearchBarPageState(); 9 | } 10 | 11 | class _LogisticsSearchBarPageState extends State { 12 | TextEditingController startAdressController = TextEditingController(); 13 | TextEditingController endAdressController = TextEditingController(); 14 | TextEditingController goodsNameController = TextEditingController(); 15 | String startAdress; 16 | String endAdress; 17 | String logisticsNo = ''; 18 | Map startCodeMap; 19 | Map endCodeMap; 20 | @override 21 | Widget build(BuildContext context) { 22 | return Scaffold( 23 | appBar: AppBar(title: Text('搜索'),), 24 | body: Container( 25 | color: Colors.white, 26 | child: Column( 27 | mainAxisAlignment: MainAxisAlignment.start, 28 | crossAxisAlignment: CrossAxisAlignment.center, 29 | children: [ 30 | input(goodsNameController, '请输入订单号', true,(val){ 31 | setState(() { 32 | logisticsNo = val; 33 | }); 34 | }), 35 | InkWell( 36 | child: input(startAdressController, '请选择发货地', false,(val){}), 37 | onTap: (){ 38 | showPicker(context, (res){ 39 | setState(() { 40 | startAdress = res['textValue']; 41 | startAdressController.text = startAdress; 42 | startCodeMap = res; 43 | }); 44 | print(startCodeMap); 45 | },true); 46 | }, 47 | ), 48 | InkWell( 49 | child: input(endAdressController, '请选择收货地', false,(val){}), 50 | onTap: (){ 51 | showPicker(context, (res){ 52 | setState(() { 53 | endAdress = res['textValue']; 54 | endAdressController.text = endAdress; 55 | endCodeMap = res; 56 | }); 57 | }, true); 58 | }, 59 | ), 60 | InkWell( 61 | child: Container( 62 | width: 200.0, 63 | height: 50.0, 64 | margin: EdgeInsets.only(top: 20.0), 65 | decoration: BoxDecoration( 66 | color: Theme.of(context).primaryColor, 67 | borderRadius: BorderRadius.circular(5.0) 68 | ), 69 | child: Center( 70 | child: Text('搜索',style: TextStyle(color: Colors.white,fontSize: 16.0),), 71 | ) 72 | ), 73 | onTap: (){ 74 | Navigator.of(context).pop(); 75 | Map result = {'startCodeMap': startCodeMap, 'endCodeMap': endCodeMap, 'logisticsNo':logisticsNo}; 76 | widget.success(result); 77 | }, 78 | ) 79 | ], 80 | ) 81 | ), 82 | ); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /lib/pages/condition_search_page/resource_search_bar_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../../components/city_picker.dart'; 3 | import '../../widget/input.dart'; 4 | class ResourceSearchBarPage extends StatefulWidget { 5 | final Function success; 6 | 7 | ResourceSearchBarPage({Key key, this.success}) : super(key: key); 8 | _ResourceSearchBarPageState createState() => _ResourceSearchBarPageState(); 9 | } 10 | 11 | class _ResourceSearchBarPageState extends State { 12 | TextEditingController startAdressController = TextEditingController(); 13 | TextEditingController endAdressController = TextEditingController(); 14 | TextEditingController goodsNameController = TextEditingController(); 15 | String startAdress; 16 | String endAdress; 17 | String freightNo = ''; 18 | Map startCodeMap; 19 | Map endCodeMap; 20 | @override 21 | Widget build(BuildContext context) { 22 | return Scaffold( 23 | appBar: AppBar(title: Text('搜索'),), 24 | body: Container( 25 | color: Colors.white, 26 | child: Column( 27 | mainAxisAlignment: MainAxisAlignment.start, 28 | crossAxisAlignment: CrossAxisAlignment.center, 29 | children: [ 30 | input(goodsNameController, '请输入货源号', true,(val){ 31 | setState(() { 32 | freightNo = val; 33 | }); 34 | }), 35 | InkWell( 36 | child: input(startAdressController, '请选择发货地', false,(val){}), 37 | onTap: (){ 38 | showPicker(context, (res){ 39 | setState(() { 40 | startAdress = res['textValue']; 41 | startAdressController.text = startAdress; 42 | startCodeMap = res; 43 | }); 44 | print(startCodeMap); 45 | },true); 46 | }, 47 | ), 48 | InkWell( 49 | child: input(endAdressController, '请选择收货地', false,(val){}), 50 | onTap: (){ 51 | showPicker(context, (res){ 52 | setState(() { 53 | endAdress = res['textValue']; 54 | endAdressController.text = endAdress; 55 | endCodeMap = res; 56 | }); 57 | }, true); 58 | }, 59 | ), 60 | InkWell( 61 | child: Container( 62 | width: 200.0, 63 | height: 50.0, 64 | margin: EdgeInsets.only(top: 20.0), 65 | decoration: BoxDecoration( 66 | color: Theme.of(context).primaryColor, 67 | borderRadius: BorderRadius.circular(5.0) 68 | ), 69 | child: Center( 70 | child: Text('搜索',style: TextStyle(color: Colors.white,fontSize: 16.0),), 71 | ) 72 | ), 73 | onTap: (){ 74 | Navigator.of(context).pop(); 75 | Map result = {'startCodeMap': startCodeMap, 'endCodeMap': endCodeMap, 'freightNo':freightNo}; 76 | widget.success(result); 77 | }, 78 | ) 79 | ], 80 | ) 81 | ), 82 | ); 83 | } 84 | } -------------------------------------------------------------------------------- /lib/pages/condition_search_page/truck_list_search_bar_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../../widget/input.dart'; 3 | class TruckListSearchBarPage extends StatefulWidget { 4 | final Function success; 5 | 6 | TruckListSearchBarPage({Key key, this.success}) : super(key: key); 7 | _TruckListSearchBarPageState createState() => _TruckListSearchBarPageState(); 8 | } 9 | 10 | class _TruckListSearchBarPageState extends State { 11 | TextEditingController truckLicenseNoController = TextEditingController(); 12 | TextEditingController driverFullNameController = TextEditingController(); 13 | String truckLicenseNo = ''; 14 | String driverFullName = ''; 15 | @override 16 | Widget build(BuildContext context) { 17 | return Scaffold( 18 | appBar: AppBar(title: Text('搜索'),), 19 | body: Container( 20 | color: Colors.white, 21 | child: Column( 22 | mainAxisAlignment: MainAxisAlignment.start, 23 | crossAxisAlignment: CrossAxisAlignment.center, 24 | children: [ 25 | input(truckLicenseNoController, '请输入车牌号', true,(val){ 26 | setState(() { 27 | truckLicenseNo = val; 28 | }); 29 | }), 30 | input(driverFullNameController, '请输入司机姓名', true,(val){ 31 | setState(() { 32 | driverFullName = val; 33 | }); 34 | }), 35 | InkWell( 36 | child: Container( 37 | width: 200.0, 38 | height: 50.0, 39 | margin: EdgeInsets.only(top: 20.0), 40 | decoration: BoxDecoration( 41 | color: Theme.of(context).primaryColor, 42 | borderRadius: BorderRadius.circular(5.0) 43 | ), 44 | child: Center( 45 | child: Text('搜索',style: TextStyle(color: Colors.white,fontSize: 16.0),), 46 | ) 47 | ), 48 | onTap: (){ 49 | Navigator.of(context).pop(); 50 | Map result = { 'truckLicenseNo':truckLicenseNo,'driverFullName': driverFullName}; 51 | widget.success(result); 52 | }, 53 | ) 54 | ], 55 | ) 56 | ), 57 | ); 58 | } 59 | } -------------------------------------------------------------------------------- /lib/pages/condition_search_page/waybill_search_bar_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../../components/city_picker.dart'; 3 | import '../../widget/input.dart'; 4 | class WaybillSearchBarPage extends StatefulWidget { 5 | final Function success; 6 | 7 | WaybillSearchBarPage({Key key, this.success}) : super(key: key); 8 | _WaybillSearchBarPageState createState() => _WaybillSearchBarPageState(); 9 | } 10 | 11 | class _WaybillSearchBarPageState extends State { 12 | TextEditingController startAdressController = TextEditingController(); 13 | TextEditingController endAdressController = TextEditingController(); 14 | TextEditingController goodsNameController = TextEditingController(); 15 | TextEditingController trucklincenseNoController = TextEditingController(); 16 | String startAdress; 17 | String endAdress; 18 | String waybillNo = ''; 19 | String truckLicenseNo = ''; 20 | Map startCodeMap; 21 | Map endCodeMap; 22 | @override 23 | Widget build(BuildContext context) { 24 | return Scaffold( 25 | appBar: AppBar(title: Text('搜索'),), 26 | body: SingleChildScrollView( 27 | child: Container( 28 | color: Colors.white, 29 | padding: EdgeInsets.only(bottom: 10), 30 | child: Column( 31 | mainAxisAlignment: MainAxisAlignment.start, 32 | crossAxisAlignment: CrossAxisAlignment.center, 33 | children: [ 34 | input(goodsNameController, '请输入运单号', true,(val){ 35 | setState(() { 36 | waybillNo = val; 37 | }); 38 | }), 39 | input(trucklincenseNoController, '请输入车牌号', true,(val){ 40 | setState(() { 41 | truckLicenseNo = val; 42 | }); 43 | }), 44 | 45 | InkWell( 46 | child: input(startAdressController, '请选择发货地', false,(val){}), 47 | onTap: (){ 48 | showPicker(context, (res){ 49 | setState(() { 50 | startAdress = res['textValue']; 51 | startAdressController.text = startAdress; 52 | startCodeMap = res; 53 | }); 54 | print(startCodeMap); 55 | },true); 56 | }, 57 | ), 58 | InkWell( 59 | child: input(endAdressController, '请选择收货地', false,(val){}), 60 | onTap: (){ 61 | showPicker(context, (res){ 62 | setState(() { 63 | endAdress = res['textValue']; 64 | endAdressController.text = endAdress; 65 | endCodeMap = res; 66 | }); 67 | }, true); 68 | }, 69 | ), 70 | InkWell( 71 | child: Container( 72 | width: 200.0, 73 | height: 50.0, 74 | margin: EdgeInsets.only(top: 20.0), 75 | decoration: BoxDecoration( 76 | color: Theme.of(context).primaryColor, 77 | borderRadius: BorderRadius.circular(5.0) 78 | ), 79 | child: Center( 80 | child: Text('搜索',style: TextStyle(color: Colors.white,fontSize: 16.0),), 81 | ) 82 | ), 83 | onTap: (){ 84 | Navigator.of(context).pop(); 85 | Map result = {'startCodeMap': startCodeMap, 'endCodeMap': endCodeMap, 'waybillNo':waybillNo, 'truckLicenseNo': truckLicenseNo}; 86 | widget.success(result); 87 | }, 88 | ) 89 | ], 90 | ) 91 | ) 92 | ), 93 | ); 94 | } 95 | } -------------------------------------------------------------------------------- /lib/pages/driver_detail_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../widget/widget_model.dart'; 3 | import '../widget/detailPageWidget/content_block_widget.dart'; 4 | import '../common/service_method.dart'; 5 | import '../config/service_url.dart'; 6 | import '../components/progressDialog.dart'; 7 | import '../common/utils.dart'; 8 | import '../widget/detailPageWidget/bottom_button_list_widget.dart'; 9 | import '../widget/detailPageWidget/preview_image_list.dart'; 10 | import '../components/componentsModel.dart'; 11 | import '../components/full_screen_wrapper.dart'; 12 | 13 | class DriverDetailPage extends StatefulWidget { 14 | 15 | final String code; 16 | DriverDetailPage({Key key, this.code}); 17 | @override 18 | _DriverDetailPageState createState() => _DriverDetailPageState(); 19 | } 20 | 21 | class _DriverDetailPageState extends State { 22 | TextEditingController descriptionController = TextEditingController(); 23 | Map driverInfo = {}; 24 | bool _loading = false; 25 | var areaInfo; 26 | var configInfo; 27 | List identityImageList = [];//身份证附件数组 28 | List driverImageList = []; //驾驶证附件数组 29 | List qualificationImageList = []; //从业资格证附件数组 30 | @override 31 | void initState() { 32 | super.initState(); 33 | _loading = true; 34 | _getDriverInfo(); 35 | } 36 | @override 37 | Widget build(BuildContext context) { 38 | return Scaffold( 39 | appBar: AppBar(title: Text('司机详情'),), 40 | body: ProgressDialog( 41 | loading: _loading, 42 | msg: '加载中...', 43 | child: Column( 44 | children: [ 45 | Expanded( 46 | flex: 1, 47 | child: SingleChildScrollView( 48 | child: Column( 49 | children: [ 50 | headerTitleWidget('认证信息'), 51 | contentBlockWidget([ 52 | contentItemWidget('司机姓名:', driverInfo['fullName'] ?? ''), 53 | contentItemWidget('认证状态:', driverInfo['certStatus'] != null? configCertTruckStatus[driverInfo['certStatus']] : ''), 54 | contentItemWidget('手机号:', driverInfo['phone'] ?? ''), 55 | contentItemWidget('性别:', '${driverInfo['gender'] != null? configGender[driverInfo['gender']] ?? '' : ''}'), 56 | previewImageList('身份证附件',identityImageList,_previewImage), 57 | contentItemWidget('身份证号:', driverInfo['identityNumber'] ?? ''), 58 | contentItemWidget('身份证过期日期:', '${driverInfo['identityExpirationDates'] ?? ''}' ), 59 | previewImageList('驾驶证附件',driverImageList,_previewImage), 60 | contentItemWidget('准驾车型:', driverInfo['driverLicenseAcceptType'] ?? ''), 61 | contentItemWidget('驾驶证过期日期:', driverInfo['driverLicenseExpirationDates'] ?? ''), 62 | contentItemWidget('驾照档案编号:', driverInfo['driverLicenseNo'] ?? ''), 63 | previewImageList('资格证附件',qualificationImageList,_previewImage), 64 | contentItemWidget('从业资格证号:', driverInfo['qualificationCertificateNumber'] ?? ''), 65 | contentItemWidget('驾驶证过期日期:', driverInfo['qualificationCertificateExpirationDates'] ?? ''), 66 | 67 | ]), 68 | headerTitleWidget('银行账户信息'), 69 | contentBlockWidget([ 70 | contentItemWidget('银行户名:', driverInfo['bankAccountName'] ?? ' '), 71 | contentItemWidget('开户行:', driverInfo['bankName'] ?? ' '), 72 | contentItemWidget('银行账号:', driverInfo['bankAccountNo'] ?? ' '), 73 | contentItemWidget('描述:', driverInfo['bankAccountDescription'] ?? ''), 74 | 75 | ]), 76 | ], 77 | ), 78 | ), 79 | ), 80 | bottomButtonListWidget([ 81 | Expanded( 82 | child: Offstage( 83 | offstage: driverInfo['certStatus'] == 'authenticating'? false : true, 84 | child: commonBtnWidget(context, '认证不通过', (){ 85 | 86 | },mainColor: false), 87 | ), 88 | flex: driverInfo['certStatus'] == 'authenticating'? 1 : 0, 89 | ), 90 | ]) 91 | ], 92 | ), 93 | ) 94 | ); 95 | } 96 | _previewImage(String url) {//预览图片 97 | Navigator.push(context, MaterialPageRoute(builder: (context){ 98 | return FullScreenWrapper( 99 | imageProvider: NetworkImage( 100 | url 101 | ) 102 | ); 103 | })); 104 | } 105 | _getImageUrl(String code, String type) {//获取图片地址 106 | getAjaxStr('$serviceUrl/platform/fw/image/$code/get', '', context).then((res){ 107 | if(res['code'] == 200 && res['content']['resourceCode'] != '') { 108 | print(res['content']['thumbnailList'][0]['url']); 109 | if(type == 'identity'){//身份证附件 110 | setState(() { 111 | identityImageList.add(res['content']['thumbnailList'][0]['url']); 112 | }); 113 | }else if(type == 'driver') {//驾驶证附件 114 | setState(() { 115 | driverImageList.add(res['content']['thumbnailList'][0]['url']); 116 | }); 117 | }else{//从业资格证 118 | setState(() { 119 | qualificationImageList.add(res['content']['thumbnailList'][0]['url']); 120 | }); 121 | } 122 | } 123 | }); 124 | } 125 | _getDriverInfo() { 126 | getAjaxStr('$serviceUrl/person/person/driver/${widget.code}/get', '?code=${widget.code}', context).then((res){ 127 | setState(() { 128 | _loading = false; 129 | }); 130 | if(res['code'] == 200) { 131 | setState(() { 132 | driverInfo = res['content'] ?? {}; 133 | }); 134 | List identityCodeList = driverInfo['identityResourceCode']!= null && driverInfo['identityResourceCode'] != ''? driverInfo['identityResourceCode'].split(':') : []; 135 | List driverCodeList = driverInfo['driverLicenseResourceCode'] != null && driverInfo['driverLicenseResourceCode'] != ''? driverInfo['driverLicenseResourceCode'].split(':') : []; 136 | List qualificationCodeList = driverInfo['qualificationCertificateResourceCode'] != null && driverInfo['qualificationCertificateResourceCode'] != ''? driverInfo['qualificationCertificateResourceCode'].split(':') : []; 137 | if(identityCodeList.length > 0) { 138 | identityCodeList.forEach((item){ 139 | _getImageUrl(item, 'identity'); 140 | }); 141 | } 142 | if(driverCodeList.length > 0) { 143 | driverCodeList.forEach((item){ 144 | _getImageUrl(item, 'driver'); 145 | }); 146 | } 147 | if(qualificationCodeList.length > 0) { 148 | qualificationCodeList.forEach((item){ 149 | _getImageUrl(item, 'qualification'); 150 | }); 151 | } 152 | } 153 | }); 154 | } 155 | 156 | } 157 | 158 | -------------------------------------------------------------------------------- /lib/pages/index_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | import './work_bench_page.dart'; 4 | import './mine_page.dart'; 5 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 6 | 7 | class IndexPage extends StatefulWidget { 8 | 9 | _IndexPageState createState() => _IndexPageState(); 10 | } 11 | 12 | class _IndexPageState extends State { 13 | final List bottomTabs = [ 14 | BottomNavigationBarItem( 15 | icon: Icon(Icons.menu), 16 | title: Text('工作台') 17 | ), 18 | BottomNavigationBarItem( 19 | icon: Icon(Icons.person), 20 | title: Text('我') 21 | ), 22 | ]; 23 | 24 | final List tabBodies = [ 25 | WorkBenchPage(), 26 | MinePage(), 27 | ]; 28 | int currentIndex = 0; 29 | // var currentPage; 30 | 31 | @override 32 | void initState() { 33 | // currentPage = tabBodies[currentIndex]; 34 | super.initState(); 35 | } 36 | @override 37 | Widget build(BuildContext context) { 38 | ScreenUtil.instance =ScreenUtil(width: 750, height: 1334)..init(context); 39 | return Scaffold( 40 | backgroundColor: Color.fromRGBO(244, 245, 245, 1.0), 41 | bottomNavigationBar: BottomNavigationBar( 42 | type: BottomNavigationBarType.fixed, 43 | currentIndex: currentIndex, 44 | items: bottomTabs, 45 | onTap: (index) { 46 | setState(() { 47 | currentIndex = index; 48 | // currentPage = tabBodies[currentIndex]; 49 | }); 50 | }, 51 | ), 52 | body: IndexedStack( 53 | index: currentIndex, 54 | children: tabBodies, 55 | ), 56 | ); 57 | } 58 | } -------------------------------------------------------------------------------- /lib/pages/login_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../widget/widget_model.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | import 'package:shared_preferences/shared_preferences.dart'; 5 | import '../config/service_url.dart'; 6 | import 'dart:io'; 7 | import 'package:dio/dio.dart'; 8 | import '../components/toast.dart'; 9 | import 'dart:convert'; 10 | import '../common/utils.dart'; 11 | 12 | class LoginPage extends StatefulWidget { 13 | @override 14 | _LoginPageState createState() => _LoginPageState(); 15 | } 16 | 17 | class _LoginPageState extends State { 18 | TextEditingController userController = TextEditingController(); 19 | TextEditingController passwordController = TextEditingController(); 20 | String account = ''; 21 | String password = ''; 22 | @override 23 | void initState() { 24 | super.initState(); 25 | 26 | } 27 | @override 28 | Widget build(BuildContext context) { 29 | return Scaffold( 30 | appBar: AppBar(title: Text('登录'),), 31 | body: SingleChildScrollView( 32 | child: Container( 33 | child: Column( 34 | children: [ 35 | logoModel(), 36 | loginModel(), 37 | ], 38 | ), 39 | ), 40 | ), 41 | ); 42 | } 43 | Widget logoModel() { 44 | return Container( 45 | margin: EdgeInsets.only(top: ScreenUtil().setHeight(200)), 46 | child: Center( 47 | child: Image.asset('assets/images/logo.png',width:ScreenUtil().setWidth(300),height:ScreenUtil().setWidth(300),), 48 | ), 49 | ); 50 | } 51 | Widget loginModel() { 52 | return Container( 53 | child: Column( 54 | children: [ 55 | Container( 56 | width: MediaQuery.of(context).size.width, 57 | margin: EdgeInsets.fromLTRB(20, 20, 20, 0), 58 | child: inputWidget(userController, '请输入用户名', (res){ 59 | account = res; 60 | },imgUrl: 'assets/images/users.png', inputType: 'number'), 61 | ), 62 | Container( 63 | margin: EdgeInsets.fromLTRB(20, 20, 20, 0), 64 | child: inputWidget(passwordController, '请输入密码', (res){ 65 | password = res.trim(); 66 | },imgUrl: 'assets/images/password.png', obscureText: true), 67 | ), 68 | 69 | commonBtnWidget(context, '立即登录', (){ 70 | _login(); 71 | }) 72 | ], 73 | ), 74 | ); 75 | } 76 | _login() async { 77 | SharedPreferences prefs =await SharedPreferences.getInstance(); 78 | 79 | if(account == '') { 80 | return Toast.toast(context, '请输入账号'); 81 | } 82 | if(password == '') { 83 | return Toast.toast(context, '请输入密码'); 84 | } 85 | try { 86 | print('获取数据'); 87 | Response response; 88 | Dio dio = new Dio(); 89 | 90 | // (dio.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate = (client) { 91 | // client.findProxy = (uri) { 92 | // return "PROXY 192.168.10.120:8888"; 93 | // }; 94 | // client.badCertificateCallback = 95 | // (X509Certificate cert, String host, int port) { 96 | // return true; 97 | // }; 98 | // }; 99 | 100 | dio.options.contentType = ContentType.parse("application/x-www-form-urlencoded"); 101 | response = await dio.post('$serviceUrl/account/login', data: {'account':account.trim(), 'password':password.trim()}); 102 | print(response.data['code']); 103 | if(response.data['code'] == 200) { 104 | String cookies = getCookieAndSaveInStorage(response); 105 | prefs.setString('cookies', cookies); 106 | prefs.setString('roleInfo', json.encode(response.data['content'])); 107 | Navigator.pushNamedAndRemoveUntil(context, '/workBench', (route)=>false); 108 | }else{ 109 | Toast.toast(context, response.data['content']); 110 | } 111 | } on DioError catch (e) { 112 | if (e.response.data['code'] == 401) { 113 | Navigator.pushNamedAndRemoveUntil(context, '/login', (route)=>false); 114 | } 115 | } 116 | } 117 | } -------------------------------------------------------------------------------- /lib/pages/logistics_detail_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../widget/widget_model.dart'; 3 | import '../widget/detailPageWidget/content_block_widget.dart'; 4 | import '../common/service_method.dart'; 5 | import '../config/service_url.dart'; 6 | import '../components/progressDialog.dart'; 7 | import '../common/utils.dart'; 8 | import '../widget/detailPageWidget/company_block_widget.dart'; 9 | import '../widget/detailPageWidget/bottom_button_list_widget.dart'; 10 | import '../widget/textWidget/text_model.dart'; 11 | import 'package:shared_preferences/shared_preferences.dart'; 12 | import '../pages/release_resource_page.dart'; 13 | import '../pages/build_waybill_page.dart'; 14 | import 'dart:convert'; 15 | 16 | class LogisticsDetailPage extends StatefulWidget { 17 | 18 | final String code; 19 | LogisticsDetailPage({Key key, this.code}); 20 | @override 21 | _LogisticsDetailPageState createState() => _LogisticsDetailPageState(); 22 | } 23 | 24 | class _LogisticsDetailPageState extends State { 25 | Map logisticsInfo = {}; 26 | bool _loading = false; 27 | var areaInfo; 28 | var configInfo; 29 | @override 30 | void initState() { 31 | super.initState(); 32 | _loading = true; 33 | _getLogisticsInfo(); 34 | _getConfigMessage(); 35 | } 36 | @override 37 | Widget build(BuildContext context) { 38 | return Scaffold( 39 | appBar: AppBar(title: Text('订单详情'),), 40 | body: ProgressDialog( 41 | loading: _loading, 42 | msg: '加载中...', 43 | child: Column( 44 | children: [ 45 | Expanded( 46 | flex: 1, 47 | child: SingleChildScrollView( 48 | child: Column( 49 | children: [ 50 | headerTitleWidget('基本信息'), 51 | contentBlockWidget([ 52 | contentItemWidget('订单号:', logisticsInfo['logisticsNo'] ?? ''), 53 | contentItemWidget('订单状态:',logisticsInfo['logisticsStatus'] != null? configLogisticsStatus[logisticsInfo['logisticsStatus']] : ''), 54 | contentItemWidget('托运客户:', logisticsInfo['clientOrgName'] ?? ''), 55 | contentItemWidget('承运方:', logisticsInfo['carrierOrgName'] ?? ''), 56 | contentItemWidget('结算方式:',logisticsInfo['settleMethod'] != null ? configSettleMethod[logisticsInfo['settleMethod']] : ''), 57 | ]), 58 | headerTitleWidget('线路信息'), 59 | companyBlockWidget( 60 | context, 61 | companyBlockItemWidget(context, 'f', [ 62 | text1('${logisticsInfo['unloadingProvinceCode'] != null ? areaInfo['province'][logisticsInfo['loadingProvinceCode']] : ''} ${logisticsInfo['unloadingCityCode'] != null ? areaInfo['city'][logisticsInfo['loadingCityCode']] : ''} ${logisticsInfo['loadingCountyCode'] != null ? areaInfo['county'][logisticsInfo['loadingCountyCode']] : ''}'), 63 | text2(logisticsInfo['loadingAddress'] ?? ''), 64 | text2(logisticsInfo['loadingOrgName'] ?? ''), 65 | text2('${logisticsInfo['loadingUserFullName'] ?? ''} ${logisticsInfo['loadingUserPhone'] ?? ''}'), 66 | ]), 67 | companyBlockItemWidget(context, 'z', [ 68 | text1('${logisticsInfo['unloadingProvinceCode'] != null ? areaInfo['province'][logisticsInfo['unloadingProvinceCode']] : ''} ${logisticsInfo['unloadingCityCode'] != null ? areaInfo['city'][logisticsInfo['unloadingCityCode']] : ''} ${logisticsInfo['unloadingCountyCode'] != null ? areaInfo['county'][logisticsInfo['unloadingCountyCode']] : ''}'), 69 | text2(logisticsInfo['unloadingAddress'] ?? ''), 70 | text2(logisticsInfo['unloadingOrgName'] ?? ''), 71 | text2('${logisticsInfo['unloadingUserFullName'] ?? ''} ${logisticsInfo['unloadingUserPhone'] ?? ''}'), 72 | ]) 73 | ), 74 | contentBlockWidget([ 75 | contentItemWidget('线路名称:', logisticsInfo['routeName']?? ''), 76 | contentItemWidget('业务类型:', logisticsInfo['businessTypeCode'] != null ? configBusinessTypeCode[logisticsInfo['businessTypeCode']] : ''), 77 | ],borderTop: true), 78 | headerTitleWidget('货物信息'), 79 | contentBlockWidget([ 80 | contentItemWidget('货物类型:', logisticsInfo['cargoTypeClassificationCode'] != null ? configGoodsType[logisticsInfo['cargoTypeClassificationCode']] : ''), 81 | contentItemWidget('货物名称:', logisticsInfo['goodsName'] ?? ''), 82 | contentItemWidget('计量标准:', logisticsInfo['meterageType'] != null ? configMeterageType[logisticsInfo['meterageType']] : ''), 83 | contentItemWidget('计划重量:', '${logisticsInfo['goodsWeight'] != null? logisticsInfo['goodsWeight'].toString() + '吨' : ''}'), 84 | contentItemWidget('计划体积:', '${logisticsInfo['goodsVolume'] != null? logisticsInfo['goodsVolume'].toString() + '方' : ''}'), 85 | contentItemWidget('计划数量:', '${logisticsInfo['goodsNum'] != null? logisticsInfo['goodsNum'].toString() + '件' : ''}'), 86 | ]), 87 | headerTitleWidget('其他信息'), 88 | contentBlockWidget([ 89 | contentItemWidget('客户运价:', '${logisticsInfo['clientFreightPrice']?? ''}${logisticsInfo['meterageType'] != null && logisticsInfo['clientFreightPriceUnitCode'] != null? unit[logisticsInfo['meterageType']]['driver.prices'][logisticsInfo['clientFreightPriceUnitCode']] : ''}'), 90 | contentItemWidget('司机运价:', '${logisticsInfo['driverReferPrice'] ?? ''}${logisticsInfo['meterageType'] != null && logisticsInfo['driverReferPriceUnitCode'] != null? unit[logisticsInfo['meterageType']]['driver.prices'][logisticsInfo['driverReferPriceUnitCode']] : ''}'), 91 | contentItemWidget('需求车次:', '${logisticsInfo['truckQty'] ?? ''}车'), 92 | contentItemWidget('备注:', logisticsInfo['description'] ?? ''), 93 | ]), 94 | 95 | ], 96 | ), 97 | ), 98 | ), 99 | bottomButtonListWidget([ 100 | Expanded( 101 | child: commonBtnWidget(context, '派车', (){ 102 | Navigator.of(context).push(MaterialPageRoute(builder: (context){ 103 | return BuildWaybillPage( code:logisticsInfo['code']); 104 | })); 105 | }), 106 | ), 107 | Expanded( 108 | child: commonBtnWidget(context, '发布货源', (){ 109 | Navigator.of(context).push(MaterialPageRoute(builder: (context){ 110 | return ReleaseResourcePage(code: logisticsInfo['code'],); 111 | })); 112 | }), 113 | ), 114 | ]) 115 | ], 116 | ), 117 | ) 118 | ); 119 | } 120 | _getConfigMessage()async {//获取配置信息 121 | SharedPreferences prefs = await SharedPreferences.getInstance(); 122 | setState(() { 123 | configInfo = json.decode(prefs.getString('otherConfigs')); 124 | areaInfo = json.decode(prefs.getString('areaInfo')); 125 | // orgSelfInfo = json.decode(prefs.getString('orgSelfInfo')); 126 | }); 127 | } 128 | _getLogisticsInfo() { 129 | getAjaxStr('$serviceUrl/logistics/logistics/${widget.code}/get', '', context).then((res){ 130 | setState(() { 131 | _loading = false; 132 | }); 133 | if(res['code'] == 200) { 134 | setState(() { 135 | logisticsInfo = res['content'] ?? {}; 136 | }); 137 | } 138 | }); 139 | } 140 | } -------------------------------------------------------------------------------- /lib/pages/search_customer_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:flutter_easyrefresh/easy_refresh.dart'; 4 | import '../common/service_method.dart'; 5 | import '../components/componentsModel.dart'; 6 | import '../widget/searchPageWidget/searchBar_widget.dart'; 7 | import '../widget/searchPageWidget/bottomButtomWidget.dart'; 8 | import '../widget/searchPageWidget/common_refresh_list_widget.dart'; 9 | 10 | class SearchCustomerPage extends StatefulWidget { 11 | @override 12 | _SearchCustomerPageState createState() => _SearchCustomerPageState(); 13 | } 14 | 15 | class _SearchCustomerPageState extends State { 16 | TextEditingController searchController = TextEditingController(); 17 | GlobalKey _footerKey = new GlobalKey(); 18 | GlobalKey _headerKey = new GlobalKey(); 19 | List comList = []; 20 | int page = 1; 21 | int groupValue = -1; 22 | Map customeInfo = {}; 23 | String orgName = ''; 24 | bool _loading = false; 25 | @override 26 | void initState() { 27 | super.initState(); 28 | _loading = true; 29 | _getCustomerList(); 30 | } 31 | @override 32 | Widget build(BuildContext context) { 33 | return Scaffold( 34 | appBar: AppBar(title: Text('搜索客户'),), 35 | body: ProgressDialog( 36 | loading: _loading, 37 | msg: '加载中...', 38 | child: Container( 39 | color: Color(0xFFF2F2F2), 40 | child: Column( 41 | children: [ 42 | searchBar(searchController, '请输入客户名称',(res){ 43 | orgName = res; 44 | groupValue = -1; 45 | page = 1; 46 | comList = []; 47 | _getCustomerList(); 48 | }), 49 | commonList( 50 | commonRereshListWidget(comList, _headerKey, _footerKey, '暂无线路',(){ 51 | page++; 52 | _getCustomerList(); 53 | },(){ 54 | groupValue = -1; 55 | page = 1; 56 | comList = []; 57 | _getCustomerList(); 58 | }, 59 | commonItem 60 | ), 61 | bottomButtomWidget(context, (){ 62 | if(groupValue >= 0){ 63 | customeInfo = comList[groupValue]; 64 | Navigator.of(context).pop(customeInfo); 65 | }else{ 66 | return Toast.toast(context, '请选择用户'); 67 | } 68 | }) 69 | ), 70 | ], 71 | ) 72 | ), 73 | ), 74 | ); 75 | } 76 | Widget commonList(commonRereshListWidget, bottomButtomWidget) { 77 | return Expanded( 78 | child: Stack( 79 | children: [ 80 | Padding( 81 | child: commonRereshListWidget, 82 | padding: EdgeInsets.only(bottom: ScreenUtil().setHeight(120)), 83 | ), 84 | Positioned( 85 | bottom: 0, 86 | left: 0, 87 | child: bottomButtomWidget, 88 | ) 89 | ], 90 | ) 91 | ); 92 | } 93 | 94 | Widget commonItem( int index, Map item) { 95 | return Material( 96 | child: InkWell( 97 | child: Container( 98 | height: ScreenUtil().setHeight(100), 99 | decoration: BoxDecoration( 100 | border: Border(bottom: BorderSide( 101 | width: 1, 102 | color: Color(0xFFF2F2F2) 103 | )), 104 | ), 105 | child: Row( 106 | children: [ 107 | Radio( 108 | groupValue: groupValue, 109 | value: index, 110 | onChanged: (value){ 111 | setState(() { 112 | groupValue = value; 113 | }); 114 | }, 115 | ), 116 | Container( 117 | child: Column( 118 | mainAxisAlignment: MainAxisAlignment.center, 119 | children: [ 120 | Text(item['orgFullName']?? '', style: TextStyle(fontSize: ScreenUtil().setSp(30)),), 121 | ], 122 | ), 123 | ) 124 | ], 125 | ), 126 | ), 127 | onTap: (){ 128 | setState(() { 129 | groupValue = index; 130 | }); 131 | }, 132 | ), 133 | color: Colors.white, 134 | ); 135 | } 136 | _getCustomerList() {//获取客户列表 137 | var stringParams = '?size=20&page=$page'; 138 | if(orgName != ''){ 139 | stringParams +='&orgName=$orgName'; 140 | } 141 | getAjax('partnerList', stringParams, context).then((res){ 142 | setState(() { 143 | _loading = false; 144 | }); 145 | if(res['code'] == 200 && res['content'].length > 0){ 146 | setState(() { 147 | comList.addAll(res['content']); 148 | }); 149 | }else{ 150 | if(res['code'] == 200 && page == 1 && res['content'].length == 0){ 151 | setState(() { 152 | comList = []; 153 | }); 154 | } 155 | } 156 | }); 157 | } 158 | } -------------------------------------------------------------------------------- /lib/pages/search_driver_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:flutter_easyrefresh/easy_refresh.dart'; 4 | import '../common/service_method.dart'; 5 | import '../components/componentsModel.dart'; 6 | import '../widget/searchPageWidget/searchBar_widget.dart'; 7 | import '../widget/searchPageWidget/bottomButtomWidget.dart'; 8 | import '../widget/searchPageWidget/common_refresh_list_widget.dart'; 9 | import '../components/progressDialog.dart'; 10 | 11 | class SearchDriverPage extends StatefulWidget { 12 | @override 13 | _SearchDriverPageState createState() => _SearchDriverPageState(); 14 | } 15 | 16 | class _SearchDriverPageState extends State { 17 | TextEditingController searchController = TextEditingController(); 18 | GlobalKey _footerKey = new GlobalKey(); 19 | GlobalKey _headerKey = new GlobalKey(); 20 | List comList = []; 21 | int page = 1; 22 | int groupValue = -1; 23 | Map driverInfo = {}; 24 | String fullName = ''; 25 | bool _loading = false; 26 | @override 27 | void initState() { 28 | super.initState(); 29 | _loading = true; 30 | _getDriverList(); 31 | } 32 | @override 33 | Widget build(BuildContext context) { 34 | return Scaffold( 35 | appBar: AppBar(title: Text('搜索司机'),), 36 | body: ProgressDialog( 37 | loading: _loading, 38 | msg: '加载中...', 39 | child: Container( 40 | color: Color(0xFFF2F2F2), 41 | child: Column( 42 | children: [ 43 | searchBar(searchController, '请输入司机名称',(res){ 44 | fullName = res; 45 | groupValue = -1; 46 | page = 1; 47 | comList = []; 48 | _getDriverList(); 49 | }), 50 | commonList( 51 | commonRereshListWidget(comList, _headerKey, _footerKey, '暂无线路',(){ 52 | page++; 53 | _getDriverList(); 54 | },(){ 55 | groupValue = -1; 56 | page = 1; 57 | comList = []; 58 | _getDriverList(); 59 | }, 60 | commonItem 61 | ), 62 | bottomButtomWidget(context, (){ 63 | if(groupValue >= 0){ 64 | driverInfo = comList[groupValue]; 65 | Navigator.of(context).pop(driverInfo); 66 | }else{ 67 | return Toast.toast(context, '请选择用户'); 68 | } 69 | }) 70 | ), 71 | ], 72 | ) 73 | ), 74 | ), 75 | ); 76 | } 77 | Widget commonList(commonRereshListWidget, bottomButtomWidget) { 78 | return Expanded( 79 | child: Stack( 80 | children: [ 81 | Padding( 82 | child: commonRereshListWidget, 83 | padding: EdgeInsets.only(bottom: ScreenUtil().setHeight(120)), 84 | ), 85 | Positioned( 86 | bottom: 0, 87 | left: 0, 88 | child: bottomButtomWidget, 89 | ) 90 | ], 91 | ) 92 | ); 93 | } 94 | Widget commonItem( int index, Map item) { 95 | return Material( 96 | child: InkWell( 97 | child: Container( 98 | height: ScreenUtil().setHeight(100), 99 | decoration: BoxDecoration( 100 | border: Border(bottom: BorderSide( 101 | width: 1, 102 | color: Color(0xFFF2F2F2) 103 | )), 104 | ), 105 | child: Row( 106 | children: [ 107 | Radio( 108 | groupValue: groupValue, 109 | value: index, 110 | onChanged: (value){ 111 | setState(() { 112 | groupValue = value; 113 | }); 114 | }, 115 | ), 116 | Container( 117 | child: Column( 118 | mainAxisAlignment: MainAxisAlignment.center, 119 | crossAxisAlignment: CrossAxisAlignment.start, 120 | children: [ 121 | Text(item['fullName']?? '', style: TextStyle(fontSize: ScreenUtil().setSp(30)),), 122 | Padding(child: null,padding: EdgeInsets.only(top: 4),), 123 | Text(item['phone']?? '', style: TextStyle(fontSize: ScreenUtil().setSp(30)),), 124 | 125 | ], 126 | ), 127 | ) 128 | ], 129 | ), 130 | ), 131 | onTap: (){ 132 | setState(() { 133 | groupValue = index; 134 | }); 135 | }, 136 | ), 137 | color: Colors.white, 138 | ); 139 | } 140 | _getDriverList() {//获取司机列表 141 | var stringParams = '?size=20&page=$page'; 142 | if(fullName != ''){ 143 | stringParams +='&fullName=$fullName'; 144 | } 145 | getAjax('driverList', stringParams, context).then((res){ 146 | setState(() { 147 | _loading = false; 148 | }); 149 | if(res['code'] == 200 && res['content'].length > 0){ 150 | setState(() { 151 | comList.addAll(res['content']); 152 | }); 153 | }else{ 154 | if(res['code'] == 200 && page == 1 && res['content'].length == 0){ 155 | setState(() { 156 | comList = []; 157 | }); 158 | } 159 | } 160 | }); 161 | } 162 | } -------------------------------------------------------------------------------- /lib/pages/search_route_line_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:flutter_easyrefresh/easy_refresh.dart'; 4 | import '../common/service_method.dart'; 5 | import '../components/componentsModel.dart'; 6 | import '../widget/searchPageWidget/searchBar_widget.dart'; 7 | import '../widget/searchPageWidget/bottomButtomWidget.dart'; 8 | import '../widget/searchPageWidget/common_refresh_list_widget.dart'; 9 | 10 | 11 | class SearchRouteLinePage extends StatefulWidget { 12 | @override 13 | _SearchRouteLinePageState createState() => _SearchRouteLinePageState(); 14 | } 15 | 16 | class _SearchRouteLinePageState extends State { 17 | TextEditingController searchController = TextEditingController(); 18 | GlobalKey _footerKey = new GlobalKey(); 19 | GlobalKey _headerKey = new GlobalKey(); 20 | List comList = []; 21 | int page = 1; 22 | int groupValue = -1; 23 | Map routeLineInfo = {}; 24 | String routeName = ''; 25 | bool _loading = false; 26 | @override 27 | void initState() { 28 | super.initState(); 29 | _loading = true; 30 | _getRouteLineList(); 31 | } 32 | @override 33 | Widget build(BuildContext context) { 34 | return Scaffold( 35 | appBar: AppBar(title: Text('搜索线路'),), 36 | body: ProgressDialog( 37 | loading: _loading, 38 | msg: '加载中...', 39 | child: Container( 40 | color: Color(0xFFF2F2F2), 41 | child: Column( 42 | children: [ 43 | searchBar(searchController, '请输入线路名称',(res){ 44 | routeName = res; 45 | groupValue = -1; 46 | page = 1; 47 | comList = []; 48 | _getRouteLineList(); 49 | }), 50 | commonList( 51 | commonRereshListWidget(comList, _headerKey, _footerKey, '暂无线路',(){ 52 | page++; 53 | _getRouteLineList(); 54 | },(){ 55 | groupValue = -1; 56 | page = 1; 57 | comList = []; 58 | _getRouteLineList(); 59 | }, 60 | commonItem 61 | ), 62 | bottomButtomWidget(context, (){ 63 | if(groupValue >= 0){ 64 | routeLineInfo = comList[groupValue]; 65 | Navigator.of(context).pop(routeLineInfo); 66 | }else{ 67 | return Toast.toast(context, '请选择线路'); 68 | } 69 | }) 70 | ), 71 | ], 72 | ) 73 | ), 74 | ), 75 | ); 76 | } 77 | Widget commonList(commonRereshListWidget, bottomButtomWidget) { 78 | return Expanded( 79 | child: Stack( 80 | children: [ 81 | Padding( 82 | child: commonRereshListWidget, 83 | padding: EdgeInsets.only(bottom: ScreenUtil().setHeight(120)), 84 | ), 85 | Positioned( 86 | bottom: 0, 87 | left: 0, 88 | child: bottomButtomWidget, 89 | ) 90 | ], 91 | ) 92 | ); 93 | } 94 | Widget commonItem( int index, Map item) { 95 | return Material( 96 | child: InkWell( 97 | child: Container( 98 | width: MediaQuery.of(context).size.width, 99 | padding: EdgeInsets.only(top: 6,bottom:6), 100 | decoration: BoxDecoration( 101 | border: Border(bottom: BorderSide( 102 | width: 1, 103 | color: Color(0xFFF2F2F2) 104 | )), 105 | ), 106 | child: Row( 107 | children: [ 108 | Radio( 109 | groupValue: groupValue, 110 | value: index, 111 | onChanged: (value){ 112 | setState(() { 113 | groupValue = value; 114 | }); 115 | }, 116 | ), 117 | Expanded( 118 | flex: 1, 119 | child: Container( 120 | child: Column( 121 | mainAxisAlignment: MainAxisAlignment.center, 122 | crossAxisAlignment: CrossAxisAlignment.start, 123 | children: [ 124 | Text(item['routeName']?? '', style: TextStyle(fontSize: ScreenUtil().setSp(34),),softWrap: true,), 125 | Padding(child: null,padding: EdgeInsets.only(top: 6),), 126 | Text('发货单位: ${item['loadingOrgName']?? ''}', style: TextStyle(fontSize: ScreenUtil().setSp(28),color: Color(0xFF666666)),softWrap: true,), 127 | Padding(child: null,padding: EdgeInsets.only(top: 6),), 128 | Text('收货单位: ${item['unloadingOrgName']?? ''}', style: TextStyle(fontSize: ScreenUtil().setSp(28),color: Color(0xFF666666)),softWrap: true,), 129 | ], 130 | ), 131 | ), 132 | ) 133 | ], 134 | ), 135 | ), 136 | onTap: (){ 137 | setState(() { 138 | groupValue = index; 139 | }); 140 | }, 141 | ), 142 | color: Colors.white, 143 | ); 144 | } 145 | _getRouteLineList() {//获取线路列表 146 | var stringParams = '?size=20&page=$page'; 147 | if(routeName != ''){ 148 | stringParams +='&routeName=$routeName'; 149 | } 150 | getAjax('routeLineList', stringParams, context).then((res){ 151 | setState(() { 152 | _loading = false; 153 | }); 154 | if(res['code'] == 200 && res['content'].length > 0){ 155 | setState(() { 156 | comList.addAll(res['content']); 157 | }); 158 | }else{ 159 | if(res['code'] == 200 && page == 1 && res['content'].length == 0){ 160 | setState(() { 161 | comList = []; 162 | }); 163 | } 164 | } 165 | }); 166 | } 167 | } -------------------------------------------------------------------------------- /lib/pages/search_truck_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:flutter_easyrefresh/easy_refresh.dart'; 4 | import '../common/service_method.dart'; 5 | import '../components/componentsModel.dart'; 6 | import '../widget/searchPageWidget/searchBar_widget.dart'; 7 | import '../widget/searchPageWidget/bottomButtomWidget.dart'; 8 | import '../widget/searchPageWidget/common_refresh_list_widget.dart'; 9 | 10 | 11 | class SearchTruckPage extends StatefulWidget { 12 | final String type; 13 | SearchTruckPage({Key key, this.type}); 14 | @override 15 | _SearchTruckPageState createState() => _SearchTruckPageState(); 16 | } 17 | 18 | class _SearchTruckPageState extends State { 19 | TextEditingController searchController = TextEditingController(); 20 | GlobalKey _footerKey = new GlobalKey(); 21 | GlobalKey _headerKey = new GlobalKey(); 22 | List comList = []; 23 | int page = 1; 24 | int groupValue = -1; 25 | Map truckInfo = {}; 26 | String searchValue = ''; 27 | bool _loading = false; 28 | @override 29 | void initState() { 30 | super.initState(); 31 | _loading = true; 32 | _getTruckList(); 33 | } 34 | @override 35 | Widget build(BuildContext context) { 36 | return Scaffold( 37 | appBar: AppBar(title: Text('搜索车辆'),), 38 | body:ProgressDialog( 39 | loading: _loading, 40 | msg: '加载中...', 41 | child: Container( 42 | color: Color(0xFFF2F2F2), 43 | child: Column( 44 | children: [ 45 | searchBar(searchController, '请输入车牌号',(res){ 46 | searchValue = res; 47 | groupValue = -1; 48 | page = 1; 49 | comList = []; 50 | _getTruckList(); 51 | }), 52 | commonList( 53 | commonRereshListWidget(comList, _headerKey, _footerKey, '暂无车辆',(){ 54 | page++; 55 | _getTruckList(); 56 | },(){ 57 | groupValue = -1; 58 | page = 1; 59 | comList = []; 60 | _getTruckList(); 61 | }, 62 | commonItem 63 | ), 64 | bottomButtomWidget(context, (){ 65 | if(groupValue >= 0){ 66 | truckInfo = comList[groupValue]; 67 | Navigator.of(context).pop(truckInfo); 68 | }else{ 69 | return Toast.toast(context, '请选择用户'); 70 | } 71 | }) 72 | ), 73 | ], 74 | ) 75 | ), 76 | ), 77 | ); 78 | } 79 | Widget commonList(commonRereshListWidget, bottomButtomWidget) { 80 | return Expanded( 81 | child: Stack( 82 | children: [ 83 | Padding( 84 | child: commonRereshListWidget, 85 | padding: EdgeInsets.only(bottom: ScreenUtil().setHeight(120)), 86 | ), 87 | Positioned( 88 | bottom: 0, 89 | left: 0, 90 | child: bottomButtomWidget, 91 | ) 92 | ], 93 | ) 94 | ); 95 | } 96 | Widget commonItem( int index, Map item) { 97 | return Material( 98 | child: InkWell( 99 | child: Container( 100 | height: ScreenUtil().setHeight(100), 101 | decoration: BoxDecoration( 102 | border: Border(bottom: BorderSide( 103 | width: 1, 104 | color: Color(0xFFF2F2F2) 105 | )), 106 | ), 107 | child: Row( 108 | children: [ 109 | Radio( 110 | groupValue: groupValue, 111 | value: index, 112 | onChanged: (value){ 113 | setState(() { 114 | groupValue = value; 115 | }); 116 | }, 117 | ), 118 | Container( 119 | child: Column( 120 | mainAxisAlignment: MainAxisAlignment.center, 121 | children: [ 122 | widget.type == 'mainTruck' 123 | ? Text(item['mainTruckLicenseNo']?? '', style: TextStyle(fontSize: ScreenUtil().setSp(30)),) 124 | : Text(item['truckLicenseNo']?? '', style: TextStyle(fontSize: ScreenUtil().setSp(30)),), 125 | ], 126 | ), 127 | ) 128 | ], 129 | ), 130 | ), 131 | onTap: (){ 132 | setState(() { 133 | groupValue = index; 134 | }); 135 | }, 136 | ), 137 | color: Colors.white, 138 | ); 139 | } 140 | _getTruckList() {//获取车辆列表 141 | if(widget.type == 'mainTruck'){ 142 | _getMainTruckInfo(); 143 | }else{ 144 | _getTrailerInfo(); 145 | } 146 | 147 | } 148 | _getMainTruckInfo(){//获取主车信息 149 | var stringParams = '?size=20&page=$page'; 150 | if(searchValue != ''){ 151 | stringParams +='&mainTruckLicenseNo=$searchValue'; 152 | } 153 | getAjax('transportList', stringParams, context).then((res){ 154 | setState(() { 155 | _loading = false; 156 | }); 157 | if(res['code'] == 200 && res['content'].length > 0){ 158 | setState(() { 159 | comList.addAll(res['content']); 160 | }); 161 | }else{ 162 | if(res['code'] == 200 && page == 1 && res['content'].length == 0){ 163 | setState(() { 164 | comList = []; 165 | }); 166 | } 167 | } 168 | }); 169 | } 170 | _getTrailerInfo() {//获取挂车 171 | var stringParams = '?size=20&page=$page'; 172 | if(searchValue != ''){ 173 | stringParams +='&truckLicenseNo=$searchValue'; 174 | } 175 | getAjax('trailerList', stringParams, context).then((res){ 176 | setState(() { 177 | _loading = false; 178 | }); 179 | if(res['code'] == 200 && res['content'].length > 0){ 180 | setState(() { 181 | comList.addAll(res['content']); 182 | }); 183 | }else{ 184 | if(res['code'] == 200 && page == 1 && res['content'].length == 0){ 185 | setState(() { 186 | comList = []; 187 | }); 188 | } 189 | } 190 | }); 191 | } 192 | } -------------------------------------------------------------------------------- /lib/pages/truck_detail_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../widget/widget_model.dart'; 3 | import '../widget/detailPageWidget/content_block_widget.dart'; 4 | import '../common/service_method.dart'; 5 | import '../config/service_url.dart'; 6 | import '../components/progressDialog.dart'; 7 | import '../common/utils.dart'; 8 | import '../components/componentsModel.dart'; 9 | import '../widget/detailPageWidget/preview_image_list.dart'; 10 | import '../components/full_screen_wrapper.dart'; 11 | 12 | class TruckDetailPage extends StatefulWidget { 13 | 14 | final String code; 15 | TruckDetailPage({Key key, this.code}); 16 | @override 17 | _TruckDetailPageState createState() => _TruckDetailPageState(); 18 | } 19 | 20 | class _TruckDetailPageState extends State { 21 | TextEditingController descriptionController = TextEditingController(); 22 | Map vehicleInfo = {}; 23 | Map truckInfo = {}; 24 | bool _loading = false; 25 | List driverImageList = [];//行驶证附件数组 26 | List transportImageLlist = []; //运输证附件数组 27 | List truckImageList = [];//车辆照片 28 | @override 29 | void initState() { 30 | super.initState(); 31 | _loading = true; 32 | _getTruckInfo(); 33 | _getCertTruckInfo(); 34 | } 35 | @override 36 | Widget build(BuildContext context) { 37 | return Scaffold( 38 | appBar: AppBar(title: Text('车辆详情'),), 39 | body: ProgressDialog( 40 | loading: _loading, 41 | msg: '加载中...', 42 | child: Column( 43 | children: [ 44 | Expanded( 45 | flex: 1, 46 | child: SingleChildScrollView( 47 | child: Column( 48 | children: [ 49 | headerTitleWidget('认证信息'), 50 | contentBlockWidget([ 51 | contentItemWidget('车牌号:', vehicleInfo['truckLicenseNo'] ?? ''), 52 | contentItemWidget('认证状态:', vehicleInfo['certStatus'] != null? configCertTruckStatus[vehicleInfo['certStatus']] : ''), 53 | contentItemWidget('牌照类型:', vehicleInfo['truckLicenseType'] != null? configLicensePlate[vehicleInfo['truckLicenseType']] : ''), 54 | previewImageList('车辆照片',truckImageList,_previewImage), 55 | contentItemWidget('车型:', vehicleInfo['truckModelName'] ?? '' ), 56 | contentItemWidget('车长:', '${vehicleInfo['truckLength'] != null? vehicleInfo['truckLength'].toString() + '米' : ''}' ), 57 | contentItemWidget('核定载质量:', '${vehicleInfo['regTonnage'] != null? vehicleInfo['regTonnage'].toString() + '吨' : ''}' ), 58 | previewImageList('行驶证附件',driverImageList,_previewImage), 59 | contentItemWidget('车辆识别代号:', vehicleInfo['truckIdentifyCode'] ?? '' ), 60 | contentItemWidget('发动机号码:', '${vehicleInfo['truckEngineNo'] != null && vehicleInfo['truckEngineNo'] != 'undefined'? vehicleInfo['truckEngineNo'] : ''}' ), 61 | contentItemWidget('行驶证过期日期:', vehicleInfo['drivingLicenseExpirationDate'] ?? '' ), 62 | previewImageList('运输证附件',transportImageLlist,_previewImage), 63 | contentItemWidget('道路运输证号:', vehicleInfo['transportLicenseNo'] ?? ''), 64 | contentItemWidget('道路经营许可证:', vehicleInfo['vehiclePermitNumber'] ?? ''), 65 | contentItemWidget('运输证过期日期:', vehicleInfo['transportLicenseExpirationDate'] ?? ''), 66 | contentItemWidget('总质量:', '${vehicleInfo['truckTotalWeight'] != null ? vehicleInfo['truckTotalWeight'].toString() + '吨' : ''}'), 67 | contentItemWidget('准牵引总质量:', '${vehicleInfo['truckTowWeight'] != null ? vehicleInfo['truckTowWeight'].toString() + '吨' : ''}'), 68 | contentItemWidget('车辆所有人:', vehicleInfo['truckOwner'] ?? '' ), 69 | 70 | ]), 71 | headerTitleWidget('附加信息'), 72 | contentBlockWidget([ 73 | contentItemWidget('联系人:', vehicleInfo['truckLinkman'] ?? ' ' ), 74 | contentItemWidget('联系手机号:', vehicleInfo['truckFixedMobile'] ?? ' ' ), 75 | contentItemWidget('车宽:', '${vehicleInfo['truckWidth'] != null? vehicleInfo['truckWidth'].toString() + '吨' : ''}' ), 76 | contentItemWidget('车高:', '${vehicleInfo['truckHeight'] != null? vehicleInfo['truckHeight'].toString() + '吨' : ''}' ), 77 | contentItemWidget('容积:', '${vehicleInfo['cubage'] != null? vehicleInfo['cubage'].toString() + '方' : ''}' ), 78 | contentItemWidget('动力类型:', vehicleInfo['powerType'] != null ? configPowerTypeMap[vehicleInfo['powerType']] ?? ' ' : ' ' ), 79 | contentItemWidget('整备质量:', '${vehicleInfo['truckCurbWeight'] != null? vehicleInfo['truckCurbWeight'].toString() + '吨' : ''}' ), 80 | contentItemWidget('注册日期:', vehicleInfo['truckRegisterDate'] ?? '' ), 81 | 82 | ]), 83 | headerTitleWidget('司机信息'), 84 | contentBlockWidget([ 85 | contentItemWidget('主驾姓名:', vehicleInfo['driverFullName'] ?? ' ' ), 86 | contentItemWidget('手机号:', vehicleInfo['driverPhone'] ?? ' ' ), 87 | contentItemWidget('副驾姓名:', vehicleInfo['viceDriverFullName'] ?? ' ' ), 88 | contentItemWidget('手机号:', vehicleInfo['viceDriverPhone'] ?? ' ' ), 89 | ]), 90 | 91 | ], 92 | ), 93 | ), 94 | ), 95 | ], 96 | ), 97 | ) 98 | ); 99 | } 100 | _previewImage(String url) {//预览图片 101 | Navigator.push(context, MaterialPageRoute(builder: (context){ 102 | return FullScreenWrapper( 103 | imageProvider: NetworkImage( 104 | url 105 | ) 106 | ); 107 | })); 108 | } 109 | _getImageUrl(String code, String type) {//获取图片地址 110 | getAjaxStr('$serviceUrl/platform/fw/image/$code/get', '', context).then((res){ 111 | if(res['code'] == 200 && res['content']['resourceCode'] != '') { 112 | print(res['content']['thumbnailList'][0]['url']); 113 | if(type == 'driver'){//行驶证附件 114 | setState(() { 115 | driverImageList.add(res['content']['thumbnailList'][0]['url']); 116 | }); 117 | }else if(type == 'transport') {//运输证附件 118 | setState(() { 119 | transportImageLlist.add(res['content']['thumbnailList'][0]['url']); 120 | }); 121 | }else{ 122 | setState(() { 123 | truckImageList.add(res['content']['thumbnailList'][0]['url']); 124 | }); 125 | } 126 | } 127 | }); 128 | } 129 | _getCertTruckInfo() { 130 | String stringParams = '?mainTruckCode=${widget.code}&page=1&size=1'; 131 | getAjax('truckList', stringParams, context).then((res){ 132 | if(res['code'] == 200 && res['content'].length > 0){ 133 | setState(() { 134 | truckInfo = res['content'][0]; 135 | }); 136 | 137 | } 138 | }); 139 | } 140 | _getTruckInfo() { 141 | getAjaxStr('$serviceUrl/truck/truck/${widget.code}/get', '?code=${widget.code}', context).then((res){ 142 | setState(() { 143 | _loading = false; 144 | }); 145 | if(res['code'] == 200) { 146 | setState(() { 147 | vehicleInfo = res['content'] ?? {}; 148 | }); 149 | List driverCodeList = vehicleInfo['drivingLicenseRecourseCode']!= null && vehicleInfo['drivingLicenseRecourseCode'] != ''? vehicleInfo['drivingLicenseRecourseCode'].split(':') : []; 150 | List truckCodeList = vehicleInfo['truckPictureResourceCode']!= null && vehicleInfo['truckPictureResourceCode'] != ''? vehicleInfo['truckPictureResourceCode'].split(':') : []; 151 | List transportCodeList = vehicleInfo['transportLicenseRecourseCode'] != null && vehicleInfo['transportLicenseRecourseCode'] != ''? vehicleInfo['transportLicenseRecourseCode'].split(':') : []; 152 | if(driverCodeList.length > 0) { 153 | driverCodeList.forEach((item){ 154 | _getImageUrl(item, 'driver'); 155 | }); 156 | } 157 | if(transportCodeList.length > 0) { 158 | transportCodeList.forEach((item){ 159 | _getImageUrl(item, 'transport'); 160 | }); 161 | } 162 | if(truckCodeList.length > 0) { 163 | truckCodeList.forEach((item){ 164 | _getImageUrl(item, 'truck'); 165 | }); 166 | } 167 | } 168 | }); 169 | } 170 | } 171 | 172 | -------------------------------------------------------------------------------- /lib/widget/agreement_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | Widget agreementWidget(BuildContext context,bool isAgree,String urlName , Function change, Function urlLaunch){ 4 | return Container( 5 | child: Row( 6 | children: [ 7 | Checkbox( 8 | value: isAgree, 9 | onChanged: change 10 | ), 11 | Text('同意'), 12 | InkWell( 13 | child: Text('<<$urlName>>',style:TextStyle(color: Theme.of(context).primaryColor)), 14 | onTap: urlLaunch, 15 | ) 16 | ], 17 | ), 18 | ); 19 | } -------------------------------------------------------------------------------- /lib/widget/city_select_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../components/city_picker.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | 5 | Widget citySelectWidget(String title,BuildContext context, Function change, bool showArea){ 6 | return InkWell( 7 | child: Container( 8 | padding: EdgeInsets.only(top: 10,bottom:10), 9 | child: Row( 10 | mainAxisAlignment: MainAxisAlignment.end, 11 | children: [ 12 | Expanded( 13 | child: Text(title,overflow: TextOverflow.ellipsis,textAlign: TextAlign.end,style: TextStyle( 14 | fontSize: ScreenUtil().setSp(30), 15 | 16 | ),), 17 | flex: 1, 18 | ), 19 | Icon( 20 | Icons.arrow_forward_ios, 21 | size: 20, 22 | color: Color(0xFF454545), 23 | ) 24 | ], 25 | ), 26 | ), 27 | onTap: (){ 28 | showPicker(context, change, showArea,); 29 | } 30 | ); 31 | } -------------------------------------------------------------------------------- /lib/widget/common_button_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | 4 | Widget commonBtnWidget(BuildContext context, String title, Function onTap,{bool mainColor}) { 5 | return InkWell( 6 | child: Container( 7 | // width: double.infinity, 8 | height: ScreenUtil().setHeight(100), 9 | margin: EdgeInsets.only(top: ScreenUtil().setHeight(20) , left: ScreenUtil().setHeight(20),right: ScreenUtil().setHeight(20)), 10 | decoration: BoxDecoration( 11 | color: mainColor == null || mainColor == true ? Theme.of(context).primaryColor : Colors.white, 12 | borderRadius: BorderRadius.circular(5), 13 | border: mainColor == null || mainColor == true ? Border.all(width: 1,color: Colors.transparent) : Border.all(width: 1,color: Color(0xFFCCCCCC)), 14 | boxShadow: [ 15 | BoxShadow( 16 | offset: Offset(2, 2), 17 | color: Color(0xFFCCCCCC) 18 | ) 19 | ] 20 | ), 21 | child: Center( 22 | child: Text(title, style:TextStyle( 23 | fontSize: ScreenUtil().setSp(36), 24 | color: mainColor == null || mainColor == true ? Colors.white : Color(0xFF454545)) 25 | ), 26 | ), 27 | ), 28 | onTap: onTap, 29 | ); 30 | } -------------------------------------------------------------------------------- /lib/widget/common_input_select_button_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import './input_widget.dart'; 3 | import '../components/select_button.dart'; 4 | 5 | Widget commonInputSelectButtonWidget(TextEditingController controller, String hintText, Function change,List list, String selectValue, Function result,{bool offstage}){ 6 | return Container( 7 | child:Row( 8 | mainAxisAlignment: MainAxisAlignment.end, 9 | children: [ 10 | offstage != null && offstage == false 11 | ? Padding( 12 | child: null, 13 | padding: EdgeInsets.only(left: 0), 14 | ) 15 | :Expanded( 16 | child: inputWidget(controller, hintText, change), 17 | flex: 1, 18 | ) , 19 | Padding( 20 | child: null, 21 | padding: EdgeInsets.only(left: 6), 22 | ), 23 | selectButton(list, selectValue, result,) 24 | ] 25 | ), 26 | ); 27 | } -------------------------------------------------------------------------------- /lib/widget/common_input_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import './input_widget.dart'; 3 | 4 | Widget commonInputWidget(TextEditingController controller, String hintText, Function change,{String title,bool enabled}){ 5 | return Container( 6 | child:Row( 7 | children: [ 8 | Expanded( 9 | child: inputWidget(controller, hintText, change,enabled: enabled), 10 | flex: 1, 11 | ), 12 | title !=null? 13 | Padding(child: Text(title),padding: EdgeInsets.only(left: 8)) 14 | : Text(''), 15 | ] 16 | ), 17 | ); 18 | } -------------------------------------------------------------------------------- /lib/widget/common_row_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | 4 | commonRowWidget(BuildContext context,bool isNeed, String title, Widget widgetModel,{num height, num width} ) { 5 | return Container( 6 | width: double.infinity, 7 | padding: EdgeInsets.only(left: 10, right:10), 8 | margin: EdgeInsets.only(top: 6), 9 | height: height!= null? ScreenUtil().setHeight(height) : ScreenUtil().setHeight(100), 10 | child: Row( 11 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 12 | children: [ 13 | Container( 14 | width: width != null ?ScreenUtil().setWidth(width) : ScreenUtil().setWidth(200), 15 | child:Row( 16 | children: [ 17 | Offstage( 18 | child: Text('*',style: TextStyle(color: Theme.of(context).primaryColor),), 19 | offstage: !isNeed, 20 | ), 21 | Expanded( 22 | child: Text(title, style: TextStyle( 23 | fontSize: ScreenUtil().setSp(30) 24 | ),softWrap: true,), 25 | flex: 1, 26 | ) 27 | ], 28 | ), 29 | ), 30 | Expanded( 31 | flex: 1, 32 | child: widgetModel, 33 | ) 34 | ], 35 | ), 36 | ); 37 | } -------------------------------------------------------------------------------- /lib/widget/date_select_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../components/date_picker.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | 5 | Widget dateSelectWidget(String title,BuildContext context, Function change,){ 6 | return InkWell( 7 | child: Container( 8 | padding: EdgeInsets.only(top: 10,bottom:10), 9 | child: Row( 10 | mainAxisAlignment: MainAxisAlignment.end, 11 | children: [ 12 | Expanded( 13 | child: Text(title,overflow: TextOverflow.ellipsis,textAlign: TextAlign.end,style: TextStyle( 14 | fontSize: ScreenUtil().setSp(32) 15 | ),), 16 | flex: 1, 17 | ), 18 | Icon( 19 | Icons.arrow_forward_ios, 20 | size: 20, 21 | color: Color(0xFF454545), 22 | ) 23 | ], 24 | ), 25 | ), 26 | onTap: (){ 27 | datePicker(context,title, change); 28 | } 29 | ); 30 | } -------------------------------------------------------------------------------- /lib/widget/detailPageWidget/bottom_button_list_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | bottomButtonListWidget(List listWidget) { 4 | return Container( 5 | padding: EdgeInsets.only(bottom: 10), 6 | color: Color(0xFFF2F2F2), 7 | child: Row( 8 | mainAxisSize: MainAxisSize.max, 9 | children: listWidget 10 | ), 11 | ); 12 | } -------------------------------------------------------------------------------- /lib/widget/detailPageWidget/company_block_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | 4 | companyBlockWidget(BuildContext context, Widget startCompany, Widget endCompany) { 5 | return Container( 6 | width: MediaQuery.of(context).size.width, 7 | decoration: BoxDecoration( 8 | color: Colors.white, 9 | border: Border(top: BorderSide(width: 1,color: Color(0xFFCCCCCC)),bottom: BorderSide(width: 1,color: Color(0xFFCCCCCC))) 10 | ), 11 | child: Stack( 12 | children: [ 13 | Positioned( 14 | top: 30, 15 | left: 25, 16 | child: Container( 17 | height: ScreenUtil().setHeight(240), 18 | decoration: BoxDecoration( 19 | border: Border(left: BorderSide(width: 1,color: Color(0xFFF2F2F2))) 20 | ), 21 | child: Text(''), 22 | ), 23 | ), 24 | Column( 25 | children: [ 26 | startCompany, 27 | Padding(child: Divider(),padding: EdgeInsets.only(left: 40),), 28 | endCompany 29 | ], 30 | ), 31 | // Positioned( 32 | // top: 10, 33 | // right: 0, 34 | // child: Image.asset('assets/images/r.png',width: ScreenUtil().setWidth(180),), 35 | // ), 36 | ], 37 | ), 38 | ); 39 | } 40 | companyBlockItemWidget(BuildContext context, String imageUrl, List widgetList) { 41 | return LimitedBox( 42 | child: Container( 43 | width: MediaQuery.of(context).size.width, 44 | margin: EdgeInsets.only(left: 10), 45 | constraints: BoxConstraints( 46 | minHeight: ScreenUtil().setHeight(240) 47 | ), 48 | child: Row( 49 | crossAxisAlignment: CrossAxisAlignment.start, 50 | children: [ 51 | Padding( 52 | child: Image.asset('assets/images/$imageUrl.png',width: ScreenUtil().setWidth(60),), 53 | padding: EdgeInsets.only(right: 5,top: 10) 54 | ), 55 | Column( 56 | crossAxisAlignment: CrossAxisAlignment.start, 57 | children: widgetList 58 | ) 59 | ], 60 | ), 61 | ), 62 | ); 63 | } -------------------------------------------------------------------------------- /lib/widget/detailPageWidget/content_block_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | 4 | contentBlockWidget(List contentList,{bool borderTop, bool borderBottom}){ 5 | return Container( 6 | padding: EdgeInsets.all(10), 7 | decoration: BoxDecoration( 8 | color: Colors.white, 9 | border: Border( 10 | top: borderTop == null ? BorderSide(width: 1,color: Color(0xFFCCCCCC)) : BorderSide(width: 1,color: Colors.transparent), 11 | bottom: borderBottom == null ? BorderSide(width: 1,color: Color(0xFFCCCCCC)) : BorderSide(width: 1,color: Colors.transparent) 12 | ), 13 | 14 | ), 15 | child: Column( 16 | children: contentList, 17 | ), 18 | ); 19 | } 20 | contentItemWidget( String title, value) { 21 | if(value == ''){ 22 | return Text('',style: TextStyle(height: 0),); 23 | }else{ 24 | return Container( 25 | height: ScreenUtil().setHeight(50), 26 | child: Row( 27 | children: [ 28 | Container(child: Text(title,style: TextStyle(fontSize: ScreenUtil().setSp(28),color: Color(0xFF888888)),),width: ScreenUtil().setWidth(200)), 29 | Text(value.toString(),style: TextStyle(fontSize: ScreenUtil().setSp(30)),) 30 | ], 31 | ), 32 | ); 33 | } 34 | 35 | } -------------------------------------------------------------------------------- /lib/widget/detailPageWidget/preview_image_list.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | 5 | Widget previewImageList(String title, List imageList, Function previewImage) { 6 | return Container( 7 | height: ScreenUtil().setHeight(120), 8 | child: Row( 9 | children: [ 10 | Container(child: Text('$title:',style: TextStyle(fontSize: ScreenUtil().setSp(28),color: Color(0xFF888888)),),width: ScreenUtil().setWidth(200)), 11 | Container( 12 | child: Row( 13 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 14 | children: imageList.length > 0 15 | ? imageList.map((item){ 16 | return InkWell( 17 | child: Container( 18 | padding: EdgeInsets.only(right: 20), 19 | child: Image.network(item,width:ScreenUtil().setWidth(100),height: ScreenUtil().setHeight(80),fit: BoxFit.fill,), 20 | ), 21 | onTap: (){ 22 | previewImage(item); 23 | }, 24 | ); 25 | }).toList() 26 | : [ 27 | 28 | ], 29 | ), 30 | ) 31 | ], 32 | ), 33 | ); 34 | } -------------------------------------------------------------------------------- /lib/widget/header_title_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | 4 | headerTitleWidget(String title) { 5 | return Container( 6 | padding: EdgeInsets.only(left: 10), 7 | height: ScreenUtil().setHeight(100), 8 | width: double.infinity, 9 | alignment: Alignment.centerLeft, 10 | decoration: BoxDecoration( 11 | color: Color(0xFFF2F2F2) 12 | ), 13 | child: Text(title,style: TextStyle( 14 | fontSize: ScreenUtil().setSp(34), 15 | color: Color(0xFF777777) 16 | ),), 17 | ); 18 | } -------------------------------------------------------------------------------- /lib/widget/image_title_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | 4 | Widget imageTitle(String imgName, String title) { 5 | return Container( 6 | height: ScreenUtil().setHeight(100), 7 | child: Row( 8 | mainAxisAlignment: MainAxisAlignment.start, 9 | children: [ 10 | Image.asset('assets/images/$imgName.png',width: ScreenUtil().setWidth(50),height: ScreenUtil().setHeight(50),), 11 | Padding( 12 | child: Text(title,style: TextStyle( 13 | fontSize: ScreenUtil().setSp(34) 14 | ),), 15 | padding: EdgeInsets.only(left:10), 16 | ) 17 | ], 18 | ), 19 | ); 20 | } -------------------------------------------------------------------------------- /lib/widget/input.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | Widget input(TextEditingController controller, String hintText, bool enabled, Function change){ 4 | return Container( 5 | margin: EdgeInsets.only(left: 10.0, right: 10.0, top: 10.0), 6 | padding: EdgeInsets.only(left: 5.0), 7 | decoration: BoxDecoration( 8 | border: Border.all(width: 1.0, color: Color(0XFFCCCCCC)), 9 | borderRadius: BorderRadius.circular(5.0) 10 | ), 11 | child: TextField( 12 | controller: controller, 13 | decoration: InputDecoration( 14 | hintText: hintText, 15 | border: OutlineInputBorder( 16 | borderRadius: BorderRadius.circular(3.0), 17 | borderSide: BorderSide(color: Colors.transparent), 18 | ), 19 | disabledBorder: InputBorder.none, 20 | enabledBorder:InputBorder.none, 21 | focusedBorder:InputBorder.none, 22 | hintStyle: TextStyle(color: Color(0xFF8e8e8e)) 23 | ), 24 | cursorColor: Colors.black, 25 | enabled: enabled, 26 | onChanged: (text){ 27 | return change(text); 28 | }, 29 | ), 30 | ); 31 | } -------------------------------------------------------------------------------- /lib/widget/input_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | 4 | Widget inputWidget(TextEditingController controller, String hintText, Function change, {String imgUrl,bool obscureText,bool enabled,String inputType,bool border, String align}) { 5 | return Container( 6 | padding: EdgeInsets.only(left: 5.0), 7 | decoration: BoxDecoration( 8 | border: border != null && !border? Border.all(color: Colors.transparent): Border.all(width: 1.0, color: Color(0xFFCCCCCC)), 9 | borderRadius: BorderRadius.circular(5.0), 10 | ), 11 | child: Row( 12 | children: [ 13 | imgUrl != null 14 | ? Image.asset(imgUrl,width: ScreenUtil().setWidth(60),) 15 | : Container(child: null,), 16 | imgUrl != null 17 | ? Padding(child: null,padding: EdgeInsets.only(left: 10),) 18 | : Container(child: null,), 19 | Expanded( 20 | child: TextField( 21 | controller: controller, 22 | textAlign: align != null && align == 'center'? TextAlign.center : TextAlign.start, 23 | decoration: InputDecoration( 24 | hintText: hintText, 25 | border: OutlineInputBorder( 26 | borderRadius: BorderRadius.circular(3.0), 27 | borderSide: BorderSide(color: Colors.transparent) 28 | ), 29 | disabledBorder: InputBorder.none, 30 | enabledBorder:InputBorder.none, 31 | focusedBorder:InputBorder.none 32 | ), 33 | cursorColor: Colors.black, 34 | obscureText: obscureText !=null? obscureText : false, 35 | enabled: enabled !=null? enabled : true, 36 | keyboardType: inputType != null && inputType == 'number'? TextInputType.number : TextInputType.text, 37 | onChanged: (text){ 38 | return change(text); 39 | }, 40 | ), 41 | ) 42 | ], 43 | ), 44 | ); 45 | } -------------------------------------------------------------------------------- /lib/widget/mini_button_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | 4 | Widget minButton(BuildContext context, String title, bool isMainColor, Function change) { 5 | return Padding( 6 | child: InkWell( 7 | child: Container( 8 | width: ScreenUtil().setWidth(200), 9 | height: ScreenUtil().setHeight(80), 10 | decoration: BoxDecoration( 11 | color: isMainColor? Theme.of(context).primaryColor :Color(0xFFFFFFFF), 12 | borderRadius: BorderRadius.circular(5.0), 13 | border: Border.all(width:1, color: isMainColor? Theme.of(context).primaryColor : Color(0xFFCCCCCC)), 14 | boxShadow: [ 15 | BoxShadow( 16 | offset: Offset(2, 2), 17 | color: Color(0xFFCCCCCC) 18 | ) 19 | ] 20 | ), 21 | child: Center( 22 | child: Text(title, style: TextStyle(color: isMainColor? Color(0xFFFFFFFF) :Color(0xFF454545)),), 23 | ), 24 | ), 25 | onTap: change, 26 | ), 27 | padding: EdgeInsets.only(left:10), 28 | ); 29 | } -------------------------------------------------------------------------------- /lib/widget/multiple_select_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../components/multiple_picker.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | 5 | Widget mulitipleSelectWidget(BuildContext context, List list,String value, Function success,){ 6 | return InkWell( 7 | child: Container( 8 | padding: EdgeInsets.only(top: 10,bottom:10), 9 | child: Row( 10 | mainAxisAlignment: MainAxisAlignment.end, 11 | children: [ 12 | Expanded( 13 | child: Text(value,maxLines: 1,overflow: TextOverflow.ellipsis,textAlign: TextAlign.end,style: TextStyle( 14 | fontSize: ScreenUtil().setSp(30) 15 | ),), 16 | ), 17 | Icon( 18 | Icons.arrow_forward_ios, 19 | size: 20, 20 | color: Color(0xFF454545), 21 | ) 22 | ], 23 | ), 24 | ), 25 | onTap: (){ 26 | mulitiplePicker(context,list,value,success); 27 | } 28 | ); 29 | } -------------------------------------------------------------------------------- /lib/widget/radio_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | 4 | radioWidget(List radioList, int indexValue, Function result){ 5 | return Container( 6 | child: Row( 7 | mainAxisAlignment: MainAxisAlignment.end, 8 | children: radioList.map((item){ 9 | return raioItemWidget(indexValue, item['index'], item['title'],result); 10 | }).toList() 11 | ), 12 | ); 13 | } 14 | Widget raioItemWidget(int groupValue, int index, String title, Function result) { 15 | return StatefulBuilder( 16 | builder: (BuildContext context, setState) { 17 | return Container( 18 | child: Row( 19 | children: [ 20 | Radio( 21 | materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, 22 | groupValue: groupValue, 23 | value: index, 24 | onChanged: (indexs){ 25 | setState(() { 26 | groupValue = indexs; 27 | }); 28 | result(indexs); 29 | }, 30 | ), 31 | Text(title,style: TextStyle( 32 | fontSize: ScreenUtil().setSp(28) 33 | ),) 34 | ], 35 | ), 36 | ); 37 | }, 38 | ); 39 | } -------------------------------------------------------------------------------- /lib/widget/searchPageWidget/bottomButtomWidget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | 4 | 5 | Widget bottomButtomWidget( BuildContext context ,Function beSure){ 6 | return Container( 7 | width: MediaQuery.of(context).size.width, 8 | height: ScreenUtil().setHeight(120), 9 | padding: EdgeInsets.only(left: 10,right:10), 10 | decoration: BoxDecoration( 11 | border: Border( 12 | top: BorderSide(width: 1,color: Color(0xFFCCCCCC)), 13 | 14 | ), 15 | color: Colors.white 16 | ), 17 | child: Row( 18 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 19 | children: [ 20 | InkWell( 21 | child: Text('取消',style: TextStyle( 22 | fontSize: ScreenUtil().setSp(34) 23 | ),), 24 | onTap: (){ 25 | Navigator.of(context).pop(); 26 | }, 27 | ), 28 | InkWell( 29 | child: Container( 30 | width: ScreenUtil().setWidth(160), 31 | height: ScreenUtil().setHeight(80), 32 | decoration: BoxDecoration( 33 | color: Theme.of(context).primaryColor, 34 | borderRadius: BorderRadius.circular(5) 35 | ), 36 | child: Center( 37 | child: Text('确认',style: TextStyle( 38 | color: Colors.white, 39 | fontSize: ScreenUtil().setSp(34) 40 | ),), 41 | ), 42 | ), 43 | onTap: beSure 44 | ) 45 | ], 46 | ), 47 | ); 48 | } -------------------------------------------------------------------------------- /lib/widget/searchPageWidget/common_refresh_list_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_easyrefresh/easy_refresh.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | 5 | Widget commonRereshListWidget(List comList, GlobalKey _headerKey, GlobalKey _footerKey, String title, Function loadMore, Function onRefresh, Function commonItem) { 6 | return EasyRefresh( 7 | child: comList.length > 0 8 | ?ListView.builder( 9 | itemCount: comList.length, 10 | itemBuilder: (BuildContext context, int index) { 11 | return commonItem(index,comList[index]); 12 | }, 13 | ) 14 | : Center(child: Padding(child: Text(title,style: TextStyle(fontSize: ScreenUtil().setSp(40)),),padding: EdgeInsets.only(top: 200))), 15 | loadMore: loadMore, 16 | onRefresh: onRefresh, 17 | refreshFooter: ClassicsFooter( 18 | key: _footerKey, 19 | bgColor: Colors.white, 20 | textColor: Colors.black26, 21 | moreInfoColor: Colors.black26, 22 | showMore: false, 23 | noMoreText: '完成', 24 | moreInfo: ' ', 25 | loadText: '上拉加载', 26 | loadReadyText: '上拉加载', 27 | loadedText: '加载完成', 28 | loadingText: '加载中' 29 | ), 30 | refreshHeader: ClassicsHeader( 31 | key: _headerKey, 32 | bgColor: Colors.white, 33 | textColor: Colors.black26, 34 | moreInfoColor: Colors.black26, 35 | showMore: true, 36 | moreInfo: '加载中', 37 | refreshReadyText: '下拉刷新', 38 | refreshedText: '刷新完成', 39 | ), 40 | ); 41 | } -------------------------------------------------------------------------------- /lib/widget/searchPageWidget/searchBar_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import '../../widget/input_widget.dart'; 4 | Widget searchBar(TextEditingController searchController,String title, Function result) { 5 | return Container( 6 | width: double.infinity, 7 | height: ScreenUtil().setHeight(140), 8 | decoration: BoxDecoration( 9 | color: Colors.white, 10 | border: Border(bottom: BorderSide(width: 1, color: Color(0xFFCCCCCC))) 11 | ), 12 | child: Container( 13 | margin: EdgeInsets.all(10), 14 | padding: EdgeInsets.only(left: 10), 15 | decoration: BoxDecoration( 16 | color: Color(0xFFF2F2F2), 17 | borderRadius: BorderRadius.circular(40) 18 | ), 19 | child: Row( 20 | children: [ 21 | Icon(Icons.search), 22 | Expanded( 23 | child: inputWidget(searchController, title, result, border: false), 24 | flex: 1, 25 | ) 26 | ], 27 | ), 28 | ), 29 | ); 30 | } -------------------------------------------------------------------------------- /lib/widget/search_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | searchWidget( BuildContext context,String title, Widget navigatorPage, Function result){ 4 | return InkWell( 5 | child: Container( 6 | padding: EdgeInsets.only(top: 10,bottom:10), 7 | child: Row( 8 | mainAxisAlignment: MainAxisAlignment.end, 9 | children: [ 10 | Expanded( 11 | child: Text(title,softWrap: true,textAlign: TextAlign.end,), 12 | flex: 1, 13 | ), 14 | Icon( 15 | Icons.arrow_forward_ios, 16 | size: 20, 17 | color: Color(0xFF454545), 18 | ) 19 | ], 20 | ), 21 | ), 22 | onTap: (){ 23 | Navigator.of(context).push(MaterialPageRoute(builder: (context){ 24 | return navigatorPage; 25 | })).then(result); 26 | } 27 | ); 28 | } -------------------------------------------------------------------------------- /lib/widget/single_select_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../components/single_picker.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | 5 | Widget singleSelectWidget(String title, BuildContext context, List list, int index, result ){ 6 | return InkWell( 7 | child: Container( 8 | padding: EdgeInsets.only(top:10,bottom:10), 9 | child: Row( 10 | mainAxisAlignment: MainAxisAlignment.end, 11 | children: [ 12 | Text(title,overflow: TextOverflow.ellipsis,style: TextStyle( 13 | fontSize: ScreenUtil().setSp(30) 14 | ),), 15 | Icon( 16 | Icons.arrow_forward_ios, 17 | size: 20, 18 | color: Color(0xFF454545), 19 | ) 20 | ], 21 | ), 22 | ), 23 | onTap: (){ 24 | singlePicker(context, list, index, result); 25 | } 26 | ); 27 | } -------------------------------------------------------------------------------- /lib/widget/textWidget/text1.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | 4 | text1(String title) { 5 | return Text( 6 | title, 7 | style: TextStyle(height: 1.7,fontWeight: FontWeight.bold,fontSize: ScreenUtil().setSp(32)), 8 | ); 9 | } -------------------------------------------------------------------------------- /lib/widget/textWidget/text2.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | 4 | text2(String title) { 5 | if(title != ''){ 6 | return Text( 7 | title, 8 | style: TextStyle(height: 1.5,fontSize: ScreenUtil().setSp(28)), 9 | ); 10 | }else{ 11 | return Text('',style: TextStyle(height: 0),); 12 | } 13 | 14 | } -------------------------------------------------------------------------------- /lib/widget/textWidget/text_model.dart: -------------------------------------------------------------------------------- 1 | export './text1.dart'; 2 | export './text2.dart'; -------------------------------------------------------------------------------- /lib/widget/widget_model.dart: -------------------------------------------------------------------------------- 1 | export './common_button_widget.dart'; 2 | export './input_widget.dart'; 3 | export './header_title_widget.dart'; 4 | export './common_row_widget.dart'; 5 | export './radio_widget.dart'; 6 | export './single_select_widget.dart'; 7 | export './search_widget.dart'; 8 | export './common_input_widget.dart'; 9 | export './city_select_widget.dart'; 10 | export './common_input_select_button_widget.dart'; 11 | export './date_select_widget.dart'; 12 | export './multiple_select_widget.dart'; 13 | export './agreement_widget.dart'; 14 | export './mini_button_widget.dart'; 15 | export './image_title_widget.dart'; -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://www.dartlang.org/tools/pub/glossary#lockfile 3 | packages: 4 | after_layout: 5 | dependency: transitive 6 | description: 7 | name: after_layout 8 | url: "https://pub.flutter-io.cn" 9 | source: hosted 10 | version: "1.0.7+2" 11 | amap_location: 12 | dependency: "direct main" 13 | description: 14 | name: amap_location 15 | url: "https://pub.flutter-io.cn" 16 | source: hosted 17 | version: "0.2.0" 18 | async: 19 | dependency: transitive 20 | description: 21 | name: async 22 | url: "https://pub.flutter-io.cn" 23 | source: hosted 24 | version: "2.0.8" 25 | boolean_selector: 26 | dependency: transitive 27 | description: 28 | name: boolean_selector 29 | url: "https://pub.flutter-io.cn" 30 | source: hosted 31 | version: "1.0.4" 32 | charcode: 33 | dependency: transitive 34 | description: 35 | name: charcode 36 | url: "https://pub.flutter-io.cn" 37 | source: hosted 38 | version: "1.1.2" 39 | collection: 40 | dependency: transitive 41 | description: 42 | name: collection 43 | url: "https://pub.flutter-io.cn" 44 | source: hosted 45 | version: "1.14.11" 46 | cookie_jar: 47 | dependency: transitive 48 | description: 49 | name: cookie_jar 50 | url: "https://pub.flutter-io.cn" 51 | source: hosted 52 | version: "1.0.0" 53 | cupertino_icons: 54 | dependency: "direct main" 55 | description: 56 | name: cupertino_icons 57 | url: "https://pub.flutter-io.cn" 58 | source: hosted 59 | version: "0.1.2" 60 | dio: 61 | dependency: "direct main" 62 | description: 63 | name: dio 64 | url: "https://pub.flutter-io.cn" 65 | source: hosted 66 | version: "2.1.7" 67 | flutter: 68 | dependency: "direct main" 69 | description: flutter 70 | source: sdk 71 | version: "0.0.0" 72 | flutter_easyrefresh: 73 | dependency: "direct main" 74 | description: 75 | name: flutter_easyrefresh 76 | url: "https://pub.flutter-io.cn" 77 | source: hosted 78 | version: "1.2.7" 79 | flutter_screenutil: 80 | dependency: "direct main" 81 | description: 82 | name: flutter_screenutil 83 | url: "https://pub.flutter-io.cn" 84 | source: hosted 85 | version: "0.5.2" 86 | flutter_test: 87 | dependency: "direct dev" 88 | description: flutter 89 | source: sdk 90 | version: "0.0.0" 91 | image_picker: 92 | dependency: "direct main" 93 | description: 94 | name: image_picker 95 | url: "https://pub.flutter-io.cn" 96 | source: hosted 97 | version: "0.5.0" 98 | matcher: 99 | dependency: transitive 100 | description: 101 | name: matcher 102 | url: "https://pub.flutter-io.cn" 103 | source: hosted 104 | version: "0.12.3+1" 105 | meta: 106 | dependency: transitive 107 | description: 108 | name: meta 109 | url: "https://pub.flutter-io.cn" 110 | source: hosted 111 | version: "1.1.6" 112 | path: 113 | dependency: transitive 114 | description: 115 | name: path 116 | url: "https://pub.flutter-io.cn" 117 | source: hosted 118 | version: "1.6.2" 119 | pedantic: 120 | dependency: transitive 121 | description: 122 | name: pedantic 123 | url: "https://pub.flutter-io.cn" 124 | source: hosted 125 | version: "1.4.0" 126 | photo_view: 127 | dependency: "direct main" 128 | description: 129 | name: photo_view 130 | url: "https://pub.flutter-io.cn" 131 | source: hosted 132 | version: "0.2.4" 133 | quiver: 134 | dependency: transitive 135 | description: 136 | name: quiver 137 | url: "https://pub.flutter-io.cn" 138 | source: hosted 139 | version: "2.0.1" 140 | shared_preferences: 141 | dependency: "direct main" 142 | description: 143 | name: shared_preferences 144 | url: "https://pub.flutter-io.cn" 145 | source: hosted 146 | version: "0.5.3" 147 | sky_engine: 148 | dependency: transitive 149 | description: flutter 150 | source: sdk 151 | version: "0.0.99" 152 | source_span: 153 | dependency: transitive 154 | description: 155 | name: source_span 156 | url: "https://pub.flutter-io.cn" 157 | source: hosted 158 | version: "1.5.3" 159 | stack_trace: 160 | dependency: transitive 161 | description: 162 | name: stack_trace 163 | url: "https://pub.flutter-io.cn" 164 | source: hosted 165 | version: "1.9.3" 166 | stream_channel: 167 | dependency: transitive 168 | description: 169 | name: stream_channel 170 | url: "https://pub.flutter-io.cn" 171 | source: hosted 172 | version: "1.6.8" 173 | string_scanner: 174 | dependency: transitive 175 | description: 176 | name: string_scanner 177 | url: "https://pub.flutter-io.cn" 178 | source: hosted 179 | version: "1.0.4" 180 | term_glyph: 181 | dependency: transitive 182 | description: 183 | name: term_glyph 184 | url: "https://pub.flutter-io.cn" 185 | source: hosted 186 | version: "1.1.0" 187 | test_api: 188 | dependency: transitive 189 | description: 190 | name: test_api 191 | url: "https://pub.flutter-io.cn" 192 | source: hosted 193 | version: "0.2.2" 194 | typed_data: 195 | dependency: transitive 196 | description: 197 | name: typed_data 198 | url: "https://pub.flutter-io.cn" 199 | source: hosted 200 | version: "1.1.6" 201 | url_launcher: 202 | dependency: "direct main" 203 | description: 204 | name: url_launcher 205 | url: "https://pub.flutter-io.cn" 206 | source: hosted 207 | version: "4.2.0" 208 | vector_math: 209 | dependency: transitive 210 | description: 211 | name: vector_math 212 | url: "https://pub.flutter-io.cn" 213 | source: hosted 214 | version: "2.0.8" 215 | sdks: 216 | dart: ">=2.1.0 <3.0.0" 217 | flutter: ">=0.5.6 <2.0.0" 218 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_enterprise_application 2 | description: A new Flutter project. 3 | 4 | # The following defines the version and build number for your application. 5 | # A version number is three numbers separated by dots, like 1.2.43 6 | # followed by an optional build number separated by a +. 7 | # Both the version and the builder number may be overridden in flutter 8 | # build by specifying --build-name and --build-number, respectively. 9 | # Read more about versioning at semver.org. 10 | version: 1.0.0+1 11 | 12 | environment: 13 | sdk: ">=2.1.0 <3.0.0" 14 | 15 | dependencies: 16 | flutter: 17 | sdk: flutter 18 | flutter_screenutil: 0.5.2 19 | dio: 2.1.7 20 | shared_preferences: 0.5.3 21 | flutter_easyrefresh: 1.2.7 22 | url_launcher: 4.2.0 23 | photo_view: 0.2.4 24 | image_picker: 0.5.0 25 | amap_location: 0.2.0 26 | # simple_permissions: 0.1.9 27 | # permission_handler: 3.2.0 28 | # The following adds the Cupertino Icons font to your application. 29 | # Use with the CupertinoIcons class for iOS style icons. 30 | cupertino_icons: ^0.1.2 31 | 32 | dev_dependencies: 33 | flutter_test: 34 | sdk: flutter 35 | 36 | 37 | # For information on the generic Dart part of this file, see the 38 | # following page: https://www.dartlang.org/tools/pub/pubspec 39 | 40 | # The following section is specific to Flutter. 41 | flutter: 42 | 43 | # The following line ensures that the Material Icons font is 44 | # included with your application, so that you can use the icons in 45 | # the material Icons class. 46 | uses-material-design: true 47 | 48 | # To add assets to your application, add an assets section, like this: 49 | assets: 50 | - assets/images/splash.png 51 | - assets/images/banner.png 52 | - assets/images/driver.png 53 | - assets/images/confirm-order.png 54 | - assets/images/logistics.png 55 | - assets/images/releaseResource.png 56 | - assets/images/goodsList.png 57 | - assets/images/directCar.png 58 | - assets/images/orderList.png 59 | - assets/images/fahuo.png 60 | - assets/images/receiptList.png 61 | - assets/images/certifiedTruck.png 62 | - assets/images/certifiedDriver.png 63 | - assets/images/invitingMotivation.png 64 | - assets/images/driverList.png 65 | - assets/images/users.png 66 | - assets/images/password.png 67 | - assets/images/logo.png 68 | - assets/images/bg_mine.jpg 69 | - assets/images/modify.png 70 | - assets/images/arrow.png 71 | - assets/images/driver.png 72 | - assets/images/fdriver.png 73 | - assets/images/car.png 74 | - assets/images/arrows.png 75 | - assets/images/f.png 76 | - assets/images/z.png 77 | - assets/images/tel.png 78 | - assets/images/fahuo.png 79 | - assets/images/shouhuo.png 80 | - assets/images/pic.png 81 | - assets/images/delete.png 82 | # An image asset can refer to one or more resolution-specific "variants", see 83 | # https://flutter.io/assets-and-images/#resolution-aware. 84 | 85 | # For details regarding adding assets from package dependencies, see 86 | # https://flutter.io/assets-and-images/#from-packages 87 | 88 | # To add custom fonts to your application, add a fonts section here, 89 | # in this "flutter" section. Each entry in this list should have a 90 | # "family" key with the font family name, and a "fonts" key with a 91 | # list giving the asset and other descriptors for the font. For 92 | # example: 93 | # fonts: 94 | # - family: Schyler 95 | # fonts: 96 | # - asset: fonts/Schyler-Regular.ttf 97 | # - asset: fonts/Schyler-Italic.ttf 98 | # style: italic 99 | # - family: Trajan Pro 100 | # fonts: 101 | # - asset: fonts/TrajanPro.ttf 102 | # - asset: fonts/TrajanPro_Bold.ttf 103 | # weight: 700 104 | # 105 | # For details regarding fonts from package dependencies, 106 | # see https://flutter.io/custom-fonts/#from-packages 107 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:flutter_enterprise_application/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | --------------------------------------------------------------------------------