diff --git a/README.md b/README.md index a9dbae25..a009e821 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# aku_community +# aku_new_community ## Getting Started diff --git a/android/app/build.gradle b/android/app/build.gradle index f0d15e6f..0648f79b 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -44,7 +44,7 @@ android { defaultConfig { // Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.akuCommunity.app" + applicationId "com.aku_new_community.app" minSdkVersion 21 targetSdkVersion 28 versionCode flutterVersionCode.toInteger() @@ -101,5 +101,5 @@ dependencies { } -apply plugin: 'com.google.gms.google-services' +//apply plugin: 'com.google.gms.google-services' //apply plugin: 'com.google.firebase.crashlytics' diff --git a/android/app/google-services.json b/android/app/google-services.json index 74eeca7d..b87162cf 100644 --- a/android/app/google-services.json +++ b/android/app/google-services.json @@ -9,7 +9,7 @@ "client_info": { "mobilesdk_app_id": "1:767907767238:android:73ba965a47818e4d9cc8c7", "android_client_info": { - "package_name": "com.akuCommunity.app" + "package_name": "com.aku_new_community.app" } }, "oauth_client": [ diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index 39e79aee..0d33e07d 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="com.aku_new_community.app"> diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 5c7108f1..25bdb25f 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,4 +1,4 @@ - + diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 8d027adc..063227b8 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -399,7 +399,7 @@ "$(PROJECT_DIR)/Flutter", ); MARKETING_VERSION = 1.0.5; - PRODUCT_BUNDLE_IDENTIFIER = com.akuCommunity.bee; + PRODUCT_BUNDLE_IDENTIFIER = "com.aku-new-community.bee"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -543,7 +543,7 @@ "$(PROJECT_DIR)/Flutter", ); MARKETING_VERSION = 1.0.5; - PRODUCT_BUNDLE_IDENTIFIER = com.akuCommunity.bee; + PRODUCT_BUNDLE_IDENTIFIER = "com.aku-new-community.bee"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -581,7 +581,7 @@ "$(PROJECT_DIR)/Flutter", ); MARKETING_VERSION = 1.0.5; - PRODUCT_BUNDLE_IDENTIFIER = com.akuCommunity.bee; + PRODUCT_BUNDLE_IDENTIFIER = "com.aku-new-community.bee"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json index f4c7eef9..78f28c0f 100644 --- a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,68 +1,68 @@ { - "images" : [ + "images": [ { - "filename" : "40x40.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "20x20" + "filename": "40x40.png", + "idiom": "iphone", + "scale": "2x", + "size": "20x20" }, { - "filename" : "60x60.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "20x20" + "filename": "60x60.png", + "idiom": "iphone", + "scale": "3x", + "size": "20x20" }, { - "filename" : "29x29.png", - "idiom" : "iphone", - "scale" : "1x", - "size" : "29x29" + "filename": "29x29.png", + "idiom": "iphone", + "scale": "1x", + "size": "29x29" }, { - "filename" : "58x58.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "29x29" + "filename": "58x58.png", + "idiom": "iphone", + "scale": "2x", + "size": "29x29" }, { - "filename" : "87x87.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "29x29" + "filename": "87x87.png", + "idiom": "iphone", + "scale": "3x", + "size": "29x29" }, { - "filename" : "80x80.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "40x40" + "filename": "80x80.png", + "idiom": "iphone", + "scale": "2x", + "size": "40x40" }, { - "filename" : "120x120.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "40x40" + "filename": "120x120.png", + "idiom": "iphone", + "scale": "3x", + "size": "40x40" }, { - "filename" : "120x120-1.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "60x60" + "filename": "120x120-1.png", + "idiom": "iphone", + "scale": "2x", + "size": "60x60" }, { - "filename" : "180x180.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "60x60" + "filename": "180x180.png", + "idiom": "iphone", + "scale": "3x", + "size": "60x60" }, { - "filename" : "1024x1024.png", - "idiom" : "ios-marketing", - "scale" : "1x", - "size" : "1024x1024" + "filename": "1024x1024.png", + "idiom": "ios-marketing", + "scale": "1x", + "size": "1024x1024" } ], - "info" : { - "author" : "xcode", - "version" : 1 + "info": { + "author": "xcode", + "version": 1 } } diff --git a/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json index fa313278..812f07d9 100644 --- a/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json +++ b/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json @@ -1,52 +1,52 @@ { - "images" : [ + "images": [ { - "filename" : "background.png", - "idiom" : "universal", - "scale" : "1x" + "filename": "background.png", + "idiom": "universal", + "scale": "1x" }, { - "appearances" : [ + "appearances": [ { - "appearance" : "luminosity", - "value" : "dark" + "appearance": "luminosity", + "value": "dark" } ], - "filename" : "darkbackground.png", - "idiom" : "universal", - "scale" : "1x" + "filename": "darkbackground.png", + "idiom": "universal", + "scale": "1x" }, { - "idiom" : "universal", - "scale" : "2x" + "idiom": "universal", + "scale": "2x" }, { - "appearances" : [ + "appearances": [ { - "appearance" : "luminosity", - "value" : "dark" + "appearance": "luminosity", + "value": "dark" } ], - "idiom" : "universal", - "scale" : "2x" + "idiom": "universal", + "scale": "2x" }, { - "idiom" : "universal", - "scale" : "3x" + "idiom": "universal", + "scale": "3x" }, { - "appearances" : [ + "appearances": [ { - "appearance" : "luminosity", - "value" : "dark" + "appearance": "luminosity", + "value": "dark" } ], - "idiom" : "universal", - "scale" : "3x" + "idiom": "universal", + "scale": "3x" } ], - "info" : { - "author" : "xcode", - "version" : 1 + "info": { + "author": "xcode", + "version": 1 } } diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json index 00cabce8..da0cb6fa 100644 --- a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -1,23 +1,23 @@ { - "images" : [ + "images": [ { - "filename" : "LaunchImage.png", - "idiom" : "universal", - "scale" : "1x" + "filename": "LaunchImage.png", + "idiom": "universal", + "scale": "1x" }, { - "filename" : "LaunchImage@2x.png", - "idiom" : "universal", - "scale" : "2x" + "filename": "LaunchImage@2x.png", + "idiom": "universal", + "scale": "2x" }, { - "filename" : "LaunchImage@3x.png", - "idiom" : "universal", - "scale" : "3x" + "filename": "LaunchImage@3x.png", + "idiom": "universal", + "scale": "3x" } ], - "info" : { - "author" : "xcode", - "version" : 1 + "info": { + "author": "xcode", + "version": 1 } } diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md index 89c2725b..35a8b070 100644 --- a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -2,4 +2,5 @@ You can customize the launch screen with your own desired assets by replacing the image files in this directory. -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. \ No newline at end of file +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. \ No newline at end of file diff --git a/lib/base/base_style.dart b/lib/base/base_style.dart index e94da277..040b318d 100644 --- a/lib/base/base_style.dart +++ b/lib/base/base_style.dart @@ -1,8 +1,7 @@ +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/utils/headers.dart'; - const ktextPrimary = Color(0xff333333); const ktextSubColor = Color(0xff666666); const ktextThirdColor = Color(0xff999999); diff --git a/lib/const/resource.dart b/lib/const/resource.dart index 3625af31..de0aadc0 100644 --- a/lib/const/resource.dart +++ b/lib/const/resource.dart @@ -3,972 +3,972 @@ class R { const R._(); - /// ![preview](file:///Users/datang/aku_community/assets/applications/advice.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/applications/advice.png) static const String ASSETS_APPLICATIONS_ADVICE_PNG = 'assets/applications/advice.png'; - /// ![preview](file:///Users/datang/aku_community/assets/applications/all_app.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/applications/all_app.png) static const String ASSETS_APPLICATIONS_ALL_APP_PNG = 'assets/applications/all_app.png'; - /// ![preview](file:///Users/datang/aku_community/assets/applications/borrow.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/applications/borrow.png) static const String ASSETS_APPLICATIONS_BORROW_PNG = 'assets/applications/borrow.png'; - /// ![preview](file:///Users/datang/aku_community/assets/applications/box.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/applications/box.png) static const String ASSETS_APPLICATIONS_BOX_PNG = 'assets/applications/box.png'; - /// ![preview](file:///Users/datang/aku_community/assets/applications/committee.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/applications/committee.png) static const String ASSETS_APPLICATIONS_COMMITTEE_PNG = 'assets/applications/committee.png'; - /// ![preview](file:///Users/datang/aku_community/assets/applications/community_phone.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/applications/community_phone.png) static const String ASSETS_APPLICATIONS_COMMUNITY_PHONE_PNG = 'assets/applications/community_phone.png'; - /// ![preview](file:///Users/datang/aku_community/assets/applications/complaint.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/applications/complaint.png) static const String ASSETS_APPLICATIONS_COMPLAINT_PNG = 'assets/applications/complaint.png'; - /// ![preview](file:///Users/datang/aku_community/assets/applications/decoration.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/applications/decoration.png) static const String ASSETS_APPLICATIONS_DECORATION_PNG = 'assets/applications/decoration.png'; - /// ![preview](file:///Users/datang/aku_community/assets/applications/digital.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/applications/digital.png) static const String ASSETS_APPLICATIONS_DIGITAL_PNG = 'assets/applications/digital.png'; - /// ![preview](file:///Users/datang/aku_community/assets/applications/door_code.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/applications/door_code.png) static const String ASSETS_APPLICATIONS_DOOR_CODE_PNG = 'assets/applications/door_code.png'; - /// ![preview](file:///Users/datang/aku_community/assets/applications/fix.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/applications/fix.png) static const String ASSETS_APPLICATIONS_FIX_PNG = 'assets/applications/fix.png'; - /// ![preview](file:///Users/datang/aku_community/assets/applications/goods_out.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/applications/goods_out.png) static const String ASSETS_APPLICATIONS_GOODS_OUT_PNG = 'assets/applications/goods_out.png'; - /// ![preview](file:///Users/datang/aku_community/assets/applications/home_live.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/applications/home_live.png) static const String ASSETS_APPLICATIONS_HOME_LIVE_PNG = 'assets/applications/home_live.png'; - /// ![preview](file:///Users/datang/aku_community/assets/applications/hospital.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/applications/hospital.png) static const String ASSETS_APPLICATIONS_HOSPITAL_PNG = 'assets/applications/hospital.png'; - /// ![preview](file:///Users/datang/aku_community/assets/applications/makeup.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/applications/makeup.png) static const String ASSETS_APPLICATIONS_MAKEUP_PNG = 'assets/applications/makeup.png'; - /// ![preview](file:///Users/datang/aku_community/assets/applications/oepn_door.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/applications/oepn_door.png) static const String ASSETS_APPLICATIONS_OEPN_DOOR_PNG = 'assets/applications/oepn_door.png'; - /// ![preview](file:///Users/datang/aku_community/assets/applications/payment.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/applications/payment.png) static const String ASSETS_APPLICATIONS_PAYMENT_PNG = 'assets/applications/payment.png'; - /// ![preview](file:///Users/datang/aku_community/assets/applications/police.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/applications/police.png) static const String ASSETS_APPLICATIONS_POLICE_PNG = 'assets/applications/police.png'; - /// ![preview](file:///Users/datang/aku_community/assets/applications/question.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/applications/question.png) static const String ASSETS_APPLICATIONS_QUESTION_PNG = 'assets/applications/question.png'; - /// ![preview](file:///Users/datang/aku_community/assets/applications/snack.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/applications/snack.png) static const String ASSETS_APPLICATIONS_SNACK_PNG = 'assets/applications/snack.png'; - /// ![preview](file:///Users/datang/aku_community/assets/applications/tool_bmts.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/applications/tool_bmts.png) static const String ASSETS_APPLICATIONS_TOOL_BMTS_PNG = 'assets/applications/tool_bmts.png'; - /// ![preview](file:///Users/datang/aku_community/assets/applications/toy.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/applications/toy.png) static const String ASSETS_APPLICATIONS_TOY_PNG = 'assets/applications/toy.png'; - /// ![preview](file:///Users/datang/aku_community/assets/applications/transfer.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/applications/transfer.png) static const String ASSETS_APPLICATIONS_TRANSFER_PNG = 'assets/applications/transfer.png'; - /// ![preview](file:///Users/datang/aku_community/assets/applications/visitor_invite.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/applications/visitor_invite.png) static const String ASSETS_APPLICATIONS_VISITOR_INVITE_PNG = 'assets/applications/visitor_invite.png'; - /// ![preview](file:///Users/datang/aku_community/assets/applications/vote.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/applications/vote.png) static const String ASSETS_APPLICATIONS_VOTE_PNG = 'assets/applications/vote.png'; - /// ![preview](file:///Users/datang/aku_community/assets/applications/wine.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/applications/wine.png) static const String ASSETS_APPLICATIONS_WINE_PNG = 'assets/applications/wine.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/add.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/add.png) static const String ASSETS_ICONS_ADD_PNG = 'assets/icons/add.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/alarm.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/alarm.png) static const String ASSETS_ICONS_ALARM_PNG = 'assets/icons/alarm.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/alipay_round.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/alipay_round.png) static const String ASSETS_ICONS_ALIPAY_ROUND_PNG = 'assets/icons/alipay_round.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/app_add.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/app_add.png) static const String ASSETS_ICONS_APP_ADD_PNG = 'assets/icons/app_add.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/app_alarm.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/app_alarm.png) static const String ASSETS_ICONS_APP_ALARM_PNG = 'assets/icons/app_alarm.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/app_reduce.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/app_reduce.png) static const String ASSETS_ICONS_APP_REDUCE_PNG = 'assets/icons/app_reduce.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/appointment-address.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/appointment-address.png) static const String ASSETS_ICONS_APPOINTMENT_ADDRESS_PNG = 'assets/icons/appointment-address.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/appointment-code.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/appointment-code.png) static const String ASSETS_ICONS_APPOINTMENT_CODE_PNG = 'assets/icons/appointment-code.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/appointment_date.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/appointment_date.png) static const String ASSETS_ICONS_APPOINTMENT_DATE_PNG = 'assets/icons/appointment_date.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/article_count.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/article_count.png) static const String ASSETS_ICONS_ARTICLE_COUNT_PNG = 'assets/icons/article_count.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/article_name.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/article_name.png) static const String ASSETS_ICONS_ARTICLE_NAME_PNG = 'assets/icons/article_name.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/borrow_failure.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/borrow_failure.png) static const String ASSETS_ICONS_BORROW_FAILURE_PNG = 'assets/icons/borrow_failure.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/borrow_status.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/borrow_status.png) static const String ASSETS_ICONS_BORROW_STATUS_PNG = 'assets/icons/borrow_status.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/borrow_success.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/borrow_success.png) static const String ASSETS_ICONS_BORROW_SUCCESS_PNG = 'assets/icons/borrow_success.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/change.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/change.png) static const String ASSETS_ICONS_CHANGE_PNG = 'assets/icons/change.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/collect.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/collect.png) static const String ASSETS_ICONS_COLLECT_PNG = 'assets/icons/collect.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/collection_setting.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/collection_setting.png) static const String ASSETS_ICONS_COLLECTION_SETTING_PNG = 'assets/icons/collection_setting.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/collection_share.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/collection_share.png) static const String ASSETS_ICONS_COLLECTION_SHARE_PNG = 'assets/icons/collection_share.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/comment_notice.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/comment_notice.png) static const String ASSETS_ICONS_COMMENT_NOTICE_PNG = 'assets/icons/comment_notice.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/commerc.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/commerc.png) static const String ASSETS_ICONS_COMMERC_PNG = 'assets/icons/commerc.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/complaint.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/complaint.png) static const String ASSETS_ICONS_COMPLAINT_PNG = 'assets/icons/complaint.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/consult.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/consult.png) static const String ASSETS_ICONS_CONSULT_PNG = 'assets/icons/consult.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/contract.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/contract.png) static const String ASSETS_ICONS_CONTRACT_PNG = 'assets/icons/contract.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/delete.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/delete.png) static const String ASSETS_ICONS_DELETE_PNG = 'assets/icons/delete.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/device_alarm.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/device_alarm.png) static const String ASSETS_ICONS_DEVICE_ALARM_PNG = 'assets/icons/device_alarm.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/examine.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/examine.png) static const String ASSETS_ICONS_EXAMINE_PNG = 'assets/icons/examine.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/eye_close.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/eye_close.png) static const String ASSETS_ICONS_EYE_CLOSE_PNG = 'assets/icons/eye_close.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/facility.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/facility.png) static const String ASSETS_ICONS_FACILITY_PNG = 'assets/icons/facility.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/file.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/file.png) static const String ASSETS_ICONS_FILE_PNG = 'assets/icons/file.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/filter.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/filter.png) static const String ASSETS_ICONS_FILTER_PNG = 'assets/icons/filter.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/finish.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/finish.png) static const String ASSETS_ICONS_FINISH_PNG = 'assets/icons/finish.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/fire_alarm.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/fire_alarm.png) static const String ASSETS_ICONS_FIRE_ALARM_PNG = 'assets/icons/fire_alarm.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/func_all.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/func_all.png) static const String ASSETS_ICONS_FUNC_ALL_PNG = 'assets/icons/func_all.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/func_bmdh.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/func_bmdh.png) static const String ASSETS_ICONS_FUNC_BMDH_PNG = 'assets/icons/func_bmdh.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/func_bsbx.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/func_bsbx.png) static const String ASSETS_ICONS_FUNC_BSBX_PNG = 'assets/icons/func_bsbx.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/func_dlxx.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/func_dlxx.png) static const String ASSETS_ICONS_FUNC_DLXX_PNG = 'assets/icons/func_dlxx.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/func_dzsw.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/func_dzsw.png) static const String ASSETS_ICONS_FUNC_DZSW_PNG = 'assets/icons/func_dzsw.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/func_fkyq.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/func_fkyq.png) static const String ASSETS_ICONS_FUNC_FKYQ_PNG = 'assets/icons/func_fkyq.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/func_fwll.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/func_fwll.png) static const String ASSETS_ICONS_FUNC_FWLL_PNG = 'assets/icons/func_fwll.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/func_gife.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/func_gife.png) static const String ASSETS_ICONS_FUNC_GIFE_PNG = 'assets/icons/func_gife.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/func_hdtp.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/func_hdtp.png) static const String ASSETS_ICONS_FUNC_HDTP_PNG = 'assets/icons/func_hdtp.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/func_jhgl.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/func_jhgl.png) static const String ASSETS_ICONS_FUNC_JHGL_PNG = 'assets/icons/func_jhgl.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/func_jyzx.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/func_jyzx.png) static const String ASSETS_ICONS_FUNC_JYZX_PNG = 'assets/icons/func_jyzx.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/func_jzfw.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/func_jzfw.png) static const String ASSETS_ICONS_FUNC_JZFW_PNG = 'assets/icons/func_jzfw.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/func_kdbg.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/func_kdbg.png) static const String ASSETS_ICONS_FUNC_KDBG_PNG = 'assets/icons/func_kdbg.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/func_kmm.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/func_kmm.png) static const String ASSETS_ICONS_FUNC_KMM_PNG = 'assets/icons/func_kmm.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/func_shjf.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/func_shjf.png) static const String ASSETS_ICONS_FUNC_SHJF_PNG = 'assets/icons/func_shjf.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/func_sqjs.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/func_sqjs.png) static const String ASSETS_ICONS_FUNC_SQJS_PNG = 'assets/icons/func_sqjs.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/func_ssyy.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/func_ssyy.png) static const String ASSETS_ICONS_FUNC_SSYY_PNG = 'assets/icons/func_ssyy.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/func_tsby.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/func_tsby.png) static const String ASSETS_ICONS_FUNC_TSBY_PNG = 'assets/icons/func_tsby.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/func_wjdc.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/func_wjdc.png) static const String ASSETS_ICONS_FUNC_WJDC_PNG = 'assets/icons/func_wjdc.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/func_wpch.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/func_wpch.png) static const String ASSETS_ICONS_FUNC_WPCH_PNG = 'assets/icons/func_wpch.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/func_yjbj.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/func_yjbj.png) static const String ASSETS_ICONS_FUNC_YJBJ_PNG = 'assets/icons/func_yjbj.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/func_ywh.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/func_ywh.png) static const String ASSETS_ICONS_FUNC_YWH_PNG = 'assets/icons/func_ywh.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/func_zbqy.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/func_zbqy.png) static const String ASSETS_ICONS_FUNC_ZBQY_PNG = 'assets/icons/func_zbqy.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/func_zfsm.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/func_zfsm.png) static const String ASSETS_ICONS_FUNC_ZFSM_PNG = 'assets/icons/func_zfsm.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/func_zxgl.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/func_zxgl.png) static const String ASSETS_ICONS_FUNC_ZXGL_PNG = 'assets/icons/func_zxgl.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/goods_borrow.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/goods_borrow.png) static const String ASSETS_ICONS_GOODS_BORROW_PNG = 'assets/icons/goods_borrow.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/goods_return.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/goods_return.png) static const String ASSETS_ICONS_GOODS_RETURN_PNG = 'assets/icons/goods_return.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/groupbuy_tab_selected.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/groupbuy_tab_selected.png) static const String ASSETS_ICONS_GROUPBUY_TAB_SELECTED_PNG = 'assets/icons/groupbuy_tab_selected.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/groupbuy_tab_unselected.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/groupbuy_tab_unselected.png) static const String ASSETS_ICONS_GROUPBUY_TAB_UNSELECTED_PNG = 'assets/icons/groupbuy_tab_unselected.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/hot_fire.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/hot_fire.png) static const String ASSETS_ICONS_HOT_FIRE_PNG = 'assets/icons/hot_fire.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/house.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/house.png) static const String ASSETS_ICONS_HOUSE_PNG = 'assets/icons/house.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/house_keeping.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/house_keeping.png) static const String ASSETS_ICONS_HOUSE_KEEPING_PNG = 'assets/icons/house_keeping.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_address_edit.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_address_edit.png) static const String ASSETS_ICONS_ICON_ADDRESS_EDIT_PNG = 'assets/icons/icon_address_edit.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_address_isdefault.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_address_isdefault.png) static const String ASSETS_ICONS_ICON_ADDRESS_ISDEFAULT_PNG = 'assets/icons/icon_address_isdefault.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_address_not.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_address_not.png) static const String ASSETS_ICONS_ICON_ADDRESS_NOT_PNG = 'assets/icons/icon_address_not.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_back.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_back.png) static const String ASSETS_ICONS_ICON_BACK_PNG = 'assets/icons/icon_back.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_change_grid.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_change_grid.png) static const String ASSETS_ICONS_ICON_CHANGE_GRID_PNG = 'assets/icons/icon_change_grid.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_change_list.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_change_list.png) static const String ASSETS_ICONS_ICON_CHANGE_LIST_PNG = 'assets/icons/icon_change_list.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_comment.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_comment.png) static const String ASSETS_ICONS_ICON_COMMENT_PNG = 'assets/icons/icon_comment.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_community_push.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_community_push.png) static const String ASSETS_ICONS_ICON_COMMUNITY_PUSH_PNG = 'assets/icons/icon_community_push.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_favor_choose.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_favor_choose.png) static const String ASSETS_ICONS_ICON_FAVOR_CHOOSE_PNG = 'assets/icons/icon_favor_choose.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_good_car.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_good_car.png) static const String ASSETS_ICONS_ICON_GOOD_CAR_PNG = 'assets/icons/icon_good_car.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_good_favor.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_good_favor.png) static const String ASSETS_ICONS_ICON_GOOD_FAVOR_PNG = 'assets/icons/icon_good_favor.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_good_location.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_good_location.png) static const String ASSETS_ICONS_ICON_GOOD_LOCATION_PNG = 'assets/icons/icon_good_location.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_good_my.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_good_my.png) static const String ASSETS_ICONS_ICON_GOOD_MY_PNG = 'assets/icons/icon_good_my.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_logistics.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_logistics.png) static const String ASSETS_ICONS_ICON_LOGISTICS_PNG = 'assets/icons/icon_logistics.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_main_all.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_main_all.png) static const String ASSETS_ICONS_ICON_MAIN_ALL_PNG = 'assets/icons/icon_main_all.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_main_consult.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_main_consult.png) static const String ASSETS_ICONS_ICON_MAIN_CONSULT_PNG = 'assets/icons/icon_main_consult.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_main_find.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_main_find.png) static const String ASSETS_ICONS_ICON_MAIN_FIND_PNG = 'assets/icons/icon_main_find.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_main_fix.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_main_fix.png) static const String ASSETS_ICONS_ICON_MAIN_FIX_PNG = 'assets/icons/icon_main_fix.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_main_invite.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_main_invite.png) static const String ASSETS_ICONS_ICON_MAIN_INVITE_PNG = 'assets/icons/icon_main_invite.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_main_location.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_main_location.png) static const String ASSETS_ICONS_ICON_MAIN_LOCATION_PNG = 'assets/icons/icon_main_location.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_main_message.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_main_message.png) static const String ASSETS_ICONS_ICON_MAIN_MESSAGE_PNG = 'assets/icons/icon_main_message.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_main_open.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_main_open.png) static const String ASSETS_ICONS_ICON_MAIN_OPEN_PNG = 'assets/icons/icon_main_open.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_main_pay.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_main_pay.png) static const String ASSETS_ICONS_ICON_MAIN_PAY_PNG = 'assets/icons/icon_main_pay.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_main_police.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_main_police.png) static const String ASSETS_ICONS_ICON_MAIN_POLICE_PNG = 'assets/icons/icon_main_police.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_main_subscribe.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_main_subscribe.png) static const String ASSETS_ICONS_ICON_MAIN_SUBSCRIBE_PNG = 'assets/icons/icon_main_subscribe.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_market_success.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_market_success.png) static const String ASSETS_ICONS_ICON_MARKET_SUCCESS_PNG = 'assets/icons/icon_market_success.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_more.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_more.png) static const String ASSETS_ICONS_ICON_MORE_PNG = 'assets/icons/icon_more.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_my_car.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_my_car.png) static const String ASSETS_ICONS_ICON_MY_CAR_PNG = 'assets/icons/icon_my_car.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_my_carSeat.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_my_carSeat.png) static const String ASSETS_ICONS_ICON_MY_CARSEAT_PNG = 'assets/icons/icon_my_carSeat.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_my_edit.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_my_edit.png) static const String ASSETS_ICONS_ICON_MY_EDIT_PNG = 'assets/icons/icon_my_edit.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_my_house.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_my_house.png) static const String ASSETS_ICONS_ICON_MY_HOUSE_PNG = 'assets/icons/icon_my_house.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_my_location.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_my_location.png) static const String ASSETS_ICONS_ICON_MY_LOCATION_PNG = 'assets/icons/icon_my_location.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_my_setting.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_my_setting.png) static const String ASSETS_ICONS_ICON_MY_SETTING_PNG = 'assets/icons/icon_my_setting.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_my_visitor.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_my_visitor.png) static const String ASSETS_ICONS_ICON_MY_VISITOR_PNG = 'assets/icons/icon_my_visitor.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_notification.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_notification.png) static const String ASSETS_ICONS_ICON_NOTIFICATION_PNG = 'assets/icons/icon_notification.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_price.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_price.png) static const String ASSETS_ICONS_ICON_PRICE_PNG = 'assets/icons/icon_price.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_price_bottom.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_price_bottom.png) static const String ASSETS_ICONS_ICON_PRICE_BOTTOM_PNG = 'assets/icons/icon_price_bottom.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_price_normal.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_price_normal.png) static const String ASSETS_ICONS_ICON_PRICE_NORMAL_PNG = 'assets/icons/icon_price_normal.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_price_top.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_price_top.png) static const String ASSETS_ICONS_ICON_PRICE_TOP_PNG = 'assets/icons/icon_price_top.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_property_location.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_property_location.png) static const String ASSETS_ICONS_ICON_PROPERTY_LOCATION_PNG = 'assets/icons/icon_property_location.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_property_message.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_property_message.png) static const String ASSETS_ICONS_ICON_PROPERTY_MESSAGE_PNG = 'assets/icons/icon_property_message.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_property_search.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_property_search.png) static const String ASSETS_ICONS_ICON_PROPERTY_SEARCH_PNG = 'assets/icons/icon_property_search.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_setting.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_setting.png) static const String ASSETS_ICONS_ICON_SETTING_PNG = 'assets/icons/icon_setting.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_thumbsUp.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_thumbsUp.png) static const String ASSETS_ICONS_ICON_THUMBSUP_PNG = 'assets/icons/icon_thumbsUp.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_toTop.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_toTop.png) static const String ASSETS_ICONS_ICON_TOTOP_PNG = 'assets/icons/icon_toTop.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_topic_first.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_topic_first.png) static const String ASSETS_ICONS_ICON_TOPIC_FIRST_PNG = 'assets/icons/icon_topic_first.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_topic_second.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_topic_second.png) static const String ASSETS_ICONS_ICON_TOPIC_SECOND_PNG = 'assets/icons/icon_topic_second.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_topic_third.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/icon_topic_third.png) static const String ASSETS_ICONS_ICON_TOPIC_THIRD_PNG = 'assets/icons/icon_topic_third.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/img_add.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/img_add.png) static const String ASSETS_ICONS_IMG_ADD_PNG = 'assets/icons/img_add.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/introduce.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/introduce.png) static const String ASSETS_ICONS_INTRODUCE_PNG = 'assets/icons/introduce.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/lease_house.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/lease_house.png) static const String ASSETS_ICONS_LEASE_HOUSE_PNG = 'assets/icons/lease_house.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/like.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/like.png) static const String ASSETS_ICONS_LIKE_PNG = 'assets/icons/like.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/location.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/location.png) static const String ASSETS_ICONS_LOCATION_PNG = 'assets/icons/location.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/manager_order_cancel.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/manager_order_cancel.png) static const String ASSETS_ICONS_MANAGER_ORDER_CANCEL_PNG = 'assets/icons/manager_order_cancel.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/manager_phone_call.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/manager_phone_call.png) static const String ASSETS_ICONS_MANAGER_PHONE_CALL_PNG = 'assets/icons/manager_phone_call.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/market_tab_selected.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/market_tab_selected.png) static const String ASSETS_ICONS_MARKET_TAB_SELECTED_PNG = 'assets/icons/market_tab_selected.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/market_tab_unselected.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/market_tab_unselected.png) static const String ASSETS_ICONS_MARKET_TAB_UNSELECTED_PNG = 'assets/icons/market_tab_unselected.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/pay.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/pay.png) static const String ASSETS_ICONS_PAY_PNG = 'assets/icons/pay.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/phone.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/phone.png) static const String ASSETS_ICONS_PHONE_PNG = 'assets/icons/phone.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/property.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/property.png) static const String ASSETS_ICONS_PROPERTY_PNG = 'assets/icons/property.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/proposal.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/proposal.png) static const String ASSETS_ICONS_PROPOSAL_PNG = 'assets/icons/proposal.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/report.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/report.png) static const String ASSETS_ICONS_REPORT_PNG = 'assets/icons/report.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/second_hand.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/second_hand.png) static const String ASSETS_ICONS_SECOND_HAND_PNG = 'assets/icons/second_hand.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/service.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/service.png) static const String ASSETS_ICONS_SERVICE_PNG = 'assets/icons/service.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/shield_content.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/shield_content.png) static const String ASSETS_ICONS_SHIELD_CONTENT_PNG = 'assets/icons/shield_content.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/shield_user.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/shield_user.png) static const String ASSETS_ICONS_SHIELD_USER_PNG = 'assets/icons/shield_user.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/shop_car.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/shop_car.png) static const String ASSETS_ICONS_SHOP_CAR_PNG = 'assets/icons/shop_car.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/shop_close.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/shop_close.png) static const String ASSETS_ICONS_SHOP_CLOSE_PNG = 'assets/icons/shop_close.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/shop_favorfill.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/shop_favorfill.png) static const String ASSETS_ICONS_SHOP_FAVORFILL_PNG = 'assets/icons/shop_favorfill.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/shop_laba.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/shop_laba.png) static const String ASSETS_ICONS_SHOP_LABA_PNG = 'assets/icons/shop_laba.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/shop_location.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/shop_location.png) static const String ASSETS_ICONS_SHOP_LOCATION_PNG = 'assets/icons/shop_location.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/shop_notice.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/shop_notice.png) static const String ASSETS_ICONS_SHOP_NOTICE_PNG = 'assets/icons/shop_notice.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/shop_order.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/shop_order.png) static const String ASSETS_ICONS_SHOP_ORDER_PNG = 'assets/icons/shop_order.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/shop_search.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/shop_search.png) static const String ASSETS_ICONS_SHOP_SEARCH_PNG = 'assets/icons/shop_search.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/shop_torb.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/shop_torb.png) static const String ASSETS_ICONS_SHOP_TORB_PNG = 'assets/icons/shop_torb.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/system_notice.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/system_notice.png) static const String ASSETS_ICONS_SYSTEM_NOTICE_PNG = 'assets/icons/system_notice.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tabbar_home.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tabbar_home.png) static const String ASSETS_ICONS_TABBAR_HOME_PNG = 'assets/icons/tabbar_home.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tabbar_home_no.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tabbar_home_no.png) static const String ASSETS_ICONS_TABBAR_HOME_NO_PNG = 'assets/icons/tabbar_home_no.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tabbar_house.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tabbar_house.png) static const String ASSETS_ICONS_TABBAR_HOUSE_PNG = 'assets/icons/tabbar_house.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tabbar_house_no.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tabbar_house_no.png) static const String ASSETS_ICONS_TABBAR_HOUSE_NO_PNG = 'assets/icons/tabbar_house_no.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tabbar_market.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tabbar_market.png) static const String ASSETS_ICONS_TABBAR_MARKET_PNG = 'assets/icons/tabbar_market.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tabbar_market_no.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tabbar_market_no.png) static const String ASSETS_ICONS_TABBAR_MARKET_NO_PNG = 'assets/icons/tabbar_market_no.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tabbar_message.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tabbar_message.png) static const String ASSETS_ICONS_TABBAR_MESSAGE_PNG = 'assets/icons/tabbar_message.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tabbar_message_no.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tabbar_message_no.png) static const String ASSETS_ICONS_TABBAR_MESSAGE_NO_PNG = 'assets/icons/tabbar_message_no.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tabbar_user.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tabbar_user.png) static const String ASSETS_ICONS_TABBAR_USER_PNG = 'assets/icons/tabbar_user.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tabbar_user_no.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tabbar_user_no.png) static const String ASSETS_ICONS_TABBAR_USER_NO_PNG = 'assets/icons/tabbar_user_no.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/test_kingcion.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/test_kingcion.png) static const String ASSETS_ICONS_TEST_KINGCION_PNG = 'assets/icons/test_kingcion.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tool_bmdh.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tool_bmdh.png) static const String ASSETS_ICONS_TOOL_BMDH_PNG = 'assets/icons/tool_bmdh.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tool_bmts.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tool_bmts.png) static const String ASSETS_ICONS_TOOL_BMTS_PNG = 'assets/icons/tool_bmts.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tool_bsbx.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tool_bsbx.png) static const String ASSETS_ICONS_TOOL_BSBX_PNG = 'assets/icons/tool_bsbx.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tool_czxs.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tool_czxs.png) static const String ASSETS_ICONS_TOOL_CZXS_PNG = 'assets/icons/tool_czxs.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tool_facility.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tool_facility.png) static const String ASSETS_ICONS_TOOL_FACILITY_PNG = 'assets/icons/tool_facility.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tool_fkyq.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tool_fkyq.png) static const String ASSETS_ICONS_TOOL_FKYQ_PNG = 'assets/icons/tool_fkyq.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tool_fsxb.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tool_fsxb.png) static const String ASSETS_ICONS_TOOL_FSXB_PNG = 'assets/icons/tool_fsxb.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tool_hdtp.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tool_hdtp.png) static const String ASSETS_ICONS_TOOL_HDTP_PNG = 'assets/icons/tool_hdtp.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tool_jhgl.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tool_jhgl.png) static const String ASSETS_ICONS_TOOL_JHGL_PNG = 'assets/icons/tool_jhgl.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tool_jjsh.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tool_jjsh.png) static const String ASSETS_ICONS_TOOL_JJSH_PNG = 'assets/icons/tool_jjsh.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tool_jyts.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tool_jyts.png) static const String ASSETS_ICONS_TOOL_JYTS_PNG = 'assets/icons/tool_jyts.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tool_kmm.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tool_kmm.png) static const String ASSETS_ICONS_TOOL_KMM_PNG = 'assets/icons/tool_kmm.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tool_mywj.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tool_mywj.png) static const String ASSETS_ICONS_TOOL_MYWJ_PNG = 'assets/icons/tool_mywj.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tool_qbyy.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tool_qbyy.png) static const String ASSETS_ICONS_TOOL_QBYY_PNG = 'assets/icons/tool_qbyy.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tool_shjf.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tool_shjf.png) static const String ASSETS_ICONS_TOOL_SHJF_PNG = 'assets/icons/tool_shjf.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tool_smjd.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tool_smjd.png) static const String ASSETS_ICONS_TOOL_SMJD_PNG = 'assets/icons/tool_smjd.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tool_tsby.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tool_tsby.png) static const String ASSETS_ICONS_TOOL_TSBY_PNG = 'assets/icons/tool_tsby.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tool_wjdc.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tool_wjdc.png) static const String ASSETS_ICONS_TOOL_WJDC_PNG = 'assets/icons/tool_wjdc.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tool_wpcm.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tool_wpcm.png) static const String ASSETS_ICONS_TOOL_WPCM_PNG = 'assets/icons/tool_wpcm.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tool_xxfs.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tool_xxfs.png) static const String ASSETS_ICONS_TOOL_XXFS_PNG = 'assets/icons/tool_xxfs.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tool_yjbj.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tool_yjbj.png) static const String ASSETS_ICONS_TOOL_YJBJ_PNG = 'assets/icons/tool_yjbj.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tool_yjkm.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tool_yjkm.png) static const String ASSETS_ICONS_TOOL_YJKM_PNG = 'assets/icons/tool_yjkm.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tool_yljs.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tool_yljs.png) static const String ASSETS_ICONS_TOOL_YLJS_PNG = 'assets/icons/tool_yljs.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tool_ywh.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tool_ywh.png) static const String ASSETS_ICONS_TOOL_YWH_PNG = 'assets/icons/tool_ywh.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tool_zbbj.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tool_zbbj.png) static const String ASSETS_ICONS_TOOL_ZBBJ_PNG = 'assets/icons/tool_zbbj.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/tool_zxgl.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/tool_zxgl.png) static const String ASSETS_ICONS_TOOL_ZXGL_PNG = 'assets/icons/tool_zxgl.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/user_icon_dfh.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/user_icon_dfh.png) static const String ASSETS_ICONS_USER_ICON_DFH_PNG = 'assets/icons/user_icon_dfh.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/user_icon_dfk.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/user_icon_dfk.png) static const String ASSETS_ICONS_USER_ICON_DFK_PNG = 'assets/icons/user_icon_dfk.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/user_icon_dpj.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/user_icon_dpj.png) static const String ASSETS_ICONS_USER_ICON_DPJ_PNG = 'assets/icons/user_icon_dpj.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/user_icon_dsh.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/user_icon_dsh.png) static const String ASSETS_ICONS_USER_ICON_DSH_PNG = 'assets/icons/user_icon_dsh.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/user_icon_sh.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/user_icon_sh.png) static const String ASSETS_ICONS_USER_ICON_SH_PNG = 'assets/icons/user_icon_sh.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/user_icon_sz.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/user_icon_sz.png) static const String ASSETS_ICONS_USER_ICON_SZ_PNG = 'assets/icons/user_icon_sz.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/user_icon_vip.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/user_icon_vip.png) static const String ASSETS_ICONS_USER_ICON_VIP_PNG = 'assets/icons/user_icon_vip.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/user_icon_wdbx.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/user_icon_wdbx.png) static const String ASSETS_ICONS_USER_ICON_WDBX_PNG = 'assets/icons/user_icon_wdbx.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/user_icon_wdc.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/user_icon_wdc.png) static const String ASSETS_ICONS_USER_ICON_WDC_PNG = 'assets/icons/user_icon_wdc.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/user_icon_wdcw.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/user_icon_wdcw.png) static const String ASSETS_ICONS_USER_ICON_WDCW_PNG = 'assets/icons/user_icon_wdcw.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/user_icon_wddz.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/user_icon_wddz.png) static const String ASSETS_ICONS_USER_ICON_WDDZ_PNG = 'assets/icons/user_icon_wddz.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/user_icon_wdfk.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/user_icon_wdfk.png) static const String ASSETS_ICONS_USER_ICON_WDFK_PNG = 'assets/icons/user_icon_wdfk.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/user_icon_wdfw.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/user_icon_wdfw.png) static const String ASSETS_ICONS_USER_ICON_WDFW_PNG = 'assets/icons/user_icon_wdfw.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/user_icon_wdgj.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/user_icon_wdgj.png) static const String ASSETS_ICONS_USER_ICON_WDGJ_PNG = 'assets/icons/user_icon_wdgj.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/user_icon_wdjf.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/user_icon_wdjf.png) static const String ASSETS_ICONS_USER_ICON_WDJF_PNG = 'assets/icons/user_icon_wdjf.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/user_icon_wdsqhd.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/user_icon_wdsqhd.png) static const String ASSETS_ICONS_USER_ICON_WDSQHD_PNG = 'assets/icons/user_icon_wdsqhd.png'; - /// ![preview](file:///Users/datang/aku_community/assets/icons/xianshi.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/icons/xianshi.png) static const String ASSETS_ICONS_XIANSHI_PNG = 'assets/icons/xianshi.png'; - /// ![preview](file:///Users/datang/aku_community/assets/images/application.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/images/application.png) static const String ASSETS_IMAGES_APPLICATION_PNG = 'assets/images/application.png'; - /// ![preview](file:///Users/datang/aku_community/assets/images/car_header.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/images/car_header.png) static const String ASSETS_IMAGES_CAR_HEADER_PNG = 'assets/images/car_header.png'; - /// ![preview](file:///Users/datang/aku_community/assets/images/card_blue.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/images/card_blue.png) static const String ASSETS_IMAGES_CARD_BLUE_PNG = 'assets/images/card_blue.png'; - /// ![preview](file:///Users/datang/aku_community/assets/images/card_pink.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/images/card_pink.png) static const String ASSETS_IMAGES_CARD_PINK_PNG = 'assets/images/card_pink.png'; - /// ![preview](file:///Users/datang/aku_community/assets/images/card_yellow.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/images/card_yellow.png) static const String ASSETS_IMAGES_CARD_YELLOW_PNG = 'assets/images/card_yellow.png'; - /// ![preview](file:///Users/datang/aku_community/assets/images/circle_left_bottom.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/images/circle_left_bottom.png) static const String ASSETS_IMAGES_CIRCLE_LEFT_BOTTOM_PNG = 'assets/images/circle_left_bottom.png'; - /// ![preview](file:///Users/datang/aku_community/assets/images/circle_right_bottom.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/images/circle_right_bottom.png) static const String ASSETS_IMAGES_CIRCLE_RIGHT_BOTTOM_PNG = 'assets/images/circle_right_bottom.png'; - /// ![preview](file:///Users/datang/aku_community/assets/images/circle_right_top.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/images/circle_right_top.png) static const String ASSETS_IMAGES_CIRCLE_RIGHT_TOP_PNG = 'assets/images/circle_right_top.png'; - /// ![preview](file:///Users/datang/aku_community/assets/images/circle_text.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/images/circle_text.png) static const String ASSETS_IMAGES_CIRCLE_TEXT_PNG = 'assets/images/circle_text.png'; - /// ![preview](file:///Users/datang/aku_community/assets/images/code_logo.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/images/code_logo.png) static const String ASSETS_IMAGES_CODE_LOGO_PNG = 'assets/images/code_logo.png'; - /// ![preview](file:///Users/datang/aku_community/assets/images/commitment.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/images/commitment.png) static const String ASSETS_IMAGES_COMMITMENT_PNG = 'assets/images/commitment.png'; - /// ![preview](file:///Users/datang/aku_community/assets/images/contact_manager.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/images/contact_manager.png) static const String ASSETS_IMAGES_CONTACT_MANAGER_PNG = 'assets/images/contact_manager.png'; - /// ![preview](file:///Users/datang/aku_community/assets/images/drawings.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/images/drawings.png) static const String ASSETS_IMAGES_DRAWINGS_PNG = 'assets/images/drawings.png'; - /// ![preview](file:///Users/datang/aku_community/assets/images/house_attestation.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/images/house_attestation.png) static const String ASSETS_IMAGES_HOUSE_ATTESTATION_PNG = 'assets/images/house_attestation.png'; - /// ![preview](file:///Users/datang/aku_community/assets/images/house_header.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/images/house_header.png) static const String ASSETS_IMAGES_HOUSE_HEADER_PNG = 'assets/images/house_header.png'; - /// ![preview](file:///Users/datang/aku_community/assets/images/license.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/images/license.png) static const String ASSETS_IMAGES_LICENSE_PNG = 'assets/images/license.png'; - /// ![preview](file:///Users/datang/aku_community/assets/images/license_back.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/images/license_back.png) static const String ASSETS_IMAGES_LICENSE_BACK_PNG = 'assets/images/license_back.png'; - /// ![preview](file:///Users/datang/aku_community/assets/images/lock.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/images/lock.png) static const String ASSETS_IMAGES_LOCK_PNG = 'assets/images/lock.png'; - /// ![preview](file:///Users/datang/aku_community/assets/images/logo.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/images/logo.png) static const String ASSETS_IMAGES_LOGO_PNG = 'assets/images/logo.png'; - /// ![preview](file:///Users/datang/aku_community/assets/images/member_bg.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/images/member_bg.png) static const String ASSETS_IMAGES_MEMBER_BG_PNG = 'assets/images/member_bg.png'; - /// ![preview](file:///Users/datang/aku_community/assets/images/mine_bg.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/images/mine_bg.png) static const String ASSETS_IMAGES_MINE_BG_PNG = 'assets/images/mine_bg.png'; - /// ![preview](file:///Users/datang/aku_community/assets/images/my_bg.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/images/my_bg.png) static const String ASSETS_IMAGES_MY_BG_PNG = 'assets/images/my_bg.png'; - /// ![preview](file:///Users/datang/aku_community/assets/images/notice.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/images/notice.png) static const String ASSETS_IMAGES_NOTICE_PNG = 'assets/images/notice.png'; - /// ![preview](file:///Users/datang/aku_community/assets/images/open_door.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/images/open_door.png) static const String ASSETS_IMAGES_OPEN_DOOR_PNG = 'assets/images/open_door.png'; - /// ![preview](file:///Users/datang/aku_community/assets/images/phone_logo.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/images/phone_logo.png) static const String ASSETS_IMAGES_PHONE_LOGO_PNG = 'assets/images/phone_logo.png'; - /// ![preview](file:///Users/datang/aku_community/assets/images/placeholder.webp) + /// ![preview](file:///Users/datang/aku_new_community/assets/images/placeholder.webp) static const String ASSETS_IMAGES_PLACEHOLDER_WEBP = 'assets/images/placeholder.webp'; - /// ![preview](file:///Users/datang/aku_community/assets/images/property_bg.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/images/property_bg.png) static const String ASSETS_IMAGES_PROPERTY_BG_PNG = 'assets/images/property_bg.png'; - /// ![preview](file:///Users/datang/aku_community/assets/images/shop_car_empty.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/images/shop_car_empty.png) static const String ASSETS_IMAGES_SHOP_CAR_EMPTY_PNG = 'assets/images/shop_car_empty.png'; - /// ![preview](file:///Users/datang/aku_community/assets/images/splash_logo.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/images/splash_logo.png) static const String ASSETS_IMAGES_SPLASH_LOGO_PNG = 'assets/images/splash_logo.png'; - /// ![preview](file:///Users/datang/aku_community/assets/images/white.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/images/white.png) static const String ASSETS_IMAGES_WHITE_PNG = 'assets/images/white.png'; - /// ![preview](file:///Users/datang/aku_community/assets/images/wxpay.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/images/wxpay.png) static const String ASSETS_IMAGES_WXPAY_PNG = 'assets/images/wxpay.png'; - /// ![preview](file:///Users/datang/aku_community/assets/json/province.json) + /// ![preview](file:///Users/datang/aku_new_community/assets/json/province.json) static const String ASSETS_JSON_PROVINCE_JSON = 'assets/json/province.json'; - /// ![preview](file:///Users/datang/aku_community/assets/static/car_card_grey.webp) + /// ![preview](file:///Users/datang/aku_new_community/assets/static/car_card_grey.webp) static const String ASSETS_STATIC_CAR_CARD_GREY_WEBP = 'assets/static/car_card_grey.webp'; - /// ![preview](file:///Users/datang/aku_community/assets/static/car_card_yellow.webp) + /// ![preview](file:///Users/datang/aku_new_community/assets/static/car_card_yellow.webp) static const String ASSETS_STATIC_CAR_CARD_YELLOW_WEBP = 'assets/static/car_card_yellow.webp'; - /// ![preview](file:///Users/datang/aku_community/assets/static/car_park_empty.webp) + /// ![preview](file:///Users/datang/aku_new_community/assets/static/car_park_empty.webp) static const String ASSETS_STATIC_CAR_PARK_EMPTY_WEBP = 'assets/static/car_park_empty.webp'; - /// ![preview](file:///Users/datang/aku_community/assets/static/house_auth_fail.webp) + /// ![preview](file:///Users/datang/aku_new_community/assets/static/house_auth_fail.webp) static const String ASSETS_STATIC_HOUSE_AUTH_FAIL_WEBP = 'assets/static/house_auth_fail.webp'; - /// ![preview](file:///Users/datang/aku_community/assets/static/house_auth_success.webp) + /// ![preview](file:///Users/datang/aku_new_community/assets/static/house_auth_success.webp) static const String ASSETS_STATIC_HOUSE_AUTH_SUCCESS_WEBP = 'assets/static/house_auth_success.webp'; - /// ![preview](file:///Users/datang/aku_community/assets/static/id_card_back.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/static/id_card_back.png) static const String ASSETS_STATIC_ID_CARD_BACK_PNG = 'assets/static/id_card_back.png'; - /// ![preview](file:///Users/datang/aku_community/assets/static/id_card_front.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/static/id_card_front.png) static const String ASSETS_STATIC_ID_CARD_FRONT_PNG = 'assets/static/id_card_front.png'; - /// ![preview](file:///Users/datang/aku_community/assets/static/parking_grey.webp) + /// ![preview](file:///Users/datang/aku_new_community/assets/static/parking_grey.webp) static const String ASSETS_STATIC_PARKING_GREY_WEBP = 'assets/static/parking_grey.webp'; - /// ![preview](file:///Users/datang/aku_community/assets/static/parking_yellow.webp) + /// ![preview](file:///Users/datang/aku_new_community/assets/static/parking_yellow.webp) static const String ASSETS_STATIC_PARKING_YELLOW_WEBP = 'assets/static/parking_yellow.webp'; - /// ![preview](file:///Users/datang/aku_community/assets/static/review_fail.webp) + /// ![preview](file:///Users/datang/aku_new_community/assets/static/review_fail.webp) static const String ASSETS_STATIC_REVIEW_FAIL_WEBP = 'assets/static/review_fail.webp'; - /// ![preview](file:///Users/datang/aku_community/assets/static/reviewing.webp) + /// ![preview](file:///Users/datang/aku_new_community/assets/static/reviewing.webp) static const String ASSETS_STATIC_REVIEWING_WEBP = 'assets/static/reviewing.webp'; - /// ![preview](file:///Users/datang/aku_community/assets/tab/bkjh.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/tab/bkjh.png) static const String ASSETS_TAB_BKJH_PNG = 'assets/tab/bkjh.png'; - /// ![preview](file:///Users/datang/aku_community/assets/tab/kbhw.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/tab/kbhw.png) static const String ASSETS_TAB_KBHW_PNG = 'assets/tab/kbhw.png'; - /// ![preview](file:///Users/datang/aku_community/assets/tab/nanz.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/tab/nanz.png) static const String ASSETS_TAB_NANZ_PNG = 'assets/tab/nanz.png'; - /// ![preview](file:///Users/datang/aku_community/assets/tab/nvz.png) + /// ![preview](file:///Users/datang/aku_new_community/assets/tab/nvz.png) static const String ASSETS_TAB_NVZ_PNG = 'assets/tab/nvz.png'; } diff --git a/lib/constants/api.dart b/lib/constants/api.dart index 1cb6b619..b9a1034f 100644 --- a/lib/constants/api.dart +++ b/lib/constants/api.dart @@ -26,7 +26,6 @@ class API { static _House house = _House(); } - class _Login { /// 获取手机验证码 String get sendSMSCode => '/login/sendMMSLogin'; @@ -115,11 +114,11 @@ class _User { String get insertAddress => '/user/jcookAddress/insert'; ///设置默认收货地址 - String get settingDefaultAddress => '/user/jcookAddress/settingDefaultAddress'; + String get settingDefaultAddress => + '/user/jcookAddress/settingDefaultAddress'; ///查询所有城市的信息 需要10秒 首次打开APP时加载调用,保存到本地 String get findAllCityInfo => '/user/jcookAddress/findAllCityInfo'; - } class _News { @@ -345,9 +344,7 @@ class _Manager { String get surroundingEnterprises => '/user/surroundingEnterprises/list'; ///生活缴费:查询未缴金额(日常缴费+公摊费) - String get findUnpaidAmount => - '/user/dailyPayment/findUnpaidAmount'; - + String get findUnpaidAmount => '/user/dailyPayment/findUnpaidAmount'; } class _Community { @@ -417,9 +414,6 @@ class _Community { ///查询当前话题下,所有的主题信息 String get listByGambitId => '/user/gambit/listByGambitId'; - - - } class _Market { @@ -526,8 +520,6 @@ class _Market { ///jcook商城 查询所有的可显示的分类信息 需要4秒 进入商场页面的时候加载 String get findAllCategoryInfo => '/user/jcookGoods/findAllCategoryInfo'; - - ///jcook商城(购物车):更改购物车商品数量 String get shopCarChangeNum => '/user/jcookShoppingCat/updateShoppingCartNum'; @@ -551,9 +543,6 @@ class _Market { ///jcook商城 查询轮播图信息集合 String get findRotationList => '/user/jcookGoods/findRotationList'; - - - } class _Upload { @@ -703,14 +692,10 @@ class _Pay { '/user/alipay/meterReadingShareDetailsOrderCheckAlipay'; ///app jcook商品创建订单(生成APP支付订单消息) - String get jcookOrderCreateOrder => - '/user/alipay/jcookOrderCreateOrder'; + String get jcookOrderCreateOrder => '/user/alipay/jcookOrderCreateOrder'; ///支付宝支付:jcook商品 向支付宝发起订单查询请求 - String get jcookOrderCheckAlipay => - '/user/alipay/jcookOrderCheckAlipay'; - - + String get jcookOrderCheckAlipay => '/user/alipay/jcookOrderCheckAlipay'; } class _House { diff --git a/lib/constants/app_theme.dart b/lib/constants/app_theme.dart index 3f39232a..2771dda3 100644 --- a/lib/constants/app_theme.dart +++ b/lib/constants/app_theme.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; class AppTheme { diff --git a/lib/constants/application_objects.dart b/lib/constants/application_objects.dart index 4b588991..6fc1afcb 100644 --- a/lib/constants/application_objects.dart +++ b/lib/constants/application_objects.dart @@ -1,35 +1,35 @@ -// import 'package:aku_community/widget/bee_scaffold.dart'; - -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/pages/community_introduce/community_introduce_page.dart'; -import 'package:aku_community/pages/convenient_phone/convenient_phone_page.dart'; -import 'package:aku_community/pages/electronic_commerc/electronic_commerc_page.dart'; -import 'package:aku_community/pages/event_activity/event_voting_page.dart'; -import 'package:aku_community/pages/express_packages/express_package_page.dart'; -import 'package:aku_community/pages/geographic_information/geographic_information_page.dart'; -import 'package:aku_community/pages/goods_deto_page/goods_deto_page.dart'; -import 'package:aku_community/pages/goods_manage_page/select_borrow_return_page.dart'; -import 'package:aku_community/pages/house_introduce/house_introduce.dart'; -import 'package:aku_community/pages/industry_committee/industry_committee_page.dart'; -import 'package:aku_community/pages/life_pay/life_pay_choose_page.dart'; -import 'package:aku_community/pages/one_alarm/widget/alarm_page.dart'; -import 'package:aku_community/pages/opening_code_page/opening_code_page.dart'; -import 'package:aku_community/pages/renovation_manage/new_renovation/new_renovation_page.dart'; -import 'package:aku_community/pages/service_browse/service_browse_page.dart'; -import 'package:aku_community/pages/setting_page/settings_page.dart'; -import 'package:aku_community/pages/surrounding_enterprises/Surrounding_enterprises_page.dart'; -import 'package:aku_community/pages/things_page/fixed_submit_page.dart'; -import 'package:aku_community/pages/visitor_access_page/visitor_access_page.dart'; -import 'package:aku_community/ui/community/activity/activity_list_page.dart'; -import 'package:aku_community/ui/community/facility/facility_appointment_page.dart'; -import 'package:aku_community/ui/home/application/all_application.dart'; -import 'package:aku_community/ui/manager/advice/advice_page.dart'; -import 'package:aku_community/ui/manager/house_keeping/house_keeping_page.dart'; -import 'package:aku_community/ui/manager/questionnaire/questionnaire_page.dart'; -import 'package:aku_community/ui/profile/car/car_manage_page.dart'; -import 'package:aku_community/ui/profile/car_parking/car_parking_page.dart'; -import 'package:aku_community/ui/profile/house/house_owners_page.dart'; -import 'package:aku_community/widget/others/user_tool.dart'; +// import 'package:aku_new_community/widget/bee_scaffold.dart'; + +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/pages/community_introduce/community_introduce_page.dart'; +import 'package:aku_new_community/pages/convenient_phone/convenient_phone_page.dart'; +import 'package:aku_new_community/pages/electronic_commerc/electronic_commerc_page.dart'; +import 'package:aku_new_community/pages/event_activity/event_voting_page.dart'; +import 'package:aku_new_community/pages/express_packages/express_package_page.dart'; +import 'package:aku_new_community/pages/geographic_information/geographic_information_page.dart'; +import 'package:aku_new_community/pages/goods_deto_page/goods_deto_page.dart'; +import 'package:aku_new_community/pages/goods_manage_page/select_borrow_return_page.dart'; +import 'package:aku_new_community/pages/house_introduce/house_introduce.dart'; +import 'package:aku_new_community/pages/industry_committee/industry_committee_page.dart'; +import 'package:aku_new_community/pages/life_pay/life_pay_choose_page.dart'; +import 'package:aku_new_community/pages/one_alarm/widget/alarm_page.dart'; +import 'package:aku_new_community/pages/opening_code_page/opening_code_page.dart'; +import 'package:aku_new_community/pages/renovation_manage/new_renovation/new_renovation_page.dart'; +import 'package:aku_new_community/pages/service_browse/service_browse_page.dart'; +import 'package:aku_new_community/pages/setting_page/settings_page.dart'; +import 'package:aku_new_community/pages/surrounding_enterprises/Surrounding_enterprises_page.dart'; +import 'package:aku_new_community/pages/things_page/fixed_submit_page.dart'; +import 'package:aku_new_community/pages/visitor_access_page/visitor_access_page.dart'; +import 'package:aku_new_community/ui/community/activity/activity_list_page.dart'; +import 'package:aku_new_community/ui/community/facility/facility_appointment_page.dart'; +import 'package:aku_new_community/ui/home/application/all_application.dart'; +import 'package:aku_new_community/ui/manager/advice/advice_page.dart'; +import 'package:aku_new_community/ui/manager/house_keeping/house_keeping_page.dart'; +import 'package:aku_new_community/ui/manager/questionnaire/questionnaire_page.dart'; +import 'package:aku_new_community/ui/profile/car/car_manage_page.dart'; +import 'package:aku_new_community/ui/profile/car_parking/car_parking_page.dart'; +import 'package:aku_new_community/ui/profile/house/house_owners_page.dart'; +import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:flutter/material.dart'; ///应用对象 @@ -71,15 +71,13 @@ List appObjects = [ // if (false) AO('一键开门', R.ASSETS_APPLICATIONS_OEPN_DOOR_PNG, () => Scaffold()), AO('开门码', R.ASSETS_ICONS_FUNC_KMM_PNG, () => OpeningCodePage()), - AO('访客邀请', R.ASSETS_ICONS_FUNC_FKYQ_PNG, - () => VisitorAccessPage()), + AO('访客邀请', R.ASSETS_ICONS_FUNC_FKYQ_PNG, () => VisitorAccessPage()), AO('报事报修', R.ASSETS_ICONS_FUNC_BSBX_PNG, () => FixedSubmitPage()), AO('生活缴费', R.ASSETS_ICONS_FUNC_SHJF_PNG, () => LifePayChoosePage()), AO('业委会', R.ASSETS_ICONS_FUNC_YWH_PNG, () => IndustryCommitteePage()), AO('建议咨询', R.ASSETS_ICONS_FUNC_JYZX_PNG, () => AdvicePage(type: AdviceType.SUGGESTION)), - AO('便民电话', R.ASSETS_ICONS_FUNC_BMDH_PNG, - () => ConvenientPhonePage()), + AO('便民电话', R.ASSETS_ICONS_FUNC_BMDH_PNG, () => ConvenientPhonePage()), AO('活动投票', R.ASSETS_ICONS_FUNC_HDTP_PNG, () => EventVotingPage()), AO('物品出门', R.ASSETS_ICONS_FUNC_WPCH_PNG, () => GoodsDetoPage()), AO('投诉表扬', R.ASSETS_ICONS_FUNC_TSBY_PNG, @@ -187,8 +185,6 @@ List _smartManagerApp = [ '周边企业', '住房说明' - - // '小区教育', // '健康运动', // '家政服务', @@ -210,11 +206,7 @@ List _getOutApp = [ ]; ///出行安全 -List get getOutApp => - _getOutApp.map((e) => AO.fromRaw(e)).toList(); - - - +List get getOutApp => _getOutApp.map((e) => AO.fromRaw(e)).toList(); ///物业服务 List _propertyServicesApp = [ @@ -229,7 +221,6 @@ List _propertyServicesApp = [ List get propertyServicesApp => _propertyServicesApp.map((e) => AO.fromRaw(e)).toList(); - ///居民生活 List _residentLifeApp = [ '便民电话', @@ -251,8 +242,6 @@ List get residentLifeApp => ///About community List _aboutCommunityApp = [ - - '服务浏览', '社区介绍', // '地理信息', @@ -263,4 +252,4 @@ List _aboutCommunityApp = [ ///智慧管家 List get aboutCommunityApp => - _aboutCommunityApp.map((e) => AO.fromRaw(e)).toList(); \ No newline at end of file + _aboutCommunityApp.map((e) => AO.fromRaw(e)).toList(); diff --git a/lib/extensions/num_ext.dart b/lib/extensions/num_ext.dart index f24888e9..aa6d5bad 100644 --- a/lib/extensions/num_ext.dart +++ b/lib/extensions/num_ext.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; extension NumExt on num { Widget get wb => SizedBox(width: this.w); + Widget get hb => SizedBox(height: this.w); } diff --git a/lib/l10n/app_zh.arb b/lib/l10n/app_zh.arb index 0b9e751d..dc4ada6b 100644 --- a/lib/l10n/app_zh.arb +++ b/lib/l10n/app_zh.arb @@ -1,10 +1,10 @@ { - "appName": "智慧小区", - "@appName":{ - "description": "应用名称" - }, - "tempPlotName": "人才公寓智慧小区", - "@tempPlotName":{ - "description": "临时使用的小区名称" - } + "appName": "智慧小区", + "@appName": { + "description": "应用名称" + }, + "tempPlotName": "人才公寓智慧小区", + "@tempPlotName": { + "description": "临时使用的小区名称" + } } \ No newline at end of file diff --git a/lib/main.dart b/lib/main.dart index a4e36ff2..5aaf4efb 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,19 +1,17 @@ -import 'package:aku_community/constants/app_theme.dart'; -import 'package:aku_community/main_initialize.dart'; -import 'package:aku_community/pages/splash/splash_page.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/provider/sign_up_provider.dart'; -import 'package:aku_community/provider/user_provider.dart'; -import 'package:aku_community/utils/developer_util.dart'; -import 'package:aku_community/utils/headers.dart'; +import 'package:aku_new_community/constants/app_theme.dart'; +import 'package:aku_new_community/main_initialize.dart'; +import 'package:aku_new_community/pages/splash/splash_page.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/provider/sign_up_provider.dart'; +import 'package:aku_new_community/provider/user_provider.dart'; +import 'package:aku_new_community/utils/developer_util.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; -import 'package:jpush_flutter/jpush_flutter.dart'; -import 'package:power_logger/power_logger.dart'; import 'package:provider/provider.dart'; void main() async { @@ -78,7 +76,7 @@ class _MyAppState extends State { return MediaQuery( //设置文字大小不随系统设置改变 data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0), - child: BotToastInit().call(context,child), + child: BotToastInit().call(context, child), ); }, navigatorObservers: [BotToastNavigatorObserver()], diff --git a/lib/main_initialize.dart b/lib/main_initialize.dart index 065f6768..550b5707 100644 --- a/lib/main_initialize.dart +++ b/lib/main_initialize.dart @@ -1,16 +1,12 @@ import 'dart:io'; -import 'package:aku_community/constants/app_theme.dart'; -import 'package:aku_community/constants/config.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/utils/message_parser.dart'; -import 'package:aku_community/utils/websocket/fire_dialog.dart'; -import 'package:aku_community/utils/websocket/web_socket_util.dart'; -// import 'package:firebase_core/firebase_core.dart'; -// import 'package:firebase_crashlytics/firebase_crashlytics.dart'; -import 'package:flutter/cupertino.dart'; +import 'package:aku_new_community/constants/app_theme.dart'; +import 'package:aku_new_community/constants/config.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/utils/message_parser.dart'; +import 'package:aku_new_community/utils/websocket/fire_dialog.dart'; +import 'package:aku_new_community/utils/websocket/web_socket_util.dart'; import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:fluwx/fluwx.dart'; import 'package:get/get.dart'; @@ -19,7 +15,6 @@ import 'package:power_logger/power_logger.dart'; import 'package:provider/provider.dart'; class MainInitialize { - ///初始化firebase // static Future initFirebase() async { // await Firebase.initializeApp(); @@ -53,27 +48,21 @@ class MainInitialize { // } try { - jpush.addEventHandler( - onReceiveNotification: (message) async { + jpush.addEventHandler(onReceiveNotification: (message) async { LoggerData.addData(message, tag: 'onReceiveNotification'); await MessageParser(message).shot(); final appProvider = Provider.of(Get.context!, listen: false); appProvider.getMessageCenter(); - }, - onOpenNotification: (Map? message) async { + }, onOpenNotification: (Map? message) async { LoggerData.addData(message, tag: 'onOpenNotification'); - }, - onReceiveMessage: (Map? message) async { + }, onReceiveMessage: (Map? message) async { LoggerData.addData(message, tag: 'onReceiveMessage'); }, onReceiveNotificationAuthorization: - (Map message) async { - print("flutter onReceiveNotificationAuthorization: $message"); - } - ); - } on PlatformException { - - } + (Map message) async { + print("flutter onReceiveNotificationAuthorization: $message"); + }); + } on PlatformException {} jpush.setup( appKey: "00e20fef79ee804d5c9abb54", channel: "developer-default", @@ -87,7 +76,6 @@ class MainInitialize { rID = rid; LoggerData.addData(rID, tag: 'RegistrationID'); }); - } static initWechat() { diff --git a/lib/model/common/img_model.dart b/lib/model/common/img_model.dart index c3f8d08b..244dc116 100644 --- a/lib/model/common/img_model.dart +++ b/lib/model/common/img_model.dart @@ -4,6 +4,7 @@ class ImgModel { double? longs; double? paragraph; int? sort; + double get aspect => paragraph! / longs!; ImgModel({this.url, this.size, this.longs, this.paragraph, this.sort}); diff --git a/lib/model/community/activity_detail_model.dart b/lib/model/community/activity_detail_model.dart index c803ff93..00773439 100644 --- a/lib/model/community/activity_detail_model.dart +++ b/lib/model/community/activity_detail_model.dart @@ -1,7 +1,6 @@ +import 'package:aku_new_community/model/common/img_model.dart'; import 'package:flustars/flustars.dart'; -import 'package:aku_community/model/common/img_model.dart'; - class ActivityDetailModel { int? id; String? title; @@ -15,7 +14,9 @@ class ActivityDetailModel { List? headImgURls; DateTime? get startDate => DateUtil.getDateTime(activityStartTime!); + DateTime? get endDate => DateUtil.getDateTime(activityEndTime!); + DateTime? get registEndDate => DateUtil.getDateTime(registrationEndTime!); ActivityDetailModel( diff --git a/lib/model/community/activity_item_model.dart b/lib/model/community/activity_item_model.dart index 4ec82d3d..88dd52dd 100644 --- a/lib/model/community/activity_item_model.dart +++ b/lib/model/community/activity_item_model.dart @@ -1,9 +1,7 @@ -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; import 'package:flustars/flustars.dart'; - -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/model/common/img_model.dart'; +import 'package:flutter/material.dart'; class ActivityItemModel { int? id; @@ -16,6 +14,7 @@ class ActivityItemModel { List? headImgURls; DateTime? get begin => DateUtil.getDateTime(registrationStartTime!); + DateTime? get end => DateUtil.getDateTime(registrationEndTime!); ActivityItemModel( diff --git a/lib/model/community/activity_people_model.dart b/lib/model/community/activity_people_model.dart index 63fa1b4f..0e01f82f 100644 --- a/lib/model/community/activity_people_model.dart +++ b/lib/model/community/activity_people_model.dart @@ -1,4 +1,4 @@ -import 'package:aku_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; class ActivityPeopleModel { int? id; diff --git a/lib/model/community/board_detail_model.dart b/lib/model/community/board_detail_model.dart index 809e2e19..1fba6815 100644 --- a/lib/model/community/board_detail_model.dart +++ b/lib/model/community/board_detail_model.dart @@ -1,4 +1,4 @@ -import 'package:aku_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; class BoardDetailModel { int? id; diff --git a/lib/model/community/board_model.dart b/lib/model/community/board_model.dart index eff340f6..3f60a779 100644 --- a/lib/model/community/board_model.dart +++ b/lib/model/community/board_model.dart @@ -1,7 +1,6 @@ +import 'package:aku_new_community/model/common/img_model.dart'; import 'package:flustars/flustars.dart'; -import 'package:aku_community/model/common/img_model.dart'; - class BoardItemModel { int? id; String? title; diff --git a/lib/model/community/community_topic_model.dart b/lib/model/community/community_topic_model.dart index 61678608..622ae145 100644 --- a/lib/model/community/community_topic_model.dart +++ b/lib/model/community/community_topic_model.dart @@ -1,4 +1,4 @@ -import 'package:aku_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; class CommunityTopicModel { int? id; diff --git a/lib/model/community/event_item_model.dart b/lib/model/community/event_item_model.dart index d68c9f50..993c6fa0 100644 --- a/lib/model/community/event_item_model.dart +++ b/lib/model/community/event_item_model.dart @@ -1,7 +1,6 @@ +import 'package:aku_new_community/model/common/img_model.dart'; import 'package:flustars/flustars.dart'; -import 'package:aku_community/model/common/img_model.dart'; - class EventItemModel { int? id; int? createId; @@ -15,7 +14,9 @@ class EventItemModel { List? imgUrls; List? headSculptureImgUrl; List? gambitThemeCommentVoList; + DateTime? get date => DateUtil.getDateTime(createDate!); + EventItemModel( {this.id, this.createId, diff --git a/lib/model/community/hot_news_model.dart b/lib/model/community/hot_news_model.dart index 22479896..d8d0584e 100644 --- a/lib/model/community/hot_news_model.dart +++ b/lib/model/community/hot_news_model.dart @@ -1,4 +1,4 @@ -import 'package:aku_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; class HotNewsModel { int? id; @@ -35,4 +35,4 @@ class HotNewsModel { } return data; } -} \ No newline at end of file +} diff --git a/lib/model/community/my_event_item_model.dart b/lib/model/community/my_event_item_model.dart index b51858d7..adb3d6ec 100644 --- a/lib/model/community/my_event_item_model.dart +++ b/lib/model/community/my_event_item_model.dart @@ -1,7 +1,6 @@ +import 'package:aku_new_community/model/common/img_model.dart'; import 'package:flustars/flustars.dart'; -import 'package:aku_community/model/common/img_model.dart'; - class MyEventItemModel { int? id; String? content; diff --git a/lib/model/community/swiper_model.dart b/lib/model/community/swiper_model.dart index 3d911d17..3e8ddd5f 100644 --- a/lib/model/community/swiper_model.dart +++ b/lib/model/community/swiper_model.dart @@ -1,4 +1,4 @@ -import 'package:aku_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; class SwiperModel { int? newsId; @@ -25,8 +25,9 @@ class SwiperModel { data['newsId'] = this.newsId; data['title'] = this.title; if (this.voResourcesImgList != null) { - data['voResourcesImgList'] = this.voResourcesImgList!.map((v) => v.toJson()).toList(); + data['voResourcesImgList'] = + this.voResourcesImgList!.map((v) => v.toJson()).toList(); } return data; } -} \ No newline at end of file +} diff --git a/lib/model/good/category_model.dart b/lib/model/good/category_model.dart index 83d73823..06db8e4f 100644 --- a/lib/model/good/category_model.dart +++ b/lib/model/good/category_model.dart @@ -4,19 +4,19 @@ class CategoryModel { List? imgUrls; List? categoryList; - CategoryModel({this.id, this.name, this.categoryList,this.imgUrls}); + CategoryModel({this.id, this.name, this.categoryList, this.imgUrls}); CategoryModel.fromJson(Map json) { id = json['id']; name = json['name']; if (json['imgUrls'] != null) { - imgUrls = []; + imgUrls = []; json['imgUrls'].forEach((v) { imgUrls!.add(v.toString()); }); } if (json['categoryList'] != null) { - categoryList = []; + categoryList = []; json['categoryList'].forEach((v) { categoryList!.add(new CategoryList.fromJson(v)); }); @@ -55,7 +55,7 @@ class CategoryList { }); } if (json['imgUrls'] != null) { - imgUrls = []; + imgUrls = []; json['imgUrls'].forEach((v) { imgUrls!.add(v.toString()); }); @@ -82,18 +82,20 @@ class CategoryListSecond { String? name; List? imgUrls; - CategoryListSecond({this.id, this.name,}); + CategoryListSecond({ + this.id, + this.name, + }); CategoryListSecond.fromJson(Map json) { id = json['id']; name = json['name']; if (json['imgUrls'] != null) { - imgUrls = []; + imgUrls = []; json['imgUrls'].forEach((v) { imgUrls!.add(v.toString()); }); } - } Map toJson() { @@ -105,4 +107,4 @@ class CategoryListSecond { } return data; } -} \ No newline at end of file +} diff --git a/lib/model/good/good_detail_model.dart b/lib/model/good/good_detail_model.dart index 596ebd0d..59a0e8da 100644 --- a/lib/model/good/good_detail_model.dart +++ b/lib/model/good/good_detail_model.dart @@ -1,4 +1,4 @@ -import 'package:aku_community/ui/market/shop_car/shop_car_func.dart'; +import 'package:aku_new_community/ui/market/shop_car/shop_car_func.dart'; class GoodDetailModel { int? id; @@ -18,33 +18,46 @@ class GoodDetailModel { String? unit; double? weight; - factory GoodDetailModel.fail() => GoodDetailModel(goodsDetailImageVos: [],sellPrice: 0,discountPrice: 0,skuName: '', - sellNum: 0,kind: 0,defaultLocation: '',defaultAddressDetail: '',stockStatus: 0,goodsDetailSpecificationVoList: [],isCollection: 0,unit:'',weight: 0 - ); - GoodStatus get goodStatus => ShopCarFunc.getGoodsStatus(status??1, shopStatus??1); + factory GoodDetailModel.fail() => GoodDetailModel( + goodsDetailImageVos: [], + sellPrice: 0, + discountPrice: 0, + skuName: '', + sellNum: 0, + kind: 0, + defaultLocation: '', + defaultAddressDetail: '', + stockStatus: 0, + goodsDetailSpecificationVoList: [], + isCollection: 0, + unit: '', + weight: 0); + + GoodStatus get goodStatus => + ShopCarFunc.getGoodsStatus(status ?? 1, shopStatus ?? 1); GoodDetailModel( {this.id, - this.goodsDetailImageVos, - this.sellPrice, - this.discountPrice, - this.skuName, - this.status, - this.shopStatus, - this.sellNum, - this.kind, - this.defaultLocation, - this.defaultAddressDetail, - this.stockStatus, - this.goodsDetailSpecificationVoList, - this.isCollection, - this.unit, - this.weight}); + this.goodsDetailImageVos, + this.sellPrice, + this.discountPrice, + this.skuName, + this.status, + this.shopStatus, + this.sellNum, + this.kind, + this.defaultLocation, + this.defaultAddressDetail, + this.stockStatus, + this.goodsDetailSpecificationVoList, + this.isCollection, + this.unit, + this.weight}); GoodDetailModel.fromJson(Map json) { id = json['id']; if (json['goodsDetailImageVos'] != null) { - goodsDetailImageVos =[]; + goodsDetailImageVos = []; json['goodsDetailImageVos'].forEach((v) { goodsDetailImageVos!.add(new GoodsDetailImageVos.fromJson(v)); }); @@ -60,8 +73,7 @@ class GoodDetailModel { defaultAddressDetail = json['defaultAddressDetail']; stockStatus = json['stockStatus']; if (json['goodsDetailSpecificationVoList'] != null) { - goodsDetailSpecificationVoList = - []; + goodsDetailSpecificationVoList = []; json['goodsDetailSpecificationVoList'].forEach((v) { goodsDetailSpecificationVoList! .add(new GoodsDetailSpecificationVoList.fromJson(v)); @@ -172,4 +184,4 @@ class Attribute { data['value'] = this.value; return data; } -} \ No newline at end of file +} diff --git a/lib/model/good/market_swiper_model.dart b/lib/model/good/market_swiper_model.dart index 08b3afa8..6591c05f 100644 --- a/lib/model/good/market_swiper_model.dart +++ b/lib/model/good/market_swiper_model.dart @@ -56,4 +56,4 @@ class ImgList { data['sort'] = this.sort; return data; } -} \ No newline at end of file +} diff --git a/lib/model/manager/advice_detail_model.dart b/lib/model/manager/advice_detail_model.dart index 796f592d..07751543 100644 --- a/lib/model/manager/advice_detail_model.dart +++ b/lib/model/manager/advice_detail_model.dart @@ -1,7 +1,6 @@ +import 'package:aku_new_community/model/common/img_model.dart'; import 'package:flustars/flustars.dart'; -import 'package:aku_community/model/common/img_model.dart'; - class AdviceDetailModel { AppAdviceDetailVo? appAdviceDetailVo; diff --git a/lib/model/manager/article_borrow_detail_model.dart b/lib/model/manager/article_borrow_detail_model.dart index 1601e44d..609c74ed 100644 --- a/lib/model/manager/article_borrow_detail_model.dart +++ b/lib/model/manager/article_borrow_detail_model.dart @@ -1,4 +1,4 @@ -import 'package:aku_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; class ArticleBorrowDetailModel { int? id; @@ -6,6 +6,7 @@ class ArticleBorrowDetailModel { String? code; int? status; List? imgList; + String get borrowStatus { switch (this.status) { case 1: diff --git a/lib/model/manager/article_borrow_model.dart b/lib/model/manager/article_borrow_model.dart index 6a546bcb..3597320c 100644 --- a/lib/model/manager/article_borrow_model.dart +++ b/lib/model/manager/article_borrow_model.dart @@ -1,4 +1,4 @@ -import 'package:aku_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; class ArticleBorrowModel { int? id; diff --git a/lib/model/manager/article_return_list_model.dart b/lib/model/manager/article_return_list_model.dart index 978b2edd..3171f24f 100644 --- a/lib/model/manager/article_return_list_model.dart +++ b/lib/model/manager/article_return_list_model.dart @@ -1,4 +1,4 @@ -import 'package:aku_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; class ArticleReturnListModel { int? id; @@ -7,6 +7,7 @@ class ArticleReturnListModel { String? beginDate; int? borrowTime; List? imgList; + String get paraseBorrowTime { if (this.borrowTime! > 24) { return '${this.borrowTime! ~/ 24}天${this.borrowTime! % 24}小时'; diff --git a/lib/model/manager/article_return_model.dart b/lib/model/manager/article_return_model.dart index e4f8488c..4b77110a 100644 --- a/lib/model/manager/article_return_model.dart +++ b/lib/model/manager/article_return_model.dart @@ -1,4 +1,4 @@ -import 'package:aku_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; class ArticleReturnModel { int? id; diff --git a/lib/model/manager/event_voting_model.dart b/lib/model/manager/event_voting_model.dart index 37be6a42..2ace09cb 100644 --- a/lib/model/manager/event_voting_model.dart +++ b/lib/model/manager/event_voting_model.dart @@ -1,4 +1,4 @@ -import 'package:aku_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; class EventVotingModel { int? id; diff --git a/lib/model/manager/questinnaire_model.dart b/lib/model/manager/questinnaire_model.dart index 03ea5d81..33e79eee 100644 --- a/lib/model/manager/questinnaire_model.dart +++ b/lib/model/manager/questinnaire_model.dart @@ -1,4 +1,4 @@ -import 'package:aku_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; class QuestionnaireModel { int? id; diff --git a/lib/model/manager/questionnaire_detail_model.dart b/lib/model/manager/questionnaire_detail_model.dart index 9162ad03..7556322a 100644 --- a/lib/model/manager/questionnaire_detail_model.dart +++ b/lib/model/manager/questionnaire_detail_model.dart @@ -1,4 +1,4 @@ -import 'package:aku_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; class QuestionnaireDetialModel { int? id; diff --git a/lib/model/manager/suggestion_or_complain_model.dart b/lib/model/manager/suggestion_or_complain_model.dart index c102270c..16a1b040 100644 --- a/lib/model/manager/suggestion_or_complain_model.dart +++ b/lib/model/manager/suggestion_or_complain_model.dart @@ -1,7 +1,6 @@ +import 'package:aku_new_community/model/common/img_model.dart'; import 'package:flustars/flustars.dart'; -import 'package:aku_community/model/common/img_model.dart'; - class SuggestionOrComplainModel { int? id; int? type; diff --git a/lib/model/manager/voting_detail_model.dart b/lib/model/manager/voting_detail_model.dart index 9515dd90..349404c8 100644 --- a/lib/model/manager/voting_detail_model.dart +++ b/lib/model/manager/voting_detail_model.dart @@ -1,4 +1,4 @@ -import 'package:aku_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; class VotingDetailModel { int? id; diff --git a/lib/model/message/comment_message_model.dart b/lib/model/message/comment_message_model.dart index 285dd4c6..9b98730a 100644 --- a/lib/model/message/comment_message_model.dart +++ b/lib/model/message/comment_message_model.dart @@ -1,4 +1,4 @@ -import 'package:aku_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; class CommentMessageModel { int? id; diff --git a/lib/model/order/create_order_model.dart b/lib/model/order/create_order_model.dart index f39c1c41..db60972e 100644 --- a/lib/model/order/create_order_model.dart +++ b/lib/model/order/create_order_model.dart @@ -6,8 +6,8 @@ class CreateOrderModel { CreateOrderModel( {this.defaultAddressVo, this.myShoppingCartVoList, this.fee}); - factory CreateOrderModel.fail() => CreateOrderModel(defaultAddressVo: null,myShoppingCartVoList: [],fee: null - ); + factory CreateOrderModel.fail() => CreateOrderModel( + defaultAddressVo: null, myShoppingCartVoList: [], fee: null); CreateOrderModel.fromJson(Map json) { defaultAddressVo = json['defaultAddressVo'] != null @@ -19,7 +19,7 @@ class CreateOrderModel { json['myShoppingCartVoList'].forEach((v) { myShoppingCartVoList!.add(new MyShoppingCartVoList.fromJson(v)); }); - }else + } else myShoppingCartVoList = []; fee = json['fee']; } @@ -83,16 +83,17 @@ class MyShoppingCartVoList { MyShoppingCartVoList( {this.id, - this.skuName, - this.mainPhoto, - this.status, - this.shopStatus, - this.sellPrice, - this.discountPrice, - this.unit, - this.kind, - this.weight, - this.num,this.stockStatus}); + this.skuName, + this.mainPhoto, + this.status, + this.shopStatus, + this.sellPrice, + this.discountPrice, + this.unit, + this.kind, + this.weight, + this.num, + this.stockStatus}); MyShoppingCartVoList.fromJson(Map json) { id = json['id']; @@ -125,4 +126,4 @@ class MyShoppingCartVoList { data['num'] = this.num; return data; } -} \ No newline at end of file +} diff --git a/lib/model/order/logistics_model.dart b/lib/model/order/logistics_model.dart index bc56a84e..6c0a790b 100644 --- a/lib/model/order/logistics_model.dart +++ b/lib/model/order/logistics_model.dart @@ -38,11 +38,11 @@ class OperatorNodeList { OperatorNodeList( {this.scanState, - this.systemOperator, - this.msgTime, - this.orderId, - this.content, - this.groupState}); + this.systemOperator, + this.msgTime, + this.orderId, + this.content, + this.groupState}); OperatorNodeList.fromJson(Map json) { scanState = json['scan_state']; @@ -63,4 +63,4 @@ class OperatorNodeList { data['group_state'] = this.groupState; return data; } -} \ No newline at end of file +} diff --git a/lib/model/order/order_list_model.dart b/lib/model/order/order_list_model.dart index 71f1bfa4..f0e9333a 100644 --- a/lib/model/order/order_list_model.dart +++ b/lib/model/order/order_list_model.dart @@ -15,17 +15,18 @@ class OrderListModel { OrderListModel( {this.id, - this.code, - this.tradeStatus, - this.payType, - this.payPrice, - this.freightFee, - this.receiverName, - this.receiverTel, - this.locationName, - this.addressDetail, - this.createDate, - this.myOrderListVoList,this.jcookAddressId}); + this.code, + this.tradeStatus, + this.payType, + this.payPrice, + this.freightFee, + this.receiverName, + this.receiverTel, + this.locationName, + this.addressDetail, + this.createDate, + this.myOrderListVoList, + this.jcookAddressId}); OrderListModel.fromJson(Map json) { id = json['id']; @@ -45,7 +46,7 @@ class OrderListModel { json['myOrderListVoList'].forEach((v) { myOrderListVoList!.add(new MyOrderListVoList.fromJson(v)); }); - }else{ + } else { myOrderListVoList = []; } } @@ -86,15 +87,15 @@ class MyOrderListVoList { MyOrderListVoList( {this.id, - this.jcookGoodsId, - this.skuName, - this.mainPhoto, - this.sellPrice, - this.unit, - this.kind, - this.weight, - this.num, - this.payPrice}); + this.jcookGoodsId, + this.skuName, + this.mainPhoto, + this.sellPrice, + this.unit, + this.kind, + this.weight, + this.num, + this.payPrice}); MyOrderListVoList.fromJson(Map json) { id = json['id']; @@ -123,4 +124,4 @@ class MyOrderListVoList { data['payPrice'] = this.payPrice; return data; } -} \ No newline at end of file +} diff --git a/lib/model/user/adress_model.dart b/lib/model/user/adress_model.dart index ecdf452e..a1093388 100644 --- a/lib/model/user/adress_model.dart +++ b/lib/model/user/adress_model.dart @@ -1,5 +1,5 @@ class AddressModel { - int?id; + int? id; String? name; String? tel; int? location; @@ -12,20 +12,18 @@ class AddressModel { String? city; String? district; - - - AddressModel( - {this.id, - this.name, - this.tel, - this.location, - this.locationName, - this.addressDetail, - this.isDefault, - this.province = '', - this.city = '', - this.district = '', - }); + AddressModel({ + this.id, + this.name, + this.tel, + this.location, + this.locationName, + this.addressDetail, + this.isDefault, + this.province = '', + this.city = '', + this.district = '', + }); AddressModel.fromJson(Map json) { id = json['id']; @@ -50,6 +48,13 @@ class AddressModel { } factory AddressModel.empty() { - return AddressModel(id: null,name: '',tel: '',location: null,locationName: '',addressDetail: '',isDefault: null); + return AddressModel( + id: null, + name: '', + tel: '', + location: null, + locationName: '', + addressDetail: '', + isDefault: null); } -} \ No newline at end of file +} diff --git a/lib/model/user/car_parking_model.dart b/lib/model/user/car_parking_model.dart index 321adb80..cbcc3a47 100644 --- a/lib/model/user/car_parking_model.dart +++ b/lib/model/user/car_parking_model.dart @@ -1,6 +1,5 @@ -import 'package:flutter/material.dart'; - import 'package:flustars/flustars.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class CarParkingModel { @@ -8,6 +7,7 @@ class CarParkingModel { int? type; int? status; String? effectiveTimeEnd; + String get typeName { switch (type) { case 1: diff --git a/lib/model/user/committee_item_model.dart b/lib/model/user/committee_item_model.dart index 930f2794..bfc15d40 100644 --- a/lib/model/user/committee_item_model.dart +++ b/lib/model/user/committee_item_model.dart @@ -1,4 +1,4 @@ -import 'package:aku_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; class CommitteeItemModel { int? id; diff --git a/lib/model/user/fixed_submit_model.dart b/lib/model/user/fixed_submit_model.dart index 6e321831..4ed8002f 100644 --- a/lib/model/user/fixed_submit_model.dart +++ b/lib/model/user/fixed_submit_model.dart @@ -1,4 +1,4 @@ -import 'package:aku_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; class FixedSubmitModel { int? id; diff --git a/lib/model/user/province_model.dart b/lib/model/user/province_model.dart index 70fb1e44..01d7610c 100644 --- a/lib/model/user/province_model.dart +++ b/lib/model/user/province_model.dart @@ -1,10 +1,9 @@ - import 'package:hive/hive.dart'; + part 'province_model.g.dart'; @HiveType(typeId: 0) class ProvinceModel { - @HiveField(0) int? id; @HiveField(1) @@ -19,9 +18,9 @@ class ProvinceModel { name = json['name']; if (json['cityList'] != null) { - cityList = (json['cityList'] as List).map((e) => City.fromJson(e)).toList(); - - }else + cityList = + (json['cityList'] as List).map((e) => City.fromJson(e)).toList(); + } else cityList = []; } @@ -51,9 +50,9 @@ class City { id = json['id']; name = json['name']; if (json['cityList'] != null) { - districts = (json['cityList'] as List).map((e) => District.fromJson(e)).toList(); - - }else + districts = + (json['cityList'] as List).map((e) => District.fromJson(e)).toList(); + } else districts = []; } @@ -88,4 +87,4 @@ class District { data['name'] = this.name; return data; } -} \ No newline at end of file +} diff --git a/lib/model/user/user_detail_model.dart b/lib/model/user/user_detail_model.dart index 41b10e15..e15210b2 100644 --- a/lib/model/user/user_detail_model.dart +++ b/lib/model/user/user_detail_model.dart @@ -15,6 +15,7 @@ class UserDetailModel { String? nickName; List? estateNames; int? nowEstateExamineId; + UserDetailModel( {this.id, this.name, diff --git a/lib/models/collection/collection_goods_model.dart b/lib/models/collection/collection_goods_model.dart index 8e64b78d..8351f767 100644 --- a/lib/models/collection/collection_goods_model.dart +++ b/lib/models/collection/collection_goods_model.dart @@ -1,22 +1,22 @@ class CollectionGoodsModel { int? id; - String? skuName; - String? mainPhoto; - int? status; - int? shopStatus; - double? sellPrice; - double? discountPrice; - int? kind; + String? skuName; + String? mainPhoto; + int? status; + int? shopStatus; + double? sellPrice; + double? discountPrice; + int? kind; CollectionGoodsModel( {this.id, - this.skuName, - this.mainPhoto, - this.status, - this.shopStatus, - this.sellPrice, - this.discountPrice, - this.kind}); + this.skuName, + this.mainPhoto, + this.status, + this.shopStatus, + this.sellPrice, + this.discountPrice, + this.kind}); CollectionGoodsModel.fromJson(Map json) { id = json['id']; @@ -41,4 +41,4 @@ class CollectionGoodsModel { data['kind'] = this.kind; return data; } -} \ No newline at end of file +} diff --git a/lib/models/community_introduce/community_introduce_model.dart b/lib/models/community_introduce/community_introduce_model.dart index 8d0aecaa..b22a0b16 100644 --- a/lib/models/community_introduce/community_introduce_model.dart +++ b/lib/models/community_introduce/community_introduce_model.dart @@ -1,8 +1,7 @@ +import 'package:aku_new_community/model/common/img_model.dart'; import 'package:equatable/equatable.dart'; import 'package:json_annotation/json_annotation.dart'; -import 'package:aku_community/model/common/img_model.dart'; - part 'community_introduce_model.g.dart'; @JsonSerializable() @@ -12,6 +11,7 @@ class CommunityIontroduceModel extends Equatable { final String content; final String createDate; final List? imgList; + CommunityIontroduceModel({ required this.id, required this.name, @@ -19,11 +19,13 @@ class CommunityIontroduceModel extends Equatable { required this.createDate, this.imgList, }); + factory CommunityIontroduceModel.fromJson(Map json) => _$CommunityIontroduceModelFromJson(json); factory CommunityIontroduceModel.init() => CommunityIontroduceModel(id: -1, name: '', content: '', createDate: ''); + @override List get props { return [ diff --git a/lib/models/electronic_commerc/electronic_commerc_category_model.dart b/lib/models/electronic_commerc/electronic_commerc_category_model.dart index 14a12e1e..2f9ee8f4 100644 --- a/lib/models/electronic_commerc/electronic_commerc_category_model.dart +++ b/lib/models/electronic_commerc/electronic_commerc_category_model.dart @@ -7,6 +7,7 @@ part 'electronic_commerc_category_model.g.dart'; class ElectronicCommercCategoryModel extends Equatable { final int id; final String name; + ElectronicCommercCategoryModel({ required this.id, required this.name, diff --git a/lib/models/electronic_commerc/electronic_commerc_detail_model.dart b/lib/models/electronic_commerc/electronic_commerc_detail_model.dart index 5983cf3e..2710e39f 100644 --- a/lib/models/electronic_commerc/electronic_commerc_detail_model.dart +++ b/lib/models/electronic_commerc/electronic_commerc_detail_model.dart @@ -12,6 +12,7 @@ class ElectronicCommercDetailModel extends Equatable { final String electronicCommerceCategoryName; final String createName; final String createDate; + ElectronicCommercDetailModel({ required this.id, required this.title, @@ -21,8 +22,10 @@ class ElectronicCommercDetailModel extends Equatable { required this.createName, required this.createDate, }); + factory ElectronicCommercDetailModel.fromJson(Map json) => _$ElectronicCommercDetailModelFromJson(json); + @override List get props { return [ diff --git a/lib/models/electronic_commerc/electronic_commerc_list_model.dart b/lib/models/electronic_commerc/electronic_commerc_list_model.dart index e1a7df79..4f3da491 100644 --- a/lib/models/electronic_commerc/electronic_commerc_list_model.dart +++ b/lib/models/electronic_commerc/electronic_commerc_list_model.dart @@ -1,8 +1,7 @@ +import 'package:aku_new_community/model/common/img_model.dart'; import 'package:equatable/equatable.dart'; import 'package:json_annotation/json_annotation.dart'; -import 'package:aku_community/model/common/img_model.dart'; - part 'electronic_commerc_list_model.g.dart'; @JsonSerializable() @@ -11,12 +10,14 @@ class ElectronicCommercListModel extends Equatable { final String title; final String createDate; final List imgList; + ElectronicCommercListModel({ required this.id, required this.title, required this.createDate, required this.imgList, }); + factory ElectronicCommercListModel.fromJson(Map json) => _$ElectronicCommercListModelFromJson(json); diff --git a/lib/models/express_package/express_package_list_model.dart b/lib/models/express_package/express_package_list_model.dart index 887718b2..998f2083 100644 --- a/lib/models/express_package/express_package_list_model.dart +++ b/lib/models/express_package/express_package_list_model.dart @@ -15,6 +15,7 @@ class ExpressPackageListModel extends Equatable { final String? receiveDate; final String createDate; final String placePosition; + ExpressPackageListModel({ required this.id, required this.code, @@ -26,8 +27,10 @@ class ExpressPackageListModel extends Equatable { required this.createDate, required this.placePosition, }); + factory ExpressPackageListModel.fromJson(Map json) => _$ExpressPackageListModelFromJson(json); + String get createDateString => DateUtil.formatDateStr(this.createDate, format: 'yyyy-MM-dd HH:mm'); diff --git a/lib/models/facility/facility_appointment_model.dart b/lib/models/facility/facility_appointment_model.dart index 01de4787..1ebbd4d1 100644 --- a/lib/models/facility/facility_appointment_model.dart +++ b/lib/models/facility/facility_appointment_model.dart @@ -1,10 +1,8 @@ -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/base/base_style.dart'; import 'package:flustars/flustars.dart'; +import 'package:flutter/material.dart'; import 'package:json_annotation/json_annotation.dart'; -import 'package:aku_community/base/base_style.dart'; - part 'facility_appointment_model.g.dart'; @JsonSerializable() @@ -27,6 +25,7 @@ class FacilityAppointmentModel { final String? useEndDate; DateTime? get appointmentStart => DateUtil.getDateTime(appointmentStartDate); + DateTime? get appointmentEnd => DateUtil.getDateTime(appointmentEndDate); String get displayDate { diff --git a/lib/models/facility/facility_order_date_list_model.dart b/lib/models/facility/facility_order_date_list_model.dart index 18648736..d4d92bda 100644 --- a/lib/models/facility/facility_order_date_list_model.dart +++ b/lib/models/facility/facility_order_date_list_model.dart @@ -10,21 +10,27 @@ class FacilityOrderDateListModel extends Equatable { final String appointmentStartDate; final String appointmentEndDate; final String appointmentName; + FacilityOrderDateListModel({ required this.id, required this.appointmentStartDate, required this.appointmentEndDate, required this.appointmentName, }); + factory FacilityOrderDateListModel.fromJson(Map json) => _$FacilityOrderDateListModelFromJson(json); + String get startDateString => DateUtil.formatDateStr(this.appointmentStartDate, format: 'yyyy-MM-dd HH:mm'); + String get endDateString => DateUtil.formatDateStr(this.appointmentEndDate, format: 'yyyy-MM-dd HH:mm'); + String get tiemSlot => '${this.startDateString}-${DateUtil.formatDateStr(this.appointmentEndDate, format: 'HH:mm')}'; + @override List get props => [id, appointmentStartDate, appointmentEndDate, appointmentName]; diff --git a/lib/models/facility/facility_type_detail_model.dart b/lib/models/facility/facility_type_detail_model.dart index 8e306b64..b46a158e 100644 --- a/lib/models/facility/facility_type_detail_model.dart +++ b/lib/models/facility/facility_type_detail_model.dart @@ -7,6 +7,7 @@ part 'facility_type_detail_model.g.dart'; class FacilityTypeDetailModel extends Equatable { final int id; final String name; + FacilityTypeDetailModel({ required this.id, required this.name, diff --git a/lib/models/facility/facility_type_model.dart b/lib/models/facility/facility_type_model.dart index 3001304b..5172e7f0 100644 --- a/lib/models/facility/facility_type_model.dart +++ b/lib/models/facility/facility_type_model.dart @@ -1,7 +1,6 @@ +import 'package:aku_new_community/model/common/img_model.dart'; import 'package:json_annotation/json_annotation.dart'; -import 'package:aku_community/model/common/img_model.dart'; - part 'facility_type_model.g.dart'; @JsonSerializable() @@ -12,11 +11,13 @@ class FacilityTypeModel { final String openEndDate; String get startDateStr => openStartDate.split(':').getRange(0, 2).join(':'); + String get endDateStr => openEndDate.split(':').getRange(0, 2).join(':'); @JsonKey(name: 'num') final int num_; final List? imgUrls; + FacilityTypeModel({ required this.id, required this.name, diff --git a/lib/models/geographic_information/geographic_information_model.dart b/lib/models/geographic_information/geographic_information_model.dart index 74156973..a08f2295 100644 --- a/lib/models/geographic_information/geographic_information_model.dart +++ b/lib/models/geographic_information/geographic_information_model.dart @@ -1,4 +1,4 @@ -import 'package:aku_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; import 'package:flustars/flustars.dart'; class GeographicInformationModel { @@ -39,5 +39,4 @@ class GeographicInformationModel { factory GeographicInformationModel.init() => GeographicInformationModel(id: -1, name: '', content: '', createDate: ''); - } diff --git a/lib/models/house/lease_detail_model.dart b/lib/models/house/lease_detail_model.dart index f5f99174..0639115c 100644 --- a/lib/models/house/lease_detail_model.dart +++ b/lib/models/house/lease_detail_model.dart @@ -1,8 +1,7 @@ +import 'package:aku_new_community/model/common/img_model.dart'; import 'package:equatable/equatable.dart'; import 'package:json_annotation/json_annotation.dart'; -import 'package:aku_community/model/common/img_model.dart'; - part 'lease_detail_model.g.dart'; @JsonSerializable() @@ -39,6 +38,7 @@ class LeaseDetailModel extends Equatable { final String? notMeterRentDate; final num? requiredRent; final String? depositRefundReviewRemake; + LeaseDetailModel({ required this.id, required this.code, @@ -76,6 +76,7 @@ class LeaseDetailModel extends Equatable { factory LeaseDetailModel.fromJson(Map json) => _$LeaseDetailModelFromJson(json); + @override List get props { return [ diff --git a/lib/models/house/lease_echo_model.dart b/lib/models/house/lease_echo_model.dart index 53cdd9e3..000641c5 100644 --- a/lib/models/house/lease_echo_model.dart +++ b/lib/models/house/lease_echo_model.dart @@ -9,12 +9,14 @@ class LeaseEchoModel extends Equatable { final num? sex; final String tel; final String? idNumber; + LeaseEchoModel({ required this.name, required this.sex, required this.tel, required this.idNumber, }); + factory LeaseEchoModel.fromJson(Map json) => _$LeaseEchoModelFromJson(json); diff --git a/lib/models/house/lease_fee_list_model.dart b/lib/models/house/lease_fee_list_model.dart index 08605538..973f2b3a 100644 --- a/lib/models/house/lease_fee_list_model.dart +++ b/lib/models/house/lease_fee_list_model.dart @@ -11,6 +11,7 @@ class LeaseFeeListModel extends Equatable { final int payStatus; final String createDate; final int type; + LeaseFeeListModel({ required this.id, required this.price, @@ -18,8 +19,10 @@ class LeaseFeeListModel extends Equatable { required this.createDate, required this.type, }); + factory LeaseFeeListModel.fromJson(Map json) => _$LeaseFeeListModelFromJson(json); + @override List get props { return [ diff --git a/lib/models/house/lease_list_model.dart b/lib/models/house/lease_list_model.dart index a2fe2602..d7b54d35 100644 --- a/lib/models/house/lease_list_model.dart +++ b/lib/models/house/lease_list_model.dart @@ -10,6 +10,7 @@ class LeaseListModel extends Equatable { final int type; final String estateType; final int status; + LeaseListModel({ required this.id, required this.roomName, diff --git a/lib/models/house/submit_model.dart b/lib/models/house/submit_model.dart index 02930095..9e3866a7 100644 --- a/lib/models/house/submit_model.dart +++ b/lib/models/house/submit_model.dart @@ -13,6 +13,7 @@ class SubmitModel { List idCardBackImgUrl; File? idCardFrontFile; File? idCardBackFile; + SubmitModel({ required this.id, required this.emergencyContact, diff --git a/lib/models/house_introduce/house_introduce_model.dart b/lib/models/house_introduce/house_introduce_model.dart index 3d21b748..4e25c03f 100644 --- a/lib/models/house_introduce/house_introduce_model.dart +++ b/lib/models/house_introduce/house_introduce_model.dart @@ -1,4 +1,4 @@ -import 'package:aku_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; import 'package:flustars/flustars.dart'; class HouseIntroduceModel { diff --git a/lib/models/house_keeping/house_keeping_list_model.dart b/lib/models/house_keeping/house_keeping_list_model.dart index 3aa20d81..fb52d64b 100644 --- a/lib/models/house_keeping/house_keeping_list_model.dart +++ b/lib/models/house_keeping/house_keeping_list_model.dart @@ -1,9 +1,8 @@ +import 'package:aku_new_community/model/common/img_model.dart'; import 'package:equatable/equatable.dart'; import 'package:flutter/material.dart'; import 'package:json_annotation/json_annotation.dart'; -import 'package:aku_community/model/common/img_model.dart'; - part 'house_keeping_list_model.g.dart'; @JsonSerializable() @@ -28,6 +27,7 @@ class HouseKeepingListModel extends Equatable { final List evaluationImgList; final String createDate; final List submitImgList; + HouseKeepingListModel({ required this.id, required this.proposerName, @@ -38,8 +38,8 @@ class HouseKeepingListModel extends Equatable { required this.status, this.completion, this.processDescription, - this.handlerName, - this.handlerTel, + this.handlerName, + this.handlerTel, this.handlingTime, required this.handlerImgList, this.payFee, @@ -50,8 +50,10 @@ class HouseKeepingListModel extends Equatable { required this.createDate, required this.submitImgList, }); + factory HouseKeepingListModel.fromJson(Map json) => _$HouseKeepingListModelFromJson(json); + String get typeString { switch (this.type) { case 1: diff --git a/lib/models/house_keeping/house_keeping_process_model.dart b/lib/models/house_keeping/house_keeping_process_model.dart index bb8eaff7..66bc5402 100644 --- a/lib/models/house_keeping/house_keeping_process_model.dart +++ b/lib/models/house_keeping/house_keeping_process_model.dart @@ -13,6 +13,7 @@ class HouseKeepingProcessModel extends Equatable { final int opName; final int operatorType; final String operatorContent; + HouseKeepingProcessModel({ required this.id, required this.housekeepingServiceId, @@ -22,8 +23,10 @@ class HouseKeepingProcessModel extends Equatable { required this.operatorType, required this.operatorContent, }); + factory HouseKeepingProcessModel.fromJson(Map json) => _$HouseKeepingProcessModelFromJson(json); + factory HouseKeepingProcessModel.fail() => HouseKeepingProcessModel( id: -1, housekeepingServiceId: -1, @@ -32,6 +35,7 @@ class HouseKeepingProcessModel extends Equatable { operationType: 0, operatorContent: '', operatorType: 1); + @override List get props { return [ diff --git a/lib/models/life_pay/life_pay_list_model.dart b/lib/models/life_pay/life_pay_list_model.dart index 29ac491a..7559de8e 100644 --- a/lib/models/life_pay/life_pay_list_model.dart +++ b/lib/models/life_pay/life_pay_list_model.dart @@ -8,13 +8,16 @@ class LifePayListModel extends Equatable { final int years; final int paymentNum; final List dailyPaymentTypeVos; + LifePayListModel({ required this.years, required this.paymentNum, required this.dailyPaymentTypeVos, }); + factory LifePayListModel.fromJson(Map json) => _$LifePayListModelFromJson(json); + // factory LifePayListModel.zero() => // LifePayListModel(years: 0, paymentNum: 0, dailyPaymentTypeVos: [ // DailyPaymentTypeVos(id: 0, name: '', detailedVoList: [ @@ -22,6 +25,7 @@ class LifePayListModel extends Equatable { // ]) // ]); Map toJson() => _$LifePayListModelToJson(this); + @override List get props => [years, paymentNum, dailyPaymentTypeVos]; } @@ -31,14 +35,18 @@ class DailyPaymentTypeVos extends Equatable { final int id; final String name; final List detailedVoList; + DailyPaymentTypeVos({ required this.id, required this.name, required this.detailedVoList, }); + factory DailyPaymentTypeVos.fromJson(Map json) => _$DailyPaymentTypeVosFromJson(json); + Map toJson() => _$DailyPaymentTypeVosToJson(this); + @override List get props => [id, name, detailedVoList]; } @@ -49,15 +57,19 @@ class DetailedVoList extends Equatable { final num paymentPrice; final num overdueFine; final List detailsVoList; + DetailedVoList({ required this.groupId, required this.paymentPrice, required this.overdueFine, required this.detailsVoList, }); + factory DetailedVoList.fromJson(Map json) => _$DetailedVoListFromJson(json); + Map toJson() => _$DetailedVoListToJson(this); + @override List get props => [groupId, paymentPrice, overdueFine, detailsVoList]; } @@ -79,6 +91,7 @@ class DetailsVoList extends Equatable { final num rate; final String paymentTerm; final num overdueFine; + DetailsVoList({ required this.id, required this.month, @@ -95,9 +108,12 @@ class DetailsVoList extends Equatable { required this.paymentTerm, required this.overdueFine, }); + factory DetailsVoList.fromJson(Map json) => _$DetailsVoListFromJson(json); + Map toJson() => _$DetailsVoListToJson(this); + @override List get props { return [ diff --git a/lib/models/life_pay/life_pay_record_model.dart b/lib/models/life_pay/life_pay_record_model.dart index 31d32d3f..9c0f6ab0 100644 --- a/lib/models/life_pay/life_pay_record_model.dart +++ b/lib/models/life_pay/life_pay_record_model.dart @@ -14,6 +14,7 @@ class LifePayRecordModel extends Equatable { final String createDate; final int payType; final String code; + LifePayRecordModel({ required this.id, required this.chargesTemplateDetailName, @@ -25,8 +26,10 @@ class LifePayRecordModel extends Equatable { required this.payType, required this.code, }); + factory LifePayRecordModel.fromJson(Map json) => _$LifePayRecordModelFromJson(json); + @override List get props { return [ diff --git a/lib/models/life_pay/share_pay_record_model.dart b/lib/models/life_pay/share_pay_record_model.dart index c90cf330..55f9e4e4 100644 --- a/lib/models/life_pay/share_pay_record_model.dart +++ b/lib/models/life_pay/share_pay_record_model.dart @@ -13,6 +13,7 @@ class SharePayRecordModel { final String effectiveTimeEnd; final double shareUnitPrice; final double indoorArea; + factory SharePayRecordModel.fromJson(Map json) => _$SharePayRecordModelFromJson(json); diff --git a/lib/models/manage/fix_report/fix_detail_model.dart b/lib/models/manage/fix_report/fix_detail_model.dart index 9ef45138..a006d909 100644 --- a/lib/models/manage/fix_report/fix_detail_model.dart +++ b/lib/models/manage/fix_report/fix_detail_model.dart @@ -1,8 +1,7 @@ +import 'package:aku_new_community/model/common/img_model.dart'; import 'package:equatable/equatable.dart'; import 'package:json_annotation/json_annotation.dart'; -import 'package:aku_community/model/common/img_model.dart'; - part 'fix_detail_model.g.dart'; @JsonSerializable() @@ -12,14 +11,17 @@ class FixDetailModel extends Equatable { final List appProcessRecordVo; final AppMaintenanceResultVo? appMaintenanceResultVo; final AppDispatchListVo? appDispatchListVo; + FixDetailModel({ required this.appReportRepairVo, required this.appProcessRecordVo, this.appMaintenanceResultVo, required this.appDispatchListVo, }); + factory FixDetailModel.fromJson(Map json) => _$FixDetailModelFromJson(json); + @override List get props => [ appReportRepairVo, @@ -37,6 +39,7 @@ class AppReportRepairVo extends Equatable { final int status; final String reportDetail; final List imgUrls; + AppReportRepairVo({ required this.roomName, required this.id, @@ -48,6 +51,7 @@ class AppReportRepairVo extends Equatable { factory AppReportRepairVo.fromJson(Map json) => _$AppReportRepairVoFromJson(json); + @override List get props { return [ @@ -65,6 +69,7 @@ class AppReportRepairVo extends Equatable { class AppProcessRecordVo extends Equatable { final String operationDate; final int operationType; + AppProcessRecordVo({ required this.operationDate, required this.operationType, @@ -72,6 +77,7 @@ class AppProcessRecordVo extends Equatable { factory AppProcessRecordVo.fromJson(Map json) => _$AppProcessRecordVoFromJson(json); + @override List get props => [operationDate, operationType]; } @@ -83,6 +89,7 @@ class AppDispatchListVo extends Equatable { final int type; final String operatorName; final String distributorName; + AppDispatchListVo({ required this.code, required this.orderDate, @@ -93,6 +100,7 @@ class AppDispatchListVo extends Equatable { factory AppDispatchListVo.fromJson(Map json) => _$AppDispatchListVoFromJson(json); + @override List get props { return [ @@ -112,6 +120,7 @@ class AppMaintenanceResultVo extends Equatable { final num? materialCost; final num? totalCost; final List imgUrls; + AppMaintenanceResultVo({ required this.id, this.laborCost, @@ -122,6 +131,7 @@ class AppMaintenanceResultVo extends Equatable { factory AppMaintenanceResultVo.fromJson(Map json) => _$AppMaintenanceResultVoFromJson(json); + @override List get props { return [ diff --git a/lib/models/market/display_category_model.dart b/lib/models/market/display_category_model.dart index ccc75b3c..ea97af05 100644 --- a/lib/models/market/display_category_model.dart +++ b/lib/models/market/display_category_model.dart @@ -1,11 +1,12 @@ -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/market/market_category_model.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/models/market/market_category_model.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; class DisplayCategoryModel { final MarketCategoryModel model; final List children; + DisplayCategoryModel({ required this.model, required this.children, diff --git a/lib/models/market/goods_classification.dart b/lib/models/market/goods_classification.dart index f6dec802..23f9bb21 100644 --- a/lib/models/market/goods_classification.dart +++ b/lib/models/market/goods_classification.dart @@ -1,4 +1,4 @@ -import 'package:aku_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; class GoodsClassification { int? id; @@ -30,4 +30,4 @@ class GoodsClassification { } return data; } -} \ No newline at end of file +} diff --git a/lib/models/market/goods_detail_model.dart b/lib/models/market/goods_detail_model.dart index 76df08ce..32a15c4d 100644 --- a/lib/models/market/goods_detail_model.dart +++ b/lib/models/market/goods_detail_model.dart @@ -1,8 +1,7 @@ +import 'package:aku_new_community/model/common/img_model.dart'; import 'package:equatable/equatable.dart'; import 'package:json_annotation/json_annotation.dart'; -import 'package:aku_community/model/common/img_model.dart'; - part 'goods_detail_model.g.dart'; @JsonSerializable() diff --git a/lib/models/market/goods_item.dart b/lib/models/market/goods_item.dart index d50f7741..db430629 100644 --- a/lib/models/market/goods_item.dart +++ b/lib/models/market/goods_item.dart @@ -1,8 +1,7 @@ +import 'package:aku_new_community/model/common/img_model.dart'; import 'package:equatable/equatable.dart'; import 'package:json_annotation/json_annotation.dart'; -import 'package:aku_community/model/common/img_model.dart'; - part 'goods_item.g.dart'; @JsonSerializable() @@ -14,6 +13,7 @@ class GoodsItem extends Equatable { final num markingPrice; final int subscribeNum; final List imgList; + GoodsItem({ required this.id, required this.title, @@ -32,6 +32,7 @@ class GoodsItem extends Equatable { markingPrice: 2000, subscribeNum: 0, imgList: []); + @override List get props => throw UnimplementedError(); diff --git a/lib/models/market/goods_popular_model.dart b/lib/models/market/goods_popular_model.dart index cbb0769c..1c7475bc 100644 --- a/lib/models/market/goods_popular_model.dart +++ b/lib/models/market/goods_popular_model.dart @@ -21,4 +21,4 @@ class GoodsPopularModel { data['viewsNum'] = this.viewsNum; return data; } -} \ No newline at end of file +} diff --git a/lib/models/market/market_category_model.dart b/lib/models/market/market_category_model.dart index a22b904b..e5c56dbb 100644 --- a/lib/models/market/market_category_model.dart +++ b/lib/models/market/market_category_model.dart @@ -1,8 +1,7 @@ +import 'package:aku_new_community/model/common/img_model.dart'; import 'package:equatable/equatable.dart'; import 'package:json_annotation/json_annotation.dart'; -import 'package:aku_community/model/common/img_model.dart'; - part 'market_category_model.g.dart'; @JsonSerializable() @@ -10,11 +9,13 @@ class MarketCategoryModel extends Equatable { final int id; final String name; final List imgList; + MarketCategoryModel({ required this.id, required this.name, required this.imgList, }); + @override List get props => [id]; diff --git a/lib/models/market/order/goods_home_model.dart b/lib/models/market/order/goods_home_model.dart index 98f5b905..e941d071 100644 --- a/lib/models/market/order/goods_home_model.dart +++ b/lib/models/market/order/goods_home_model.dart @@ -9,12 +9,12 @@ class GoodsHomeModel { GoodsHomeModel( {this.id, - this.skuName, - this.mainPhoto, - this.sellPrice, - this.discountPrice, - this.kind, - this.isCollection}); + this.skuName, + this.mainPhoto, + this.sellPrice, + this.discountPrice, + this.kind, + this.isCollection}); GoodsHomeModel.fromJson(Map json) { id = json['id']; @@ -37,4 +37,4 @@ class GoodsHomeModel { data['isCollection'] = this.isCollection; return data; } -} \ No newline at end of file +} diff --git a/lib/models/market/order/my_order_list_model.dart b/lib/models/market/order/my_order_list_model.dart index 93e4f5a4..c8bf9992 100644 --- a/lib/models/market/order/my_order_list_model.dart +++ b/lib/models/market/order/my_order_list_model.dart @@ -1,11 +1,9 @@ -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/model/common/img_model.dart'; import 'package:equatable/equatable.dart'; import 'package:flustars/flustars.dart'; +import 'package:flutter/material.dart'; import 'package:json_annotation/json_annotation.dart'; -import 'package:aku_community/model/common/img_model.dart'; - part 'my_order_list_model.g.dart'; @JsonSerializable() @@ -35,6 +33,7 @@ class MyOrderListModel extends Equatable { final String? evaluationReason; final String? createDate; final String arrivalTime; + MyOrderListModel({ required this.id, required this.code, @@ -68,18 +67,24 @@ class MyOrderListModel extends Equatable { String get sendDateString => DateUtil.formatDateStr(this.sendDate ?? '', format: 'yyyy-MM-dd HH:mm'); + String get arrivalDateString => DateUtil.formatDateStr(this.arrivalDate ?? '', format: 'yyyy-MM-dd HH:mm'); + String get receiveDateString => DateUtil.formatDateStr(this.receivingDate ?? '', format: 'yyyy-MM-dd HH:mm'); + String get backDateString => DateUtil.formatDateStr(this.backDate ?? '', format: 'yyyy-MM-dd HH:mm'); + String get evaluateDateString => DateUtil.formatDateStr(this.evaluationDate ?? '', format: 'yyyy-MM-dd HH:mm'); + String get createDateString => DateUtil.formatDateStr(this.createDate ?? '', format: 'yyyy-MM-dd HH:mm'); + String get statusString { switch (this.status) { case 1: diff --git a/lib/models/market/order/order_detail_model.dart b/lib/models/market/order/order_detail_model.dart index 65269d09..47c0cdbb 100644 --- a/lib/models/market/order/order_detail_model.dart +++ b/lib/models/market/order/order_detail_model.dart @@ -1,8 +1,7 @@ +import 'package:aku_new_community/model/common/img_model.dart'; import 'package:equatable/equatable.dart'; import 'package:json_annotation/json_annotation.dart'; -import 'package:aku_community/model/common/img_model.dart'; - part 'order_detail_model.g.dart'; @JsonSerializable() @@ -33,6 +32,7 @@ class OrderDetailModel extends Equatable { final String? evaluationReason; final String? arrivalTime; final String? createDate; + OrderDetailModel({ required this.id, required this.code, diff --git a/lib/models/market/shop_car/shop_car_list_model.dart b/lib/models/market/shop_car/shop_car_list_model.dart index d7562138..db8faf23 100644 --- a/lib/models/market/shop_car/shop_car_list_model.dart +++ b/lib/models/market/shop_car/shop_car_list_model.dart @@ -1,4 +1,4 @@ -import 'package:aku_community/ui/market/shop_car/shop_car_func.dart'; +import 'package:aku_new_community/ui/market/shop_car/shop_car_func.dart'; import 'package:json_annotation/json_annotation.dart'; part 'shop_car_list_model.g.dart'; @@ -8,31 +8,38 @@ class ShopCarListModel { final int? id; final String? skuName; final String? mainPhoto; + //0.下架,1.上架(当该状态下架,商品直接下架,不考虑小蜜蜂商品状态) final int? status; + //0.下架,1.上架(当jcook商品状态为上架才生效) final int? shopStatus; final double? sellPrice; final double? discountPrice; final String? unit; + // 0=未知 1=自营 2=其 他,商品类别 final int? kind; final double? weight; final int? num; + factory ShopCarListModel.fromJson(Map json) => _$ShopCarListModelFromJson(json); - GoodStatus get goodStatus => ShopCarFunc.getGoodsStatus(status??1, shopStatus??1); + + GoodStatus get goodStatus => + ShopCarFunc.getGoodsStatus(status ?? 1, shopStatus ?? 1); + const ShopCarListModel({ - this.id, - this.skuName, - this.mainPhoto, - this.status, - this.shopStatus, - this.sellPrice, - this.discountPrice, - this.unit, - this.kind, - this.weight, - this.num, + this.id, + this.skuName, + this.mainPhoto, + this.status, + this.shopStatus, + this.sellPrice, + this.discountPrice, + this.unit, + this.kind, + this.weight, + this.num, }); } diff --git a/lib/models/new_renovation/new_renovation_list_model.dart b/lib/models/new_renovation/new_renovation_list_model.dart index badd7d8a..a8d3be7c 100644 --- a/lib/models/new_renovation/new_renovation_list_model.dart +++ b/lib/models/new_renovation/new_renovation_list_model.dart @@ -1,11 +1,9 @@ -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/base/base_style.dart'; import 'package:equatable/equatable.dart'; import 'package:flustars/flustars.dart'; +import 'package:flutter/material.dart'; import 'package:json_annotation/json_annotation.dart'; -import 'package:aku_community/base/base_style.dart'; - part 'new_renovation_list_model.g.dart'; @JsonSerializable() @@ -29,6 +27,7 @@ class NewRenovationListModel extends Equatable { final String createName; final String createDate; final List checkVoList; + NewRenovationListModel({ required this.id, required this.roomName, @@ -137,8 +136,10 @@ class NewRenovationListModel extends Equatable { String get actualEndString => DateUtil.formatDateStr(this.actualEnd ?? '', format: 'yyyy-MM-dd HH:mm'); + String get expectSlot => '${expectBginString}-${DateUtil.formatDateStr(this.expectedEnd, format: 'HH:mm')}'; + String get actualSlot => '${actualBginString}-${DateUtil.formatDateStr(this.actualEnd ?? '', format: 'HH:mm')}'; @@ -162,6 +163,7 @@ class CheckVoList extends Equatable { final int isQualified; final String createName; final String createDate; + CheckVoList({ required this.id, required this.decorationNewId, @@ -185,6 +187,7 @@ class CheckVoList extends Equatable { factory CheckVoList.fromJson(Map json) => _$CheckVoListFromJson(json); + String get qualitfied { switch (this.isQualified) { case 1: diff --git a/lib/models/news/news_category_model.dart b/lib/models/news/news_category_model.dart index 5ece2221..9fdcf43f 100644 --- a/lib/models/news/news_category_model.dart +++ b/lib/models/news/news_category_model.dart @@ -6,6 +6,7 @@ part 'news_category_model.g.dart'; class NewsCategoryModel { final int id; final String name; + NewsCategoryModel({ required this.id, required this.name, diff --git a/lib/models/news/news_detail_model.dart b/lib/models/news/news_detail_model.dart index 9570cb9d..5c3defb1 100644 --- a/lib/models/news/news_detail_model.dart +++ b/lib/models/news/news_detail_model.dart @@ -12,6 +12,7 @@ class NewsDetailModel extends Equatable { final String newsCategoryName; final String createName; final String createDate; + NewsDetailModel({ required this.id, required this.code, @@ -21,8 +22,10 @@ class NewsDetailModel extends Equatable { required this.createName, required this.createDate, }); + factory NewsDetailModel.fromJson(Map json) => _$NewsDetailModelFromJson(json); + @override List get props { return [ diff --git a/lib/models/news/news_item_model.dart b/lib/models/news/news_item_model.dart index 51b95099..f35934a3 100644 --- a/lib/models/news/news_item_model.dart +++ b/lib/models/news/news_item_model.dart @@ -1,8 +1,7 @@ +import 'package:aku_new_community/model/common/img_model.dart'; import 'package:flustars/flustars.dart'; import 'package:json_annotation/json_annotation.dart'; -import 'package:aku_community/model/common/img_model.dart'; - part 'news_item_model.g.dart'; @JsonSerializable() @@ -11,7 +10,9 @@ class NewsItemModel { final String title; final String createDate; final List imgList; + DateTime? get create => DateUtil.getDateTime(createDate); + NewsItemModel({ required this.id, required this.title, diff --git a/lib/models/pay/pay_model.dart b/lib/models/pay/pay_model.dart index e85fc79c..e63a441f 100644 --- a/lib/models/pay/pay_model.dart +++ b/lib/models/pay/pay_model.dart @@ -10,13 +10,16 @@ class PayModel extends Equatable { final String sign; @JsonKey(name: 'sign_type') final String signType; + PayModel({ required this.aliPayTradeAppPayResponse, required this.sign, required this.signType, }); + factory PayModel.fromJson(Map json) => _$PayModelFromJson(json); + @override List get props => [aliPayTradeAppPayResponse, sign, signType]; } @@ -37,6 +40,7 @@ class AliPayTradeAppPayResponse extends Equatable { final String sellerId; final String charset; final String timestamp; + AliPayTradeAppPayResponse({ required this.code, required this.msg, diff --git a/lib/models/search/search_goods_model.dart b/lib/models/search/search_goods_model.dart index c3422a2a..17e0cb2c 100644 --- a/lib/models/search/search_goods_model.dart +++ b/lib/models/search/search_goods_model.dart @@ -9,12 +9,12 @@ class SearchGoodsModel { SearchGoodsModel( {this.id, - this.skuName, - this.mainPhoto, - this.sellPrice, - this.discountPrice, - this.kind, - this.isCollection}); + this.skuName, + this.mainPhoto, + this.sellPrice, + this.discountPrice, + this.kind, + this.isCollection}); SearchGoodsModel.fromJson(Map json) { id = json['id']; @@ -37,4 +37,4 @@ class SearchGoodsModel { data['isCollection'] = this.isCollection; return data; } -} \ No newline at end of file +} diff --git a/lib/models/search/search_model.dart b/lib/models/search/search_model.dart index b8afe289..19db6cd9 100644 --- a/lib/models/search/search_model.dart +++ b/lib/models/search/search_model.dart @@ -1,23 +1,26 @@ +import 'package:aku_new_community/model/community/activity_item_model.dart'; +import 'package:aku_new_community/model/community/community_topic_model.dart'; import 'package:equatable/equatable.dart'; import 'package:json_annotation/json_annotation.dart'; -import 'package:aku_community/model/community/activity_item_model.dart'; -import 'package:aku_community/model/community/community_topic_model.dart'; - part 'search_model.g.dart'; @JsonSerializable() class SearchModel extends Equatable { final List activityVoList; final List gambitVoList; + SearchModel({ required this.activityVoList, required this.gambitVoList, }); + factory SearchModel.fromJson(Map json) => _$SearchModelFromJson(json); + factory SearchModel.init() => SearchModel(activityVoList: [], gambitVoList: []); + @override List get props => [activityVoList, gambitVoList]; } diff --git a/lib/models/service_browse/service_browse_list_mode.dart b/lib/models/service_browse/service_browse_list_mode.dart index 82a526f9..7028298a 100644 --- a/lib/models/service_browse/service_browse_list_mode.dart +++ b/lib/models/service_browse/service_browse_list_mode.dart @@ -9,14 +9,17 @@ class ServiceBrowseListModel extends Equatable { final String name; final String content; final String createDate; + ServiceBrowseListModel({ required this.id, required this.name, required this.content, required this.createDate, }); + factory ServiceBrowseListModel.fromJson(Map json) => _$ServiceBrowseListModelFromJson(json); + @override List get props => [id, name, content, createDate]; } diff --git a/lib/models/surrounding_enterprises/surrounding_enterprises_model.dart b/lib/models/surrounding_enterprises/surrounding_enterprises_model.dart index 8bc76632..eb78b870 100644 --- a/lib/models/surrounding_enterprises/surrounding_enterprises_model.dart +++ b/lib/models/surrounding_enterprises/surrounding_enterprises_model.dart @@ -1,4 +1,4 @@ -import 'package:aku_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; import 'package:flustars/flustars.dart'; class SurroundingEnterprisesModel { @@ -37,4 +37,4 @@ class SurroundingEnterprisesModel { } return data; } -} \ No newline at end of file +} diff --git a/lib/models/user/passed_house_list_model.dart b/lib/models/user/passed_house_list_model.dart index 1d97d29c..9e31ec41 100644 --- a/lib/models/user/passed_house_list_model.dart +++ b/lib/models/user/passed_house_list_model.dart @@ -14,6 +14,7 @@ class PassedHouseListModel extends Equatable { final String? effectiveTimeStart; final String? effectiveTimeEnd; final int? sysLeaseId; + PassedHouseListModel({ required this.id, required this.estateId, @@ -40,6 +41,7 @@ class PassedHouseListModel extends Equatable { _$PassedHouseListModelFromJson(json); DateTime? get effectiveStartDate => DateUtil.getDateTime(effectiveTimeStart!); + DateTime? get effectiveEndDate => DateUtil.getDateTime(effectiveTimeEnd!); String get houseStatus { diff --git a/lib/models/user/user_info_model.dart b/lib/models/user/user_info_model.dart index 710724d3..d5638103 100644 --- a/lib/models/user/user_info_model.dart +++ b/lib/models/user/user_info_model.dart @@ -1,4 +1,4 @@ -import 'package:aku_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; import 'package:flustars/flustars.dart'; import 'package:json_annotation/json_annotation.dart'; diff --git a/lib/pages/community_introduce/community_introduce_page.dart b/lib/pages/community_introduce/community_introduce_page.dart index d95c686b..ebe05314 100644 --- a/lib/pages/community_introduce/community_introduce_page.dart +++ b/lib/pages/community_introduce/community_introduce_page.dart @@ -1,18 +1,16 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/models/community_introduce/community_introduce_model.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/models/community_introduce/community_introduce_model.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class CommunityIntroducePage extends StatefulWidget { CommunityIntroducePage({Key? key}) : super(key: key); diff --git a/lib/pages/convenient_phone/convenient_phone_page.dart b/lib/pages/convenient_phone/convenient_phone_page.dart index 1eba5b06..6ec89518 100644 --- a/lib/pages/convenient_phone/convenient_phone_page.dart +++ b/lib/pages/convenient_phone/convenient_phone_page.dart @@ -1,18 +1,16 @@ +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/user/convenient_phone_model.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:url_launcher/url_launcher.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/user/convenient_phone_model.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class ConvenientPhonePage extends StatefulWidget { ConvenientPhonePage({Key? key}) : super(key: key); diff --git a/lib/pages/electronic_commerc/electronic_commerc_card.dart b/lib/pages/electronic_commerc/electronic_commerc_card.dart index 69f1217f..15ffe3f9 100644 --- a/lib/pages/electronic_commerc/electronic_commerc_card.dart +++ b/lib/pages/electronic_commerc/electronic_commerc_card.dart @@ -1,19 +1,18 @@ -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/models/electronic_commerc/electronic_commerc_list_model.dart'; +import 'package:aku_new_community/pages/electronic_commerc/electronic_commerc_detail_page.dart'; import 'package:flustars/flustars.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/models/electronic_commerc/electronic_commerc_list_model.dart'; -import 'package:aku_community/pages/electronic_commerc/electronic_commerc_detail_page.dart'; - class ElectronicCommercCard extends StatefulWidget { final ElectronicCommercListModel model; + ElectronicCommercCard({Key? key, required this.model}) : super(key: key); @override diff --git a/lib/pages/electronic_commerc/electronic_commerc_detail_page.dart b/lib/pages/electronic_commerc/electronic_commerc_detail_page.dart index 38af8ccb..462d183c 100644 --- a/lib/pages/electronic_commerc/electronic_commerc_detail_page.dart +++ b/lib/pages/electronic_commerc/electronic_commerc_detail_page.dart @@ -1,20 +1,19 @@ -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/models/electronic_commerc/electronic_commerc_detail_model.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flustars/flustars.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/electronic_commerc/electronic_commerc_detail_model.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class ElectronicCommercDetailPage extends StatefulWidget { final int id; + ElectronicCommercDetailPage({Key? key, required this.id}) : super(key: key); @override @@ -27,6 +26,7 @@ class _ElectronicCommercDetailPageState late EasyRefreshController _easyRefreshController; bool _onload = true; late ElectronicCommercDetailModel _detailModel; + @override void initState() { super.initState(); diff --git a/lib/pages/electronic_commerc/electronic_commerc_page.dart b/lib/pages/electronic_commerc/electronic_commerc_page.dart index f01bd2b2..76071494 100644 --- a/lib/pages/electronic_commerc/electronic_commerc_page.dart +++ b/lib/pages/electronic_commerc/electronic_commerc_page.dart @@ -1,21 +1,19 @@ -import 'package:aku_community/utils/hive_store.dart'; -import 'package:aku_community/utils/websocket/tips_dialog.dart'; -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/extensions/num_ext.dart'; +import 'package:aku_new_community/models/electronic_commerc/electronic_commerc_category_model.dart'; +import 'package:aku_new_community/pages/electronic_commerc/electronic_commerc_view.dart'; +import 'package:aku_new_community/utils/hive_store.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/utils/websocket/tips_dialog.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/tab_bar/bee_tab_bar.dart'; import 'package:bot_toast/bot_toast.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:shimmer/shimmer.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/extensions/num_ext.dart'; -import 'package:aku_community/models/electronic_commerc/electronic_commerc_category_model.dart'; -import 'package:aku_community/pages/electronic_commerc/electronic_commerc_view.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/tab_bar/bee_tab_bar.dart'; - class ElectronicCommercPage extends StatefulWidget { ElectronicCommercPage({Key? key}) : super(key: key); @@ -29,14 +27,16 @@ class _ElectronicCommercPageState extends State late TabController _tabController; bool _onloading = true; late List _models; + @override void initState() { super.initState(); Future.delayed(Duration(milliseconds: 0), () async { - var agreement = await HiveStore.appBox?.get('ElectronicCommercPage') ?? false; + var agreement = + await HiveStore.appBox?.get('ElectronicCommercPage') ?? false; if (!agreement) { await TipsDialog.tipsDialog(); - HiveStore.appBox!.put('ElectronicCommercPage',true); + HiveStore.appBox!.put('ElectronicCommercPage', true); } }); _tabController = TabController(length: _tabs.length, vsync: this); diff --git a/lib/pages/electronic_commerc/electronic_commerc_view.dart b/lib/pages/electronic_commerc/electronic_commerc_view.dart index fbec23c8..64c7a1d9 100644 --- a/lib/pages/electronic_commerc/electronic_commerc_view.dart +++ b/lib/pages/electronic_commerc/electronic_commerc_view.dart @@ -1,16 +1,15 @@ +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/models/electronic_commerc/electronic_commerc_list_model.dart'; +import 'package:aku_new_community/pages/electronic_commerc/electronic_commerc_card.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/electronic_commerc/electronic_commerc_list_model.dart'; -import 'package:aku_community/pages/electronic_commerc/electronic_commerc_card.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; - class ElectronicCommercView extends StatefulWidget { final int id; + ElectronicCommercView({Key? key, required this.id}) : super(key: key); @override @@ -19,6 +18,7 @@ class ElectronicCommercView extends StatefulWidget { class _ElectronicCommercViewState extends State { late EasyRefreshController _refreshController; + @override void initState() { super.initState(); diff --git a/lib/pages/event_activity/event_voting_page.dart b/lib/pages/event_activity/event_voting_page.dart index 59da9072..4bdb52e3 100644 --- a/lib/pages/event_activity/event_voting_page.dart +++ b/lib/pages/event_activity/event_voting_page.dart @@ -1,18 +1,16 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/manager/event_voting_model.dart'; +import 'package:aku_new_community/pages/event_activity/voting_detail_page.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/others/stack_avatar.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/model/manager/event_voting_model.dart'; -import 'package:aku_community/pages/event_activity/voting_detail_page.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/others/stack_avatar.dart'; - class EventVotingPage extends StatefulWidget { EventVotingPage({Key? key}) : super(key: key); @@ -22,6 +20,7 @@ class EventVotingPage extends StatefulWidget { class _EventVotingPageState extends State { EasyRefreshController? _controller; + @override void initState() { super.initState(); diff --git a/lib/pages/event_activity/voting_detail_page.dart b/lib/pages/event_activity/voting_detail_page.dart index e217afaa..9641c4cf 100644 --- a/lib/pages/event_activity/voting_detail_page.dart +++ b/lib/pages/event_activity/voting_detail_page.dart @@ -1,24 +1,22 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/constants/app_theme.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/manager/voting_detail_model.dart'; +import 'package:aku_new_community/pages/manager_func.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bee_single_check.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - -import 'package:bot_toast/bot_toast.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/constants/app_theme.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/model/manager/voting_detail_model.dart'; -import 'package:aku_community/pages/manager_func.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/widget/bee_divider.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bee_single_check.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; - class VotingDetailPage extends StatefulWidget { final int? id; @@ -32,9 +30,11 @@ class _VotingDetailPageState extends State { VotingDetailModel _model = VotingDetailModel(); late EasyRefreshController _refreshController; bool _isOnload = true; + // List _select = []; int? _selectId; bool _hasVoted = false; + bool get finishVoted { if ((_model.status == 4) || _hasVoted || (_model.status == 3)) { return true; diff --git a/lib/pages/express_packages/express_package_card.dart b/lib/pages/express_packages/express_package_card.dart index 4f7a332c..7fe17d62 100644 --- a/lib/pages/express_packages/express_package_card.dart +++ b/lib/pages/express_packages/express_package_card.dart @@ -1,22 +1,21 @@ -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/extensions/widget_list_ext.dart'; +import 'package:aku_new_community/models/express_package/express_package_list_model.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; import 'package:bot_toast/bot_toast.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/extensions/widget_list_ext.dart'; -import 'package:aku_community/models/express_package/express_package_list_model.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_divider.dart'; - class ExpressPackageCard extends StatefulWidget { final int index; final ExpressPackageListModel model; final VoidCallback callFresh; + ExpressPackageCard( {Key? key, required this.index, diff --git a/lib/pages/express_packages/express_package_page.dart b/lib/pages/express_packages/express_package_page.dart index 9b3b8635..de8ca1b4 100644 --- a/lib/pages/express_packages/express_package_page.dart +++ b/lib/pages/express_packages/express_package_page.dart @@ -1,11 +1,10 @@ -import 'package:aku_community/utils/hive_store.dart'; -import 'package:aku_community/utils/websocket/tips_dialog.dart'; +import 'package:aku_new_community/pages/express_packages/express_package_view.dart'; +import 'package:aku_new_community/utils/hive_store.dart'; +import 'package:aku_new_community/utils/websocket/tips_dialog.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/tab_bar/bee_tab_bar.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/pages/express_packages/express_package_view.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/tab_bar/bee_tab_bar.dart'; - class ExpressPackagePage extends StatefulWidget { ExpressPackagePage({Key? key}) : super(key: key); @@ -17,14 +16,16 @@ class _ExpressPackagePageState extends State with TickerProviderStateMixin { List _tabs = ['未领取', '已领取']; late TabController _tabController; + @override void initState() { super.initState(); Future.delayed(Duration(milliseconds: 0), () async { - var agreement = await HiveStore.appBox?.get('ExpressPackagePage') ?? false; + var agreement = + await HiveStore.appBox?.get('ExpressPackagePage') ?? false; if (!agreement) { await TipsDialog.tipsDialog(); - HiveStore.appBox!.put('ExpressPackagePage',true); + HiveStore.appBox!.put('ExpressPackagePage', true); } }); _tabController = TabController(length: _tabs.length, vsync: this); diff --git a/lib/pages/express_packages/express_package_view.dart b/lib/pages/express_packages/express_package_view.dart index 7c3dd578..af3eda8e 100644 --- a/lib/pages/express_packages/express_package_view.dart +++ b/lib/pages/express_packages/express_package_view.dart @@ -1,16 +1,15 @@ +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/models/express_package/express_package_list_model.dart'; +import 'package:aku_new_community/pages/express_packages/express_package_card.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/express_package/express_package_list_model.dart'; -import 'package:aku_community/pages/express_packages/express_package_card.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; - class ExpressPackageView extends StatefulWidget { final int index; + ExpressPackageView({Key? key, required this.index}) : super(key: key); @override @@ -19,6 +18,7 @@ class ExpressPackageView extends StatefulWidget { class _ExpressPackageViewState extends State { late EasyRefreshController _refreshController; + @override void initState() { super.initState(); diff --git a/lib/pages/geographic_information/geograhic_information.dart b/lib/pages/geographic_information/geograhic_information.dart index d510b0a7..faf6b5c3 100644 --- a/lib/pages/geographic_information/geograhic_information.dart +++ b/lib/pages/geographic_information/geograhic_information.dart @@ -1,76 +1,72 @@ -import 'package:aku_community/models/geographic_information/geographic_information_model.dart'; -import 'package:aku_community/models/house_introduce/house_introduce_model.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/models/geographic_information/geographic_information_model.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class GeographicInformationPage extends StatefulWidget { - - - GeographicInformationPage({Key? key,}) - : super(key: key); + GeographicInformationPage({ + Key? key, + }) : super(key: key); @override - _GeographicInformationPageState createState() => _GeographicInformationPageState(); + _GeographicInformationPageState createState() => + _GeographicInformationPageState(); } class _GeographicInformationPageState extends State { GeographicInformationModel _model = GeographicInformationModel.init(); bool _onload = true; + @override Widget build(BuildContext context) { return BeeScaffold( - bodyColor: Colors.white, - title: '地理信息', - body:EasyRefresh( - firstRefresh: true, - header: MaterialHeader(), + bodyColor: Colors.white, + title: '地理信息', + body: EasyRefresh( + firstRefresh: true, + header: MaterialHeader(), onRefresh: () async { - BaseModel baseModel = - await NetUtil().get(API.manager.geographyInformation); - if (baseModel.status! && baseModel.data != null) { - _model = GeographicInformationModel.fromJson(baseModel.data); - } - _onload = false; - setState(() {}); + BaseModel baseModel = + await NetUtil().get(API.manager.geographyInformation); + if (baseModel.status! && baseModel.data != null) { + _model = GeographicInformationModel.fromJson(baseModel.data); + } + _onload = false; + setState(() {}); }, - child: _onload - ? Container() - : - ListView( - children: [ - SizedBox( - child: FadeInImage.assetNetwork( - placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, - fit: BoxFit.cover, - image: API - .image(ImgModel.first(_model.imgUrls))), - width: double.infinity, - height: 424.w, - ), - 24.w.heightBox, - - Padding( - padding: EdgeInsets.only(left: 32.w,right: 32.w,top: 40.w), - child: Text( - _model.content ?? '', - style: TextStyle( - fontSize: 26.sp, - color: (ktextSubColor), - fontWeight: FontWeight.bold), - )), - ], - ), - )); + child: _onload + ? Container() + : ListView( + children: [ + SizedBox( + child: FadeInImage.assetNetwork( + placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, + fit: BoxFit.cover, + image: API.image(ImgModel.first(_model.imgUrls))), + width: double.infinity, + height: 424.w, + ), + 24.w.heightBox, + Padding( + padding: + EdgeInsets.only(left: 32.w, right: 32.w, top: 40.w), + child: Text( + _model.content ?? '', + style: TextStyle( + fontSize: 26.sp, + color: (ktextSubColor), + fontWeight: FontWeight.bold), + )), + ], + ), + )); } } diff --git a/lib/pages/geographic_information/geographic_information_page.dart b/lib/pages/geographic_information/geographic_information_page.dart index 850a4161..b614547d 100644 --- a/lib/pages/geographic_information/geographic_information_page.dart +++ b/lib/pages/geographic_information/geographic_information_page.dart @@ -1,44 +1,41 @@ -import 'package:aku_community/models/geographic_information/geographic_information_model.dart'; -import 'package:aku_community/models/house_introduce/house_introduce_model.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/models/geographic_information/geographic_information_model.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/models/community_introduce/community_introduce_model.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class GeographicInformationPage extends StatefulWidget { - - - GeographicInformationPage({Key? key,}) - : super(key: key); + GeographicInformationPage({ + Key? key, + }) : super(key: key); @override - _GeographicInformationPageState createState() => _GeographicInformationPageState(); + _GeographicInformationPageState createState() => + _GeographicInformationPageState(); } class _GeographicInformationPageState extends State { GeographicInformationModel _model = GeographicInformationModel.init(); bool _onload = false; + @override Widget build(BuildContext context) { return BeeScaffold( bodyColor: Colors.white, title: '地理信息', - body:EasyRefresh( + body: EasyRefresh( firstRefresh: true, header: MaterialHeader(), onRefresh: () async { BaseModel baseModel = - await NetUtil().get(API.manager.geographyInformation); + await NetUtil().get(API.manager.geographyInformation); if (baseModel.status! && baseModel.data != null) { _model = GeographicInformationModel.fromJson(baseModel.data); } @@ -47,31 +44,29 @@ class _GeographicInformationPageState extends State { }, child: _onload ? Container() - : - ListView( - children: [ - SizedBox( - child: FadeInImage.assetNetwork( - placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, - fit: BoxFit.cover, - image: API - .image(ImgModel.first(_model.imgUrls))), - width: double.infinity, - height: 424.w, - ), - 24.w.heightBox, - - Padding( - padding: EdgeInsets.only(left: 32.w,right: 32.w,top: 40.w), - child: Text( - _model.content ?? '', - style: TextStyle( - fontSize: 26.sp, - color: (ktextSubColor), - fontWeight: FontWeight.bold), - )), - ], - ), + : ListView( + children: [ + SizedBox( + child: FadeInImage.assetNetwork( + placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, + fit: BoxFit.cover, + image: API.image(ImgModel.first(_model.imgUrls))), + width: double.infinity, + height: 424.w, + ), + 24.w.heightBox, + Padding( + padding: + EdgeInsets.only(left: 32.w, right: 32.w, top: 40.w), + child: Text( + _model.content ?? '', + style: TextStyle( + fontSize: 26.sp, + color: (ktextSubColor), + fontWeight: FontWeight.bold), + )), + ], + ), )); } } diff --git a/lib/pages/goods_deto_page/deto_code_page/deto_code_page.dart b/lib/pages/goods_deto_page/deto_code_page/deto_code_page.dart index bde7b276..9b5da89e 100644 --- a/lib/pages/goods_deto_page/deto_code_page/deto_code_page.dart +++ b/lib/pages/goods_deto_page/deto_code_page/deto_code_page.dart @@ -1,20 +1,19 @@ +import 'package:aku_new_community/model/manager/article_QR_code_model.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/dotted_line.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_icons/flutter_icons.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; import 'package:qr_flutter/qr_flutter.dart'; -import 'package:aku_community/model/manager/article_QR_code_model.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/dotted_line.dart'; - class DetoCodePage extends StatelessWidget { final int? id; final ArticleQRModel? model; + const DetoCodePage({Key? key, this.id, this.model}) : super(key: key); Widget _header(String estateName) { diff --git a/lib/pages/goods_deto_page/deto_create_page/deto_create_page.dart b/lib/pages/goods_deto_page/deto_create_page/deto_create_page.dart index 56377232..c3f316a6 100644 --- a/lib/pages/goods_deto_page/deto_create_page/deto_create_page.dart +++ b/lib/pages/goods_deto_page/deto_create_page/deto_create_page.dart @@ -2,34 +2,32 @@ import 'dart:io'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/constants/app_theme.dart'; +import 'package:aku_new_community/pages/goods_deto_page/select_move_company_page.dart'; +import 'package:aku_new_community/pages/manager_func.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/provider/user_provider.dart'; +import 'package:aku_new_community/ui/profile/house/pick_my_house_page.dart'; +import 'package:aku_new_community/utils/bee_parse.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bee_check_button.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:aku_new_community/widget/picker/bee_date_picker.dart'; +import 'package:aku_new_community/widget/picker/grid_image_picker.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flustars/flustars.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/constants/app_theme.dart'; -import 'package:aku_community/pages/goods_deto_page/select_move_company_page.dart'; -import 'package:aku_community/pages/manager_func.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/provider/user_provider.dart'; -import 'package:aku_community/ui/profile/house/pick_my_house_page.dart'; -import 'package:aku_community/utils/bee_parse.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_divider.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bee_check_button.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; -import 'package:aku_community/widget/picker/bee_date_picker.dart'; -import 'package:aku_community/widget/picker/grid_image_picker.dart'; - class DetoCreatePage extends StatefulWidget { DetoCreatePage({Key? key}) : super(key: key); @@ -39,10 +37,12 @@ class DetoCreatePage extends StatefulWidget { class _DetoCreatePageState extends State { List _files = []; + UserProvider get userProvider => Provider.of(context); String? _itemName; DateTime? _date; + String get datetime => DateUtil.formatDate(_date, format: "yyyy-MM-dd HH:mm:ss"); int? _selectWeight; diff --git a/lib/pages/goods_deto_page/deto_create_page/widget/common_radio.dart b/lib/pages/goods_deto_page/deto_create_page/widget/common_radio.dart index 73f7a95f..b09acebc 100644 --- a/lib/pages/goods_deto_page/deto_create_page/widget/common_radio.dart +++ b/lib/pages/goods_deto_page/deto_create_page/widget/common_radio.dart @@ -1,14 +1,14 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/animated/animated_scale.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/animated/animated_scale.dart'; - class CommonRadio extends StatefulWidget { final T? value; final T? groupValue; final Widget? text; final double? size; + CommonRadio({Key? key, this.value, this.groupValue, this.text, this.size}) : super(key: key); @@ -18,6 +18,7 @@ class CommonRadio extends StatefulWidget { class _CommonRadioState extends State { bool get _selected => widget.value == widget.groupValue; + double get smallSize { return widget.size!.isNull! ? 24.w : (widget.size! * 24 / 40); } diff --git a/lib/pages/goods_deto_page/goods_deto_page.dart b/lib/pages/goods_deto_page/goods_deto_page.dart index c547d56e..fe0fbd66 100644 --- a/lib/pages/goods_deto_page/goods_deto_page.dart +++ b/lib/pages/goods_deto_page/goods_deto_page.dart @@ -1,23 +1,22 @@ +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/constants/app_theme.dart'; +import 'package:aku_new_community/model/manager/goods_out_model.dart'; +import 'package:aku_new_community/pages/goods_deto_page/deto_create_page/deto_create_page.dart'; +import 'package:aku_new_community/pages/manager_func.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/provider/user_provider.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:aku_new_community/widget/buttons/radio_button.dart'; +import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - -import 'package:bot_toast/bot_toast.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/constants/app_theme.dart'; -import 'package:aku_community/model/manager/goods_out_model.dart'; -import 'package:aku_community/pages/goods_deto_page/deto_create_page/deto_create_page.dart'; -import 'package:aku_community/pages/manager_func.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/provider/user_provider.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; -import 'package:aku_community/widget/buttons/radio_button.dart'; import 'widget/goods_info_card.dart'; class GoodsDetoPage extends StatefulWidget { @@ -31,6 +30,7 @@ class _GoodsDetoPageState extends State { EasyRefreshController _refreshController = EasyRefreshController(); List _select = []; bool _isEdit = false; + bool _canSkew(int? state) { switch (state) { case 1: diff --git a/lib/pages/goods_deto_page/select_move_company_page.dart b/lib/pages/goods_deto_page/select_move_company_page.dart index a28cf4f8..f13fa99e 100644 --- a/lib/pages/goods_deto_page/select_move_company_page.dart +++ b/lib/pages/goods_deto_page/select_move_company_page.dart @@ -1,19 +1,17 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/model/manager/moving_company_model.dart'; +import 'package:aku_new_community/pages/goods_deto_page/deto_create_page/widget/common_radio.dart'; +import 'package:aku_new_community/pages/manager_func.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - -import 'package:bot_toast/bot_toast.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/model/manager/moving_company_model.dart'; -import 'package:aku_community/pages/goods_deto_page/deto_create_page/widget/common_radio.dart'; -import 'package:aku_community/pages/manager_func.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_divider.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; - class SelectMoveCompanyPage extends StatefulWidget { SelectMoveCompanyPage({Key? key}) : super(key: key); @@ -26,6 +24,7 @@ class _SelectMoveCompanyPageState extends State { late MovingCompanyModel _companyModel; EasyRefreshController? _controller; bool _onloading = true; + String? get result { if (_selected == _companyModel.appMovingCompanyVoList!.length) { return '已选择自己联系'; diff --git a/lib/pages/goods_deto_page/widget/goods_info_card.dart b/lib/pages/goods_deto_page/widget/goods_info_card.dart index e10be101..3acc6e72 100644 --- a/lib/pages/goods_deto_page/widget/goods_info_card.dart +++ b/lib/pages/goods_deto_page/widget/goods_info_card.dart @@ -1,15 +1,16 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/model/manager/goods_out_model.dart'; +import 'package:aku_new_community/utils/bee_map.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/views/horizontal_image_view.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/model/manager/goods_out_model.dart'; -import 'package:aku_community/utils/bee_map.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/views/horizontal_image_view.dart'; import 'goods_info_card_button.dart'; class GoodsInfoCard extends StatelessWidget { final GoodsOutModel? model; + GoodsInfoCard({ Key? key, this.model, diff --git a/lib/pages/goods_deto_page/widget/goods_info_card_button.dart b/lib/pages/goods_deto_page/widget/goods_info_card_button.dart index d4377da1..61da065b 100644 --- a/lib/pages/goods_deto_page/widget/goods_info_card_button.dart +++ b/lib/pages/goods_deto_page/widget/goods_info_card_button.dart @@ -1,25 +1,25 @@ +import 'package:aku_new_community/model/manager/article_QR_code_model.dart'; +import 'package:aku_new_community/pages/goods_deto_page/deto_code_page/deto_code_page.dart'; +import 'package:aku_new_community/pages/manager_func.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - -import 'package:bot_toast/bot_toast.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:get/get.dart'; import 'package:url_launcher/url_launcher.dart'; -import 'package:aku_community/model/manager/article_QR_code_model.dart'; -import 'package:aku_community/pages/goods_deto_page/deto_code_page/deto_code_page.dart'; -import 'package:aku_community/pages/manager_func.dart'; -import 'package:aku_community/utils/headers.dart'; - class GoodsInfoCardButton extends StatelessWidget { final String? tel; final int? id; + GoodsInfoCardButton({Key? key, this.tel, this.id}) : super(key: key); final List> _listButton = [ {'title': '查看二维码', 'icon': MaterialCommunityIcons.qrcode}, {'title': '搬家公司', 'icon': SimpleLineIcons.phone} ]; + Future _phoneCall(String url) async { if (await canLaunch(url)) { await launch(url); diff --git a/lib/pages/goods_manage_page/borrow/borrow_examine_page.dart b/lib/pages/goods_manage_page/borrow/borrow_examine_page.dart index 1649ba5a..494eb4be 100644 --- a/lib/pages/goods_manage_page/borrow/borrow_examine_page.dart +++ b/lib/pages/goods_manage_page/borrow/borrow_examine_page.dart @@ -1,16 +1,12 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/pages/tab_navigator.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class BorrowExaminePage extends StatefulWidget { - BorrowExaminePage({Key? key}) : super(key: key); @override @@ -29,22 +25,12 @@ class _BorrowExaminePageState extends State { SizedBox( width: 110.w, height: 110.w, - child: Image.asset(R.ASSETS_ICONS_EXAMINE_PNG - ), + child: Image.asset(R.ASSETS_ICONS_EXAMINE_PNG), ), 48.w.heightBox, - '正在审核中' - .text - .color(ktextPrimary) - .size(36.sp) - .bold - .make(), + '正在审核中'.text.color(ktextPrimary).size(36.sp).bold.make(), 16.w.heightBox, - '使用后请记得归还' - .text - .color(ktextSubColor) - .size(26.sp) - .make(), + '使用后请记得归还'.text.color(ktextSubColor).size(26.sp).make(), 95.w.heightBox, MaterialButton( color: kPrimaryColor, @@ -58,12 +44,9 @@ class _BorrowExaminePageState extends State { padding: EdgeInsets.symmetric(vertical: 24.w), minWidth: double.infinity, onPressed: () { - Get.back();}, - child: '返回物品借还列表' - .text - .color( ktextPrimary ) - .size(36.sp) - .make(), + Get.back(); + }, + child: '返回物品借还列表'.text.color(ktextPrimary).size(36.sp).make(), ) ], ), diff --git a/lib/pages/goods_manage_page/borrow/borrow_finsh_page.dart b/lib/pages/goods_manage_page/borrow/borrow_finsh_page.dart index 82e16e42..faf36694 100644 --- a/lib/pages/goods_manage_page/borrow/borrow_finsh_page.dart +++ b/lib/pages/goods_manage_page/borrow/borrow_finsh_page.dart @@ -1,17 +1,16 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/pages/tab_navigator.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/pages/tab_navigator.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class BorrowFinshPage extends StatefulWidget { final bool? isSuccess; final String? failText; + BorrowFinshPage({Key? key, this.isSuccess, this.failText}) : super(key: key); @override diff --git a/lib/pages/goods_manage_page/borrow/borrow_goods_detail_page.dart b/lib/pages/goods_manage_page/borrow/borrow_goods_detail_page.dart index 91f263a1..85485fef 100644 --- a/lib/pages/goods_manage_page/borrow/borrow_goods_detail_page.dart +++ b/lib/pages/goods_manage_page/borrow/borrow_goods_detail_page.dart @@ -1,24 +1,23 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/manager/article_borrow_detail_model.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/animated/animated_scale.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/radio_button.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/model/manager/article_borrow_detail_model.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/animated/animated_scale.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/radio_button.dart'; - class BorrowGoodsDetailPage extends StatefulWidget { final int articleId; final List? receiveIds; + BorrowGoodsDetailPage({Key? key, required this.articleId, this.receiveIds}) : super(key: key); @@ -31,7 +30,9 @@ class _BorrowGoodsDetailPageState extends State { List _models = []; bool _onload = true; List _selectItems = []; + bool get allSelect => _selectItems.length == _models.length; + @override void initState() { super.initState(); @@ -195,10 +196,14 @@ class _BorrowGoodsDetailPageState extends State { child: ClipRRect( child: FadeInImage.assetNetwork( placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, - image: API.image(ImgModel.first(model.imgList)), imageErrorBuilder: (context, error, stackTrace) { - return Image.asset(R.ASSETS_IMAGES_PLACEHOLDER_WEBP,height: 184.w, - width: 184.w,); - }, + image: API.image(ImgModel.first(model.imgList)), + imageErrorBuilder: (context, error, stackTrace) { + return Image.asset( + R.ASSETS_IMAGES_PLACEHOLDER_WEBP, + height: 184.w, + width: 184.w, + ); + }, ), ), ), diff --git a/lib/pages/goods_manage_page/borrow/borrow_goods_page.dart b/lib/pages/goods_manage_page/borrow/borrow_goods_page.dart index f96114f3..7aaf740b 100644 --- a/lib/pages/goods_manage_page/borrow/borrow_goods_page.dart +++ b/lib/pages/goods_manage_page/borrow/borrow_goods_page.dart @@ -1,14 +1,13 @@ -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/model/manager/article_borrow_model.dart'; -import 'package:aku_community/pages/goods_manage_page/borrow/borrow_finsh_page.dart'; -import 'package:aku_community/pages/goods_manage_page/borrow/borrow_goods_detail_page.dart'; -import 'package:aku_community/utils/network/base_list_model.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/manager/article_borrow_model.dart'; +import 'package:aku_new_community/pages/goods_manage_page/borrow/borrow_goods_detail_page.dart'; +import 'package:aku_new_community/utils/network/base_list_model.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; @@ -139,17 +138,15 @@ class _BorrowGoodsPageState extends State { color: kPrimaryColor, padding: EdgeInsets.symmetric(horizontal: 50.w, vertical: 15.w), onPressed: () async { - if(_submitIds.length<1){ + if (_submitIds.length < 1) { BotToast.showText(text: '请先选择您要借出的物品'); - }else{ + } else { BaseModel baseModel = await NetUtil().post( API.manager.articleBorrowGoods, params: {"ids": _submitIds}, showMessage: false); - Get.to(BorrowExaminePage( - )); + Get.to(BorrowExaminePage()); } - }, child: '借出'.text.black.size(32.sp).bold.make(), ), @@ -178,8 +175,11 @@ class _BorrowGoodsPageState extends State { placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, image: API.image(ImgModel.first(model.imgUrls)), imageErrorBuilder: (context, error, stackTrace) { - return Image.asset(R.ASSETS_IMAGES_PLACEHOLDER_WEBP,height: 184.w, - width: 184.w,); + return Image.asset( + R.ASSETS_IMAGES_PLACEHOLDER_WEBP, + height: 184.w, + width: 184.w, + ); }, ), ), diff --git a/lib/pages/goods_manage_page/goods_manage_page.dart b/lib/pages/goods_manage_page/goods_manage_page.dart index 805a5138..b863d88d 100644 --- a/lib/pages/goods_manage_page/goods_manage_page.dart +++ b/lib/pages/goods_manage_page/goods_manage_page.dart @@ -1,24 +1,23 @@ +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/manager/article_borrow_model.dart'; +import 'package:aku_new_community/pages/goods_manage_page/borrow/borrow_goods_page.dart'; +import 'package:aku_new_community/pages/goods_manage_page/mine_goods_page/mine_goods_page.dart'; +import 'package:aku_new_community/pages/goods_manage_page/retrun/return_goods_detail_page.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/model/manager/article_borrow_model.dart'; -import 'package:aku_community/pages/goods_manage_page/borrow/borrow_goods_page.dart'; -import 'package:aku_community/pages/goods_manage_page/mine_goods_page/mine_goods_page.dart'; -import 'package:aku_community/pages/goods_manage_page/retrun/return_goods_detail_page.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; - class GoodsManagePage extends StatefulWidget { final bool isBorrow; + GoodsManagePage({Key? key, this.isBorrow = true}) : super(key: key); @override @@ -58,8 +57,11 @@ class _GoodsManagePageState extends State { placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, image: API.image(ImgModel.first(model.imgUrls)), imageErrorBuilder: (context, error, stackTrace) { - return Image.asset(R.ASSETS_IMAGES_PLACEHOLDER_WEBP,height: 106.w, - width: 106.w,); + return Image.asset( + R.ASSETS_IMAGES_PLACEHOLDER_WEBP, + height: 106.w, + width: 106.w, + ); }, ), ), @@ -122,7 +124,9 @@ class _GoodsManagePageState extends State { itemCount: items.length); }), bottomNavi: BottomButton( - child: widget.isBorrow?'出借'.text.black.size(32.sp).bold.make():'归还'.text.black.size(32.sp).bold.make(), + child: widget.isBorrow + ? '出借'.text.black.size(32.sp).bold.make() + : '归还'.text.black.size(32.sp).bold.make(), onPressed: widget.isBorrow ? () { Get.to(() => BorrowGoodsPage()); diff --git a/lib/pages/goods_manage_page/mine_goods_page/mine_goods_page.dart b/lib/pages/goods_manage_page/mine_goods_page/mine_goods_page.dart index 1868a496..c97ffb82 100644 --- a/lib/pages/goods_manage_page/mine_goods_page/mine_goods_page.dart +++ b/lib/pages/goods_manage_page/mine_goods_page/mine_goods_page.dart @@ -1,13 +1,13 @@ -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/manager/mine_goods_model.dart'; -import 'package:aku_community/pages/goods_manage_page/borrow/borrow_examine_page.dart'; -import 'package:aku_community/pages/manager_func.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/utils/bee_map.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/manager/mine_goods_model.dart'; +import 'package:aku_new_community/pages/goods_manage_page/borrow/borrow_examine_page.dart'; +import 'package:aku_new_community/pages/manager_func.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/utils/bee_map.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; @@ -67,8 +67,7 @@ class _MineGoodsPageState extends State { API.manager.articleBorrowGoods, params: {"ids": _list}, showMessage: false); - Get.to(BorrowExaminePage( - )); + Get.to(BorrowExaminePage()); }, child: Container( width: 120.w, @@ -93,13 +92,12 @@ class _MineGoodsPageState extends State { return InkWell( onTap: () async { BaseModel baseModel = - await NetUtil().post(API.manager.articleReturnGoods, - params: { - 'ids': _list, - }, - showMessage: true); - Get.to(BorrowExaminePage( - )); + await NetUtil().post(API.manager.articleReturnGoods, + params: { + 'ids': _list, + }, + showMessage: true); + Get.to(BorrowExaminePage()); }, child: Container( width: 120.w, @@ -118,8 +116,6 @@ class _MineGoodsPageState extends State { ); } - - String _getDatelength(int date) { if (date >= 24) { return '${(date ~/ 24)}天' + '${date % 24}小时'; @@ -199,17 +195,16 @@ class _MineGoodsPageState extends State { '借用状态:', style: TextStyle( fontSize: 24.sp, - color:Color(0xff999999), + color: Color(0xff999999), ), ), Text( '${BeeMap.borrowStatus[model.borrowStatus]}', style: TextStyle( fontSize: 24.sp, - color:BeeMap.borrowStatusColor[model.borrowStatus], + color: BeeMap.borrowStatusColor[model.borrowStatus], ), ), - ], ), ), @@ -219,13 +214,21 @@ class _MineGoodsPageState extends State { //mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Spacer(), - model.borrowStatus==1||model.borrowStatus==4?_frmLoss(model.id):SizedBox(), - - model.borrowStatus==0||model.borrowStatus==2?SizedBox(width: 16.w):SizedBox(), - model.borrowStatus==0||model.borrowStatus==2?_frmBorrow(model.id):SizedBox(), - - model.borrowStatus==1||model.borrowStatus==4?SizedBox(width: 16.w):SizedBox(), - model.borrowStatus==1||model.borrowStatus==4?_frmReturn(model.id):SizedBox(), + model.borrowStatus == 1 || model.borrowStatus == 4 + ? _frmLoss(model.id) + : SizedBox(), + model.borrowStatus == 0 || model.borrowStatus == 2 + ? SizedBox(width: 16.w) + : SizedBox(), + model.borrowStatus == 0 || model.borrowStatus == 2 + ? _frmBorrow(model.id) + : SizedBox(), + model.borrowStatus == 1 || model.borrowStatus == 4 + ? SizedBox(width: 16.w) + : SizedBox(), + model.borrowStatus == 1 || model.borrowStatus == 4 + ? _frmReturn(model.id) + : SizedBox(), ], ), ), diff --git a/lib/pages/goods_manage_page/retrun/return_goods_detail_page.dart b/lib/pages/goods_manage_page/retrun/return_goods_detail_page.dart index 25cb67aa..468900c7 100644 --- a/lib/pages/goods_manage_page/retrun/return_goods_detail_page.dart +++ b/lib/pages/goods_manage_page/retrun/return_goods_detail_page.dart @@ -1,23 +1,21 @@ -import 'package:aku_community/pages/goods_manage_page/borrow/borrow_examine_page.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/manager/article_return_list_model.dart'; +import 'package:aku_new_community/pages/goods_manage_page/borrow/borrow_examine_page.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/animated/animated_scale.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/radio_button.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/model/manager/article_return_list_model.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/animated/animated_scale.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/radio_button.dart'; - class ReturnGoodsDetailPage extends StatefulWidget { ReturnGoodsDetailPage({Key? key}) : super(key: key); @@ -30,7 +28,9 @@ class _ReturnGoodsDetailPageState extends State { late List _models; bool _onload = true; List _selectItems = []; + bool get allSelect => _selectItems.length == _models.length; + @override void initState() { super.initState(); @@ -135,19 +135,17 @@ class _ReturnGoodsDetailPageState extends State { color: kPrimaryColor, padding: EdgeInsets.symmetric(horizontal: 50.w, vertical: 15.w), onPressed: () async { - if(_selectItems.length<1){ + if (_selectItems.length < 1) { BotToast.showText(text: '请先选择您要借归还的物品'); - }else{ + } else { BaseModel baseModel = - await NetUtil().post(API.manager.articleReturnGoods, - params: { - 'ids': _selectItems, - }, - showMessage: true); - Get.to(BorrowExaminePage( - )); + await NetUtil().post(API.manager.articleReturnGoods, + params: { + 'ids': _selectItems, + }, + showMessage: true); + Get.to(BorrowExaminePage()); } - }, child: '归还'.text.black.size(32.sp).bold.make(), ), @@ -206,8 +204,11 @@ class _ReturnGoodsDetailPageState extends State { placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, image: API.image(ImgModel.first(model.imgList)), imageErrorBuilder: (context, error, stackTrace) { - return Image.asset(R.ASSETS_IMAGES_PLACEHOLDER_WEBP,height: 184.w, - width: 184.w,); + return Image.asset( + R.ASSETS_IMAGES_PLACEHOLDER_WEBP, + height: 184.w, + width: 184.w, + ); }, ), ), diff --git a/lib/pages/goods_manage_page/select_borrow_return_page.dart b/lib/pages/goods_manage_page/select_borrow_return_page.dart index 6f7ce71b..faf89f1b 100644 --- a/lib/pages/goods_manage_page/select_borrow_return_page.dart +++ b/lib/pages/goods_manage_page/select_borrow_return_page.dart @@ -1,15 +1,13 @@ +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/extensions/widget_list_ext.dart'; +import 'package:aku_new_community/pages/goods_manage_page/goods_manage_page.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/extensions/widget_list_ext.dart'; -import 'package:aku_community/pages/goods_manage_page/goods_manage_page.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class SelectBorrowReturnPage extends StatefulWidget { SelectBorrowReturnPage({Key? key}) : super(key: key); diff --git a/lib/pages/home/home_page.dart b/lib/pages/home/home_page.dart index 9ff8fa44..03fd91b7 100644 --- a/lib/pages/home/home_page.dart +++ b/lib/pages/home/home_page.dart @@ -1,33 +1,33 @@ // Dart imports: -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/model/community/activity_item_model.dart'; -import 'package:aku_community/model/community/board_model.dart'; -import 'package:aku_community/model/community/swiper_model.dart'; -import 'package:aku_community/pages/home/widget/animate_app_bar.dart'; -import 'package:aku_community/pages/life_pay/life_pay_choose_page.dart'; -import 'package:aku_community/pages/message_center_page/message_center_page.dart'; -import 'package:aku_community/pages/one_alarm/widget/alarm_page.dart'; -import 'package:aku_community/pages/things_page/fixed_submit_page.dart'; -import 'package:aku_community/pages/visitor_access_page/visitor_access_page.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/ui/community/activity/activity_card.dart'; -import 'package:aku_community/ui/community/activity/activity_list_page.dart'; -import 'package:aku_community/ui/community/community_func.dart'; -import 'package:aku_community/ui/community/facility/facility_appointment_page.dart'; -import 'package:aku_community/ui/home/application/all_application.dart'; -import 'package:aku_community/ui/home/home_notification.dart'; -import 'package:aku_community/ui/home/home_title.dart'; -import 'package:aku_community/ui/home/public_infomation/public_information_detail_page.dart'; -import 'package:aku_community/ui/manager/advice/advice_page.dart'; -import 'package:aku_community/ui/search/bee_search.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/login_util.dart'; -import 'package:aku_community/widget/animated/OverlayWidget.dart'; -import 'package:aku_community/widget/others/rectIndicator.dart'; -import 'package:aku_community/widget/others/user_tool.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/community/activity_item_model.dart'; +import 'package:aku_new_community/model/community/board_model.dart'; +import 'package:aku_new_community/model/community/swiper_model.dart'; +import 'package:aku_new_community/pages/home/widget/animate_app_bar.dart'; +import 'package:aku_new_community/pages/life_pay/life_pay_choose_page.dart'; +import 'package:aku_new_community/pages/message_center_page/message_center_page.dart'; +import 'package:aku_new_community/pages/one_alarm/widget/alarm_page.dart'; +import 'package:aku_new_community/pages/things_page/fixed_submit_page.dart'; +import 'package:aku_new_community/pages/visitor_access_page/visitor_access_page.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/ui/community/activity/activity_card.dart'; +import 'package:aku_new_community/ui/community/activity/activity_list_page.dart'; +import 'package:aku_new_community/ui/community/community_func.dart'; +import 'package:aku_new_community/ui/community/facility/facility_appointment_page.dart'; +import 'package:aku_new_community/ui/home/application/all_application.dart'; +import 'package:aku_new_community/ui/home/home_notification.dart'; +import 'package:aku_new_community/ui/home/home_title.dart'; +import 'package:aku_new_community/ui/home/public_infomation/public_information_detail_page.dart'; +import 'package:aku_new_community/ui/manager/advice/advice_page.dart'; +import 'package:aku_new_community/ui/search/bee_search.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/login_util.dart'; +import 'package:aku_new_community/widget/animated/OverlayWidget.dart'; +import 'package:aku_new_community/widget/others/rectIndicator.dart'; +import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:badges/badges.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -124,7 +124,7 @@ class _HomePageState extends State end: -4.w, ), badgeContent: Text( - (sum>99?99:sum).toString(), + (sum > 99 ? 99 : sum).toString(), style: TextStyle(color: Colors.white, fontSize: 20.sp), ), child: GestureDetector( @@ -514,10 +514,10 @@ class _HomePageState extends State '报事报修', R.ASSETS_ICONS_FUNC_BSBX_PNG, () => FixedSubmitPage()), getFunctionBtn('设施预约', R.ASSETS_ICONS_FUNC_SSYY_PNG, () => FacilityAppointmentPage()), - getFunctionBtn('生活缴费', R.ASSETS_ICONS_FUNC_SHJF_PNG, - () => LifePayChoosePage()), - getFunctionBtn('全部应用', R.ASSETS_ICONS_FUNC_ALL_PNG, - () => AllApplicationPage()), + getFunctionBtn( + '生活缴费', R.ASSETS_ICONS_FUNC_SHJF_PNG, () => LifePayChoosePage()), + getFunctionBtn( + '全部应用', R.ASSETS_ICONS_FUNC_ALL_PNG, () => AllApplicationPage()), ], ); } diff --git a/lib/pages/home/widget/animate_app_bar.dart b/lib/pages/home/widget/animate_app_bar.dart index 67a22f93..13e7d18f 100644 --- a/lib/pages/home/widget/animate_app_bar.dart +++ b/lib/pages/home/widget/animate_app_bar.dart @@ -1,11 +1,9 @@ +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:provider/provider.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/utils/headers.dart'; - class AnimateAppBar extends StatefulWidget with PreferredSizeWidget { final ScrollController? scrollController; final List? actions; @@ -45,39 +43,38 @@ class _AnimateAppBarState extends State { padding: const EdgeInsets.only(top: 5), child: AppBar( titleSpacing: 10.0, - title: Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - if (appProvider.location != null) - Padding( - padding: const EdgeInsets.only(right: 5), - child: Image.asset( - R.ASSETS_ICONS_ICON_MAIN_LOCATION_PNG, - width: 32.w, - height: 32.w, - ), - ), - Text( - appProvider.location?['city']==null?'':appProvider.location?['city'] as String? ?? '', - style: TextStyle( - fontWeight: FontWeight.w600, - fontSize: 24.sp, - color: Color(0xff333333), - ), - textAlign: TextAlign.center, - ), - Text( - '(${appProvider.weatherType} ${appProvider.weatherTemp}℃)', - style: TextStyle( - fontSize: 24.sp, - color: Color(0xff999999), - ), - textAlign: TextAlign.center, + title: Row(crossAxisAlignment: CrossAxisAlignment.center, children: [ + if (appProvider.location != null) + Padding( + padding: const EdgeInsets.only(right: 5), + child: Image.asset( + R.ASSETS_ICONS_ICON_MAIN_LOCATION_PNG, + width: 32.w, + height: 32.w, ), - ]), + ), + Text( + appProvider.location?['city'] == null + ? '' + : appProvider.location?['city'] as String? ?? '', + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 24.sp, + color: Color(0xff333333), + ), + textAlign: TextAlign.center, + ), + Text( + '(${appProvider.weatherType} ${appProvider.weatherTemp}℃)', + style: TextStyle( + fontSize: 24.sp, + color: Color(0xff999999), + ), + textAlign: TextAlign.center, + ), + ]), backgroundColor: _bgColor, actions: widget.actions, - ), ); } diff --git a/lib/pages/home/widget/filter_tool_bar.dart b/lib/pages/home/widget/filter_tool_bar.dart index 58c7a175..d7199f2c 100644 --- a/lib/pages/home/widget/filter_tool_bar.dart +++ b/lib/pages/home/widget/filter_tool_bar.dart @@ -7,10 +7,9 @@ * ==================================================== */ -import 'package:aku_community/utils/text_utils.dart'; +import 'package:aku_new_community/utils/text_utils.dart'; import 'package:flutter/material.dart'; - /// 自筛选列表点击监听 typedef SelectedListener = Function(int selectedIndex, FilterItemModel item); @@ -35,14 +34,16 @@ class FilterToolBarController { } get toolBarDx { - RenderBox box = _toolBarKey.currentContext?.findRenderObject() as RenderBox;//_toolBarKey.currentContext.findRenderObject(); + RenderBox box = _toolBarKey.currentContext?.findRenderObject() + as RenderBox; //_toolBarKey.currentContext.findRenderObject(); Offset offset = box.localToGlobal(Offset.zero); return offset.dx; } double get toolBarDy { /// toolbar 距离top 的间距 - container外层距离top的间距 - RenderBox containerBox = _containerKey.currentContext?.findRenderObject() as RenderBox; + RenderBox containerBox = + _containerKey.currentContext?.findRenderObject() as RenderBox; RenderBox box = _toolBarKey.currentContext?.findRenderObject() as RenderBox; Offset containerTopOffset = containerBox.localToGlobal(Offset.zero); Offset toolBarTopOffset = box.localToGlobal(Offset.zero); @@ -83,7 +84,7 @@ class FilterToolBarResultContainer extends StatefulWidget { final Widget? body; const FilterToolBarResultContainer( - { GlobalKey? key, this.controller, this.body}) + {GlobalKey? key, this.controller, this.body}) : assert(controller != null, "controller 不为空"); @override @@ -177,67 +178,67 @@ class _FilterToolBarResultContainerState widget.controller?._toolBarKey == null ? Container() : Positioned( - top: widget.controller!.toolBarDy + 40, - left: 0, - right: 0, - bottom: 0, - child: Stack(children: [ - widget.controller!.item.type == FilterItemType.list - ? _buildList(context) - : Container(), - ])) + top: widget.controller!.toolBarDy + 40, + left: 0, + right: 0, + bottom: 0, + child: Stack(children: [ + widget.controller!.item.type == FilterItemType.list + ? _buildList(context) + : Container(), + ])) ], ); } Widget _maskView() { - double? num =widget.controller?.toolBarDy; + double? num = widget.controller?.toolBarDy; return widget.controller?._toolBarKey == null ? Container() : Positioned( - top: (num as double) + 40, - left: 0, - right: 0, - bottom: 0, - child: Offstage( - child: GestureDetector( - behavior: HitTestBehavior.translucent, - onTap: () { - widget.controller!.helper.changeOptionListStatus( - OptionListStatus.close, - ); - widget.controller!.updateToolBarState(false); - _animationController.reset(); - }, - child: Opacity( - opacity: 0.3, - child: Container( - color: Colors.black, + top: (num as double) + 40, + left: 0, + right: 0, + bottom: 0, + child: Offstage( + child: GestureDetector( + behavior: HitTestBehavior.translucent, + onTap: () { + widget.controller!.helper.changeOptionListStatus( + OptionListStatus.close, + ); + widget.controller!.updateToolBarState(false); + _animationController.reset(); + }, + child: Opacity( + opacity: 0.3, + child: Container( + color: Colors.black, + ), + ), + ), + offstage: _animation == null || + (_animation.status == AnimationStatus.dismissed), ), - ), - ), - offstage: _animation == null || - (_animation.status == AnimationStatus.dismissed), - ), - ); + ); } /// 有多个子列表时 因为有设置最大行数,小于最大行数[widget.maxLines]时,以子列表个数为准, /// 否则以最大行数为准,选中时切换动画, _buildAnimation(FilterItemModel item) { _lines = - item.subtitles!.length > maxLines ? maxLines : item.subtitles!.length; + item.subtitles!.length > maxLines ? maxLines : item.subtitles!.length; _animation = new Tween( - begin: 0.0 - _lines * _lineHeight - _bottomSpacing - _topSpacing, - end: 0.0) + begin: 0.0 - _lines * _lineHeight - _bottomSpacing - _topSpacing, + end: 0.0) .animate(_animationController) - ..addListener(() { - setState(() { - // the state that has changed here is the animation object’s value - }); - }); + ..addListener(() { + setState(() { + // the state that has changed here is the animation object’s value + }); + }); } /// 筛选子列表 @@ -279,7 +280,7 @@ class _FilterToolBarResultContainerState item.selectedSubIndex = index; String title = item.subtitleShort == null || - TextUtils.isEmpty(item.subtitleShort![index]) + TextUtils.isEmpty(item.subtitleShort![index]) ? item.subtitles![index] : item.subtitleShort![index]; item.title = title; @@ -316,13 +317,13 @@ class _FilterToolBarResultContainerState ), Expanded( child: Text( - item.subtitles![index], - style: TextStyle( - fontSize: _subTitleFont, - color: _unselectedColor, - fontWeight: + item.subtitles![index], + style: TextStyle( + fontSize: _subTitleFont, + color: _unselectedColor, + fontWeight: (subTitleSelected ? FontWeight.w600 : FontWeight.w400)), - )), + )), ], ), ); @@ -330,7 +331,6 @@ class _FilterToolBarResultContainerState } class FilterToolBar extends StatefulWidget { - FilterToolBar({ required this.titles, required this.listener, @@ -372,7 +372,6 @@ class _FilterToolBarState extends State widget.controller?.selectedIndex = widget.controller?.selectedIndex ?? 0; - widget.controller?._toolBarKey = _key; widget.controller?.updateToolBarState = (bool update) { @@ -397,9 +396,13 @@ class _FilterToolBarState extends State Container _buildToolBar() { List items = []; if (widget.startWidget != null) { - items.add(SizedBox(width: 60,)); + items.add(SizedBox( + width: 60, + )); items.add(widget.startWidget!); - items.add(SizedBox(width: 20,)); + items.add(SizedBox( + width: 20, + )); } items.addAll(_buildToolBarItem()); if (widget.trialing != null) { @@ -464,7 +467,7 @@ class _FilterToolBarState extends State //print(item.topSelected); //item.topSelected = !item.topSelected; // print(widget.titles[index].topSelected); - item.selectedList![index] = ! item.selectedList![index]; + item.selectedList![index] = !item.selectedList![index]; item.topSelected = item.selectedList![index]; } widget.listener(index, item); @@ -485,15 +488,15 @@ class _FilterToolBarState extends State child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Text( - item.title, - style: TextStyle( - fontSize: widget.fontSize, color: color, fontWeight: FontWeight.w400 - ) - // AppTextStyle.generate(widget.fontSize, - // color: color, fontWeight: FontWeight.w400), - ), - _buildArrow(item, color, selected,index) + Text(item.title, + style: TextStyle( + fontSize: widget.fontSize, + color: color, + fontWeight: FontWeight.w400) + // AppTextStyle.generate(widget.fontSize, + // color: color, fontWeight: FontWeight.w400), + ), + _buildArrow(item, color, selected, index) ], ), ), @@ -502,14 +505,14 @@ class _FilterToolBarState extends State }).toList(); } - _buildArrow(FilterItemModel item, color, bool selected,int index) { + _buildArrow(FilterItemModel item, color, bool selected, int index) { if (item.type == FilterItemType.list) { return Icon( selected ? (widget.controller?.helper != null && - widget.controller?.helper.status == OptionListStatus.open - ? Icons.arrow_drop_up - : Icons.arrow_drop_down) + widget.controller?.helper.status == OptionListStatus.open + ? Icons.arrow_drop_up + : Icons.arrow_drop_down) : Icons.arrow_drop_down, color: color, size: 19, @@ -519,7 +522,9 @@ class _FilterToolBarState extends State return Padding( padding: const EdgeInsets.only(left: 2.0), child: Icon( - item.selectedList![index] ? IconData( 0xe620, fontFamily: "AppIcons"): IconData( 0xe621, fontFamily: "AppIcons"), + item.selectedList![index] + ? IconData(0xe620, fontFamily: "AppIcons") + : IconData(0xe621, fontFamily: "AppIcons"), size: 7, color: color, ), @@ -531,12 +536,12 @@ class _FilterToolBarState extends State mainAxisAlignment: MainAxisAlignment.center, children: [ Icon( - IconData( 0xe620, fontFamily: "AppIcons"), + IconData(0xe620, fontFamily: "AppIcons"), size: 7, color: _unselectedColor, ), Icon( - IconData( 0xe621, fontFamily: "AppIcons"), + IconData(0xe621, fontFamily: "AppIcons"), size: 7, color: _unselectedColor, ), @@ -578,10 +583,10 @@ class FilterItemModel { this.selectedList, this.subtitles, this.subtitleShort, - this.topSelected = true, + this.topSelected = true, }) : assert( - type == FilterItemType.list - ? (subtitles != null && subtitles.length > 0) - : true, - "type为list,列表项不能为空"); + type == FilterItemType.list + ? (subtitles != null && subtitles.length > 0) + : true, + "type为list,列表项不能为空"); } diff --git a/lib/pages/home/widget/home_search.dart b/lib/pages/home/widget/home_search.dart index 3cd82c52..4cb5bbf7 100644 --- a/lib/pages/home/widget/home_search.dart +++ b/lib/pages/home/widget/home_search.dart @@ -1,12 +1,7 @@ +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:get/get.dart'; - -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/ui/search/bee_search.dart'; -import 'package:aku_community/utils/headers.dart'; - class HomeSearch extends StatefulWidget { HomeSearch({Key? key}) : super(key: key); diff --git a/lib/pages/house_introduce/house_detail_page.dart b/lib/pages/house_introduce/house_detail_page.dart index d8978b44..16bf6c4c 100644 --- a/lib/pages/house_introduce/house_detail_page.dart +++ b/lib/pages/house_introduce/house_detail_page.dart @@ -1,17 +1,13 @@ -import 'package:aku_community/models/house_introduce/house_introduce_model.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/models/house_introduce/house_introduce_model.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; - - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; - -import 'package:aku_community/widget/bee_scaffold.dart'; - class HouseDetailPage extends StatefulWidget { final HouseIntroduceModel houseIntroduceModel; @@ -45,11 +41,11 @@ class _HouseDetailPageState extends State { Padding( padding: EdgeInsets.symmetric(horizontal: 32.w), child: - // widget.houseIntroduceModel.content!.text - // .size(28.sp) - // .color(ktextPrimary) - // .make(), - Text( + // widget.houseIntroduceModel.content!.text + // .size(28.sp) + // .color(ktextPrimary) + // .make(), + Text( widget.houseIntroduceModel.name ?? '', style: TextStyle( fontSize: 30.sp, @@ -57,16 +53,16 @@ class _HouseDetailPageState extends State { fontWeight: FontWeight.bold), )), Padding( - padding: EdgeInsets.only(left: 32.w,right: 32.w,top: 16.w), + padding: EdgeInsets.only(left: 32.w, right: 32.w, top: 16.w), child: Text( - '发布于:${widget.houseIntroduceModel.getReleaseDate}' , + '发布于:${widget.houseIntroduceModel.getReleaseDate}', style: TextStyle( fontSize: 20.sp, color: (ktextThirdColor), fontWeight: FontWeight.bold), )), Padding( - padding: EdgeInsets.only(left: 32.w,right: 32.w,top: 40.w), + padding: EdgeInsets.only(left: 32.w, right: 32.w, top: 40.w), child: Text( widget.houseIntroduceModel.content ?? '', style: TextStyle( diff --git a/lib/pages/house_introduce/house_introduce.dart b/lib/pages/house_introduce/house_introduce.dart index d112ebbe..8dd82b23 100644 --- a/lib/pages/house_introduce/house_introduce.dart +++ b/lib/pages/house_introduce/house_introduce.dart @@ -1,22 +1,17 @@ -import 'package:aku_community/models/house_introduce/house_introduce_model.dart'; -import 'package:aku_community/utils/hive_store.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/constants/app_theme.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/models/house_introduce/house_introduce_model.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; -import 'package:url_launcher/url_launcher.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/constants/app_theme.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/model/user/committee_item_model.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - import 'house_detail_page.dart'; class HouseIntroducePage extends StatefulWidget { @@ -26,10 +21,9 @@ class HouseIntroducePage extends StatefulWidget { _HouseIntroducePageState createState() => _HouseIntroducePageState(); } - - class _HouseIntroducePageState extends State { EasyRefreshController _refreshController = EasyRefreshController(); + @override void initState() { super.initState(); @@ -40,14 +34,14 @@ class _HouseIntroducePageState extends State { // HiveStore.appBox!.put('IndustryCommitteePage',true); // } // }); - } - Widget _buildCard(HouseIntroduceModel model) { return GestureDetector( - onTap: (){ - Get.to(HouseDetailPage(houseIntroduceModel: model,)); + onTap: () { + Get.to(HouseDetailPage( + houseIntroduceModel: model, + )); }, child: Container( padding: EdgeInsets.all(20.w), @@ -80,8 +74,7 @@ class _HouseIntroducePageState extends State { style: TextStyle( fontSize: 30.sp, fontWeight: FontWeight.bold, - color: ktextPrimary - ), + color: ktextPrimary), maxLines: 4, overflow: TextOverflow.ellipsis, ), @@ -92,7 +85,6 @@ class _HouseIntroducePageState extends State { .size(20.sp) .color(ktextThirdColor) .make(), - ], ), ], diff --git a/lib/pages/industry_committee/committee_mailbox/committee_mailbox_page.dart b/lib/pages/industry_committee/committee_mailbox/committee_mailbox_page.dart index 935a1a11..17d48063 100644 --- a/lib/pages/industry_committee/committee_mailbox/committee_mailbox_page.dart +++ b/lib/pages/industry_committee/committee_mailbox/committee_mailbox_page.dart @@ -1,9 +1,8 @@ +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class CommitteeMailboxPage extends StatefulWidget { CommitteeMailboxPage({Key? key}) : super(key: key); @@ -13,6 +12,7 @@ class CommitteeMailboxPage extends StatefulWidget { class _CommitteeMailboxPageState extends State { TextEditingController _thingsContent = new TextEditingController(); + Widget _input() { return Container( padding: EdgeInsets.only(top: 32.w, left: 22.w, right: 35.w), diff --git a/lib/pages/industry_committee/industry_committee_page.dart b/lib/pages/industry_committee/industry_committee_page.dart index 1cd4e98b..b3b3a841 100644 --- a/lib/pages/industry_committee/industry_committee_page.dart +++ b/lib/pages/industry_committee/industry_committee_page.dart @@ -1,22 +1,20 @@ -import 'package:aku_community/utils/hive_store.dart'; -import 'package:aku_community/utils/websocket/tips_dialog.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/constants/app_theme.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/user/committee_item_model.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/hive_store.dart'; +import 'package:aku_new_community/utils/websocket/tips_dialog.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; import 'package:url_launcher/url_launcher.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/constants/app_theme.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/model/user/committee_item_model.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class IndustryCommitteePage extends StatefulWidget { IndustryCommitteePage({Key? key}) : super(key: key); @@ -24,21 +22,20 @@ class IndustryCommitteePage extends StatefulWidget { _IndustryCommitteePageState createState() => _IndustryCommitteePageState(); } - - class _IndustryCommitteePageState extends State { EasyRefreshController _refreshController = EasyRefreshController(); + @override void initState() { super.initState(); Future.delayed(Duration(milliseconds: 0), () async { - var agreement = await HiveStore.appBox?.get('IndustryCommitteePage') ?? false; + var agreement = + await HiveStore.appBox?.get('IndustryCommitteePage') ?? false; if (!agreement) { await TipsDialog.tipsDialog(); - HiveStore.appBox!.put('IndustryCommitteePage',true); + HiveStore.appBox!.put('IndustryCommitteePage', true); } }); - } Widget _buildBottomNavi() { diff --git a/lib/pages/life_pay/life_pay_bill_page/life_pay_bill_page.dart b/lib/pages/life_pay/life_pay_bill_page/life_pay_bill_page.dart index 0b96538e..6f13543b 100644 --- a/lib/pages/life_pay/life_pay_bill_page/life_pay_bill_page.dart +++ b/lib/pages/life_pay/life_pay_bill_page/life_pay_bill_page.dart @@ -1,8 +1,8 @@ +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; import 'widget/bill_card.dart'; class LifePayBillPage extends StatefulWidget { diff --git a/lib/pages/life_pay/life_pay_bill_page/widget/bill_card.dart b/lib/pages/life_pay/life_pay_bill_page/widget/bill_card.dart index f35c7ebb..b84defd2 100644 --- a/lib/pages/life_pay/life_pay_bill_page/widget/bill_card.dart +++ b/lib/pages/life_pay/life_pay_bill_page/widget/bill_card.dart @@ -1,9 +1,8 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/utils/headers.dart'; - class BillCard extends StatelessWidget { BillCard({Key? key}) : super(key: key); diff --git a/lib/pages/life_pay/life_pay_choose_page.dart b/lib/pages/life_pay/life_pay_choose_page.dart index 775ef8b4..6613226e 100644 --- a/lib/pages/life_pay/life_pay_choose_page.dart +++ b/lib/pages/life_pay/life_pay_choose_page.dart @@ -1,8 +1,8 @@ -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/extensions/widget_list_ext.dart'; -import 'package:aku_community/pages/life_pay/life_pay_page.dart'; -import 'package:aku_community/pages/share_pay_page/share_pay_page.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/extensions/widget_list_ext.dart'; +import 'package:aku_new_community/pages/life_pay/life_pay_page.dart'; +import 'package:aku_new_community/pages/share_pay_page/share_pay_page.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; diff --git a/lib/pages/life_pay/life_pay_page.dart b/lib/pages/life_pay/life_pay_page.dart index 6e55398f..e951f4d5 100644 --- a/lib/pages/life_pay/life_pay_page.dart +++ b/lib/pages/life_pay/life_pay_page.dart @@ -1,24 +1,24 @@ import 'dart:convert'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/life_pay/life_pay_list_model.dart'; -import 'package:aku_community/pages/life_pay/life_pay_record_page.dart'; -import 'package:aku_community/pages/life_pay/life_pre_pay_page.dart'; -import 'package:aku_community/pages/life_pay/pay_finish_page.dart'; -import 'package:aku_community/pages/life_pay/pay_util.dart'; -import 'package:aku_community/pages/life_pay/widget/life_pay_detail_page.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/utils/bee_parse.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/base_list_model.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_divider.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bee_check_radio.dart'; -import 'package:aku_community/widget/others/house_head_card.dart'; -import 'package:aku_community/widget/others/user_tool.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/models/life_pay/life_pay_list_model.dart'; +import 'package:aku_new_community/pages/life_pay/life_pay_record_page.dart'; +import 'package:aku_new_community/pages/life_pay/life_pre_pay_page.dart'; +import 'package:aku_new_community/pages/life_pay/pay_finish_page.dart'; +import 'package:aku_new_community/pages/life_pay/pay_util.dart'; +import 'package:aku_new_community/pages/life_pay/widget/life_pay_detail_page.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/utils/bee_parse.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_list_model.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bee_check_radio.dart'; +import 'package:aku_new_community/widget/others/house_head_card.dart'; +import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/pages/life_pay/life_pay_record_page.dart b/lib/pages/life_pay/life_pay_record_page.dart index 35df02ee..49727c3e 100644 --- a/lib/pages/life_pay/life_pay_record_page.dart +++ b/lib/pages/life_pay/life_pay_record_page.dart @@ -1,19 +1,17 @@ -import 'package:aku_community/models/life_pay/life_pay_record_model.dart'; -import 'package:aku_community/widget/others/user_tool.dart'; -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/extensions/widget_list_ext.dart'; +import 'package:aku_new_community/models/life_pay/life_pay_record_model.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:flustars/flustars.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/extensions/widget_list_ext.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class LifePayRecordPage extends StatefulWidget { LifePayRecordPage({Key? key}) : super(key: key); @@ -30,6 +28,7 @@ class _LifePayRecordPageState extends State { 4: 'pos', 5: '预缴扣除' }; + @override void initState() { super.initState(); diff --git a/lib/pages/life_pay/life_pre_pay_page.dart b/lib/pages/life_pay/life_pre_pay_page.dart index 335a70ad..6c1ff765 100644 --- a/lib/pages/life_pay/life_pre_pay_page.dart +++ b/lib/pages/life_pay/life_pre_pay_page.dart @@ -1,27 +1,26 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/pages/life_pay/pay_finish_page.dart'; +import 'package:aku_new_community/pages/life_pay/pay_util.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/bottom_sheets/pay_mothod_bottom_sheet.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:aku_new_community/widget/others/house_head_card.dart'; +import 'package:aku_new_community/widget/others/user_tool.dart'; +import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; - -import 'package:bot_toast/bot_toast.dart'; import 'package:get/get.dart'; import 'package:power_logger/power_logger.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/pages/life_pay/pay_finish_page.dart'; -import 'package:aku_community/pages/life_pay/pay_util.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_divider.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/bottom_sheets/pay_mothod_bottom_sheet.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; -import 'package:aku_community/widget/others/house_head_card.dart'; -import 'package:aku_community/widget/others/user_tool.dart'; - class LifePrePayPage extends StatefulWidget { final double prePay; + LifePrePayPage({Key? key, required this.prePay}) : super(key: key); @override @@ -31,6 +30,7 @@ class LifePrePayPage extends StatefulWidget { class _LifePrePayPageState extends State { late TextEditingController _editingController; String _payMethod = '支付宝'; + @override void initState() { super.initState(); diff --git a/lib/pages/life_pay/pay_finish_page.dart b/lib/pages/life_pay/pay_finish_page.dart index f94c73cb..849b956b 100644 --- a/lib/pages/life_pay/pay_finish_page.dart +++ b/lib/pages/life_pay/pay_finish_page.dart @@ -1,9 +1,8 @@ +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_back_button.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_back_button.dart'; - class PayFinishPage extends StatelessWidget { const PayFinishPage({Key? key}) : super(key: key); diff --git a/lib/pages/life_pay/pay_util.dart b/lib/pages/life_pay/pay_util.dart index 4cf6083a..6622a775 100644 --- a/lib/pages/life_pay/pay_util.dart +++ b/lib/pages/life_pay/pay_util.dart @@ -1,7 +1,7 @@ import 'dart:convert'; -import 'package:aku_community/models/pay/pay_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; +import 'package:aku_new_community/models/pay/pay_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:dio/dio.dart'; import 'package:power_logger/power_logger.dart'; diff --git a/lib/pages/life_pay/widget/life_pay_detail_page.dart b/lib/pages/life_pay/widget/life_pay_detail_page.dart index 63424e3e..6a653930 100644 --- a/lib/pages/life_pay/widget/life_pay_detail_page.dart +++ b/lib/pages/life_pay/widget/life_pay_detail_page.dart @@ -1,23 +1,22 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/models/life_pay/life_pay_list_model.dart'; +import 'package:aku_new_community/pages/life_pay/life_pay_page.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/utils/bee_parse.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bee_check_radio.dart'; +import 'package:expandable/expandable.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - -import 'package:expandable/expandable.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/models/life_pay/life_pay_list_model.dart'; -import 'package:aku_community/pages/life_pay/life_pay_page.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/utils/bee_parse.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bee_check_radio.dart'; - class LifePayDetailPage extends StatefulWidget { final LifePayListModel model; final LifePayListModel selectModel; final int year; + LifePayDetailPage({ Key? key, required this.model, @@ -32,6 +31,7 @@ class LifePayDetailPage extends StatefulWidget { class _LifePayDetailPageState extends State { late LifePayListModel _selectModel; //已选择的model late LifePayListModel _model; + SelectPay get total { int count = 0; double price = 0; diff --git a/lib/pages/life_pay/widget/submit_bar.dart b/lib/pages/life_pay/widget/submit_bar.dart index 58aa089f..fe2b325b 100644 --- a/lib/pages/life_pay/widget/submit_bar.dart +++ b/lib/pages/life_pay/widget/submit_bar.dart @@ -1,11 +1,11 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/utils/headers.dart'; - class SubmitBar extends StatefulWidget { final String? title; + SubmitBar({Key? key, this.title}) : super(key: key); @override diff --git a/lib/pages/manager_func.dart b/lib/pages/manager_func.dart index a1205708..b44d8a2d 100644 --- a/lib/pages/manager_func.dart +++ b/lib/pages/manager_func.dart @@ -1,17 +1,16 @@ +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/manager/article_QR_code_model.dart'; +import 'package:aku_new_community/model/manager/moving_company_model.dart'; +import 'package:aku_new_community/model/manager/questionnaire_detail_model.dart'; +import 'package:aku_new_community/model/manager/quetionnaire_submit_model.dart'; +import 'package:aku_new_community/model/manager/voting_detail_model.dart'; +import 'package:aku_new_community/models/manage/fix_report/fix_detail_model.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:dio/dio.dart'; import 'package:flustars/flustars.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/manager/article_QR_code_model.dart'; -import 'package:aku_community/model/manager/moving_company_model.dart'; -import 'package:aku_community/model/manager/questionnaire_detail_model.dart'; -import 'package:aku_community/model/manager/quetionnaire_submit_model.dart'; -import 'package:aku_community/model/manager/voting_detail_model.dart'; -import 'package:aku_community/models/manage/fix_report/fix_detail_model.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; - class ManagerFunc { @Deprecated('') static insertVisitorInfo(int id, int type, String name, int sex, String tel, diff --git a/lib/pages/message_center_page/comment_message/comment_message_page.dart b/lib/pages/message_center_page/comment_message/comment_message_page.dart index bc863cac..3a19d67b 100644 --- a/lib/pages/message_center_page/comment_message/comment_message_page.dart +++ b/lib/pages/message_center_page/comment_message/comment_message_page.dart @@ -1,21 +1,19 @@ +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/message/comment_message_model.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/utils/bee_date_util.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:flustars/flustars.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - -import 'package:flustars/flustars.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/model/message/comment_message_model.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/utils/bee_date_util.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_divider.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class CommentMessagePage extends StatefulWidget { CommentMessagePage({Key? key}) : super(key: key); @@ -25,6 +23,7 @@ class CommentMessagePage extends StatefulWidget { class _CommentMessagePageState extends State { EasyRefreshController? _easyRefreshController; + @override void initState() { super.initState(); diff --git a/lib/pages/message_center_page/message_center_page.dart b/lib/pages/message_center_page/message_center_page.dart index a2fb8d49..89f1a2ce 100644 --- a/lib/pages/message_center_page/message_center_page.dart +++ b/lib/pages/message_center_page/message_center_page.dart @@ -1,18 +1,16 @@ -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/pages/message_center_page/comment_message/comment_message_page.dart'; +import 'package:aku_new_community/pages/message_center_page/system_message/system_message_page.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:badges/badges.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/pages/message_center_page/comment_message/comment_message_page.dart'; -import 'package:aku_community/pages/message_center_page/system_message/system_message_page.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class MessageCenterPage extends StatefulWidget { MessageCenterPage({Key? key}) : super(key: key); diff --git a/lib/pages/message_center_page/message_func.dart b/lib/pages/message_center_page/message_func.dart index 4baabbe0..310c5b71 100644 --- a/lib/pages/message_center_page/message_func.dart +++ b/lib/pages/message_center_page/message_func.dart @@ -1,7 +1,7 @@ -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/message/system_message_detail_model.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/message/system_message_detail_model.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; class MessageFunc { static Future getSystemMessageDetial( diff --git a/lib/pages/message_center_page/refund_details.dart b/lib/pages/message_center_page/refund_details.dart index b6d76800..21ad854a 100644 --- a/lib/pages/message_center_page/refund_details.dart +++ b/lib/pages/message_center_page/refund_details.dart @@ -1,11 +1,11 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/utils/headers.dart'; - class RefundDetails extends StatelessWidget { final double? statusHeight; + const RefundDetails({Key? key, this.statusHeight}) : super(key: key); Container _containerHeader() { diff --git a/lib/pages/message_center_page/system_message/system_message_detail_page.dart b/lib/pages/message_center_page/system_message/system_message_detail_page.dart index 34b1eca2..4eed161b 100644 --- a/lib/pages/message_center_page/system_message/system_message_detail_page.dart +++ b/lib/pages/message_center_page/system_message/system_message_detail_page.dart @@ -1,14 +1,13 @@ +import 'package:aku_new_community/model/message/system_message_detail_model.dart'; +import 'package:aku_new_community/pages/message_center_page/message_func.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; -import 'package:aku_community/model/message/system_message_detail_model.dart'; -import 'package:aku_community/pages/message_center_page/message_func.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class SystemMessageDetailPage extends StatefulWidget { final int? id; + SystemMessageDetailPage({Key? key, this.id}) : super(key: key); @override diff --git a/lib/pages/message_center_page/system_message/system_message_page.dart b/lib/pages/message_center_page/system_message/system_message_page.dart index 2d4eac15..3390f876 100644 --- a/lib/pages/message_center_page/system_message/system_message_page.dart +++ b/lib/pages/message_center_page/system_message/system_message_page.dart @@ -1,20 +1,18 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/message/system_message_model.dart'; +import 'package:aku_new_community/pages/message_center_page/system_message/system_message_detail_page.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/utils/bee_map.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/message/system_message_model.dart'; -import 'package:aku_community/pages/message_center_page/system_message/system_message_detail_page.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/utils/bee_map.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_divider.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class SystemMessagePage extends StatefulWidget { SystemMessagePage({Key? key}) : super(key: key); @@ -24,6 +22,7 @@ class SystemMessagePage extends StatefulWidget { class _SystemMessagePageState extends State { EasyRefreshController? _refreshController; + @override void initState() { super.initState(); diff --git a/lib/pages/one_alarm/alarm_detail_page.dart b/lib/pages/one_alarm/alarm_detail_page.dart index 14bc3a0e..27ed5a12 100644 --- a/lib/pages/one_alarm/alarm_detail_page.dart +++ b/lib/pages/one_alarm/alarm_detail_page.dart @@ -1,8 +1,7 @@ +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class AlarmDetailPage extends StatelessWidget { const AlarmDetailPage({Key? key}) : super(key: key); diff --git a/lib/pages/one_alarm/widget/alarm_page.dart b/lib/pages/one_alarm/widget/alarm_page.dart index eae234bf..c969ff19 100644 --- a/lib/pages/one_alarm/widget/alarm_page.dart +++ b/lib/pages/one_alarm/widget/alarm_page.dart @@ -1,7 +1,12 @@ -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/pages/one_alarm/alarm_detail_page.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:amap_flutter_base/amap_flutter_base.dart'; import 'package:amap_flutter_map/amap_flutter_map.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -10,13 +15,6 @@ import 'package:provider/provider.dart'; import 'package:url_launcher/url_launcher.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/pages/one_alarm/alarm_detail_page.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class PermissionUtil { static Future getLocationPermission() async { return await Permission.locationWhenInUse.request().isGranted; @@ -69,7 +67,7 @@ class _AlarmPageState extends State { Provider.of(context, listen: false); LatLng _target = LatLng( (appProvider.location?['latitude'] ?? 0) as double, - (appProvider.location?['longitude'] ?? 0 )as double, + (appProvider.location?['longitude'] ?? 0) as double, ); _mapController = controller; _mapController!.moveCamera( diff --git a/lib/pages/opening_code_page/opening_code_page.dart b/lib/pages/opening_code_page/opening_code_page.dart index 242d58bc..e023de4a 100644 --- a/lib/pages/opening_code_page/opening_code_page.dart +++ b/lib/pages/opening_code_page/opening_code_page.dart @@ -1,10 +1,10 @@ import 'dart:async'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flustars/flustars.dart'; import 'package:flutter/cupertino.dart'; @@ -27,6 +27,7 @@ class _OpeningCodePageState extends State { late EasyRefreshController _refreshController; static const int seconds = 300; //有效时间 Timer? _overDateTimer; + @override void initState() { super.initState(); diff --git a/lib/pages/personal/address/address_list_page.dart b/lib/pages/personal/address/address_list_page.dart index c4637fde..b095f223 100644 --- a/lib/pages/personal/address/address_list_page.dart +++ b/lib/pages/personal/address/address_list_page.dart @@ -1,26 +1,20 @@ import 'dart:ui'; -import 'package:aku_community/model/user/adress_model.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/model/user/adress_model.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/model/community/community_topic_model.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/ui/community/community_views/topic/topic_detail_page.dart'; -import 'package:aku_community/utils/headers.dart'; - import '../item_my_address.dart'; import '../user_func.dart'; import 'new_address_page.dart'; class AddressListPage extends StatefulWidget { final bool canBack; + AddressListPage({Key? key, required this.canBack}) : super(key: key); @override @@ -32,7 +26,8 @@ class AddressListPageState extends State EasyRefreshController _refreshController = EasyRefreshController(); bool _onload = true; List _addressModels = []; - AddressModel? _addressModel; + AddressModel? _addressModel; + refresh() { _refreshController.callRefresh(); } @@ -40,77 +35,79 @@ class AddressListPageState extends State @override Widget build(BuildContext context) { super.build(context); - return BeeScaffold( + return BeeScaffold( leading: Navigator.canPop(context) ? IconButton( - onPressed: () async { - if(_addressModels.isEmpty){ - Get.back(result: null); - }else{ - - _addressModels.forEach((element) { - if(element.isDefault==1){ - _addressModel = element; + onPressed: () async { + if (_addressModels.isEmpty) { + Get.back(result: null); + } else { + _addressModels.forEach((element) { + if (element.isDefault == 1) { + _addressModel = element; + } + }); + if (_addressModel == null) { + Get.back(); + } else { + Get.back(result: _addressModel); + } } - }); - if(_addressModel==null){ - Get.back(); - }else{ - Get.back(result: _addressModel); - } - - } - }, - icon: Icon( - CupertinoIcons.chevron_back, - color: Colors.black, - ), - ) + }, + icon: Icon( + CupertinoIcons.chevron_back, + color: Colors.black, + ), + ) : SizedBox(), title: '我的收货地址', bottomNavi: GestureDetector( - onTap: ()async{ - bool? result = await Get.to(() => NewAddressPage(isFirstAdd: _addressModels.isEmpty? true:false,)); - if(result!=null){ - if(result) _refreshController.callRefresh(); + onTap: () async { + bool? result = await Get.to(() => NewAddressPage( + isFirstAdd: _addressModels.isEmpty ? true : false, + )); + if (result != null) { + if (result) _refreshController.callRefresh(); } }, child: Container( - margin: EdgeInsets.only(left: 100.w,right: 100.w,bottom: 100.w), + margin: EdgeInsets.only(left: 100.w, right: 100.w, bottom: 100.w), alignment: Alignment.center, child: '新增收货地址'.text.size(28.sp).white.make(), decoration: BoxDecoration( - borderRadius: BorderRadius.horizontal(left: Radius.circular(49.w),right: Radius.circular(49.w)), + borderRadius: BorderRadius.horizontal( + left: Radius.circular(49.w), right: Radius.circular(49.w)), color: Color(0xFFE52E2E), ), width: 522.w, height: 98.w, - ), ), - body:EasyRefresh( + body: EasyRefresh( firstRefresh: true, header: MaterialHeader(), controller: _refreshController, onRefresh: () async { _addressModels = await Userfunc.getMyAddress(); - _onload =false; + _onload = false; setState(() {}); }, child: _onload ? SizedBox() : ListView( - padding: EdgeInsets.all(20.w), - children: [ - ..._addressModels.map((e) => MyAddressItem(addressModel: e,refreshController: _refreshController,canBack: widget.canBack, - )).toList(), - ], - ), + padding: EdgeInsets.all(20.w), + children: [ + ..._addressModels + .map((e) => MyAddressItem( + addressModel: e, + refreshController: _refreshController, + canBack: widget.canBack, + )) + .toList(), + ], + ), ), - ); - - } @override diff --git a/lib/pages/personal/address/address_selector.dart b/lib/pages/personal/address/address_selector.dart index f7106640..135f2af0 100644 --- a/lib/pages/personal/address/address_selector.dart +++ b/lib/pages/personal/address/address_selector.dart @@ -6,15 +6,15 @@ * remark : * ==================================================== */ -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/model/user/province_model.dart'; -import 'package:aku_community/utils/text_utils.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/model/user/province_model.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/text_utils.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/utils/headers.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; typedef AddressSelectorCallback = Function( - String province, String city, String disctrict,int? locationId); + String province, String city, String disctrict, int? locationId); class AddressSelector extends StatefulWidget { final List model; @@ -101,16 +101,16 @@ class _AddressSelectorState extends State style: TextStyle( fontSize: 32.sp, fontWeight: FontWeight.w500, - color:ktextPrimary), + color: ktextPrimary), ), Spacer(), GestureDetector( - onTap: (){ + onTap: () { _dismiss(); }, child: Container( padding: EdgeInsets.all(5.w), - decoration:BoxDecoration( + decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(20.w)), color: Colors.white, ), @@ -134,7 +134,8 @@ class _AddressSelectorState extends State isScrollable: true, indicatorColor: Color(0xFFE52E2E), indicatorSize: TabBarIndicatorSize.label, - indicatorPadding: EdgeInsets.only(left: 10.w, right: 10.w,bottom: -5.w), + indicatorPadding: + EdgeInsets.only(left: 10.w, right: 10.w, bottom: -5.w), tabs: _tabItems()); } @@ -171,12 +172,11 @@ class _AddressSelectorState extends State itemBuilder: (context, index) { String addr = _items[_tabController.index][index]; bool selected = addr == _result[_tabController.index]; - return - GestureDetector( - onTap: (){ - _itemSelected(index); - }, - child: Container( + return GestureDetector( + onTap: () { + _itemSelected(index); + }, + child: Container( padding: EdgeInsets.zero, child: Container( color: Colors.transparent, @@ -198,8 +198,8 @@ class _AddressSelectorState extends State )) ]), ), - ), - ); + ), + ); }), ); } @@ -208,7 +208,7 @@ class _AddressSelectorState extends State int index = 1; for (int i = 0; i < widget.model.length; ++i) { ProvinceModel province = widget.model[i]; - String proAddressStr = province.name??''; + String proAddressStr = province.name ?? ''; _items[0].add(proAddressStr); if (proAddressStr != widget.province) { continue; @@ -219,7 +219,7 @@ class _AddressSelectorState extends State for (int m = 0; m < province.cityList!.length; ++m) { City city = province.cityList![m]; - String cityAddressStr = city.name??''; + String cityAddressStr = city.name ?? ''; _items[1].add(cityAddressStr); if (cityAddressStr != widget.city) { continue; @@ -230,7 +230,7 @@ class _AddressSelectorState extends State for (int n = 0; n < city.districts!.length; ++n) { District district = city.districts![n]; - String disAddressStr = district.name??''; + String disAddressStr = district.name ?? ''; _items[2].add(disAddressStr); if (disAddressStr != widget.district) { continue; @@ -245,12 +245,12 @@ class _AddressSelectorState extends State } void _resetTabBar(int index) { - if(!_tab){ + if (!_tab) { _tabController.removeListener(_tabBarListener); } _tabController = TabController(length: index, vsync: this); - _tab = false; + _tab = false; _tabController.addListener(_tabBarListener); _tabController.index = index - 1; } @@ -264,7 +264,7 @@ class _AddressSelectorState extends State _items[1].clear(); _items[2].clear(); _province = province; - _result[0] = _province.name??''; + _result[0] = _province.name ?? ''; _result[1] = ""; _result[2] = ""; _indexs[0] = index; @@ -275,7 +275,7 @@ class _AddressSelectorState extends State /// 没有次级列表返回 if (_province.cityList!.length == 0) { _dismiss(); - widget.callback(_province.name??'', '', '',_province.id??null); + widget.callback(_province.name ?? '', '', '', _province.id ?? null); return; } @@ -294,7 +294,7 @@ class _AddressSelectorState extends State _city = city; _district = null; _items[2].clear(); - _result[1] = _city?.name??''; + _result[1] = _city?.name ?? ''; _indexs[1] = index; _result[2] = ""; _indexs[2] = null; @@ -302,12 +302,13 @@ class _AddressSelectorState extends State /// 没有次级列表返回 if (city.districts!.length == 0) { _dismiss(); - widget.callback(_province.name??'', _city?.name??'', '',_city?.id??null); + widget.callback( + _province.name ?? '', _city?.name ?? '', '', _city?.id ?? null); return; } city.districts!.forEach((District district) { - _items[2].add(district.name??''); + _items[2].add(district.name ?? ''); }); _resetTabBar(3); setState(() {}); @@ -319,10 +320,11 @@ class _AddressSelectorState extends State /// 选区 District district = _city!.districts![index]; _district = district; - _result[2] = _district?.name??''; + _result[2] = _district?.name ?? ''; _indexs[2] = index; _dismiss(); - widget.callback(_province.name??'', _city?.name??'', _district?.name??'',_district?.id??null); + widget.callback(_province.name ?? '', _city?.name ?? '', + _district?.name ?? '', _district?.id ?? null); } } } @@ -344,15 +346,16 @@ class AddressSelectorHelper { {required List models, String? province, String? city, - String? district, required AddressSelectorCallback callback}) { + String? district, + required AddressSelectorCallback callback}) { showModalBottomSheet( context: context, builder: (context) { return AddressSelector( model: models, - province: province??'', - city: city??'', - district: district??"", + province: province ?? '', + city: city ?? '', + district: district ?? "", callback: callback, ); }); diff --git a/lib/pages/personal/address/editView.dart b/lib/pages/personal/address/editView.dart index fd5cd10d..5ea0d257 100644 --- a/lib/pages/personal/address/editView.dart +++ b/lib/pages/personal/address/editView.dart @@ -7,8 +7,8 @@ * ==================================================== */ +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/utils/headers.dart'; import 'input_view.dart'; @@ -51,6 +51,7 @@ class EditTile extends StatefulWidget { class _EditTileState extends State { late TextEditingController _controller; FocusNode _focusNode = FocusNode(); + @override void initState() { super.initState(); @@ -68,7 +69,7 @@ class _EditTileState extends State { padding: EdgeInsets.symmetric(vertical: 2.w, horizontal: 20.w), color: Colors.white, child: - widget.direction == Axis.horizontal ? _horizontal() : _vertical(), + widget.direction == Axis.horizontal ? _horizontal() : _vertical(), ), ); } @@ -85,17 +86,17 @@ class _EditTileState extends State { ), Expanded( child: InputView( - padding: EdgeInsets.symmetric(horizontal: 0), - focusNode: _focusNode, - controller: _controller, - maxLength: widget.maxLength, - hintStyle: widget.hintStyle, - textStyle: widget.textStyle, - onValueChanged: (string) { - widget.textChanged(string); - }, - hint: widget.hint, - )), + padding: EdgeInsets.symmetric(horizontal: 0), + focusNode: _focusNode, + controller: _controller, + maxLength: widget.maxLength, + hintStyle: widget.hintStyle, + textStyle: widget.textStyle, + onValueChanged: (string) { + widget.textChanged(string); + }, + hint: widget.hint, + )), ], ); } @@ -105,7 +106,7 @@ class _EditTileState extends State { children: [ Container( alignment: Alignment.centerLeft, - height:40.w, + height: 40.w, child: Text( widget.title, style: widget.titleStyle, @@ -113,18 +114,18 @@ class _EditTileState extends State { ), Expanded( child: InputView( - focusNode: _focusNode, - padding: EdgeInsets.symmetric(horizontal: 0), - maxLines: widget.maxLines, - maxLength: widget.maxLength, - controller: _controller, - hintStyle: widget.hintStyle, - textStyle: widget.textStyle, - onValueChanged: (string) { - widget.textChanged(string); - }, - hint: widget.hint, - )), + focusNode: _focusNode, + padding: EdgeInsets.symmetric(horizontal: 0), + maxLines: widget.maxLines, + maxLength: widget.maxLength, + controller: _controller, + hintStyle: widget.hintStyle, + textStyle: widget.textStyle, + onValueChanged: (string) { + widget.textChanged(string); + }, + hint: widget.hint, + )), ], ); } diff --git a/lib/pages/personal/address/input_view.dart b/lib/pages/personal/address/input_view.dart index de11718e..ef3197c0 100644 --- a/lib/pages/personal/address/input_view.dart +++ b/lib/pages/personal/address/input_view.dart @@ -11,8 +11,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:aku_community/utils/headers.dart'; - typedef TextInputChangeCallBack = Function(String text); // ignore: must_be_immutable @@ -40,7 +38,8 @@ class InputView extends StatefulWidget { this.padding = const EdgeInsets.symmetric(vertical: 5, horizontal: 8), this.margin = const EdgeInsets.symmetric(vertical: 0, horizontal: 0), this.hint = "", - this.textStyle = const TextStyle(color: Colors.black, fontWeight: FontWeight.w300), + this.textStyle = + const TextStyle(color: Colors.black, fontWeight: FontWeight.w300), this.hintStyle = const TextStyle(color: Color(0xFFBDBDBD), fontSize: 16), this.cursorColor = const Color(0xFFBDBDBD), this.keyboardType = TextInputType.text, @@ -69,9 +68,7 @@ class _InputViewState extends State { _controller = widget.controller; _focusNode.addListener(() { - setState(() { - - }); + setState(() {}); if (!_focusNode.hasFocus) { if (widget.onInputComplete != null) { widget.onInputComplete!(_controller.text); @@ -106,8 +103,10 @@ class _InputViewState extends State { inputFormatters: widget.maxLength == null ? null : [ - widget.maxLength == 0 ? FilteringTextInputFormatter.digitsOnly: - LengthLimitingTextInputFormatter(widget.maxLength), + widget.maxLength == 0 + ? FilteringTextInputFormatter.digitsOnly + : LengthLimitingTextInputFormatter( + widget.maxLength), ], cursorColor: widget.cursorColor, onChanged: widget.onValueChanged, @@ -118,11 +117,8 @@ class _InputViewState extends State { }, enableInteractiveSelection: true, decoration: BoxDecoration( - border: Border.all( - color: Colors.white.withAlpha(0), - width: 0 - ) - ), + border: + Border.all(color: Colors.white.withAlpha(0), width: 0)), // decoration: InputDecoration( // contentPadding: EdgeInsets.symmetric(vertical: widget.padding.vertical), // border: InputBorder.none, diff --git a/lib/pages/personal/address/new_address_page.dart b/lib/pages/personal/address/new_address_page.dart index 85d7b22e..906faad1 100644 --- a/lib/pages/personal/address/new_address_page.dart +++ b/lib/pages/personal/address/new_address_page.dart @@ -1,23 +1,19 @@ -import 'dart:convert'; import 'dart:ui'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/model/user/adress_model.dart'; -import 'package:aku_community/model/user/province_model.dart'; -import 'package:aku_community/pages/personal/user_func.dart'; -import 'package:aku_community/utils/hive_store.dart'; -import 'package:aku_community/utils/text_utils.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; + +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/model/user/adress_model.dart'; +import 'package:aku_new_community/model/user/province_model.dart'; +import 'package:aku_new_community/pages/personal/user_func.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/hive_store.dart'; +import 'package:aku_new_community/utils/text_utils.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/utils/headers.dart'; - import 'address_selector.dart'; import 'editView.dart'; @@ -26,7 +22,8 @@ class NewAddressPage extends StatefulWidget { final AddressModel? addressModel; final EasyRefreshController? refreshController; - NewAddressPage({Key? key, this.isFirstAdd, this.addressModel, this.refreshController}) + NewAddressPage( + {Key? key, this.isFirstAdd, this.addressModel, this.refreshController}) : super(key: key); @override @@ -51,7 +48,7 @@ class _NewAddressPageState extends State { @override Widget build(BuildContext context) { return BeeScaffold( - title:widget.addressModel==null? '新建收货地址':'修改收货地址', + title: widget.addressModel == null ? '新建收货地址' : '修改收货地址', body: _buildBody(context), ); } @@ -77,7 +74,8 @@ class _NewAddressPageState extends State { constraints: BoxConstraints.tight(Size(double.infinity, 45)), title: "收货人", titleStyle: TextStyle(fontSize: 28.sp, color: ktextPrimary), - hintStyle: TextStyle(fontSize: 28.sp, color: Color(0xFFBBBBBB)), + hintStyle: + TextStyle(fontSize: 28.sp, color: Color(0xFFBBBBBB)), textStyle: TextStyle(fontSize: 28.sp, color: ktextSubColor), value: _address.name ?? '', hint: "请填写收货人姓名", @@ -90,10 +88,12 @@ class _NewAddressPageState extends State { color: Color(0xFFD9D9D9), margin: EdgeInsets.symmetric(horizontal: 24.w)), EditTile( - constraints: BoxConstraints.tight(Size(double.infinity, 100.w)), + constraints: + BoxConstraints.tight(Size(double.infinity, 100.w)), title: "手机号码", titleStyle: TextStyle(fontSize: 28.sp, color: ktextPrimary), - hintStyle: TextStyle(fontSize: 28.sp, color: Color(0xFFBBBBBB)), + hintStyle: + TextStyle(fontSize: 28.sp, color: Color(0xFFBBBBBB)), textStyle: TextStyle(fontSize: 28.sp, color: ktextSubColor), value: _address.tel ?? '', hint: "请填写收货人手机号码", @@ -111,7 +111,6 @@ class _NewAddressPageState extends State { height: 2.w, color: Color(0xFFD9D9D9), margin: EdgeInsets.symmetric(horizontal: 24.w)), - Container( height: 20.w, ), @@ -119,7 +118,8 @@ class _NewAddressPageState extends State { title: "详细地址", hint: "街道门牌号等", titleStyle: TextStyle(fontSize: 28.sp, color: ktextPrimary), - hintStyle: TextStyle(fontSize: 28.sp, color: Color(0xFFBBBBBB)), + hintStyle: + TextStyle(fontSize: 28.sp, color: Color(0xFFBBBBBB)), textStyle: TextStyle(fontSize: 28.sp, color: ktextSubColor), value: _address.addressDetail ?? '', maxLength: 100, @@ -154,7 +154,6 @@ class _NewAddressPageState extends State { Container _saveButton(BuildContext context) { return Container( margin: EdgeInsets.symmetric(horizontal: 100.w), - child: GestureDetector( onTap: () { _saveAddress(context); @@ -172,7 +171,7 @@ class _NewAddressPageState extends State { "保存并使用", style: TextStyle( color: Colors.white, - fontSize:28.sp, + fontSize: 28.sp, ), ), ), @@ -266,7 +265,7 @@ class _NewAddressPageState extends State { return; } - if (_address.location==null) { + if (_address.location == null) { BotToast.showText(text: '所在地区不能为空'); return; } @@ -293,25 +292,23 @@ class _NewAddressPageState extends State { _address.isDefault ?? null); } - //Navigator.maybePop(context, _address); Get.back(result: true); } _defaultAddressTile() { - - if (widget.isFirstAdd != null) - if(_address.isDefault ==1){ - isDefault = true; - }else{ - isDefault = false; - widget.isFirstAdd! ? _address.isDefault = 1 : _address.isDefault = 0; - } + if (widget.isFirstAdd != null) if (_address.isDefault == 1) { + isDefault = true; + } else { + isDefault = false; + widget.isFirstAdd! ? _address.isDefault = 1 : _address.isDefault = 0; + } return Container( clipBehavior: Clip.antiAlias, margin: EdgeInsets.all(20.w), - padding: EdgeInsets.only(top: 24.w,bottom: 24.w,left: 24.w,right: 24.w), + padding: + EdgeInsets.only(top: 24.w, bottom: 24.w, left: 24.w, right: 24.w), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(24.w)), @@ -319,13 +316,16 @@ class _NewAddressPageState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ '设置为默认地址'.text.size(28.sp).color(ktextPrimary).make(), 5.hb, - '提醒:每次下单会默认推荐使用该地址'.text.size(24.sp).color(Color(0xFFBBBBBB)).make(), + '提醒:每次下单会默认推荐使用该地址' + .text + .size(24.sp) + .color(Color(0xFFBBBBBB)) + .make(), ], ), Spacer(), @@ -346,8 +346,5 @@ class _NewAddressPageState extends State { ], ), ); - - } - } diff --git a/lib/pages/personal/change_nick_name_page.dart b/lib/pages/personal/change_nick_name_page.dart index 8a2a6c70..b3dca890 100644 --- a/lib/pages/personal/change_nick_name_page.dart +++ b/lib/pages/personal/change_nick_name_page.dart @@ -1,13 +1,11 @@ +import 'package:aku_new_community/provider/user_provider.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/provider/user_provider.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class ChangeNickName extends StatefulWidget { ChangeNickName({Key? key}) : super(key: key); @@ -17,6 +15,7 @@ class ChangeNickName extends StatefulWidget { class _ChangeNickNameState extends State { TextEditingController? _textEditingController; + @override void initState() { final userProvider = Provider.of(context, listen: false); diff --git a/lib/pages/personal/item_my_address.dart b/lib/pages/personal/item_my_address.dart index 3375c484..37559c06 100644 --- a/lib/pages/personal/item_my_address.dart +++ b/lib/pages/personal/item_my_address.dart @@ -7,20 +7,19 @@ * ==================================================== */ -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/model/user/adress_model.dart'; -import 'package:aku_community/pages/personal/user_func.dart'; -import 'package:aku_community/provider/app_provider.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/model/user/adress_model.dart'; +import 'package:aku_new_community/pages/personal/user_func.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/utils/headers.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; import 'address/new_address_page.dart'; - // ignore: must_be_immutable class MyAddressItem extends StatefulWidget { final AddressModel addressModel; @@ -29,26 +28,30 @@ class MyAddressItem extends StatefulWidget { Color _titleColor = Colors.black; - MyAddressItem({required this.addressModel, -this.refreshController, required this.canBack}) + MyAddressItem( + {required this.addressModel, + this.refreshController, + required this.canBack}) : assert(addressModel != null); _MyAddressItemState createState() => _MyAddressItemState(); } + class _MyAddressItemState extends State { @override Widget build(BuildContext context) { final appProvider = Provider.of(context); return GestureDetector( - onTap: widget.canBack? (){ - Get.back(result: widget.addressModel); - }:(){ - - }, + onTap: widget.canBack + ? () { + Get.back(result: widget.addressModel); + } + : () {}, child: Container( clipBehavior: Clip.antiAlias, - margin: EdgeInsets.only(bottom:20.w), - padding: EdgeInsets.only(top: 22.w,bottom: 24.w,left: 24.w,right: 20.w), + margin: EdgeInsets.only(bottom: 20.w), + padding: + EdgeInsets.only(top: 22.w, bottom: 24.w, left: 24.w, right: 20.w), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(24.w)), @@ -59,19 +62,28 @@ class _MyAddressItemState extends State { Row( children: [ GestureDetector( - onTap: () async{ - bool? result = await Userfunc.setIsDefaultAddress(widget.addressModel.id!); - if(result!=null){ - if(result) { + onTap: () async { + bool? result = await Userfunc.setIsDefaultAddress( + widget.addressModel.id!); + if (result != null) { + if (result) { await appProvider.getMyAddress(); widget.refreshController!.callRefresh(); } } }, child: Container( - child: widget.addressModel.isDefault==1? - Image.asset(R.ASSETS_ICONS_ICON_ADDRESS_ISDEFAULT_PNG,width: 40.w,height: 40.w,): - Image.asset(R.ASSETS_ICONS_ICON_ADDRESS_NOT_PNG,width: 40.w,height: 40.w,), + child: widget.addressModel.isDefault == 1 + ? Image.asset( + R.ASSETS_ICONS_ICON_ADDRESS_ISDEFAULT_PNG, + width: 40.w, + height: 40.w, + ) + : Image.asset( + R.ASSETS_ICONS_ICON_ADDRESS_NOT_PNG, + width: 40.w, + height: 40.w, + ), ), ), Column( @@ -79,12 +91,13 @@ class _MyAddressItemState extends State { children: [ Padding( padding: - EdgeInsets.symmetric(horizontal: 20.w, vertical:6.w), + EdgeInsets.symmetric(horizontal: 20.w, vertical: 6.w), child: SizedBox( width: 520.w, child: Text( - widget.addressModel.locationName??'', - style:TextStyle(fontSize: 24.sp,color: ktextPrimary), + widget.addressModel.locationName ?? '', + style: + TextStyle(fontSize: 24.sp, color: ktextPrimary), maxLines: 1, overflow: TextOverflow.ellipsis, ), @@ -92,32 +105,31 @@ class _MyAddressItemState extends State { ), Padding( padding: - EdgeInsets.symmetric(horizontal: 20.w, vertical:6.w), + EdgeInsets.symmetric(horizontal: 20.w, vertical: 6.w), child: SizedBox( width: 520.w, child: Text( - ( widget.addressModel.addressDetail??''), - style:TextStyle(fontSize: 32.sp,color: ktextPrimary), + (widget.addressModel.addressDetail ?? ''), + style: + TextStyle(fontSize: 32.sp, color: ktextPrimary), maxLines: 1, overflow: TextOverflow.ellipsis, - ), ), ), Padding( - padding: EdgeInsets.symmetric(horizontal: 20.w, vertical:6.w), + padding: + EdgeInsets.symmetric(horizontal: 20.w, vertical: 6.w), child: Row( crossAxisAlignment: CrossAxisAlignment.end, children: [ - Text( - widget.addressModel.name??'', - style: TextStyle(fontSize: 24.sp,color: ktextPrimary) - ), + Text(widget.addressModel.name ?? '', + style: TextStyle( + fontSize: 24.sp, color: ktextPrimary)), 30.wb, - Text( - widget.addressModel.tel??'', - style: TextStyle(fontSize: 24.sp,color: ktextPrimary) - ), + Text(widget.addressModel.tel ?? '', + style: TextStyle( + fontSize: 24.sp, color: ktextPrimary)), ], ), ), @@ -125,17 +137,21 @@ class _MyAddressItemState extends State { ), Spacer(), GestureDetector( - onTap: () async{ - - bool? result = await Get.to(() => NewAddressPage(isFirstAdd:false,addressModel: widget.addressModel, - )); - if(result!=null){ - if(result) widget.refreshController!.callRefresh(); - } - + onTap: () async { + bool? result = await Get.to(() => NewAddressPage( + isFirstAdd: false, + addressModel: widget.addressModel, + )); + if (result != null) { + if (result) widget.refreshController!.callRefresh(); + } }, child: Container( - child: Image.asset(R.ASSETS_ICONS_ICON_ADDRESS_EDIT_PNG,width: 40.w,height: 40.w,), + child: Image.asset( + R.ASSETS_ICONS_ICON_ADDRESS_EDIT_PNG, + width: 40.w, + height: 40.w, + ), ), ) ], @@ -152,51 +168,48 @@ class _MyAddressItemState extends State { 10.wb, Text( widget.addressModel.isDefault == 0 ? "" : "默认地址", - style: TextStyle(fontSize: 28.sp,color: ktextSubColor), + style: TextStyle(fontSize: 28.sp, color: ktextSubColor), ), Spacer(), GestureDetector( - onTap: () async{ + onTap: () async { // bool? result = await Userfunc.deleteAddress(widget.addressModel.id!); // if(result!=null){ // if(result) widget.refreshController!.callRefresh(); // } - bool? result = - await Get.dialog(CupertinoAlertDialog( - title: '您确定要删除该地址吗?'.text.isIntrinsic.size(30.sp).make(), - actions: [ - CupertinoDialogAction( - child: '取消'.text.black.isIntrinsic.make(), - onPressed: () => Get.back(), - ), - CupertinoDialogAction( - child: '确定' - .text - .color(Colors.orange) - .isIntrinsic - .make(), - onPressed: () => Get.back(result: true), - ), - ], - )); + bool? result = await Get.dialog(CupertinoAlertDialog( + title: '您确定要删除该地址吗?'.text.isIntrinsic.size(30.sp).make(), + actions: [ + CupertinoDialogAction( + child: '取消'.text.black.isIntrinsic.make(), + onPressed: () => Get.back(), + ), + CupertinoDialogAction( + child: + '确定'.text.color(Colors.orange).isIntrinsic.make(), + onPressed: () => Get.back(result: true), + ), + ], + )); - if (result == true) { - bool? result = await Userfunc.deleteAddress(widget.addressModel.id!); - if(result!=null){ - if(result) widget.refreshController!.callRefresh(); - } - }; + if (result == true) { + bool? result = + await Userfunc.deleteAddress(widget.addressModel.id!); + if (result != null) { + if (result) widget.refreshController!.callRefresh(); + } + } + ; }, child: Container( width: 70.w, height: 40.w, - child:Text( + child: Text( "删除", - style: TextStyle(fontSize: 28.sp,color: ktextSubColor), + style: TextStyle(fontSize: 28.sp, color: ktextSubColor), ), ), ), - ], ) ], @@ -204,5 +217,4 @@ class _MyAddressItemState extends State { ), ); } - } diff --git a/lib/pages/personal/personal_page.dart b/lib/pages/personal/personal_page.dart index 37d1a2d8..7ede4c27 100644 --- a/lib/pages/personal/personal_page.dart +++ b/lib/pages/personal/personal_page.dart @@ -1,19 +1,16 @@ -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/constants/application_objects.dart'; -import 'package:aku_community/pages/personal/user_profile_page.dart'; -import 'package:aku_community/pages/setting_page/settings_page.dart'; -import 'package:aku_community/pages/sign/sign_in_page.dart'; -import 'package:aku_community/painters/user_bottom_bar_painter.dart'; -import 'package:aku_community/provider/user_provider.dart'; -import 'package:aku_community/ui/market/order/order_page.dart'; -import 'package:aku_community/ui/profile/car/car_manage_page.dart'; -import 'package:aku_community/ui/profile/car_parking/car_parking_page.dart'; -import 'package:aku_community/ui/profile/house/house_owners_page.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/others/user_tool.dart'; -import 'package:aku_community/widget/views/application_view.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/pages/personal/user_profile_page.dart'; +import 'package:aku_new_community/pages/setting_page/settings_page.dart'; +import 'package:aku_new_community/pages/sign/sign_in_page.dart'; +import 'package:aku_new_community/painters/user_bottom_bar_painter.dart'; +import 'package:aku_new_community/provider/user_provider.dart'; +import 'package:aku_new_community/ui/market/order/order_page.dart'; +import 'package:aku_new_community/ui/profile/car/car_manage_page.dart'; +import 'package:aku_new_community/ui/profile/car_parking/car_parking_page.dart'; +import 'package:aku_new_community/ui/profile/house/house_owners_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; @@ -33,7 +30,7 @@ class PersonalIndex extends StatefulWidget { } class _PersonalIndexState extends State - with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin{ + with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin { SliverAppBar _sliverAppBar(double height) { final userProvider = Provider.of(context); return SliverAppBar( @@ -41,7 +38,6 @@ class _PersonalIndexState extends State toolbarHeight: 0, elevation: 0, floating: false, - expandedHeight: 450.w - height, backgroundColor: Colors.white, flexibleSpace: FlexibleSpaceBar( @@ -87,9 +83,13 @@ class _PersonalIndexState extends State height: 106.w, width: 106.w, fit: BoxFit.cover, - imageErrorBuilder: (context, error, stackTrace) { - return Image.asset(R.ASSETS_IMAGES_PLACEHOLDER_WEBP,height: 106.w, - width: 106.w,); + imageErrorBuilder: + (context, error, stackTrace) { + return Image.asset( + R.ASSETS_IMAGES_PLACEHOLDER_WEBP, + height: 106.w, + width: 106.w, + ); }, ), ), @@ -203,372 +203,389 @@ class _PersonalIndexState extends State @override Widget build(BuildContext context) { + super.build(context); final double _statusHeight = MediaQuery.of(context).padding.top; final userProvider = Provider.of(context); return Scaffold( - body: EasyRefresh( - header: MaterialHeader(), - onRefresh: () async { - await userProvider.updateProfile(); - await userProvider.updateUserDetail(); - }, - child: Stack( - children: [ - // Container( - // - // width: double.infinity, - // height: 441.w, - // alignment: Alignment.topCenter, - // - // decoration: BoxDecoration( - // gradient: LinearGradient( - // begin: Alignment.topCenter, - // end: Alignment.bottomCenter, - // colors: [ - // Color(0xFFF9D57A), - // Color(0xFFF9D57A), - // ], - // ), - // ), - // padding: EdgeInsets.only(top: 130.w), - // child: Column( - // mainAxisAlignment: MainAxisAlignment.start, - // children: [ - // - // MaterialButton( - // padding: EdgeInsets.all(5.w), - // onPressed: () { - // if (!userProvider.isLogin) - // Get.to(() => SignInPage()); - // else - // Get.to(() => UserProfilePage()); - // }, - // child: Container( - // margin: EdgeInsets.only(left: 32.w), - // child: Row( - // children: [ - // Hero( - // tag: 'AVATAR', - // child: ClipOval( - // child: FadeInImage.assetNetwork( - // placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, - // image: API.image(userProvider - // .userInfoModel!.imgUrls.isNotEmpty - // ? userProvider - // .userInfoModel!.imgUrls.first.url - // : ''), - // height: 106.w, - // width: 106.w, - // fit: BoxFit.cover, - // imageErrorBuilder: (context, error, stackTrace) { - // return Image.asset(R.ASSETS_IMAGES_PLACEHOLDER_WEBP,height: 106.w, - // width: 106.w,); - // }, - // ), - // ), - // ), - // Container( - // margin: EdgeInsets.only(left: 16.w), - // child: userProvider.isLogin - // ? Text( - // userProvider.userInfoModel?.nickName ?? - // '', - // style: TextStyle( - // fontSize: 32.sp, - // color: Color(0xffad8940), - // ), - // ) - // : Text( - // '登录/注册', - // style: TextStyle( - // fontSize: 32.sp, - // color: Color(0xffad8940), - // ), - // )), - // ], - // ), - // ), - // ), - // // Stack( - // // children: [ - // // Positioned( - // // bottom: 0, - // // left: 0, - // // right: 0, - // // child: Container( - // // height: 41.w, - // // width: double.infinity, - // // child: CustomPaint( - // // painter: UserBottomBarPainter(), - // // ), - // // ), - // // ), - // // Container( - // // margin: EdgeInsets.only( - // // top: 38.w, - // // left: 36.w, - // // right: 36.w, - // // bottom: 18.w, - // // ), - // // child: Image.asset( - // // R.ASSETS_IMAGES_MEMBER_BG_PNG, - // // width: 678.w, - // // height: 129.w, - // // ), - // // ), - // // ], - // // ), - // ], - // ), - // ), - - Container( - - width: double.infinity, - height: 441.w, - alignment: Alignment.topCenter, + header: MaterialHeader(), + onRefresh: () async { + await userProvider.updateProfile(); + await userProvider.updateUserDetail(); + }, + child: Stack( + children: [ + // Container( + // + // width: double.infinity, + // height: 441.w, + // alignment: Alignment.topCenter, + // + // decoration: BoxDecoration( + // gradient: LinearGradient( + // begin: Alignment.topCenter, + // end: Alignment.bottomCenter, + // colors: [ + // Color(0xFFF9D57A), + // Color(0xFFF9D57A), + // ], + // ), + // ), + // padding: EdgeInsets.only(top: 130.w), + // child: Column( + // mainAxisAlignment: MainAxisAlignment.start, + // children: [ + // + // MaterialButton( + // padding: EdgeInsets.all(5.w), + // onPressed: () { + // if (!userProvider.isLogin) + // Get.to(() => SignInPage()); + // else + // Get.to(() => UserProfilePage()); + // }, + // child: Container( + // margin: EdgeInsets.only(left: 32.w), + // child: Row( + // children: [ + // Hero( + // tag: 'AVATAR', + // child: ClipOval( + // child: FadeInImage.assetNetwork( + // placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, + // image: API.image(userProvider + // .userInfoModel!.imgUrls.isNotEmpty + // ? userProvider + // .userInfoModel!.imgUrls.first.url + // : ''), + // height: 106.w, + // width: 106.w, + // fit: BoxFit.cover, + // imageErrorBuilder: (context, error, stackTrace) { + // return Image.asset(R.ASSETS_IMAGES_PLACEHOLDER_WEBP,height: 106.w, + // width: 106.w,); + // }, + // ), + // ), + // ), + // Container( + // margin: EdgeInsets.only(left: 16.w), + // child: userProvider.isLogin + // ? Text( + // userProvider.userInfoModel?.nickName ?? + // '', + // style: TextStyle( + // fontSize: 32.sp, + // color: Color(0xffad8940), + // ), + // ) + // : Text( + // '登录/注册', + // style: TextStyle( + // fontSize: 32.sp, + // color: Color(0xffad8940), + // ), + // )), + // ], + // ), + // ), + // ), + // // Stack( + // // children: [ + // // Positioned( + // // bottom: 0, + // // left: 0, + // // right: 0, + // // child: Container( + // // height: 41.w, + // // width: double.infinity, + // // child: CustomPaint( + // // painter: UserBottomBarPainter(), + // // ), + // // ), + // // ), + // // Container( + // // margin: EdgeInsets.only( + // // top: 38.w, + // // left: 36.w, + // // right: 36.w, + // // bottom: 18.w, + // // ), + // // child: Image.asset( + // // R.ASSETS_IMAGES_MEMBER_BG_PNG, + // // width: 678.w, + // // height: 129.w, + // // ), + // // ), + // // ], + // // ), + // ], + // ), + // ), - decoration: BoxDecoration( - image: DecorationImage( - image: AssetImage(R.ASSETS_IMAGES_MY_BG_PNG), - fit: BoxFit.cover, + Container( + width: double.infinity, + height: 441.w, + alignment: Alignment.topCenter, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage(R.ASSETS_IMAGES_MY_BG_PNG), + fit: BoxFit.cover, + ), ), - ), - padding: EdgeInsets.only(top: 100.w), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Row( - children: [ - Spacer(), - GestureDetector( - onTap: (){ - Get.to(SettingsPage()); - }, - child: Container( - width: 72.w, + padding: EdgeInsets.only(top: 100.w), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Row( + children: [ + Spacer(), + GestureDetector( + onTap: () { + Get.to(SettingsPage()); + }, + child: Container( + width: 72.w, height: 40.w, alignment: Alignment.center, - child: Image.asset(R.ASSETS_ICONS_ICON_MY_SETTING_PNG,width: 40.w,height: 40.w), - ), - ), - 24.wb, - ], - ), - - MaterialButton( - padding: EdgeInsets.all(5.w), - onPressed: () { - if (!userProvider.isLogin) - Get.to(() => SignInPage()); - else - Get.to(() => UserProfilePage()); - }, - child: Container( - margin: EdgeInsets.only(left: 32.w), - child: Row( - children: [ - Hero( - tag: 'AVATAR', - child: ClipOval( - child: FadeInImage.assetNetwork( - placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, - image: API.image(userProvider - .userInfoModel!.imgUrls.isNotEmpty - ? userProvider - .userInfoModel!.imgUrls.first.url - : ''), - height: 106.w, - width: 106.w, - fit: BoxFit.cover, - imageErrorBuilder: (context, error, stackTrace) { - return Image.asset(R.ASSETS_IMAGES_PLACEHOLDER_WEBP,height: 106.w, - width: 106.w,); - }, - ), - ), + child: Image.asset( + R.ASSETS_ICONS_ICON_MY_SETTING_PNG, + width: 40.w, + height: 40.w), ), - Container( - margin: EdgeInsets.only(left: 16.w), - child: userProvider.isLogin - ? Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - userProvider.userInfoModel?.nickName ?? - '', - style: TextStyle( - fontSize: 40.sp, - color: Colors.black.withOpacity(0.85), - ), - ), - 4.hb, - - Text( - '当一个新时代的有志青年', - style: TextStyle( - fontSize: 24.sp, - color: Colors.black.withOpacity(0.45), - ), - ), - - - ], - ) : Text( - '登录/注册', - style: TextStyle( - fontSize: 32.sp, - color: Color(0xffad8940), - ), - ) - - ), - ], - ), - ), - ), - // Stack( - // children: [ - // Positioned( - // bottom: 0, - // left: 0, - // right: 0, - // child: Container( - // height: 41.w, - // width: double.infinity, - // child: CustomPaint( - // painter: UserBottomBarPainter(), - // ), - // ), - // ), - // Container( - // margin: EdgeInsets.only( - // top: 38.w, - // left: 36.w, - // right: 36.w, - // bottom: 18.w, - // ), - // child: Image.asset( - // R.ASSETS_IMAGES_MEMBER_BG_PNG, - // width: 678.w, - // height: 129.w, - // ), - // ), - // ], - // ), - ], - ), - ), - Padding( - - padding: EdgeInsets.only(top: 350.w), - child: Column( - - children: [ - Container( - width: 686.w, - height: 282.w, - decoration: BoxDecoration( - color: Color(0xffffffff), - borderRadius: BorderRadius.all(Radius.circular(8)), - boxShadow: [ - BoxShadow( - color: Colors.grey.withOpacity(0.1), - offset: Offset(1, 1), ), + 24.wb, ], ), - margin: EdgeInsets.only(left: 32.w,right: 32.w), - padding: EdgeInsets.only(top: 24.w,left: 32.w,right: 32.w), - child: - Column( - //mainAxisAlignment: MainAxisAlignment.center, - children: [ - _homeTitle('我的订单', () { - Get.to(() => OrderPage(initIndex: 0)); - }, '查看全部'), - 50.hb, - Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, + MaterialButton( + padding: EdgeInsets.all(5.w), + onPressed: () { + if (!userProvider.isLogin) + Get.to(() => SignInPage()); + else + Get.to(() => UserProfilePage()); + }, + child: Container( + margin: EdgeInsets.only(left: 32.w), + child: Row( children: [ - _orderButton( - name: '待付款', - path: R.ASSETS_ICONS_USER_ICON_DFK_PNG, - index: 1, - ), - _orderButton( - name: '待发货', - path: R.ASSETS_ICONS_USER_ICON_DSH_PNG, - index: 2, - ), - _orderButton( - name: '待收货', - path: R.ASSETS_ICONS_USER_ICON_DPJ_PNG, - index: 3, - ), - _orderButton( - name: '已完成', - path: R.ASSETS_ICONS_USER_ICON_SH_PNG, - index: 4, + Hero( + tag: 'AVATAR', + child: ClipOval( + child: FadeInImage.assetNetwork( + placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, + image: API.image(userProvider + .userInfoModel!.imgUrls.isNotEmpty + ? userProvider + .userInfoModel!.imgUrls.first.url + : ''), + height: 106.w, + width: 106.w, + fit: BoxFit.cover, + imageErrorBuilder: + (context, error, stackTrace) { + return Image.asset( + R.ASSETS_IMAGES_PLACEHOLDER_WEBP, + height: 106.w, + width: 106.w, + ); + }, + ), + ), ), + Container( + margin: EdgeInsets.only(left: 16.w), + child: userProvider.isLogin + ? Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Text( + userProvider + .userInfoModel?.nickName ?? + '', + style: TextStyle( + fontSize: 40.sp, + color: Colors.black + .withOpacity(0.85), + ), + ), + 4.hb, + Text( + '当一个新时代的有志青年', + style: TextStyle( + fontSize: 24.sp, + color: Colors.black + .withOpacity(0.45), + ), + ), + ], + ) + : Text( + '登录/注册', + style: TextStyle( + fontSize: 32.sp, + color: Color(0xffad8940), + ), + )), ], ), - ], + ), ), - ), - Container( - decoration: BoxDecoration( - color: Color(0xffffffff), - borderRadius: BorderRadius.all(Radius.circular(8)), - boxShadow: [ - BoxShadow( - color: Colors.grey.withOpacity(0.1), - offset: Offset(1, 1), - ), - ], + // Stack( + // children: [ + // Positioned( + // bottom: 0, + // left: 0, + // right: 0, + // child: Container( + // height: 41.w, + // width: double.infinity, + // child: CustomPaint( + // painter: UserBottomBarPainter(), + // ), + // ), + // ), + // Container( + // margin: EdgeInsets.only( + // top: 38.w, + // left: 36.w, + // right: 36.w, + // bottom: 18.w, + // ), + // child: Image.asset( + // R.ASSETS_IMAGES_MEMBER_BG_PNG, + // width: 678.w, + // height: 129.w, + // ), + // ), + // ], + // ), + ], + ), + ), + Padding( + padding: EdgeInsets.only(top: 350.w), + child: Column( + children: [ + Container( + width: 686.w, + height: 282.w, + decoration: BoxDecoration( + color: Color(0xffffffff), + borderRadius: BorderRadius.all(Radius.circular(8)), + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.1), + offset: Offset(1, 1), + ), + ], + ), + margin: EdgeInsets.only(left: 32.w, right: 32.w), + padding: + EdgeInsets.only(top: 24.w, left: 32.w, right: 32.w), + child: Column( + //mainAxisAlignment: MainAxisAlignment.center, + children: [ + _homeTitle('我的订单', () { + Get.to(() => OrderPage(initIndex: 0)); + }, '查看全部'), + 50.hb, + Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + _orderButton( + name: '待付款', + path: R.ASSETS_ICONS_USER_ICON_DFK_PNG, + index: 1, + ), + _orderButton( + name: '待发货', + path: R.ASSETS_ICONS_USER_ICON_DSH_PNG, + index: 2, + ), + _orderButton( + name: '待收货', + path: R.ASSETS_ICONS_USER_ICON_DPJ_PNG, + index: 3, + ), + _orderButton( + name: '已完成', + path: R.ASSETS_ICONS_USER_ICON_SH_PNG, + index: 4, + ), + ], + ), + ], + ), ), - margin: EdgeInsets.all(32.w), - padding: EdgeInsets.all(32.w), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - _function('我的房屋', R.ASSETS_ICONS_ICON_MY_HOUSE_PNG, () => HouseOwnersPage( - identify: UserTool.userProvider.userDetailModel!.type ?? 4, - ),userProvider.userDetailModel!.estateNames!.isEmpty?'': userProvider.userDetailModel!.estateNames?[0]??'',), - 36.hb, - _function('我的车位', R.ASSETS_ICONS_ICON_MY_CARSEAT_PNG, () => CarParkingPage(),''), - 36.hb, - _function('我的车', R.ASSETS_ICONS_ICON_MY_CAR_PNG, () => CarManagePage(),''), - 36.hb, - _function('我的访客', R.ASSETS_ICONS_ICON_MY_VISITOR_PNG, () => CarManagePage(),''), - 36.hb, - _function('收货地址设置', R.ASSETS_ICONS_ICON_MY_LOCATION_PNG, () => AddressListPage(canBack: false,),''), + Container( + decoration: BoxDecoration( + color: Color(0xffffffff), + borderRadius: BorderRadius.all(Radius.circular(8)), + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.1), + offset: Offset(1, 1), + ), + ], + ), + margin: EdgeInsets.all(32.w), + padding: EdgeInsets.all(32.w), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + _function( + '我的房屋', + R.ASSETS_ICONS_ICON_MY_HOUSE_PNG, + () => HouseOwnersPage( + identify: + UserTool.userProvider.userDetailModel!.type ?? + 4, + ), + userProvider.userDetailModel!.estateNames!.isEmpty + ? '' + : userProvider + .userDetailModel!.estateNames?[0] ?? + '', + ), + 36.hb, + _function('我的车位', R.ASSETS_ICONS_ICON_MY_CARSEAT_PNG, + () => CarParkingPage(), ''), + 36.hb, + _function('我的车', R.ASSETS_ICONS_ICON_MY_CAR_PNG, + () => CarManagePage(), ''), + 36.hb, + _function('我的访客', R.ASSETS_ICONS_ICON_MY_VISITOR_PNG, + () => CarManagePage(), ''), + 36.hb, + _function( + '收货地址设置', + R.ASSETS_ICONS_ICON_MY_LOCATION_PNG, + () => AddressListPage( + canBack: false, + ), + ''), - // - // ApplicationView.custom( - // items: userAppObjects, - // needAllApp: false, - // ), - ], + // + // ApplicationView.custom( + // items: userAppObjects, + // needAllApp: false, + // ), + ], + ), ), - ), - - ], + ], + ), ), - ), - - - ], - ) - - - ), + ], + )), ); } + _homeTitle(String title, VoidCallback onTap, String suffixTitle) { return Row( children: [ @@ -592,17 +609,27 @@ class _PersonalIndexState extends State ], ); } - - _function( String title ,String path,dynamic page ,String msg,){ + + _function( + String title, + String path, + dynamic page, + String msg, + ) { return GestureDetector( - onTap: (){ + onTap: () { Get.to(page); }, child: Container( color: Colors.transparent, child: Row( children: [ - Image.asset(path,width: 40.w,height: 40.w,fit:BoxFit.fitHeight,), + Image.asset( + path, + width: 40.w, + height: 40.w, + fit: BoxFit.fitHeight, + ), 16.wb, Text( title, @@ -631,6 +658,6 @@ class _PersonalIndexState extends State ); } - @override - bool get wantKeepAlive => true; + @override + bool get wantKeepAlive => true; } diff --git a/lib/pages/personal/update_tel_page.dart b/lib/pages/personal/update_tel_page.dart index 578d3969..febfeaeb 100644 --- a/lib/pages/personal/update_tel_page.dart +++ b/lib/pages/personal/update_tel_page.dart @@ -1,20 +1,18 @@ import 'dart:async'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; - +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/pages/sign/sign_func.dart'; +import 'package:aku_new_community/provider/user_provider.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flustars/flustars.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/pages/sign/sign_func.dart'; -import 'package:aku_community/provider/user_provider.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class UpdateTelPage extends StatefulWidget { UpdateTelPage({Key? key}) : super(key: key); @@ -27,7 +25,9 @@ class _UpdateTelPageState extends State { TextEditingController? _newTelController; TextEditingController? _codeController; Timer? _timer; + bool get validPhone => RegexUtil.isMobileSimple(_newTelController!.text); + bool get _canGetCode { bool timeActive = _timer?.isActive ?? false; return (!timeActive) && validPhone; diff --git a/lib/pages/personal/user_func.dart b/lib/pages/personal/user_func.dart index dd9ffd79..4d0612d0 100644 --- a/lib/pages/personal/user_func.dart +++ b/lib/pages/personal/user_func.dart @@ -1,71 +1,60 @@ -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/community/activity_item_model.dart'; -import 'package:aku_community/model/community/board_model.dart'; -import 'package:aku_community/model/community/community_topic_model.dart'; -import 'package:aku_community/model/community/hot_news_model.dart'; -import 'package:aku_community/model/community/swiper_model.dart'; -import 'package:aku_community/model/user/adress_model.dart'; -import 'package:aku_community/models/market/goods_classification.dart'; -import 'package:aku_community/models/market/goods_popular_model.dart'; -import 'package:aku_community/models/market/order/goods_home_model.dart'; -import 'package:aku_community/utils/network/base_list_model.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/community/board_model.dart'; +import 'package:aku_new_community/model/community/swiper_model.dart'; +import 'package:aku_new_community/model/user/adress_model.dart'; +import 'package:aku_new_community/utils/network/base_list_model.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; import 'package:bot_toast/bot_toast.dart'; class Userfunc { - ///查询我的收货地址列表 - static Future> getMyAddress( - ) async { + static Future> getMyAddress() async { BaseModel model = await NetUtil().get( API.user.myAddressList, ); - if (model.data!.length == 0) - return []; - return (model.data as List) - .map((e) => AddressModel.fromJson(e)) - .toList(); + if (model.data!.length == 0) return []; + return (model.data as List).map((e) => AddressModel.fromJson(e)).toList(); } ///添加收货地址 - static Future insertAddress(String name,String tel,int? location, - String addressDetail,int? isDefault) async { - BaseModel model = await NetUtil().post( - API.user.insertAddress, - params: {'name':name,'tel':tel,'location':location, - 'addressDetail':addressDetail,'isDefault':isDefault}, - showMessage: false - ); - if (model.status??false) - { - BotToast.showText(text: '添加成功'); - return true; - } - - else{ + static Future insertAddress(String name, String tel, int? location, + String addressDetail, int? isDefault) async { + BaseModel model = await NetUtil().post(API.user.insertAddress, + params: { + 'name': name, + 'tel': tel, + 'location': location, + 'addressDetail': addressDetail, + 'isDefault': isDefault + }, + showMessage: false); + if (model.status ?? false) { + BotToast.showText(text: '添加成功'); + return true; + } else { BotToast.showText(text: '添加失败'); return false; } - } ///修改收货地址 - static Future updateAddress(int id,String name,String tel,int? location, - String addressDetail,int? isDefault) async { - BaseModel model = await NetUtil().post( - API.user.updateAddress, - params: {'id': id,'name':name,'tel':tel,'location':location, - 'addressDetail':addressDetail,'isDefault':isDefault}, - showMessage: false - ); - if (model.status??false) - { + static Future updateAddress(int id, String name, String tel, + int? location, String addressDetail, int? isDefault) async { + BaseModel model = await NetUtil().post(API.user.updateAddress, + params: { + 'id': id, + 'name': name, + 'tel': tel, + 'location': location, + 'addressDetail': addressDetail, + 'isDefault': isDefault + }, + showMessage: false); + if (model.status ?? false) { BotToast.showText(text: '修改成功'); return true; - } - - else{ + } else { BotToast.showText(text: '修改失败'); return false; } @@ -73,67 +62,39 @@ class Userfunc { ///删除收货地址 static Future deleteAddress(int addressId) async { - BaseModel model = await NetUtil().post( - API.user.deleteAddress, - params: {'addressId': addressId}, - showMessage: false - ); - if (model.status??false) - { + BaseModel model = await NetUtil().post(API.user.deleteAddress, + params: {'addressId': addressId}, showMessage: false); + if (model.status ?? false) { BotToast.showText(text: '删除成功'); return true; - } - - else{ + } else { BotToast.showText(text: '删除失败'); return false; } } - ///设置默认收货地址 static Future setIsDefaultAddress(int addressId) async { - BaseModel model = await NetUtil().post( - API.user.settingDefaultAddress, - params: {'addressId': addressId}, - showMessage: false - ); - if (model.status??false) - { + BaseModel model = await NetUtil().post(API.user.settingDefaultAddress, + params: {'addressId': addressId}, showMessage: false); + if (model.status ?? false) { BotToast.showText(text: '设置成功'); return true; - } - - else{ + } else { BotToast.showText(text: '设置失败'); return false; } } - - - - - - - - - - - - ///查询SKU总数 static Future getSkuTotal() async { BaseModel model = await NetUtil().get( API.market.skuTotal, ); - if (model.data! == null) - return '0'; + if (model.data! == null) return '0'; return (model.data as int).toString(); } - - static Future> board() async { BaseListModel model = await NetUtil().getList( API.community.boardList, @@ -147,10 +108,7 @@ class Userfunc { BaseModel model = await NetUtil().get( API.community.getSwiper, ); - if (model.data!.length == 0) - return []; - return (model.data as List) - .map((e) => SwiperModel.fromJson(e)) - .toList(); + if (model.data!.length == 0) return []; + return (model.data as List).map((e) => SwiperModel.fromJson(e)).toList(); } } diff --git a/lib/pages/personal/user_profile_page.dart b/lib/pages/personal/user_profile_page.dart index 5fbddda1..a010a495 100644 --- a/lib/pages/personal/user_profile_page.dart +++ b/lib/pages/personal/user_profile_page.dart @@ -1,20 +1,19 @@ import 'dart:io'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/pages/personal/change_nick_name_page.dart'; -import 'package:aku_community/pages/personal/update_tel_page.dart'; -import 'package:aku_community/provider/user_provider.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/base_file_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/picker/bee_custom_picker.dart'; -import 'package:aku_community/widget/picker/bee_date_picker.dart'; -import 'package:aku_community/widget/picker/bee_image_picker.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/pages/personal/change_nick_name_page.dart'; +import 'package:aku_new_community/pages/personal/update_tel_page.dart'; +import 'package:aku_new_community/provider/user_provider.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_file_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/picker/bee_custom_picker.dart'; +import 'package:aku_new_community/widget/picker/bee_date_picker.dart'; +import 'package:aku_new_community/widget/picker/bee_image_picker.dart'; import 'package:bot_toast/bot_toast.dart'; -import 'package:cached_network_image/cached_network_image.dart'; import 'package:flustars/flustars.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -94,20 +93,20 @@ class _UserProfilePageState extends State { tag: 'AVATAR', child: ClipOval( child: - // CachedNetworkImage( - // imageUrl: API.image( - // userProvider.userInfoModel!.imgUrls.isNotEmpty - // ? userProvider.userInfoModel?.imgUrls.first.url - // : ''), - // height: 56.w, - // width: 56.w, - // placeholder: (context, url) => - // Image.asset(R.ASSETS_IMAGES_PLACEHOLDER_WEBP), - // errorWidget: (context, url, error) => - // Image.asset(R.ASSETS_IMAGES_PLACEHOLDER_WEBP), - // fit: BoxFit.fill, - // ), - FadeInImage.assetNetwork( + // CachedNetworkImage( + // imageUrl: API.image( + // userProvider.userInfoModel!.imgUrls.isNotEmpty + // ? userProvider.userInfoModel?.imgUrls.first.url + // : ''), + // height: 56.w, + // width: 56.w, + // placeholder: (context, url) => + // Image.asset(R.ASSETS_IMAGES_PLACEHOLDER_WEBP), + // errorWidget: (context, url, error) => + // Image.asset(R.ASSETS_IMAGES_PLACEHOLDER_WEBP), + // fit: BoxFit.fill, + // ), + FadeInImage.assetNetwork( placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, image: API.image( userProvider.userInfoModel!.imgUrls.isNotEmpty diff --git a/lib/pages/personal/widget/refund_shop_card.dart b/lib/pages/personal/widget/refund_shop_card.dart index b8f469d1..b36cfd96 100644 --- a/lib/pages/personal/widget/refund_shop_card.dart +++ b/lib/pages/personal/widget/refund_shop_card.dart @@ -1,11 +1,11 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/utils/headers.dart'; - class RefundShopCard extends StatelessWidget { final String? imagePath, content, specs; + RefundShopCard({Key? key, this.imagePath, this.content, this.specs}) : super(key: key); diff --git a/lib/pages/personal/widget/refund_tile_card.dart b/lib/pages/personal/widget/refund_tile_card.dart index 17a6222e..a6c53e35 100644 --- a/lib/pages/personal/widget/refund_tile_card.dart +++ b/lib/pages/personal/widget/refund_tile_card.dart @@ -1,13 +1,12 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_icons/flutter_icons.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/utils/headers.dart'; - class RefundTileCard extends StatefulWidget { final List>? listTile; + RefundTileCard({Key? key, this.listTile}) : super(key: key); @override diff --git a/lib/pages/property/property_func.dart b/lib/pages/property/property_func.dart index 458155a7..3ee13a63 100644 --- a/lib/pages/property/property_func.dart +++ b/lib/pages/property/property_func.dart @@ -1,20 +1,13 @@ - -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/market/goods_item.dart'; -import 'package:aku_community/models/market/order/order_detail_model.dart'; -import 'package:aku_community/models/search/search_goods_model.dart'; -import 'package:aku_community/utils/network/base_list_model.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/utils/text_utils.dart'; -import 'package:aku_community/widget/others/user_tool.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/others/user_tool.dart'; class PropertyFunc { - ///根据房产id查询对应的预付款充值金额 static Future getDailyPaymentPrePay() async { BaseModel baseModel = - await NetUtil().get(API.manager.dailyPaymentPrePay, params: { + await NetUtil().get(API.manager.dailyPaymentPrePay, params: { "estateId": UserTool.appProveider.selectedHouse!.estateId, }); if (baseModel.status ?? false) { @@ -27,7 +20,7 @@ class PropertyFunc { ///根据房产id查询对应的未缴费金额 static Future getFindUnpaidAmount() async { BaseModel baseModel = - await NetUtil().get(API.manager.findUnpaidAmount, params: { + await NetUtil().get(API.manager.findUnpaidAmount, params: { "estateId": UserTool.appProveider.selectedHouse!.estateId, }); if (baseModel.status ?? false) { @@ -36,5 +29,4 @@ class PropertyFunc { return 0; } } - } diff --git a/lib/pages/property/property_index.dart b/lib/pages/property/property_index.dart index 4819caca..7fa45d51 100644 --- a/lib/pages/property/property_index.dart +++ b/lib/pages/property/property_index.dart @@ -1,18 +1,17 @@ +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/constants/application_objects.dart'; +import 'package:aku_new_community/model/community/board_model.dart'; +import 'package:aku_new_community/ui/community/notice/notice_card.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_list_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/views/application_box.dart'; +import 'package:aku_new_community/widget/views/application_view.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/constants/application_objects.dart'; -import 'package:aku_community/model/community/board_model.dart'; -import 'package:aku_community/ui/community/notice/notice_card.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/base_list_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/views/application_box.dart'; -import 'package:aku_community/widget/views/application_view.dart'; import 'widget/property_card.dart'; //TODO CLEAN BOTTOM CODES. @@ -35,6 +34,7 @@ class _PropertyIndexState extends State int _page = 1; int? _pageCount = 0; List _models = []; + Future> _getItems() async { BaseListModel model = await NetUtil().getList( API.community.boardList, diff --git a/lib/pages/property/property_page.dart b/lib/pages/property/property_page.dart index 066e8f1c..5dfe50c4 100644 --- a/lib/pages/property/property_page.dart +++ b/lib/pages/property/property_page.dart @@ -1,22 +1,15 @@ -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/application_objects.dart'; -import 'package:aku_community/pages/life_pay/life_pay_choose_page.dart'; -import 'package:aku_community/pages/message_center_page/message_center_page.dart'; -import 'package:aku_community/pages/personal/user_profile_page.dart'; -import 'package:aku_community/pages/property/property_func.dart'; -import 'package:aku_community/pages/sign/sign_in_page.dart'; -import 'package:aku_community/painters/user_bottom_bar_painter.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/provider/user_provider.dart'; -import 'package:aku_community/ui/profile/house/add_house_page.dart'; -import 'package:aku_community/ui/profile/house/house_owners_page.dart'; -import 'package:aku_community/ui/search/bee_search.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/login_util.dart'; -import 'package:aku_community/widget/others/user_tool.dart'; -import 'package:aku_community/widget/views/application_view.dart'; -import 'package:badges/badges.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/application_objects.dart'; +import 'package:aku_new_community/pages/life_pay/life_pay_choose_page.dart'; +import 'package:aku_new_community/pages/property/property_func.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/provider/user_provider.dart'; +import 'package:aku_new_community/ui/profile/house/add_house_page.dart'; +import 'package:aku_new_community/ui/profile/house/house_owners_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/others/user_tool.dart'; +import 'package:aku_new_community/widget/views/application_view.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -56,14 +49,14 @@ class _PropertyPageState extends State super.dispose(); } - _getRefresh(){ + _getRefresh() { Future.delayed(Duration(milliseconds: 0), () async { paid = await PropertyFunc.getDailyPaymentPrePay(); - unpaid = await PropertyFunc.getFindUnpaidAmount(); + unpaid = await PropertyFunc.getFindUnpaidAmount(); setState(() {}); }); } - + SliverAppBar _sliverAppBar(double height) { final userProvider = Provider.of(context); AppProvider appProvider = Provider.of(context); @@ -148,15 +141,13 @@ class _PropertyPageState extends State height: 503.w, fit: BoxFit.cover, ), - - top: 0, left: 0, right: 0, bottom: 0), Positioned( child: Container( - margin: EdgeInsets.only(left: 32.w, right: 32.w,top: 10.w), + margin: EdgeInsets.only(left: 32.w, right: 32.w, top: 10.w), width: 686.w, height: 74.w, decoration: BoxDecoration( @@ -178,7 +169,10 @@ class _PropertyPageState extends State ), Spacer(), Text( - userProvider.userDetailModel!.estateNames!.isEmpty?'暂未绑定': userProvider.userDetailModel!.estateNames?[0]??'暂未绑定', + userProvider.userDetailModel!.estateNames!.isEmpty + ? '暂未绑定' + : userProvider.userDetailModel!.estateNames?[0] ?? + '暂未绑定', style: TextStyle( fontSize: 28.sp, color: Colors.white.withOpacity(0.85), @@ -189,9 +183,9 @@ class _PropertyPageState extends State GestureDetector( onTap: () { Get.to(HouseOwnersPage( - identify: UserTool.userProvider.userDetailModel!.type ?? 4, + identify: + UserTool.userProvider.userDetailModel!.type ?? 4, )); - }, child: Container( alignment: Alignment.center, @@ -257,7 +251,7 @@ class _PropertyPageState extends State crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - pay?paid.toStringAsFixed(2):unpaid.toStringAsFixed(2), + pay ? paid.toStringAsFixed(2) : unpaid.toStringAsFixed(2), style: TextStyle( color: Color(0xFFFFFFFF).withOpacity(0.85), fontSize: 40.sp, @@ -275,17 +269,16 @@ class _PropertyPageState extends State ), Spacer(), GestureDetector( - onTap: () async{ - final appProvider = Provider.of(Get.context!, listen: false); + onTap: () async { + final appProvider = + Provider.of(Get.context!, listen: false); if (appProvider.selectedHouse == null) { BotToast.showText(text: '请先添加房屋'); Get.to(() => AddHousePage()); - - }else{ + } else { bool? result = await Get.to(() => LifePayChoosePage()); if (result == true) _getRefresh(); } - }, child: Container( alignment: Alignment.center, @@ -298,7 +291,6 @@ class _PropertyPageState extends State ), decoration: BoxDecoration( color: Color(0xFFFFC257), - borderRadius: BorderRadius.all( Radius.circular(8.w), ), @@ -420,6 +412,7 @@ class _PropertyPageState extends State @override Widget build(BuildContext context) { + super.build(context); final double _statusHeight = MediaQuery.of(context).padding.top; final userProvider = Provider.of(context); return Scaffold( diff --git a/lib/pages/property/widget/property_card.dart b/lib/pages/property/widget/property_card.dart index f3b6ac26..bab4780f 100644 --- a/lib/pages/property/widget/property_card.dart +++ b/lib/pages/property/widget/property_card.dart @@ -1,11 +1,9 @@ +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:get/get.dart'; import 'package:url_launcher/url_launcher.dart'; -import 'package:aku_community/utils/headers.dart'; - class PropertyCard extends StatelessWidget { PropertyCard({Key? key}) : super(key: key); diff --git a/lib/pages/renovation_manage/new_renovation/new_renovation_add_page.dart b/lib/pages/renovation_manage/new_renovation/new_renovation_add_page.dart index bf7c1f72..f7c4dc90 100644 --- a/lib/pages/renovation_manage/new_renovation/new_renovation_add_page.dart +++ b/lib/pages/renovation_manage/new_renovation/new_renovation_add_page.dart @@ -1,23 +1,21 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/extensions/widget_list_ext.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:aku_new_community/widget/others/bee_input_row.dart'; +import 'package:aku_new_community/widget/others/user_tool.dart'; +import 'package:aku_new_community/widget/picker/bee_date_picker.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flustars/flustars.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; import 'package:get/get.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/extensions/widget_list_ext.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_divider.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; -import 'package:aku_community/widget/others/bee_input_row.dart'; -import 'package:aku_community/widget/others/user_tool.dart'; -import 'package:aku_community/widget/picker/bee_date_picker.dart'; - class NewRenovationAddPage extends StatefulWidget { NewRenovationAddPage({Key? key}) : super(key: key); diff --git a/lib/pages/renovation_manage/new_renovation/new_renovation_card.dart b/lib/pages/renovation_manage/new_renovation/new_renovation_card.dart index ef2b694e..e5327594 100644 --- a/lib/pages/renovation_manage/new_renovation/new_renovation_card.dart +++ b/lib/pages/renovation_manage/new_renovation/new_renovation_card.dart @@ -1,20 +1,19 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/models/new_renovation/new_renovation_list_model.dart'; +import 'package:aku_new_community/pages/renovation_manage/new_renovation/new_renovation_detail_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; +import 'package:aku_new_community/widget/buttons/card_bottom_button.dart'; import 'package:flutter/material.dart'; - import 'package:get/get.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/new_renovation/new_renovation_list_model.dart'; -import 'package:aku_community/pages/renovation_manage/new_renovation/new_renovation_detail_page.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_divider.dart'; -import 'package:aku_community/widget/buttons/card_bottom_button.dart'; - class NewRenovationCard extends StatefulWidget { final NewRenovationListModel model; final VoidCallback callRefresh; + NewRenovationCard({Key? key, required this.model, required this.callRefresh}) : super(key: key); diff --git a/lib/pages/renovation_manage/new_renovation/new_renovation_detail_page.dart b/lib/pages/renovation_manage/new_renovation/new_renovation_detail_page.dart index 22d58ab5..3151d4d6 100644 --- a/lib/pages/renovation_manage/new_renovation/new_renovation_detail_page.dart +++ b/lib/pages/renovation_manage/new_renovation/new_renovation_detail_page.dart @@ -1,13 +1,13 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/models/new_renovation/new_renovation_list_model.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/models/new_renovation/new_renovation_list_model.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_divider.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class NewRenovationDetailPage extends StatefulWidget { final NewRenovationListModel model; + NewRenovationDetailPage({Key? key, required this.model}) : super(key: key); @override diff --git a/lib/pages/renovation_manage/new_renovation/new_renovation_page.dart b/lib/pages/renovation_manage/new_renovation/new_renovation_page.dart index 9b232a0a..58bd555e 100644 --- a/lib/pages/renovation_manage/new_renovation/new_renovation_page.dart +++ b/lib/pages/renovation_manage/new_renovation/new_renovation_page.dart @@ -1,14 +1,12 @@ +import 'package:aku_new_community/pages/renovation_manage/new_renovation/new_renovation_add_page.dart'; +import 'package:aku_new_community/pages/renovation_manage/new_renovation/new_renovation_view.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/tab_bar/bee_tab_bar.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:get/get.dart'; -import 'package:aku_community/pages/renovation_manage/new_renovation/new_renovation_add_page.dart'; -import 'package:aku_community/pages/renovation_manage/new_renovation/new_renovation_view.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/tab_bar/bee_tab_bar.dart'; - class NewRenovationPage extends StatefulWidget { NewRenovationPage({Key? key}) : super(key: key); @@ -28,6 +26,7 @@ class _NewRenovationPageState extends State '检查未通过' ]; late TabController _tabController; + @override void initState() { super.initState(); diff --git a/lib/pages/renovation_manage/new_renovation/new_renovation_view.dart b/lib/pages/renovation_manage/new_renovation/new_renovation_view.dart index c413c43b..ddf79a70 100644 --- a/lib/pages/renovation_manage/new_renovation/new_renovation_view.dart +++ b/lib/pages/renovation_manage/new_renovation/new_renovation_view.dart @@ -1,15 +1,14 @@ +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/models/new_renovation/new_renovation_list_model.dart'; +import 'package:aku_new_community/pages/renovation_manage/new_renovation/new_renovation_card.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/new_renovation/new_renovation_list_model.dart'; -import 'package:aku_community/pages/renovation_manage/new_renovation/new_renovation_card.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/utils/headers.dart'; - class NewRenovationView extends StatefulWidget { final int index; + NewRenovationView({Key? key, required this.index}) : super(key: key); @override @@ -19,6 +18,7 @@ class NewRenovationView extends StatefulWidget { class _NewRenovationViewState extends State with AutomaticKeepAliveClientMixin { late EasyRefreshController _refreshController; + @override void initState() { super.initState(); diff --git a/lib/pages/renovation_manage/renovation_manage_card.dart b/lib/pages/renovation_manage/renovation_manage_card.dart index dc9aad90..f1e13fa6 100644 --- a/lib/pages/renovation_manage/renovation_manage_card.dart +++ b/lib/pages/renovation_manage/renovation_manage_card.dart @@ -1,17 +1,16 @@ -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/pages/renovation_manage/renovation_manage_detail_page.dart'; +import 'package:aku_new_community/pages/renovation_manage/renovation_map.dart'; import 'package:flustars/flustars.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/pages/renovation_manage/renovation_manage_detail_page.dart'; -import 'package:aku_community/pages/renovation_manage/renovation_map.dart'; - class RenovationManageCard extends StatefulWidget { final int index; + RenovationManageCard({Key? key, required this.index}) : super(key: key); @override diff --git a/lib/pages/renovation_manage/renovation_manage_detail_page.dart b/lib/pages/renovation_manage/renovation_manage_detail_page.dart index 5bf47217..4ee03ec9 100644 --- a/lib/pages/renovation_manage/renovation_manage_detail_page.dart +++ b/lib/pages/renovation_manage/renovation_manage_detail_page.dart @@ -1,16 +1,14 @@ import 'dart:math'; -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/pages/renovation_manage/renovation_map.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flustars/flustars.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/pages/renovation_manage/renovation_map.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class RenovationManageDetailPage extends StatefulWidget { RenovationManageDetailPage({Key? key}) : super(key: key); diff --git a/lib/pages/renovation_manage/renovation_manage_page.dart b/lib/pages/renovation_manage/renovation_manage_page.dart index 10d8a671..3d887d54 100644 --- a/lib/pages/renovation_manage/renovation_manage_page.dart +++ b/lib/pages/renovation_manage/renovation_manage_page.dart @@ -1,9 +1,8 @@ +import 'package:aku_new_community/pages/renovation_manage/renovation_manage_view.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/tab_bar/bee_tab_bar.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/pages/renovation_manage/renovation_manage_view.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/tab_bar/bee_tab_bar.dart'; - class RenovationManagePage extends StatefulWidget { RenovationManagePage({Key? key}) : super(key: key); @@ -15,6 +14,7 @@ class _RenovationManagePageState extends State with TickerProviderStateMixin { List _tabs = ['待处理', '处理中', '已完成', '全部']; late TabController _tabController; + @override void initState() { super.initState(); diff --git a/lib/pages/renovation_manage/renovation_manage_view.dart b/lib/pages/renovation_manage/renovation_manage_view.dart index a609bc73..a5503e45 100644 --- a/lib/pages/renovation_manage/renovation_manage_view.dart +++ b/lib/pages/renovation_manage/renovation_manage_view.dart @@ -1,9 +1,9 @@ +import 'package:aku_new_community/pages/renovation_manage/renovation_manage_card.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/pages/renovation_manage/renovation_manage_card.dart'; - class RenovationManageView extends StatefulWidget { final int index; + RenovationManageView({Key? key, required this.index}) : super(key: key); @override diff --git a/lib/pages/service_browse/service_browse_detail_page.dart b/lib/pages/service_browse/service_browse_detail_page.dart index 6b2a3060..4475bd08 100644 --- a/lib/pages/service_browse/service_browse_detail_page.dart +++ b/lib/pages/service_browse/service_browse_detail_page.dart @@ -1,18 +1,17 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/models/service_browse/service_browse_list_mode.dart'; +import 'package:aku_new_community/utils/link_text_parase.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:flustars/flustars.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; - -import 'package:flustars/flustars.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:url_launcher/url_launcher.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/models/service_browse/service_browse_list_mode.dart'; -import 'package:aku_community/utils/link_text_parase.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class ServiceBrowseDetailPage extends StatefulWidget { final ServiceBrowseListModel model; + ServiceBrowseDetailPage({Key? key, required this.model}) : super(key: key); @override diff --git a/lib/pages/service_browse/service_browse_page.dart b/lib/pages/service_browse/service_browse_page.dart index 361795dd..0ae09901 100644 --- a/lib/pages/service_browse/service_browse_page.dart +++ b/lib/pages/service_browse/service_browse_page.dart @@ -1,18 +1,16 @@ -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/models/service_browse/service_browse_list_mode.dart'; +import 'package:aku_new_community/pages/service_browse/service_browse_detail_page.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flustars/flustars.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/service_browse/service_browse_list_mode.dart'; -import 'package:aku_community/pages/service_browse/service_browse_detail_page.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class ServiceBrowsePage extends StatefulWidget { ServiceBrowsePage({Key? key}) : super(key: key); @@ -22,6 +20,7 @@ class ServiceBrowsePage extends StatefulWidget { class _ServiceBrowsePageState extends State { late EasyRefreshController _easyRefreshController; + void initState() { super.initState(); _easyRefreshController = EasyRefreshController(); diff --git a/lib/pages/setting_page/about_page/about_page.dart b/lib/pages/setting_page/about_page/about_page.dart index 429181b7..f7c5e0b2 100644 --- a/lib/pages/setting_page/about_page/about_page.dart +++ b/lib/pages/setting_page/about_page/about_page.dart @@ -1,5 +1,5 @@ -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/pages/setting_page/account_manager_page.dart b/lib/pages/setting_page/account_manager_page.dart index db209bc7..7616c303 100644 --- a/lib/pages/setting_page/account_manager_page.dart +++ b/lib/pages/setting_page/account_manager_page.dart @@ -1,12 +1,10 @@ +import 'package:aku_new_community/pages/sign/sign_in_page.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/pages/sign/sign_in_page.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class AccountManagerPage extends StatefulWidget { AccountManagerPage({Key? key}) : super(key: key); diff --git a/lib/pages/setting_page/agreement_page/agreement_page.dart b/lib/pages/setting_page/agreement_page/agreement_page.dart index b1acc723..75a23bb7 100644 --- a/lib/pages/setting_page/agreement_page/agreement_page.dart +++ b/lib/pages/setting_page/agreement_page/agreement_page.dart @@ -1,5 +1,5 @@ -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; class AgreementPage extends StatefulWidget { diff --git a/lib/pages/setting_page/agreement_page/privacy_page.dart b/lib/pages/setting_page/agreement_page/privacy_page.dart index 12cae9b6..3ab3b70e 100644 --- a/lib/pages/setting_page/agreement_page/privacy_page.dart +++ b/lib/pages/setting_page/agreement_page/privacy_page.dart @@ -1,9 +1,10 @@ -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; class PrivacyPage extends StatefulWidget { PrivacyPage({Key? key}) : super(key: key); + @override _PrivacyPageState createState() => _PrivacyPageState(); } diff --git a/lib/pages/setting_page/feedback_page/feedback_page.dart b/lib/pages/setting_page/feedback_page/feedback_page.dart index 16b89aa3..0f35dee6 100644 --- a/lib/pages/setting_page/feedback_page/feedback_page.dart +++ b/lib/pages/setting_page/feedback_page/feedback_page.dart @@ -1,17 +1,15 @@ import 'dart:io'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/picker/grid_image_picker.dart'; +import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - -import 'package:bot_toast/bot_toast.dart'; import 'package:get/get.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/picker/grid_image_picker.dart'; - class FeedBackPage extends StatefulWidget { FeedBackPage({Key? key}) : super(key: key); @@ -51,7 +49,8 @@ class _FeedBackPageState extends State { bottom: 0.w, ), hintText: '请输入', - border: InputBorder.none, //去掉输入框的下滑线 + border: InputBorder.none, + //去掉输入框的下滑线 fillColor: Colors.white, filled: true, hintStyle: TextStyle( diff --git a/lib/pages/setting_page/invite_page/invite_page.dart b/lib/pages/setting_page/invite_page/invite_page.dart index 003b9071..0e74cbed 100644 --- a/lib/pages/setting_page/invite_page/invite_page.dart +++ b/lib/pages/setting_page/invite_page/invite_page.dart @@ -1,5 +1,5 @@ -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:qr_flutter/qr_flutter.dart'; diff --git a/lib/pages/setting_page/settings_page.dart b/lib/pages/setting_page/settings_page.dart index 91184b1d..924a4834 100644 --- a/lib/pages/setting_page/settings_page.dart +++ b/lib/pages/setting_page/settings_page.dart @@ -1,17 +1,17 @@ -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/extensions/num_ext.dart'; -import 'package:aku_community/extensions/widget_list_ext.dart'; -import 'package:aku_community/pages/setting_page/about_page/about_page.dart'; -import 'package:aku_community/pages/setting_page/account_manager_page.dart'; -import 'package:aku_community/pages/setting_page/agreement_page/agreement_page.dart'; -import 'package:aku_community/pages/setting_page/agreement_page/privacy_page.dart'; -import 'package:aku_community/pages/setting_page/feedback_page/feedback_page.dart'; -import 'package:aku_community/pages/tab_navigator.dart'; -import 'package:aku_community/provider/user_provider.dart'; -import 'package:aku_community/utils/developer_util.dart'; -import 'package:aku_community/utils/websocket/web_socket_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/others/user_tool.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/extensions/num_ext.dart'; +import 'package:aku_new_community/extensions/widget_list_ext.dart'; +import 'package:aku_new_community/pages/setting_page/about_page/about_page.dart'; +import 'package:aku_new_community/pages/setting_page/account_manager_page.dart'; +import 'package:aku_new_community/pages/setting_page/agreement_page/agreement_page.dart'; +import 'package:aku_new_community/pages/setting_page/agreement_page/privacy_page.dart'; +import 'package:aku_new_community/pages/setting_page/feedback_page/feedback_page.dart'; +import 'package:aku_new_community/pages/tab_navigator.dart'; +import 'package:aku_new_community/provider/user_provider.dart'; +import 'package:aku_new_community/utils/developer_util.dart'; +import 'package:aku_new_community/utils/websocket/web_socket_util.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; diff --git a/lib/pages/share_pay_page/share_pay_detail_page.dart b/lib/pages/share_pay_page/share_pay_detail_page.dart index 119e8fd5..a974edbe 100644 --- a/lib/pages/share_pay_page/share_pay_detail_page.dart +++ b/lib/pages/share_pay_page/share_pay_detail_page.dart @@ -1,12 +1,12 @@ import 'dart:convert'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/models/life_pay/share_pay_list_model.dart'; -import 'package:aku_community/pages/life_pay/life_pay_page.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bee_check_radio.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/models/life_pay/share_pay_list_model.dart'; +import 'package:aku_new_community/pages/life_pay/life_pay_page.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bee_check_radio.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; diff --git a/lib/pages/share_pay_page/share_pay_page.dart b/lib/pages/share_pay_page/share_pay_page.dart index 76dd61b9..1ca5431e 100644 --- a/lib/pages/share_pay_page/share_pay_page.dart +++ b/lib/pages/share_pay_page/share_pay_page.dart @@ -1,21 +1,21 @@ import 'dart:convert'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/extensions/widget_list_ext.dart'; -import 'package:aku_community/models/life_pay/share_pay_list_model.dart'; -import 'package:aku_community/pages/life_pay/life_pay_page.dart'; -import 'package:aku_community/pages/life_pay/pay_finish_page.dart'; -import 'package:aku_community/pages/life_pay/pay_util.dart'; -import 'package:aku_community/pages/share_pay_page/share_pay_detail_page.dart'; -import 'package:aku_community/pages/share_pay_page/share_record_page.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_divider.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bee_check_radio.dart'; -import 'package:aku_community/widget/others/house_head_card.dart'; -import 'package:aku_community/widget/others/user_tool.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/extensions/widget_list_ext.dart'; +import 'package:aku_new_community/models/life_pay/share_pay_list_model.dart'; +import 'package:aku_new_community/pages/life_pay/life_pay_page.dart'; +import 'package:aku_new_community/pages/life_pay/pay_finish_page.dart'; +import 'package:aku_new_community/pages/life_pay/pay_util.dart'; +import 'package:aku_new_community/pages/share_pay_page/share_pay_detail_page.dart'; +import 'package:aku_new_community/pages/share_pay_page/share_record_page.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bee_check_radio.dart'; +import 'package:aku_new_community/widget/others/house_head_card.dart'; +import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -195,7 +195,7 @@ class _SharePayPageState extends State { "ids": total.ids, "payType": 1, //暂时写死 等待后续补充 "payPrice": total.payTotal.toDoubleStringAsFixed() - }); + }); if (baseModel.status ?? false) { bool result = await PayUtil() .callAliPay(baseModel.message!, API.pay.sharePayOrderCodeCheck); diff --git a/lib/pages/share_pay_page/share_record_page.dart b/lib/pages/share_pay_page/share_record_page.dart index d6d8c523..22ab674c 100644 --- a/lib/pages/share_pay_page/share_record_page.dart +++ b/lib/pages/share_pay_page/share_record_page.dart @@ -1,11 +1,11 @@ -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/extensions/widget_list_ext.dart'; -import 'package:aku_community/models/life_pay/share_pay_record_model.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/others/user_tool.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/extensions/widget_list_ext.dart'; +import 'package:aku_new_community/models/life_pay/share_pay_record_model.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:flustars/flustars.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; @@ -28,6 +28,7 @@ class _ShareRecordPageState extends State { 4: 'pos', 5: '预缴扣除' }; + @override void initState() { super.initState(); diff --git a/lib/pages/sign/sign_func.dart b/lib/pages/sign/sign_func.dart index 537231ee..60769134 100644 --- a/lib/pages/sign/sign_func.dart +++ b/lib/pages/sign/sign_func.dart @@ -1,11 +1,11 @@ -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/user/pick_building_model.dart'; -import 'package:aku_community/model/user/user_detail_model.dart'; -import 'package:aku_community/models/user/user_info_model.dart'; -import 'package:aku_community/provider/sign_up_provider.dart'; -import 'package:aku_community/provider/user_provider.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/user/pick_building_model.dart'; +import 'package:aku_new_community/model/user/user_detail_model.dart'; +import 'package:aku_new_community/models/user/user_info_model.dart'; +import 'package:aku_new_community/provider/sign_up_provider.dart'; +import 'package:aku_new_community/provider/user_provider.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:dio/dio.dart'; import 'package:get/get.dart' hide Response; diff --git a/lib/pages/sign/sign_in_page.dart b/lib/pages/sign/sign_in_page.dart index 03d078c8..fd96c769 100644 --- a/lib/pages/sign/sign_in_page.dart +++ b/lib/pages/sign/sign_in_page.dart @@ -1,17 +1,17 @@ import 'dart:async'; import 'dart:ui'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/extensions/num_ext.dart'; -import 'package:aku_community/pages/sign/sign_func.dart'; -import 'package:aku_community/pages/sign/sign_up/sign_up_set_nickname_page.dart'; -import 'package:aku_community/pages/tab_navigator.dart'; -import 'package:aku_community/provider/sign_up_provider.dart'; -import 'package:aku_community/provider/user_provider.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_back_button.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/extensions/num_ext.dart'; +import 'package:aku_new_community/pages/sign/sign_func.dart'; +import 'package:aku_new_community/pages/sign/sign_up/sign_up_set_nickname_page.dart'; +import 'package:aku_new_community/pages/tab_navigator.dart'; +import 'package:aku_new_community/provider/sign_up_provider.dart'; +import 'package:aku_new_community/provider/user_provider.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_back_button.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:dio/dio.dart'; import 'package:flustars/flustars.dart' show TextUtil; diff --git a/lib/pages/sign/sign_up/sign_up_common_widget.dart b/lib/pages/sign/sign_up/sign_up_common_widget.dart index d9677830..9a7a96c1 100644 --- a/lib/pages/sign/sign_up/sign_up_common_widget.dart +++ b/lib/pages/sign/sign_up/sign_up_common_widget.dart @@ -1,11 +1,9 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/utils/headers.dart'; - signUpTitle(String subTitle) { return Column( crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/pages/sign/sign_up/sign_up_set_nickname_page.dart b/lib/pages/sign/sign_up/sign_up_set_nickname_page.dart index 1ab1422b..3ddcc943 100644 --- a/lib/pages/sign/sign_up/sign_up_set_nickname_page.dart +++ b/lib/pages/sign/sign_up/sign_up_set_nickname_page.dart @@ -1,19 +1,17 @@ -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/pages/sign/sign_func.dart'; +import 'package:aku_new_community/pages/sign/sign_up/sign_up_common_widget.dart'; +import 'package:aku_new_community/pages/tab_navigator.dart'; +import 'package:aku_new_community/provider/sign_up_provider.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flustars/flustars.dart'; +import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; import 'package:random_character/chinese_character/random_chinese_charater.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/pages/sign/sign_func.dart'; -import 'package:aku_community/pages/sign/sign_up/sign_up_common_widget.dart'; -import 'package:aku_community/pages/tab_navigator.dart'; -import 'package:aku_community/provider/sign_up_provider.dart'; -import 'package:aku_community/utils/headers.dart'; - class SignUpSetNicknamePage extends StatefulWidget { SignUpSetNicknamePage({Key? key}) : super(key: key); @@ -24,6 +22,7 @@ class SignUpSetNicknamePage extends StatefulWidget { class _SignUpSetNicknamePageState extends State { GlobalKey _globalKey = GlobalKey(); TextEditingController _textEditingController = TextEditingController(); + @override void dispose() { _textEditingController.dispose(); diff --git a/lib/pages/sign/sign_up/sign_up_verify_page.dart b/lib/pages/sign/sign_up/sign_up_verify_page.dart index 473409a7..51779bdc 100644 --- a/lib/pages/sign/sign_up/sign_up_verify_page.dart +++ b/lib/pages/sign/sign_up/sign_up_verify_page.dart @@ -1,15 +1,13 @@ -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/pages/sign/sign_func.dart'; +import 'package:aku_new_community/pages/sign/sign_up/sign_up_common_widget.dart'; +import 'package:aku_new_community/pages/tab_navigator.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flustars/flustars.dart'; +import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/pages/sign/sign_func.dart'; -import 'package:aku_community/pages/sign/sign_up/sign_up_common_widget.dart'; -import 'package:aku_community/pages/tab_navigator.dart'; -import 'package:aku_community/utils/headers.dart'; - class SignUpVerifyPage extends StatefulWidget { SignUpVerifyPage({Key? key}) : super(key: key); @@ -22,6 +20,7 @@ class _SignUpVerifyPageState extends State { TextEditingController _idNumberController = TextEditingController(); GlobalKey _formKey = GlobalKey(); + @override Widget build(BuildContext context) { return Scaffold( diff --git a/lib/pages/splash/splash_page.dart b/lib/pages/splash/splash_page.dart index a3f4385f..60096310 100644 --- a/lib/pages/splash/splash_page.dart +++ b/lib/pages/splash/splash_page.dart @@ -1,19 +1,15 @@ import 'dart:io'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/main_initialize.dart'; -import 'package:aku_community/model/user/province_model.dart'; -import 'package:aku_community/pages/setting_page/agreement_page/agreement_page.dart'; -import 'package:aku_community/pages/setting_page/agreement_page/privacy_page.dart'; -import 'package:aku_community/pages/tab_navigator.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/provider/user_provider.dart'; -import 'package:aku_community/utils/developer_util.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/hive_store.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/main_initialize.dart'; +import 'package:aku_new_community/pages/setting_page/agreement_page/agreement_page.dart'; +import 'package:aku_new_community/pages/setting_page/agreement_page/privacy_page.dart'; +import 'package:aku_new_community/pages/tab_navigator.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/provider/user_provider.dart'; +import 'package:aku_new_community/utils/developer_util.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/hive_store.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; @@ -112,13 +108,11 @@ class _SplashPageState extends State { void initState() { super.initState(); - PowerLogger.start( context, debug: DeveloperUtil.dev, ); - Future.delayed(Duration(milliseconds: 0), () async { await _originOp(); @@ -142,8 +136,7 @@ class _SplashPageState extends State { MainInitialize.initWechat(); MainInitialize.initWebSocket(); Get.offAll(() => TabNavigator()); - } - ); + }); } @override diff --git a/lib/pages/surrounding_enterprises/surrding_enterprises_detail_page.dart b/lib/pages/surrounding_enterprises/surrding_enterprises_detail_page.dart index f39dea95..73b90ece 100644 --- a/lib/pages/surrounding_enterprises/surrding_enterprises_detail_page.dart +++ b/lib/pages/surrounding_enterprises/surrding_enterprises_detail_page.dart @@ -1,30 +1,27 @@ -import 'package:aku_community/models/house_introduce/house_introduce_model.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/models/house_introduce/house_introduce_model.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; - -import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/models/community_introduce/community_introduce_model.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class SurroundingEnterprisesDetailPage extends StatefulWidget { final HouseIntroduceModel houseIntroduceModel; - SurroundingEnterprisesDetailPage({Key? key, required this.houseIntroduceModel}) + SurroundingEnterprisesDetailPage( + {Key? key, required this.houseIntroduceModel}) : super(key: key); @override - _SurroundingEnterprisesDetailPageState createState() => _SurroundingEnterprisesDetailPageState(); + _SurroundingEnterprisesDetailPageState createState() => + _SurroundingEnterprisesDetailPageState(); } -class _SurroundingEnterprisesDetailPageState extends State { +class _SurroundingEnterprisesDetailPageState + extends State { bool _onload = false; @override @@ -59,16 +56,16 @@ class _SurroundingEnterprisesDetailPageState extends State _SurroundingEnterprisesDetailPageState(); + _SurroundingEnterprisesDetailPageState createState() => + _SurroundingEnterprisesDetailPageState(); } -class _SurroundingEnterprisesDetailPageState extends State { - +class _SurroundingEnterprisesDetailPageState + extends State { @override Widget build(BuildContext context) { return BeeScaffold( @@ -38,12 +32,12 @@ class _SurroundingEnterprisesDetailPageState extends State _SurroundingEnterprisesPageState(); + _SurroundingEnterprisesPageState createState() => + _SurroundingEnterprisesPageState(); } - - -class _SurroundingEnterprisesPageState extends State { +class _SurroundingEnterprisesPageState + extends State { EasyRefreshController _refreshController = EasyRefreshController(); int _page = 1; int _size = 10; + @override void initState() { super.initState(); @@ -40,14 +37,14 @@ class _SurroundingEnterprisesPageState extends State // HiveStore.appBox!.put('IndustryCommitteePage',true); // } // }); - } - Widget _buildCard(SurroundingEnterprisesModel model) { return GestureDetector( - onTap: (){ - Get.to(SurroundingEnterprisesDetailPage(surroundingEnterprisesModel: model,)); + onTap: () { + Get.to(SurroundingEnterprisesDetailPage( + surroundingEnterprisesModel: model, + )); }, child: Container( padding: EdgeInsets.all(20.w), @@ -80,8 +77,7 @@ class _SurroundingEnterprisesPageState extends State style: TextStyle( fontSize: 30.sp, fontWeight: FontWeight.bold, - color: ktextPrimary - ), + color: ktextPrimary), maxLines: 4, overflow: TextOverflow.ellipsis, ), @@ -91,11 +87,7 @@ class _SurroundingEnterprisesPageState extends State width: 440.w, child: Text( '${model.content}', - style: TextStyle( - fontSize: 24.sp, - - color: ktextPrimary - ), + style: TextStyle(fontSize: 24.sp, color: ktextPrimary), maxLines: 2, overflow: TextOverflow.ellipsis, ), @@ -103,11 +95,7 @@ class _SurroundingEnterprisesPageState extends State Spacer(), Row( children: [ - '南宁人才公寓' - .text - .size(20.sp) - .color(ktextThirdColor) - .make(), + '南宁人才公寓'.text.size(20.sp).color(ktextThirdColor).make(), Spacer(), '发布于:${model.getReleaseDate}' .text diff --git a/lib/pages/tab_navigator.dart b/lib/pages/tab_navigator.dart index b19fea72..92a019e1 100644 --- a/lib/pages/tab_navigator.dart +++ b/lib/pages/tab_navigator.dart @@ -1,33 +1,33 @@ -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/user/province_model.dart'; -import 'package:aku_community/pages/property/property_page.dart'; -import 'package:aku_community/pages/sign/sign_in_page.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/ui/community/community_views/community_page.dart'; -import 'package:aku_community/ui/market/market_page.dart'; -import 'package:aku_community/utils/hive_store.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/utils/websocket/web_socket_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/others/user_tool.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/user/province_model.dart'; +import 'package:aku_new_community/pages/property/property_page.dart'; +import 'package:aku_new_community/pages/sign/sign_in_page.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/ui/community/community_views/community_page.dart'; +import 'package:aku_new_community/ui/market/market_page.dart'; +import 'package:aku_new_community/utils/hive_store.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/utils/websocket/web_socket_util.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; -import 'package:jpush_flutter/jpush_flutter.dart'; import 'package:provider/provider.dart'; import 'home/home_page.dart'; import 'personal/personal_page.dart'; -import 'property/property_index.dart'; class TabNavigator extends StatefulWidget { final int? index; + const TabNavigator({ - Key? key, this.index, + Key? key, + this.index, }) : super(key: key); @override @@ -48,15 +48,15 @@ class _TabNavigatorState extends State super.initState(); final appProvider = Provider.of(Get.context!); Future.delayed(Duration(milliseconds: 0), () async { - await appProvider.getMyAddress();//设置默认地址 + await appProvider.getMyAddress(); //设置默认地址 List _province = []; var agreement = await HiveStore.appBox?.get('cityList') ?? null; - if (agreement==null) { + if (agreement == null) { ///获取城市列表 BaseModel baseModel = await NetUtil().get( API.user.findAllCityInfo, ); - if (baseModel.data!=null) { + if (baseModel.data != null) { _province = (baseModel.data as List) .map((e) => ProvinceModel.fromJson(e)) .toList(); @@ -67,13 +67,13 @@ class _TabNavigatorState extends State _pages = [ HomePage(), MarketPage(), - PropertyPage(),//PropertyIndex(), + PropertyPage(), //PropertyIndex(), CommunityPage(), PersonalIndex() ]; - _tabController = TabController(length: _pages.length, vsync: this,initialIndex: widget.index??0); - + _tabController = TabController( + length: _pages.length, vsync: this, initialIndex: widget.index ?? 0); } _buildBottomBar( diff --git a/lib/pages/things_page/fixed_submit_page.dart b/lib/pages/things_page/fixed_submit_page.dart index 7c62ffbb..b86db854 100644 --- a/lib/pages/things_page/fixed_submit_page.dart +++ b/lib/pages/things_page/fixed_submit_page.dart @@ -1,26 +1,24 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/constants/app_theme.dart'; +import 'package:aku_new_community/extensions/num_ext.dart'; +import 'package:aku_new_community/model/user/fixed_submit_model.dart'; +import 'package:aku_new_community/pages/manager_func.dart'; +import 'package:aku_new_community/pages/things_page/widget/add_fixed_submit_page.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/pages/things_page/widget/fixed_check_box.dart'; +import 'package:aku_new_community/pages/things_page/widget/fixed_detail_page.dart'; +import 'package:aku_new_community/utils/bee_map.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:aku_new_community/widget/views/horizontal_image_view.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/constants/app_theme.dart'; -import 'package:aku_community/extensions/num_ext.dart'; -import 'package:aku_community/model/user/fixed_submit_model.dart'; -import 'package:aku_community/pages/manager_func.dart'; -import 'package:aku_community/pages/things_page/widget/add_fixed_submit_page.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/pages/things_page/widget/fixed_check_box.dart'; -import 'package:aku_community/pages/things_page/widget/fixed_detail_page.dart'; -import 'package:aku_community/utils/bee_map.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; -import 'package:aku_community/widget/views/horizontal_image_view.dart'; - class FixedSubmitPage extends StatefulWidget { FixedSubmitPage({Key? key}) : super(key: key); @@ -32,6 +30,7 @@ class _FixedSubmitPageState extends State { EasyRefreshController? _easyRefreshController; bool _isEdit = false; List _selected = []; + @override void initState() { super.initState(); diff --git a/lib/pages/things_page/widget/add_fixed_submit_page.dart b/lib/pages/things_page/widget/add_fixed_submit_page.dart index 90579d9c..7db9a56d 100644 --- a/lib/pages/things_page/widget/add_fixed_submit_page.dart +++ b/lib/pages/things_page/widget/add_fixed_submit_page.dart @@ -1,30 +1,28 @@ import 'dart:io'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/constants/app_theme.dart'; +import 'package:aku_new_community/extensions/widget_list_ext.dart'; +import 'package:aku_new_community/pages/manager_func.dart'; +import 'package:aku_new_community/pages/things_page/widget/finish_fixed_submit_page.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bee_check_button.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:aku_new_community/widget/others/house_head_card.dart'; +import 'package:aku_new_community/widget/picker/grid_image_picker.dart'; +import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - -import 'package:bot_toast/bot_toast.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/constants/app_theme.dart'; -import 'package:aku_community/extensions/widget_list_ext.dart'; -import 'package:aku_community/pages/manager_func.dart'; -import 'package:aku_community/pages/things_page/widget/finish_fixed_submit_page.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bee_check_button.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; -import 'package:aku_community/widget/others/house_head_card.dart'; -import 'package:aku_community/widget/picker/grid_image_picker.dart'; - class AddFixedSubmitPage extends StatefulWidget { AddFixedSubmitPage({Key? key}) : super(key: key); @@ -38,6 +36,7 @@ class _AddFixedSubmitPageState extends State { List _buttons = ['公区保修', '家庭维修']; int? _selectType; List _files = []; + @override void initState() { super.initState(); diff --git a/lib/pages/things_page/widget/bee_list_view.dart b/lib/pages/things_page/widget/bee_list_view.dart index 31688e0c..959d03ab 100644 --- a/lib/pages/things_page/widget/bee_list_view.dart +++ b/lib/pages/things_page/widget/bee_list_view.dart @@ -1,10 +1,8 @@ +import 'package:aku_new_community/utils/network/base_list_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; -import 'package:aku_community/utils/network/base_list_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; - /// ## BeeListView ///```dart ///BeeListView( @@ -58,6 +56,7 @@ class BeeListView extends StatefulWidget { ///额外的参数 final Map? extraParams; + BeeListView({ Key? key, required this.path, @@ -65,7 +64,8 @@ class BeeListView extends StatefulWidget { required this.convert, required this.builder, this.size = 10, - this.extraParams, this.refreshExtra , + this.extraParams, + this.refreshExtra, }) : super(key: key); @override @@ -76,6 +76,7 @@ class _BeeListViewState extends State { int _pageNum = 1; BaseListModel _model = BaseListModel.zero(); List _models = []; + Map get _params { Map tempMap = { 'pageNum': _pageNum, @@ -99,7 +100,7 @@ class _BeeListViewState extends State { ); _models = widget.convert(_model) as List; widget.controller?.resetLoadState(); - if(widget.refreshExtra!=null){ + if (widget.refreshExtra != null) { widget.refreshExtra!(_models); } if (mounted) setState(() {}); diff --git a/lib/pages/things_page/widget/finish_fixed_submit_page.dart b/lib/pages/things_page/widget/finish_fixed_submit_page.dart index 9a0537be..dc0d16fa 100644 --- a/lib/pages/things_page/widget/finish_fixed_submit_page.dart +++ b/lib/pages/things_page/widget/finish_fixed_submit_page.dart @@ -1,13 +1,11 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/others/finish_result_image.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/others/finish_result_image.dart'; - class FinishFixedSubmitPage extends StatelessWidget { const FinishFixedSubmitPage({Key? key}) : super(key: key); diff --git a/lib/pages/things_page/widget/fixed_check_box.dart b/lib/pages/things_page/widget/fixed_check_box.dart index f0b5de04..ce98bd43 100644 --- a/lib/pages/things_page/widget/fixed_check_box.dart +++ b/lib/pages/things_page/widget/fixed_check_box.dart @@ -1,11 +1,10 @@ +import 'package:aku_new_community/base/base_style.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:aku_community/base/base_style.dart'; - class FixedCheckBox extends StatefulWidget { final Function(bool isSelect)? onChanged; + FixedCheckBox({Key? key, this.onChanged}) : super(key: key); @override diff --git a/lib/pages/things_page/widget/fixed_detail_page.dart b/lib/pages/things_page/widget/fixed_detail_page.dart index 56daa01d..a8cff4c0 100644 --- a/lib/pages/things_page/widget/fixed_detail_page.dart +++ b/lib/pages/things_page/widget/fixed_detail_page.dart @@ -1,17 +1,17 @@ -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/manage/fix_report/fix_detail_model.dart'; -import 'package:aku_community/pages/life_pay/pay_finish_page.dart'; -import 'package:aku_community/pages/life_pay/pay_util.dart'; -import 'package:aku_community/pages/manager_func.dart'; -import 'package:aku_community/pages/things_page/widget/fixed_evaluate_page.dart'; -import 'package:aku_community/utils/bee_map.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/widget/bee_divider.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/views/horizontal_image_view.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/models/manage/fix_report/fix_detail_model.dart'; +import 'package:aku_new_community/pages/life_pay/pay_finish_page.dart'; +import 'package:aku_new_community/pages/life_pay/pay_util.dart'; +import 'package:aku_new_community/pages/manager_func.dart'; +import 'package:aku_new_community/pages/things_page/widget/fixed_evaluate_page.dart'; +import 'package:aku_new_community/utils/bee_map.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/views/horizontal_image_view.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -23,6 +23,7 @@ import 'package:velocity_x/velocity_x.dart'; class FixedDetailPage extends StatefulWidget { final int id; + FixedDetailPage( this.id, { Key? key, @@ -35,6 +36,7 @@ class FixedDetailPage extends StatefulWidget { class CancelModel { bool cancel; String message; + CancelModel(this.cancel, this.message); } @@ -42,7 +44,9 @@ class _FixedDetailPageState extends State { bool _onLoading = true; EasyRefreshController _easyRefreshController = EasyRefreshController(); late FixDetailModel _model; + bool get showRepairCard => _model.appDispatchListVo != null; + bool get showProcessCard => _model.appProcessRecordVo.isNotEmpty; bool _canComplete(int? state) { @@ -175,9 +179,7 @@ class _FixedDetailPageState extends State { children: [ '报修房屋'.text.color(ktextSubColor).size(28.sp).make(), Spacer(), - model.appReportRepairVo.roomName.text.black - .size(28.sp) - .make() + model.appReportRepairVo.roomName.text.black.size(28.sp).make() ], ), Row( diff --git a/lib/pages/things_page/widget/fixed_evaluate_page.dart b/lib/pages/things_page/widget/fixed_evaluate_page.dart index 37ec518f..957b4c21 100644 --- a/lib/pages/things_page/widget/fixed_evaluate_page.dart +++ b/lib/pages/things_page/widget/fixed_evaluate_page.dart @@ -1,20 +1,19 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/models/manage/fix_report/fix_detail_model.dart'; +import 'package:aku_new_community/pages/manager_func.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - -import 'package:bot_toast/bot_toast.dart'; import 'package:flutter_rating_bar/flutter_rating_bar.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/models/manage/fix_report/fix_detail_model.dart'; -import 'package:aku_community/pages/manager_func.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class FixedEvaluatePage extends StatefulWidget { final FixDetailModel model; + FixedEvaluatePage(this.model, {Key? key}) : super(key: key); @override @@ -24,6 +23,7 @@ class FixedEvaluatePage extends StatefulWidget { class _FixedEvaluatePageState extends State { int? _rating; TextEditingController? _textEditingController; + @override void initState() { super.initState(); diff --git a/lib/pages/visitor_access_page/visitor_access_page.dart b/lib/pages/visitor_access_page/visitor_access_page.dart index 310f7127..f08b0ea6 100644 --- a/lib/pages/visitor_access_page/visitor_access_page.dart +++ b/lib/pages/visitor_access_page/visitor_access_page.dart @@ -1,14 +1,14 @@ -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/pages/manager_func.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/provider/user_provider.dart'; -import 'package:aku_community/ui/manager/visitor/visitor_record_page.dart'; -import 'package:aku_community/ui/profile/house/pick_my_house_page.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_divider.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/common_input.dart'; -import 'package:aku_community/widget/picker/bee_date_picker.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/pages/manager_func.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/provider/user_provider.dart'; +import 'package:aku_new_community/ui/manager/visitor/visitor_record_page.dart'; +import 'package:aku_new_community/ui/profile/house/pick_my_house_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/common_input.dart'; +import 'package:aku_new_community/widget/picker/bee_date_picker.dart'; import 'package:flustars/flustars.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/painters/as_numberic_painter.dart b/lib/painters/as_numberic_painter.dart index 73369dd8..62d72b65 100644 --- a/lib/painters/as_numberic_painter.dart +++ b/lib/painters/as_numberic_painter.dart @@ -1,11 +1,13 @@ import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; class ASNUmericPainter extends CustomPainter { final bool plus; + ASNUmericPainter.minus() : this.plus = false; + ASNUmericPainter.plus() : this.plus = true; + @override void paint(Canvas canvas, Size size) { double halfWidth = size.width / 2; diff --git a/lib/painters/contact_manager_painter.dart b/lib/painters/contact_manager_painter.dart index 6f4187f1..c3b0b862 100644 --- a/lib/painters/contact_manager_painter.dart +++ b/lib/painters/contact_manager_painter.dart @@ -1,7 +1,6 @@ import 'dart:math'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; class ContactManagerPainter extends CustomPainter { diff --git a/lib/painters/plus_painter.dart b/lib/painters/plus_painter.dart index 0ae382a6..c7cd7de3 100644 --- a/lib/painters/plus_painter.dart +++ b/lib/painters/plus_painter.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; class PlusPainter extends CustomPainter { diff --git a/lib/painters/upload_painter.dart b/lib/painters/upload_painter.dart index 09c231dd..5aa91341 100644 --- a/lib/painters/upload_painter.dart +++ b/lib/painters/upload_painter.dart @@ -1,7 +1,6 @@ import 'dart:math'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; class UploadPainter extends CustomPainter { diff --git a/lib/painters/user_bottom_bar_painter.dart b/lib/painters/user_bottom_bar_painter.dart index 97366dfc..fe8ed6ae 100644 --- a/lib/painters/user_bottom_bar_painter.dart +++ b/lib/painters/user_bottom_bar_painter.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; class UserBottomBarPainter extends CustomPainter { diff --git a/lib/provider/app_provider.dart b/lib/provider/app_provider.dart index e1f10359..78db2f51 100644 --- a/lib/provider/app_provider.dart +++ b/lib/provider/app_provider.dart @@ -1,17 +1,17 @@ import 'dart:io'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/constants/application_objects.dart'; -import 'package:aku_community/constants/config.dart'; -import 'package:aku_community/model/common/real_time_weather_model.dart'; -import 'package:aku_community/model/community/hot_topic_model.dart'; -import 'package:aku_community/model/message/message_center_model.dart'; -import 'package:aku_community/model/user/adress_model.dart'; -import 'package:aku_community/model/user/car_parking_model.dart'; -import 'package:aku_community/models/user/passed_house_list_model.dart'; -import 'package:aku_community/utils/hive_store.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/constants/application_objects.dart'; +import 'package:aku_new_community/constants/config.dart'; +import 'package:aku_new_community/model/common/real_time_weather_model.dart'; +import 'package:aku_new_community/model/community/hot_topic_model.dart'; +import 'package:aku_new_community/model/message/message_center_model.dart'; +import 'package:aku_new_community/model/user/adress_model.dart'; +import 'package:aku_new_community/model/user/car_parking_model.dart'; +import 'package:aku_new_community/models/user/passed_house_list_model.dart'; +import 'package:aku_new_community/utils/hive_store.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; import 'package:amap_flutter_location/amap_flutter_location.dart'; import 'package:amap_flutter_location/amap_location_option.dart'; import 'package:collection/collection.dart' show IterableExtension; @@ -296,8 +296,8 @@ class AppProvider extends ChangeNotifier { } List _addressModels = []; - List get addressModels => _addressModels; + List get addressModels => _addressModels; AddressModel? _addressModel; @@ -305,35 +305,28 @@ class AppProvider extends ChangeNotifier { ///设置当前选中的房屋 - ///保存默认收货地址 - Future getMyAddress() async { + Future getMyAddress() async { BaseModel model = await NetUtil().get( API.user.myAddressList, ); if (model.data!.length == 0) return []; - else{ - _addressModels = (model.data as List) - .map((e) => AddressModel.fromJson(e)) - .toList(); - - if (_addressModels.isEmpty) { - _addressModel = null; - } else { - _addressModels.forEach((element) { - if(element.isDefault==1){ - _addressModel = element; - } - }); - } + else { + _addressModels = + (model.data as List).map((e) => AddressModel.fromJson(e)).toList(); + if (_addressModels.isEmpty) { + _addressModel = null; + } else { + _addressModels.forEach((element) { + if (element.isDefault == 1) { + _addressModel = element; + } + }); + } } notifyListeners(); } - - - - } diff --git a/lib/provider/sign_up_provider.dart b/lib/provider/sign_up_provider.dart index 9c9839a2..b33763b7 100644 --- a/lib/provider/sign_up_provider.dart +++ b/lib/provider/sign_up_provider.dart @@ -2,9 +2,11 @@ import 'package:flutter/material.dart'; class SignUpProvider extends ChangeNotifier { String? _nickName; + String? get nickName => _nickName; String? _tel; + String? get tel => _tel; Map get toMap => { diff --git a/lib/provider/user_provider.dart b/lib/provider/user_provider.dart index 73939548..03aeaba7 100644 --- a/lib/provider/user_provider.dart +++ b/lib/provider/user_provider.dart @@ -1,16 +1,16 @@ import 'dart:io'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/user/user_detail_model.dart'; -import 'package:aku_community/models/user/user_info_model.dart'; -import 'package:aku_community/pages/sign/sign_func.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/ui/profile/house/house_func.dart'; -import 'package:aku_community/utils/hive_store.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/utils/websocket/web_socket_util.dart'; -import 'package:aku_community/widget/others/user_tool.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/user/user_detail_model.dart'; +import 'package:aku_new_community/models/user/user_info_model.dart'; +import 'package:aku_new_community/pages/sign/sign_func.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/ui/profile/house/house_func.dart'; +import 'package:aku_new_community/utils/hive_store.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/utils/websocket/web_socket_util.dart'; +import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:flustars/flustars.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; @@ -21,8 +21,11 @@ import 'package:provider/provider.dart'; class UserProvider extends ChangeNotifier { bool _isLogin = false; + bool get isLogin => _isLogin; + bool get isNotLogin => !_isLogin; + Future setLogin(int token) async { try { final appProvider = Provider.of(Get.context!, listen: false); @@ -66,8 +69,7 @@ class UserProvider extends ChangeNotifier { Future updateProfile() async { _userInfoModel = await SignFunc.getUserInfo(); - if (_userInfoModel != null && !kIsWeb && !Platform.isMacOS) { - } + if (_userInfoModel != null && !kIsWeb && !Platform.isMacOS) {} notifyListeners(); } @@ -81,12 +83,15 @@ class UserProvider extends ChangeNotifier { } String? _token; + String get token => _token ?? ''; UserInfoModel? _userInfoModel; + UserInfoModel? get userInfoModel => _userInfoModel; UserDetailModel? _userDetailModel; + UserDetailModel? get userDetailModel => _userDetailModel; ///设置性别 diff --git a/lib/ui/common/qr_scan.dart b/lib/ui/common/qr_scan.dart index 5a6caaf1..2ef5fdc1 100644 --- a/lib/ui/common/qr_scan.dart +++ b/lib/ui/common/qr_scan.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; - import 'package:get/get.dart'; import 'package:qr_code_scanner/qr_code_scanner.dart'; @@ -20,6 +19,7 @@ class __QRScanPageState extends State<_QRScanPage> { final GlobalKey qrKey = GlobalKey(debugLabel: 'QR'); QRViewController? _controller; bool _doneTag = false; + @override void dispose() { _controller?.dispose(); diff --git a/lib/ui/community/activity/activity_card.dart b/lib/ui/community/activity/activity_card.dart index 383d65ca..f5e0267b 100644 --- a/lib/ui/community/activity/activity_card.dart +++ b/lib/ui/community/activity/activity_card.dart @@ -1,17 +1,14 @@ -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/community/activity_item_model.dart'; +import 'package:aku_new_community/ui/community/activity/activity_detail_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flustars/flustars.dart'; +import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/model/community/activity_item_model.dart'; -import 'package:aku_community/ui/community/activity/activity_detail_page.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/others/stack_avatar.dart'; - class ActivityCard extends StatelessWidget { final ActivityItemModel? model; @@ -61,7 +58,7 @@ class ActivityCard extends StatelessWidget { Container( constraints: BoxConstraints(maxWidth: 340.w), child: Text( - model==null?'':model!.title!, + model == null ? '' : model!.title!, maxLines: 2, overflow: TextOverflow.ellipsis, style: TextStyle( @@ -73,7 +70,6 @@ class ActivityCard extends StatelessWidget { Spacer(), GestureDetector( child: Container( - //color: Color(0x80FEBF76), // shape: StadiumBorder(), @@ -81,22 +77,16 @@ class ActivityCard extends StatelessWidget { height: 39.w, width: 98.w, decoration: BoxDecoration( - color: outdate ? Color(0xFFABABAB) : Color(0x80FEBF76), + color: outdate ? Color(0xFFABABAB) : Color(0x80FEBF76), borderRadius: BorderRadius.all(Radius.circular(4)), ), child: outdate - ? '已结束' - .text - .size(22.sp) - .color(Color(0xFF666666)) - - .make() + ? '已结束'.text.size(22.sp).color(Color(0xFF666666)).make() : '报名中' .text .size(22.sp) .color(Color(0xFFF48117)) - .make(), ), onTap: () { @@ -107,7 +97,7 @@ class ActivityCard extends StatelessWidget { }; }, ), - 24.wb + 24.wb ], ), ), diff --git a/lib/ui/community/activity/activity_detail_page.dart b/lib/ui/community/activity/activity_detail_page.dart index 9cacef58..37e888ba 100644 --- a/lib/ui/community/activity/activity_detail_page.dart +++ b/lib/ui/community/activity/activity_detail_page.dart @@ -1,27 +1,26 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/constants/app_theme.dart'; +import 'package:aku_new_community/model/community/activity_detail_model.dart'; +import 'package:aku_new_community/ui/community/activity/activity_people_list_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:aku_new_community/widget/others/stack_avatar.dart'; +import 'package:aku_new_community/widget/picker/bee_image_preview.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flustars/flustars.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; import 'package:shimmer/shimmer.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/constants/app_theme.dart'; -import 'package:aku_community/model/community/activity_detail_model.dart'; -import 'package:aku_community/ui/community/activity/activity_people_list_page.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; -import 'package:aku_community/widget/others/stack_avatar.dart'; -import 'package:aku_community/widget/picker/bee_image_preview.dart'; - class ActivityDetailPage extends StatefulWidget { final int? id; + ActivityDetailPage({Key? key, required this.id}) : super(key: key); @override @@ -31,8 +30,10 @@ class ActivityDetailPage extends StatefulWidget { class _ActivityDetailPageState extends State { ActivityDetailModel? model; EasyRefreshController _refreshController = EasyRefreshController(); + bool get outdate => (model?.registEndDate ?? DateTime(0)).compareTo(DateTime.now()) == -1; + Widget get emptyWidget => Shimmer.fromColors( child: Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -60,6 +61,7 @@ class _ActivityDetailPageState extends State { baseColor: Colors.black12, highlightColor: Colors.white, ); + @override void dispose() { _refreshController.dispose(); diff --git a/lib/ui/community/activity/activity_list_page.dart b/lib/ui/community/activity/activity_list_page.dart index 8b2d0b5a..961f46f3 100644 --- a/lib/ui/community/activity/activity_list_page.dart +++ b/lib/ui/community/activity/activity_list_page.dart @@ -1,14 +1,12 @@ +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/community/activity_item_model.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/ui/community/activity/activity_card.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/community/activity_item_model.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/ui/community/activity/activity_card.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class ActivityListPage extends StatefulWidget { ActivityListPage({Key? key}) : super(key: key); @@ -18,6 +16,7 @@ class ActivityListPage extends StatefulWidget { class _ActivityListPageState extends State { EasyRefreshController _refreshController = EasyRefreshController(); + @override void dispose() { _refreshController.dispose(); diff --git a/lib/ui/community/activity/activity_people_list_page.dart b/lib/ui/community/activity/activity_people_list_page.dart index c71e1335..775c8b4a 100644 --- a/lib/ui/community/activity/activity_people_list_page.dart +++ b/lib/ui/community/activity/activity_people_list_page.dart @@ -1,17 +1,16 @@ +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/community/activity_people_model.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/model/community/activity_people_model.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class ActivityPeopleListPage extends StatefulWidget { final int? id; + ActivityPeopleListPage({Key? key, required this.id}) : super(key: key); @override @@ -20,6 +19,7 @@ class ActivityPeopleListPage extends StatefulWidget { class _ActivityPeopleListPageState extends State { EasyRefreshController _refreshController = EasyRefreshController(); + @override void dispose() { _refreshController.dispose(); diff --git a/lib/ui/community/community_func.dart b/lib/ui/community/community_func.dart index 5ef56757..8eee3f2e 100644 --- a/lib/ui/community/community_func.dart +++ b/lib/ui/community/community_func.dart @@ -1,21 +1,19 @@ -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/community/activity_item_model.dart'; -import 'package:aku_community/model/community/board_model.dart'; -import 'package:aku_community/model/community/community_topic_model.dart'; -import 'package:aku_community/model/community/hot_news_model.dart'; -import 'package:aku_community/model/community/swiper_model.dart'; -import 'package:aku_community/model/good/category_model.dart'; -import 'package:aku_community/model/good/market_swiper_model.dart'; -import 'package:aku_community/models/market/goods_classification.dart'; -import 'package:aku_community/models/market/goods_popular_model.dart'; -import 'package:aku_community/models/market/order/goods_home_model.dart'; -import 'package:aku_community/utils/network/base_list_model.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/community/activity_item_model.dart'; +import 'package:aku_new_community/model/community/board_model.dart'; +import 'package:aku_new_community/model/community/community_topic_model.dart'; +import 'package:aku_new_community/model/community/hot_news_model.dart'; +import 'package:aku_new_community/model/community/swiper_model.dart'; +import 'package:aku_new_community/model/good/category_model.dart'; +import 'package:aku_new_community/model/good/market_swiper_model.dart'; +import 'package:aku_new_community/models/market/goods_classification.dart'; +import 'package:aku_new_community/models/market/goods_popular_model.dart'; +import 'package:aku_new_community/models/market/order/goods_home_model.dart'; +import 'package:aku_new_community/utils/network/base_list_model.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; class CommunityFunc { - - ///查询热门话题 static Future> getListGambit() async { BaseListModel model = await NetUtil().getList( @@ -23,7 +21,9 @@ class CommunityFunc { params: {'pageNum': 1, 'size': 8}, ); if (model.tableList!.length == 0) return []; - return model.tableList!.map((e) => CommunityTopicModel.fromJson(e)).toList(); + return model.tableList! + .map((e) => CommunityTopicModel.fromJson(e)) + .toList(); } ///查询热门资讯 @@ -40,22 +40,20 @@ class CommunityFunc { static Future addViews(int newsId) async { BaseModel model = await NetUtil().get( API.community.addViews, - params: {'newsId': newsId,}, + params: { + 'newsId': newsId, + }, ); - if (model.message == null) - return ''; + if (model.message == null) return ''; return (model.message as String).toString(); } - - ///查询当天上架的商品数量 static Future getNewProductsTodayNum() async { BaseModel model = await NetUtil().get( API.market.newProductsTodayNum, ); - if (model.data! == null) - return '0'; + if (model.data! == null) return '0'; return (model.data as int).toString(); } @@ -64,8 +62,7 @@ class CommunityFunc { BaseModel model = await NetUtil().get( API.market.settledBrandsNum, ); - if (model.data! == null) - return '0'; + if (model.data! == null) return '0'; return (model.data as int).toString(); } @@ -74,78 +71,80 @@ class CommunityFunc { BaseModel model = await NetUtil().get( API.market.skuTotal, ); - if (model.data! == null) - return '0'; + if (model.data! == null) return '0'; return (model.data as int).toString(); } ///获取商品分类 - static Future> getGoodsClassificationList(int parentId) async { + static Future> getGoodsClassificationList( + int parentId) async { BaseListModel model = await NetUtil().getList( API.market.findAllCategoryByParentId, - params: {'pageNum': 1, 'size': 9,'parentId':parentId}, + params: {'pageNum': 1, 'size': 9, 'parentId': parentId}, ); if (model.tableList!.length == 0) return []; - return model.tableList!.map((e) => GoodsClassification.fromJson(e)).toList(); + return model.tableList! + .map((e) => GoodsClassification.fromJson(e)) + .toList(); } ///商场首页的商品列表 static Future> getGoodsHomeModelList( - int PageNum,int size,int orderBySalesVolume,int orderByPrice, - ) async { + int PageNum, + int size, + int orderBySalesVolume, + int orderByPrice, + ) async { BaseListModel model = await NetUtil().getList( API.market.findRecommendGoodsList, - params: {'pageNum': PageNum, 'size': size, - 'orderBySalesVolume': orderBySalesVolume,'orderByPrice': orderByPrice,}, + params: { + 'pageNum': PageNum, + 'size': size, + 'orderBySalesVolume': orderBySalesVolume, + 'orderByPrice': orderByPrice, + }, ); if (model.tableList!.length == 0) return []; return model.tableList!.map((e) => GoodsHomeModel.fromJson(e)).toList(); } - ///查询爆款推荐 - static Future> getGoodsPopularModel( - int num - ) async { + static Future> getGoodsPopularModel(int num) async { BaseModel model = await NetUtil().get( API.market.findMaxPopularity, - params: {'num':num}, + params: {'num': num}, ); - if (model.data!.length == 0) - return []; + if (model.data!.length == 0) return []; return (model.data as List) .map((e) => GoodsPopularModel.fromJson(e)) .toList(); } - ///获取所有商品的分类 static Future> getCategory() async { BaseModel model = await NetUtil().get( API.market.findAllCategoryInfo, ); - if (model.data!.length == 0) return []; - else{ + if (model.data!.length == 0) + return []; + else { return (model.data as List) .map((e) => CategoryModel.fromJson(e)) .toList(); } - } + ///获取商城的轮播图 static Future> marketSwiper() async { BaseModel model = await NetUtil().get( API.market.findRotationList, ); - if (model.data!.length == 0) - return []; + if (model.data!.length == 0) return []; return (model.data as List) .map((e) => MarketSwiperModel.fromJson(e)) .toList(); } - - static Future activity() async { BaseListModel model = await NetUtil().getList( API.community.activityList, @@ -177,10 +176,7 @@ class CommunityFunc { BaseModel model = await NetUtil().get( API.community.getSwiper, ); - if (model.data!.length == 0) - return []; - return (model.data as List) - .map((e) => SwiperModel.fromJson(e)) - .toList(); + if (model.data!.length == 0) return []; + return (model.data as List).map((e) => SwiperModel.fromJson(e)).toList(); } } diff --git a/lib/ui/community/community_views/add_new_event_page.dart b/lib/ui/community/community_views/add_new_event_page.dart index f407717b..aa2a0bb7 100644 --- a/lib/ui/community/community_views/add_new_event_page.dart +++ b/lib/ui/community/community_views/add_new_event_page.dart @@ -1,29 +1,29 @@ import 'dart:io'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/community/hot_topic_model.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/picker/grid_image_picker.dart'; +import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - -import 'package:bot_toast/bot_toast.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/community/hot_topic_model.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/picker/grid_image_picker.dart'; - class AddNewEventPage extends StatefulWidget { final int? initTopic; final String? topicName; + AddNewEventPage({Key? key}) : initTopic = null, topicName = null, super(key: key); + AddNewEventPage.topic({ Key? key, required this.initTopic, diff --git a/lib/ui/community/community_views/community_page.dart b/lib/ui/community/community_views/community_page.dart index 01a966bb..2562028d 100644 --- a/lib/ui/community/community_views/community_page.dart +++ b/lib/ui/community/community_views/community_page.dart @@ -1,44 +1,35 @@ -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/model/community/community_topic_model.dart'; -import 'package:aku_community/model/community/event_item_model.dart'; -import 'package:aku_community/model/community/hot_news_model.dart'; -import 'package:aku_community/models/news/news_category_model.dart'; -import 'package:aku_community/ui/community/activity/activity_list_page.dart'; -import 'package:aku_community/ui/community/community_func.dart'; -import 'package:aku_community/ui/community/community_views/topic/topic_detail_page.dart'; -import 'package:aku_community/ui/community/community_views/widgets/chat_card.dart'; -import 'package:aku_community/ui/home/home_title.dart'; -import 'package:aku_community/ui/home/public_infomation/public_infomation_page.dart'; -import 'package:aku_community/ui/home/public_infomation/public_information_detail_page.dart'; -import 'package:aku_community/ui/market/search/search_goods_page.dart'; -import 'package:aku_community/utils/network/base_list_model.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; +import 'dart:math'; + +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/community/community_topic_model.dart'; +import 'package:aku_new_community/model/community/event_item_model.dart'; +import 'package:aku_new_community/model/community/hot_news_model.dart'; +import 'package:aku_new_community/models/news/news_category_model.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/provider/user_provider.dart'; +import 'package:aku_new_community/ui/community/community_func.dart'; +import 'package:aku_new_community/ui/community/community_views/add_new_event_page.dart'; +import 'package:aku_new_community/ui/community/community_views/my_community_view.dart'; +import 'package:aku_new_community/ui/community/community_views/new_community_view.dart'; +import 'package:aku_new_community/ui/community/community_views/topic/topic_community_view.dart'; +import 'package:aku_new_community/ui/community/community_views/topic/topic_detail_page.dart'; +import 'package:aku_new_community/ui/community/community_views/widgets/chat_card.dart'; +import 'package:aku_new_community/ui/home/public_infomation/public_infomation_page.dart'; +import 'package:aku_new_community/ui/home/public_infomation/public_information_detail_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/login_util.dart'; +import 'package:aku_new_community/utils/network/base_list_model.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - -import 'package:badges/badges.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; -import 'package:aku_community/pages/message_center_page/message_center_page.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/provider/user_provider.dart'; -import 'package:aku_community/ui/community/community_views/add_new_event_page.dart'; -import 'package:aku_community/ui/community/community_views/my_community_view.dart'; -import 'package:aku_community/ui/community/community_views/new_community_view.dart'; -import 'package:aku_community/ui/community/community_views/topic/topic_community_view.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/login_util.dart'; -import 'dart:math'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/column_action_button.dart'; -import 'package:aku_community/widget/tab_bar/bee_tab_bar.dart'; - class CommunityPage extends StatefulWidget { CommunityPage({Key? key}) : super(key: key); @@ -56,7 +47,6 @@ class _CommunityPageState extends State GlobalKey myKey = GlobalKey(); GlobalKey newKey = GlobalKey(); - List _newItems = []; List _gambitModels = []; List _hotNewsModels = []; @@ -92,51 +82,49 @@ class _CommunityPageState extends State final userProvider = Provider.of(context); final appProvider = Provider.of(context); return Scaffold( - appBar: AppBar( - titleSpacing: 10.0, - title: Row(crossAxisAlignment: CrossAxisAlignment.center, children: [ - Text( - '附近社区', - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 32.sp, - color: Color(0xff333333), - - ), - textAlign: TextAlign.center, + appBar: AppBar( + titleSpacing: 10.0, + title: Row(crossAxisAlignment: CrossAxisAlignment.center, children: [ + Text( + '附近社区', + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 32.sp, + color: Color(0xff333333), ), - - ]), - backgroundColor: Colors.white, - actions: [ - Padding( - padding: EdgeInsets.only(right: 32.w), - child: GestureDetector( - onTap: () async { - if (LoginUtil.isNotLogin) return; - bool? result = await Get.to(() => AddNewEventPage()); - if (result == true) { - switch (_tabController!.index) { - case 0: - newKey.currentState!.refresh(); - break; - case 1: - // topicKey.currentState!.refresh(); - break; - case 2: - myKey.currentState!.refresh(); - break; - } + textAlign: TextAlign.center, + ), + ]), + backgroundColor: Colors.white, + actions: [ + Padding( + padding: EdgeInsets.only(right: 32.w), + child: GestureDetector( + onTap: () async { + if (LoginUtil.isNotLogin) return; + bool? result = await Get.to(() => AddNewEventPage()); + if (result == true) { + switch (_tabController!.index) { + case 0: + newKey.currentState!.refresh(); + break; + case 1: + // topicKey.currentState!.refresh(); + break; + case 2: + myKey.currentState!.refresh(); + break; } - }, - child: Image.asset(R.ASSETS_ICONS_ICON_COMMUNITY_PUSH_PNG, - height: 40.w, width: 40.w), - ), - ) - ], - bottom: PreferredSize( - preferredSize: Size.fromHeight(90.w), child: _geSearch()), - ), + } + }, + child: Image.asset(R.ASSETS_ICONS_ICON_COMMUNITY_PUSH_PNG, + height: 40.w, width: 40.w), + ), + ) + ], + bottom: PreferredSize( + preferredSize: Size.fromHeight(90.w), child: _geSearch()), + ), // floatingActionButton: FloatingActionButton( // onPressed: () async { // if (LoginUtil.isNotLogin) return; @@ -159,63 +147,61 @@ class _CommunityPageState extends State // child: Icon(Icons.add), // ), - - - body: EasyRefresh( - firstRefresh: true, - header: MaterialHeader(), - controller: _easyRefreshController, - onRefresh: () async { - await (getNewInfo()); - _gambitModels = await CommunityFunc.getListGambit(); - _hotNewsModels = await CommunityFunc.getHotNews(); - _onload = false; - setState(() {}); - }, - child: _onload - ? SizedBox() - : ListView( - children: [ + body: EasyRefresh( + firstRefresh: true, + header: MaterialHeader(), + controller: _easyRefreshController, + onRefresh: () async { + await (getNewInfo()); + _gambitModels = await CommunityFunc.getListGambit(); + _hotNewsModels = await CommunityFunc.getHotNews(); + _onload = false; + setState(() {}); + }, + child: _onload + ? SizedBox() + : ListView( + children: [ 2.hb, - _hotNewsModels.isEmpty?SizedBox():_getInfo(), + _hotNewsModels.isEmpty ? SizedBox() : _getInfo(), 16.hb, - _gambitModels.isEmpty?SizedBox():_getNews(), + _gambitModels.isEmpty ? SizedBox() : _getNews(), 16.hb, - ..._newItems.map((e) => ChatCard( - model: e, - - )).toList()], - ), - ), - - // ListView( - // children: [ - - // ], - // ) - + ..._newItems + .map((e) => ChatCard( + model: e, + )) + .toList() + ], + ), + ), - // TabBarView( - // children: userProvider.isLogin - // ? [ - // NewCommunityView(key: newKey), - // TopicCommunityView(key: topicKey), - // MyCommunityView(key: myKey), - // ] - // : [ - // NewCommunityView(key: newKey), - // TopicCommunityView(key: topicKey), - // ], - // controller: _tabController, - // ), - // bodyColor: Colors.white, - ); + // ListView( + // children: [ + + // ], + // ) + + // TabBarView( + // children: userProvider.isLogin + // ? [ + // NewCommunityView(key: newKey), + // TopicCommunityView(key: topicKey), + // MyCommunityView(key: myKey), + // ] + // : [ + // NewCommunityView(key: newKey), + // TopicCommunityView(key: topicKey), + // ], + // controller: _tabController, + // ), + // bodyColor: Colors.white, + ); } - Future getNewInfo() async { BaseListModel baseListModel = - await NetUtil().getList(API.community.newEventList, params: { + await NetUtil().getList(API.community.newEventList, params: { "pageNum": _pageNum, "size": _size, }); @@ -229,7 +215,7 @@ class _CommunityPageState extends State Future loadNewInfo() async { BaseListModel baseListModel = - await NetUtil().getList(API.market.hotTop, params: { + await NetUtil().getList(API.market.hotTop, params: { "pageNum": _pageNum, "size": _size, }); @@ -241,7 +227,6 @@ class _CommunityPageState extends State _pageCount = baseListModel.pageCount!; } - _getInfo() { return Container( color: Colors.white, @@ -259,8 +244,7 @@ class _CommunityPageState extends State .toList(); } cancel(); - Get.to( - () => PublicInfomationPage(models: category ?? [])); + Get.to(() => PublicInfomationPage(models: category ?? [])); }, '更多'), 32.hb, Container( @@ -315,9 +299,8 @@ class _CommunityPageState extends State ); } - - _next(int min, int max) { - var rng = new Random(); + _next(int min, int max) { + var rng = new Random(); //将 参数min + 取随机数(最大值范围:参数max - 参数min)的结果 赋值给变量 result; var result = min + rng.nextInt(max - min); //返回变量 result 的值; @@ -325,16 +308,15 @@ class _CommunityPageState extends State } _infoCard(HotNewsModel item) { - return GestureDetector( - onTap: () async{ - var result = await Get.to(() => PublicInformationDetailPage(id: item.id!)); + onTap: () async { + var result = + await Get.to(() => PublicInformationDetailPage(id: item.id!)); CommunityFunc.addViews(item.id!); - if(result){ + if (result) { _easyRefreshController.callRefresh(); } - }, child: Stack( children: [ @@ -348,14 +330,12 @@ class _CommunityPageState extends State ), image: DecorationImage( image: NetworkImage( - API.image(ImgModel.first(item.imgList)), + API.image(ImgModel.first(item.imgList)), ), fit: BoxFit.cover, ), //color: Colors.black38, ), - - ), Positioned( top: 0, @@ -366,8 +346,8 @@ class _CommunityPageState extends State alignment: Alignment.center, width: 396.w, height: 204.w, - padding: - EdgeInsets.only(top: 32.w, left: 40.w, right: 40.w, bottom: 32.w), + padding: EdgeInsets.only( + top: 32.w, left: 40.w, right: 40.w, bottom: 32.w), decoration: BoxDecoration( color: Colors.black.withOpacity(0.5), borderRadius: BorderRadius.horizontal( @@ -375,28 +355,26 @@ class _CommunityPageState extends State left: Radius.circular(16), ), //color: Colors.black38, ), - child: - Column( + child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Container( width: 316.w, alignment: Alignment.center, child: Text( - item.title??'', + item.title ?? '', maxLines: 2, overflow: TextOverflow.ellipsis, style: TextStyle( color: Colors.white.withOpacity(0.85), fontSize: 28.sp, fontWeight: FontWeight.bold), - ) - ), + )), 24.hb, Row( children: [ Text( - '${item.views??0}浏览', + '${item.views ?? 0}浏览', maxLines: 2, overflow: TextOverflow.ellipsis, style: TextStyle( @@ -406,7 +384,7 @@ class _CommunityPageState extends State ), Spacer(), Text( - item.createDate?.substring(0,10)??'', + item.createDate?.substring(0, 10) ?? '', maxLines: 2, overflow: TextOverflow.ellipsis, style: TextStyle( @@ -417,9 +395,6 @@ class _CommunityPageState extends State ], ) ], - - - ), ), ), @@ -431,12 +406,14 @@ class _CommunityPageState extends State _getNews() { return Container( color: Colors.white, - padding: - EdgeInsets.only(top: 32.w, bottom: 32.w,), + padding: EdgeInsets.only( + top: 32.w, + bottom: 32.w, + ), child: Column( children: [ Container( - padding: EdgeInsets.only(left: 32.w,right: 32.w), + padding: EdgeInsets.only(left: 32.w, right: 32.w), child: _homeTitle('新鲜话题', () { Get.to(() => TopicCommunityView()); }, '全部'), @@ -478,7 +455,6 @@ class _CommunityPageState extends State } _searchHistoryWidget() { - return Container( //margin: EdgeInsets.symmetric(horizontal: 32.w), child: Column( @@ -487,11 +463,12 @@ class _CommunityPageState extends State Container( //width: MediaQuery.of(context).size.width, //padding: EdgeInsets.only(left: 10, right: 10), - child: Wrap( - children: [..._gambitModels.map((e) => _choiceChip(e,0)).toList()] - // [_choiceChip('EDG夺冠',1),_choiceChip('双十一',2), - // _choiceChip('11月吃土',2),_choiceChip('成都疫情',0),_choiceChip('万圣节',0)], - ), + child: Wrap(children: [ + ..._gambitModels.map((e) => _choiceChip(e, 0)).toList() + ] + // [_choiceChip('EDG夺冠',1),_choiceChip('双十一',2), + // _choiceChip('11月吃土',2),_choiceChip('成都疫情',0),_choiceChip('万圣节',0)], + ), ), // Spacer() ], @@ -500,36 +477,35 @@ class _CommunityPageState extends State } _choiceChip(CommunityTopicModel item, int type) { - return Padding( - padding: EdgeInsets.only(right: 12.w,bottom: 24.w), + return Padding( + padding: EdgeInsets.only(right: 12.w, bottom: 24.w), child: ChoiceChip( - backgroundColor: Color(0xFFF4F7FC), - // disabledColor: Colors.blue, - labelStyle: TextStyle(fontSize: 15 * 2.sp, color: Colors.black), + backgroundColor: Color(0xFFF4F7FC), + // disabledColor: Colors.blue, + labelStyle: TextStyle(fontSize: 15 * 2.sp, color: Colors.black), - labelPadding: EdgeInsets.only(right: 12.w,left: 12.w), - materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, - onSelected: (bool value) { - Get.to(() => TopicDetailPage(model: item)); - }, - label: Row( - mainAxisSize: MainAxisSize.min, - children: [ - Text( - '# ${item.summary??''}', - style: TextStyle( - color: Colors.black.withOpacity(0.65), - fontSize: 28.sp, - fontWeight: FontWeight.w500), - ), - type==1||type==2? 8.wb:SizedBox(), - type==1||type==2?_chipType(type):SizedBox() - ], - ), - selected: false, + labelPadding: EdgeInsets.only(right: 12.w, left: 12.w), + materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, + onSelected: (bool value) { + Get.to(() => TopicDetailPage(model: item)); + }, + label: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + '# ${item.summary ?? ''}', + style: TextStyle( + color: Colors.black.withOpacity(0.65), + fontSize: 28.sp, + fontWeight: FontWeight.w500), + ), + type == 1 || type == 2 ? 8.wb : SizedBox(), + type == 1 || type == 2 ? _chipType(type) : SizedBox() + ], ), + selected: false, + ), ); - } _chipType(int type) { @@ -541,7 +517,7 @@ class _CommunityPageState extends State borderRadius: BorderRadius.all( Radius.circular(6.4.w), ), - color:type == 1? Color(0xFFFFD76F):Color(0xFFFF8383), + color: type == 1 ? Color(0xFFFFD76F) : Color(0xFFFF8383), ), child: Text( type == 1 ? '荐' : '热', diff --git a/lib/ui/community/community_views/event_detail_page.dart b/lib/ui/community/community_views/event_detail_page.dart index 47826b71..de8aa8d1 100644 --- a/lib/ui/community/community_views/event_detail_page.dart +++ b/lib/ui/community/community_views/event_detail_page.dart @@ -1,16 +1,15 @@ +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/community/event_item_model.dart'; +import 'package:aku_new_community/ui/community/community_views/widgets/chat_card.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/community/event_item_model.dart'; -import 'package:aku_community/ui/community/community_views/widgets/chat_card.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class EventDetailPage extends StatefulWidget { final int? themeId; + EventDetailPage({ Key? key, required this.themeId, @@ -23,6 +22,7 @@ class EventDetailPage extends StatefulWidget { class _EventDetailPageState extends State { EasyRefreshController _refreshController = EasyRefreshController(); EventItemModel? _model; + @override Widget build(BuildContext context) { return BeeScaffold( diff --git a/lib/ui/community/community_views/my_community_view.dart b/lib/ui/community/community_views/my_community_view.dart index 15267bdc..e69be581 100644 --- a/lib/ui/community/community_views/my_community_view.dart +++ b/lib/ui/community/community_views/my_community_view.dart @@ -1,13 +1,11 @@ +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/community/my_event_item_model.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/ui/community/community_views/widgets/my_event_card.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/community/my_event_item_model.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/ui/community/community_views/widgets/my_event_card.dart'; -import 'package:aku_community/utils/headers.dart'; - class MyCommunityView extends StatefulWidget { MyCommunityView({Key? key}) : super(key: key); diff --git a/lib/ui/community/community_views/new_community_view.dart b/lib/ui/community/community_views/new_community_view.dart index 46c04a68..14cc5a18 100644 --- a/lib/ui/community/community_views/new_community_view.dart +++ b/lib/ui/community/community_views/new_community_view.dart @@ -1,12 +1,10 @@ +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/community/event_item_model.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/ui/community/community_views/widgets/chat_card.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/community/event_item_model.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/ui/community/community_views/widgets/chat_card.dart'; - class NewCommunityView extends StatefulWidget { NewCommunityView({Key? key}) : super(key: key); diff --git a/lib/ui/community/community_views/topic/topic_community_view.dart b/lib/ui/community/community_views/topic/topic_community_view.dart index 171b8ec1..17b723be 100644 --- a/lib/ui/community/community_views/topic/topic_community_view.dart +++ b/lib/ui/community/community_views/topic/topic_community_view.dart @@ -1,19 +1,17 @@ import 'dart:ui'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/community/community_topic_model.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/ui/community/community_views/topic/topic_detail_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/model/community/community_topic_model.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/ui/community/community_views/topic/topic_detail_page.dart'; -import 'package:aku_community/utils/headers.dart'; - class TopicCommunityView extends StatefulWidget { TopicCommunityView({Key? key}) : super(key: key); @@ -21,72 +19,63 @@ class TopicCommunityView extends StatefulWidget { TopicCommunityViewState createState() => TopicCommunityViewState(); } -class TopicCommunityViewState extends State{ +class TopicCommunityViewState extends State { EasyRefreshController _refreshController = EasyRefreshController(); - _buildItem(CommunityTopicModel model,int index) { + _buildItem(CommunityTopicModel model, int index) { return GestureDetector( onTap: () { Get.to(() => TopicDetailPage(model: model)); }, child: Container( - - padding: EdgeInsets.symmetric(vertical: 20.w,horizontal: 32.w), + padding: EdgeInsets.symmetric(vertical: 20.w, horizontal: 32.w), decoration: BoxDecoration( - color: Colors.white, ), child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - - Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( children: [ - index<=2?Container( - width: 36.w, - height: 35.w, - clipBehavior: Clip.antiAlias, - alignment: Alignment.center, - decoration: BoxDecoration( - image: DecorationImage( - image: AssetImage(index==0? R.ASSETS_ICONS_ICON_TOPIC_FIRST_PNG:index==1? R.ASSETS_ICONS_ICON_TOPIC_SECOND_PNG: - R.ASSETS_ICONS_ICON_TOPIC_THIRD_PNG), - fit: BoxFit.cover, - ), - ), - child:(index+1) - .text - .white - .size(24.sp) - .bold - .make(), - - ):Container( - width: 32.w, - height: 32.w, - clipBehavior: Clip.antiAlias, - alignment: Alignment.center, - decoration: BoxDecoration( - color: Color(0xFFC4C4C4), - borderRadius: BorderRadius.all(Radius.circular(4.w)), - - ), - child:(index+1) - .text - .white - .size(24.sp) - .bold - .make(), - ), + index <= 2 + ? Container( + width: 36.w, + height: 35.w, + clipBehavior: Clip.antiAlias, + alignment: Alignment.center, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage(index == 0 + ? R.ASSETS_ICONS_ICON_TOPIC_FIRST_PNG + : index == 1 + ? R.ASSETS_ICONS_ICON_TOPIC_SECOND_PNG + : R.ASSETS_ICONS_ICON_TOPIC_THIRD_PNG), + fit: BoxFit.cover, + ), + ), + child: + (index + 1).text.white.size(24.sp).bold.make(), + ) + : Container( + width: 32.w, + height: 32.w, + clipBehavior: Clip.antiAlias, + alignment: Alignment.center, + decoration: BoxDecoration( + color: Color(0xFFC4C4C4), + borderRadius: + BorderRadius.all(Radius.circular(4.w)), + ), + child: + (index + 1).text.white.size(24.sp).bold.make(), + ), 15.wb, - Container( width: 400.w, - child:('#'+model.summary!) + child: ('#' + model.summary!) .text .maxLines(1) .size(30.sp) @@ -95,7 +84,6 @@ class TopicCommunityViewState extends State{ .overflow(TextOverflow.ellipsis) .make(), ) - ], ), 20.hb, @@ -175,10 +163,9 @@ class TopicCommunityViewState extends State{ @override Widget build(BuildContext context) { - - return BeeScaffold( + return BeeScaffold( title: '所有话题'.text.color(ktextPrimary).size(32.sp).normal.make(), - body:BeeListView( + body: BeeListView( path: API.community.topicList, controller: _refreshController, convert: (model) { @@ -190,8 +177,7 @@ class TopicCommunityViewState extends State{ return ListView.separated( padding: EdgeInsets.only(top: 20.w), itemBuilder: (context, index) { - return _buildItem(items[index],index - ); + return _buildItem(items[index], index); }, separatorBuilder: (_, __) => 20.hb, itemCount: items.length, @@ -199,8 +185,6 @@ class TopicCommunityViewState extends State{ }, ), ); - - } @override diff --git a/lib/ui/community/community_views/topic/topic_detail_page.dart b/lib/ui/community/community_views/topic/topic_detail_page.dart index dd1d86e3..b86e5b4e 100644 --- a/lib/ui/community/community_views/topic/topic_detail_page.dart +++ b/lib/ui/community/community_views/topic/topic_detail_page.dart @@ -1,20 +1,18 @@ +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/constants/app_theme.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/community/community_topic_model.dart'; +import 'package:aku_new_community/model/community/event_item_model.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/ui/community/community_views/add_new_event_page.dart'; +import 'package:aku_new_community/ui/community/community_views/topic/topic_sliver_header.dart'; +import 'package:aku_new_community/ui/community/community_views/widgets/chat_card.dart'; +import 'package:aku_new_community/utils/login_util.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/constants/app_theme.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/model/community/community_topic_model.dart'; -import 'package:aku_community/model/community/event_item_model.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/ui/community/community_views/add_new_event_page.dart'; -import 'package:aku_community/ui/community/community_views/topic/topic_sliver_header.dart'; -import 'package:aku_community/ui/community/community_views/widgets/chat_card.dart'; -import 'package:aku_community/utils/login_util.dart'; - class TopicDetailPage extends StatefulWidget { final CommunityTopicModel? model; @@ -26,6 +24,7 @@ class TopicDetailPage extends StatefulWidget { class _TopicDetailPageState extends State { EasyRefreshController _refreshController = EasyRefreshController(); + @override void dispose() { _refreshController.dispose(); diff --git a/lib/ui/community/community_views/topic/topic_sliver_header.dart b/lib/ui/community/community_views/topic/topic_sliver_header.dart index a45541f6..d2b5ff77 100644 --- a/lib/ui/community/community_views/topic/topic_sliver_header.dart +++ b/lib/ui/community/community_views/topic/topic_sliver_header.dart @@ -1,11 +1,9 @@ +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_back_button.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_back_button.dart'; - class TopicSliverHeader extends SliverPersistentHeaderDelegate { final String? imgPath; final String? title; diff --git a/lib/ui/community/community_views/widgets/chat_card.dart b/lib/ui/community/community_views/widgets/chat_card.dart index 63eb30ca..2ca9ce48 100644 --- a/lib/ui/community/community_views/widgets/chat_card.dart +++ b/lib/ui/community/community_views/widgets/chat_card.dart @@ -1,26 +1,24 @@ import 'dart:math'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/community/event_item_model.dart'; +import 'package:aku_new_community/provider/user_provider.dart'; +import 'package:aku_new_community/ui/community/community_views/event_detail_page.dart'; +import 'package:aku_new_community/ui/community/community_views/widgets/send_a_chat.dart'; +import 'package:aku_new_community/utils/bee_date_util.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/login_util.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/picker/bee_image_preview.dart'; +import 'package:aku_new_community/widget/views/bee_grid_image_view.dart'; +import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - -import 'package:bot_toast/bot_toast.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/model/community/event_item_model.dart'; -import 'package:aku_community/provider/user_provider.dart'; -import 'package:aku_community/ui/community/community_views/event_detail_page.dart'; -import 'package:aku_community/ui/community/community_views/widgets/send_a_chat.dart'; -import 'package:aku_community/utils/bee_date_util.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/login_util.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/picker/bee_image_preview.dart'; -import 'package:aku_community/widget/views/bee_grid_image_view.dart'; - class ChatCard extends StatefulWidget { final EventItemModel? model; @@ -41,7 +39,7 @@ class ChatCard extends StatefulWidget { _ChatCardState createState() => _ChatCardState(); } -class _ChatCardState extends State { +class _ChatCardState extends State { bool get _isMyself { final userProvider = Provider.of(context, listen: false); return (userProvider.userInfoModel?.id ?? -1) == widget.model!.createId; @@ -71,12 +69,15 @@ class _ChatCardState extends State { ), child: Hero( tag: ImgModel.first(widget.model!.imgUrls), - child:FadeInImage.assetNetwork( + child: FadeInImage.assetNetwork( placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, image: API.image(ImgModel.first(widget.model!.imgUrls)), imageErrorBuilder: (context, error, stackTrace) { - return Image.asset(R.ASSETS_IMAGES_PLACEHOLDER_WEBP,height: 300.w, - width: 300.w,); + return Image.asset( + R.ASSETS_IMAGES_PLACEHOLDER_WEBP, + height: 300.w, + width: 300.w, + ); }, ), ), @@ -310,8 +311,11 @@ class _ChatCardState extends State { width: 96.w, fit: BoxFit.cover, imageErrorBuilder: (context, error, stackTrace) { - return Image.asset(R.ASSETS_IMAGES_PLACEHOLDER_WEBP,height: 86.w, - width: 86.w,); + return Image.asset( + R.ASSETS_IMAGES_PLACEHOLDER_WEBP, + height: 86.w, + width: 86.w, + ); }, ), ).paddingOnly(left: 32.w), @@ -338,7 +342,6 @@ class _ChatCardState extends State { ], ), Spacer(), - PopupMenuButton( shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(8.w)), @@ -359,14 +362,16 @@ class _ChatCardState extends State { BotToast.showText(text: '举报成功'); }, child: Container( - width: 40.w,height: 32.w, - child: Image.asset(R.ASSETS_ICONS_ICON_MORE_PNG, - width: 8.w,height: 32.w,fit: BoxFit.fitHeight,)), - + width: 40.w, + height: 32.w, + child: Image.asset( + R.ASSETS_ICONS_ICON_MORE_PNG, + width: 8.w, + height: 32.w, + fit: BoxFit.fitHeight, + )), ).paddingOnly(right: 32.w), - ].row(), - Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -380,30 +385,30 @@ class _ChatCardState extends State { widget.model!.gambitTitle?.isEmpty ?? true ? SizedBox() : Chip( - label: '# ${widget.model!.gambitTitle}' - .text - .color(Color(0xFF547fc0)) - .size(28.sp) - .make(), - padding: EdgeInsets.symmetric( - horizontal: 16.w, vertical: 5.w), - labelPadding: EdgeInsets.zero, - backgroundColor: Colors.transparent, - materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, - // shape: StadiumBorder( - // side: BorderSide(), - // ), - ).pOnly(top: 20.w), + label: '# ${widget.model!.gambitTitle}' + .text + .color(Color(0xFF547fc0)) + .size(28.sp) + .make(), + padding: EdgeInsets.symmetric( + horizontal: 16.w, vertical: 5.w), + labelPadding: EdgeInsets.zero, + backgroundColor: Colors.transparent, + materialTapTargetSize: + MaterialTapTargetSize.shrinkWrap, + // shape: StadiumBorder( + // side: BorderSide(), + // ), + ).pOnly(top: 20.w), 20.hb, ], - ).paddingOnly(right: 32.w,left: 32.w), + ).paddingOnly(right: 32.w, left: 32.w), Divider(height: 1.w, thickness: 1.w), 10.hb, Row( children: [ 64.hb, - _isMyself ? TextButton( onPressed: () async { @@ -444,11 +449,10 @@ class _ChatCardState extends State { ], ), // _renderLikeAndComment(), - ], ), ], - ).paddingOnly(top: 24.w,bottom: 32.w), + ).paddingOnly(top: 24.w, bottom: 32.w), ), ).paddingOnly(bottom: 16.w); } diff --git a/lib/ui/community/community_views/widgets/my_event_card.dart b/lib/ui/community/community_views/widgets/my_event_card.dart index ffd71e4f..9084a966 100644 --- a/lib/ui/community/community_views/widgets/my_event_card.dart +++ b/lib/ui/community/community_views/widgets/my_event_card.dart @@ -1,20 +1,19 @@ +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/community/my_event_item_model.dart'; +import 'package:aku_new_community/ui/community/community_views/event_detail_page.dart'; +import 'package:aku_new_community/utils/bee_date_util.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/picker/bee_image_preview.dart'; import 'package:flutter/material.dart'; - import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/model/community/my_event_item_model.dart'; -import 'package:aku_community/ui/community/community_views/event_detail_page.dart'; -import 'package:aku_community/utils/bee_date_util.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/picker/bee_image_preview.dart'; - class MyEventCard extends StatelessWidget { final MyEventItemModel model; final MyEventItemModel? preModel; + const MyEventCard({ Key? key, required this.model, diff --git a/lib/ui/community/community_views/widgets/send_a_chat.dart b/lib/ui/community/community_views/widgets/send_a_chat.dart index bfa4d503..a49982e7 100644 --- a/lib/ui/community/community_views/widgets/send_a_chat.dart +++ b/lib/ui/community/community_views/widgets/send_a_chat.dart @@ -1,15 +1,14 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; import 'package:flutter/material.dart'; - import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/net_util.dart'; - class SendAChat extends StatefulWidget { final FocusNode? node; + SendAChat({Key? key, this.node}) : super(key: key); static Future send({ @@ -43,6 +42,7 @@ class SendAChat extends StatefulWidget { class _SendAChatState extends State { TextEditingController _textEditingController = TextEditingController(); + @override void dispose() { _textEditingController.dispose(); diff --git a/lib/ui/community/facility/facility_appointment_card.dart b/lib/ui/community/facility/facility_appointment_card.dart index 6a8a4d3b..174a2f26 100644 --- a/lib/ui/community/facility/facility_appointment_card.dart +++ b/lib/ui/community/facility/facility_appointment_card.dart @@ -1,20 +1,19 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/models/facility/facility_appointment_model.dart'; +import 'package:aku_new_community/ui/common/qr_scan.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; +import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - -import 'package:bot_toast/bot_toast.dart'; import 'package:get/get.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/facility/facility_appointment_model.dart'; -import 'package:aku_community/ui/common/qr_scan.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_divider.dart'; - class FacilityAppointmentCard extends StatelessWidget { final FacilityAppointmentModel model; final VoidCallback onUpdate; + const FacilityAppointmentCard( {Key? key, required this.model, required this.onUpdate}) : super(key: key); @@ -201,6 +200,7 @@ class _FacilityButton extends StatelessWidget { final VoidCallback onPressed; final String text; final bool outline; + const _FacilityButton({ Key? key, this.color = kPrimaryColor, diff --git a/lib/ui/community/facility/facility_appointment_page.dart b/lib/ui/community/facility/facility_appointment_page.dart index 5a81c4b5..81581d24 100644 --- a/lib/ui/community/facility/facility_appointment_page.dart +++ b/lib/ui/community/facility/facility_appointment_page.dart @@ -1,13 +1,11 @@ +import 'package:aku_new_community/ui/community/facility/facility_appointment_view.dart'; +import 'package:aku_new_community/ui/community/facility/pick_facility_page.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/tab_bar/bee_tab_bar.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:get/get.dart'; -import 'package:aku_community/ui/community/facility/facility_appointment_view.dart'; -import 'package:aku_community/ui/community/facility/pick_facility_page.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/tab_bar/bee_tab_bar.dart'; - class FacilityAppointmentPage extends StatefulWidget { FacilityAppointmentPage({Key? key}) : super(key: key); @@ -19,6 +17,7 @@ class FacilityAppointmentPage extends StatefulWidget { class _FacilityAppointmentPageState extends State with TickerProviderStateMixin { late TabController _tabController; + @override void initState() { super.initState(); diff --git a/lib/ui/community/facility/facility_appointment_view.dart b/lib/ui/community/facility/facility_appointment_view.dart index b24a2cbe..360c52cf 100644 --- a/lib/ui/community/facility/facility_appointment_view.dart +++ b/lib/ui/community/facility/facility_appointment_view.dart @@ -1,21 +1,21 @@ +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/models/facility/facility_appointment_model.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/ui/community/facility/facility_appointment_card.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/facility/facility_appointment_model.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/ui/community/facility/facility_appointment_card.dart'; -import 'package:aku_community/utils/headers.dart'; - enum FacilityAppointmentType { MY, HISTORY, } + GlobalKey<_FacilityAppointmentViewState> childKey = GlobalKey(); class FacilityAppointmentView extends StatefulWidget { final FacilityAppointmentType type; + FacilityAppointmentView({Key? key, required this.type}) : super(key: key); @override @@ -25,6 +25,7 @@ class FacilityAppointmentView extends StatefulWidget { class _FacilityAppointmentViewState extends State { EasyRefreshController _refreshController = EasyRefreshController(); + int get _facilityType { switch (widget.type) { case FacilityAppointmentType.MY: diff --git a/lib/ui/community/facility/facility_preorder_page.dart b/lib/ui/community/facility/facility_preorder_page.dart index 1c876356..1027b055 100644 --- a/lib/ui/community/facility/facility_preorder_page.dart +++ b/lib/ui/community/facility/facility_preorder_page.dart @@ -1,28 +1,27 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/constants/app_theme.dart'; +import 'package:aku_new_community/models/facility/facility_type_detail_model.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/ui/community/facility/facility_type_detail_page.dart'; +import 'package:aku_new_community/ui/community/facility/fcility_order_date_list_page.dart'; +import 'package:aku_new_community/ui/profile/house/pick_my_house_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:aku_new_community/widget/picker/bee_date_picker.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flustars/flustars.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/constants/app_theme.dart'; -import 'package:aku_community/models/facility/facility_type_detail_model.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/ui/community/facility/facility_type_detail_page.dart'; -import 'package:aku_community/ui/community/facility/fcility_order_date_list_page.dart'; -import 'package:aku_community/ui/profile/house/pick_my_house_page.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_divider.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; -import 'package:aku_community/widget/picker/bee_date_picker.dart'; - class FacilityPreorderPage extends StatefulWidget { final int id; + FacilityPreorderPage({Key? key, required this.id}) : super(key: key); @override @@ -35,6 +34,7 @@ class _FacilityPreorderPageState extends State { DateTime? endDate; bool get canTap => startDate != null && endDate != null && typeModel != null; + @override Widget build(BuildContext context) { final appProvider = Provider.of(context); diff --git a/lib/ui/community/facility/facility_type_card.dart b/lib/ui/community/facility/facility_type_card.dart index 314bd79a..98297375 100644 --- a/lib/ui/community/facility/facility_type_card.dart +++ b/lib/ui/community/facility/facility_type_card.dart @@ -1,16 +1,15 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/models/facility/facility_type_model.dart'; +import 'package:aku_new_community/ui/community/facility/facility_preorder_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/material.dart'; - import 'package:get/get.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/models/facility/facility_type_model.dart'; -import 'package:aku_community/ui/community/facility/facility_preorder_page.dart'; -import 'package:aku_community/utils/headers.dart'; - class FacilityTypeCard extends StatelessWidget { final FacilityTypeModel model; + const FacilityTypeCard({Key? key, required this.model}) : super(key: key); @override diff --git a/lib/ui/community/facility/facility_type_detail_page.dart b/lib/ui/community/facility/facility_type_detail_page.dart index bec2036e..647fb5df 100644 --- a/lib/ui/community/facility/facility_type_detail_page.dart +++ b/lib/ui/community/facility/facility_type_detail_page.dart @@ -1,18 +1,17 @@ +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/models/facility/facility_type_detail_model.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/facility/facility_type_detail_model.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_divider.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class FacilityTypeDetailPage extends StatefulWidget { final int id; final FacilityTypeDetailModel? model; + FacilityTypeDetailPage({ Key? key, required this.model, @@ -25,6 +24,7 @@ class FacilityTypeDetailPage extends StatefulWidget { class _FacilityTypeDetailPageState extends State { List _models = []; + @override Widget build(BuildContext context) { return BeeScaffold( diff --git a/lib/ui/community/facility/fcility_order_date_list_page.dart b/lib/ui/community/facility/fcility_order_date_list_page.dart index f4143e34..1d823739 100644 --- a/lib/ui/community/facility/fcility_order_date_list_page.dart +++ b/lib/ui/community/facility/fcility_order_date_list_page.dart @@ -1,18 +1,17 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/models/facility/facility_order_date_list_model.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/facility/facility_order_date_list_model.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/widget/bee_divider.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class FacilityOrderDateListPage extends StatefulWidget { final int facilitiesId; + FacilityOrderDateListPage({Key? key, required this.facilitiesId}) : super(key: key); diff --git a/lib/ui/community/facility/pick_facility_page.dart b/lib/ui/community/facility/pick_facility_page.dart index d520e976..896f2674 100644 --- a/lib/ui/community/facility/pick_facility_page.dart +++ b/lib/ui/community/facility/pick_facility_page.dart @@ -1,14 +1,12 @@ +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/models/facility/facility_type_model.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/ui/community/facility/facility_type_card.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/facility/facility_type_model.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/ui/community/facility/facility_type_card.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class PickFacilityPage extends StatefulWidget { PickFacilityPage({Key? key}) : super(key: key); @@ -18,6 +16,7 @@ class PickFacilityPage extends StatefulWidget { class _PickFacilityPageState extends State { final EasyRefreshController _refreshController = EasyRefreshController(); + @override void dispose() { _refreshController.dispose(); diff --git a/lib/ui/community/notice/notice_card.dart b/lib/ui/community/notice/notice_card.dart index a0810142..f45879b1 100644 --- a/lib/ui/community/notice/notice_card.dart +++ b/lib/ui/community/notice/notice_card.dart @@ -1,20 +1,19 @@ -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/community/board_model.dart'; +import 'package:aku_new_community/ui/community/notice/notice_detail_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/picker/bee_image_preview.dart'; import 'package:flustars/flustars.dart'; +import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/model/community/board_model.dart'; -import 'package:aku_community/ui/community/notice/notice_detail_page.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/picker/bee_image_preview.dart'; - class NoticeCard extends StatelessWidget { final BoardItemModel model; final BoardItemModel? preModel; + const NoticeCard({ Key? key, required this.model, diff --git a/lib/ui/community/notice/notice_detail_page.dart b/lib/ui/community/notice/notice_detail_page.dart index 1b2b810f..fa33d4fd 100644 --- a/lib/ui/community/notice/notice_detail_page.dart +++ b/lib/ui/community/notice/notice_detail_page.dart @@ -1,23 +1,22 @@ +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/community/board_detail_model.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/picker/bee_image_preview.dart'; +import 'package:aku_new_community/widget/views/%20bee_download_view.dart'; +import 'package:aku_new_community/widget/views/doc_view.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; import 'package:open_file/open_file.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/community/board_detail_model.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/picker/bee_image_preview.dart'; -import 'package:aku_community/widget/views/%20bee_download_view.dart'; -import 'package:aku_community/widget/views/doc_view.dart'; - class NoticeDetailPage extends StatefulWidget { final int? id; + NoticeDetailPage({Key? key, required this.id}) : super(key: key); @override diff --git a/lib/ui/community/notice/notice_page.dart b/lib/ui/community/notice/notice_page.dart index db918c2d..da2934c3 100644 --- a/lib/ui/community/notice/notice_page.dart +++ b/lib/ui/community/notice/notice_page.dart @@ -1,14 +1,12 @@ +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/community/board_model.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/ui/community/notice/notice_card.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/community/board_model.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/ui/community/notice/notice_card.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class NoticePage extends StatefulWidget { NoticePage({Key? key}) : super(key: key); @@ -18,6 +16,7 @@ class NoticePage extends StatefulWidget { class _NoticePageState extends State { EasyRefreshController _refreshController = EasyRefreshController(); + @override Widget build(BuildContext context) { return BeeScaffold( diff --git a/lib/ui/home/application/all_application.dart b/lib/ui/home/application/all_application.dart index a2f84805..b0141192 100644 --- a/lib/ui/home/application/all_application.dart +++ b/lib/ui/home/application/all_application.dart @@ -1,18 +1,16 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/application_objects.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/ui/search/bee_search.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/login_util.dart'; +import 'package:aku_new_community/widget/bee_back_button.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:get/get.dart'; import 'package:provider/provider.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/application_objects.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/ui/search/bee_search.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/login_util.dart'; -import 'package:aku_community/widget/bee_back_button.dart'; - class AllApplicationPage extends StatefulWidget { AllApplicationPage({Key? key}) : super(key: key); diff --git a/lib/ui/home/home_notification.dart b/lib/ui/home/home_notification.dart index a532687a..c4706d3e 100644 --- a/lib/ui/home/home_notification.dart +++ b/lib/ui/home/home_notification.dart @@ -1,18 +1,15 @@ -import 'package:aku_community/utils/bee_date_util.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/model/community/board_model.dart'; +import 'package:aku_new_community/ui/community/notice/notice_page.dart'; +import 'package:aku_new_community/utils/bee_date_util.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:carousel_slider/carousel_slider.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - -import 'package:animated_text_kit/animated_text_kit.dart'; import 'package:flutter/rendering.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/model/community/board_model.dart'; -import 'package:aku_community/ui/community/notice/notice_page.dart'; -import 'package:aku_community/utils/headers.dart'; - class HomeNotification extends StatefulWidget { final List items; @@ -42,7 +39,6 @@ class _HomeNotificationState extends State { return Row( children: [ 24.wb, - Image.asset( R.ASSETS_IMAGES_NOTICE_PNG, height: 45.w, @@ -52,23 +48,20 @@ class _HomeNotificationState extends State { widget.items.isEmpty ? Spacer() : CarouselSlider( - items: widget.items.map((e) => getText(e)).toList(), - options: CarouselOptions( - scrollDirection: Axis.vertical, - viewportFraction: 1.0, - aspectRatio: 300 / 40, - autoPlay: true, - - onPageChanged: (index, _) { - //print(index.toString()); - // setState(() { - // _currentIndicator = index; - // }); - }, - ), - + items: widget.items.map((e) => getText(e)).toList(), + options: CarouselOptions( + scrollDirection: Axis.vertical, + viewportFraction: 1.0, + aspectRatio: 300 / 40, + autoPlay: true, + onPageChanged: (index, _) { + //print(index.toString()); + // setState(() { + // _currentIndicator = index; + // }); + }, + ), ).expand(), - 12.wb, ], ); @@ -76,29 +69,25 @@ class _HomeNotificationState extends State { Widget getText(BoardItemModel e) { return GestureDetector( - onTap: (){ + onTap: () { Get.to(() => NoticePage()); }, child: Container( color: Colors.transparent, child: Row( - children: [ Container( - - constraints: BoxConstraints( - maxWidth: 190 - ), + constraints: BoxConstraints(maxWidth: 190), child: Text( - e.title ?? '', - style: TextStyle( - color: Color(0xA6000000), - fontSize: 22.sp, - fontWeight: FontWeight.bold, - ), + e.title ?? '', + style: TextStyle( + color: Color(0xA6000000), + fontSize: 22.sp, + fontWeight: FontWeight.bold, + ), maxLines: 1, overflow: TextOverflow.ellipsis, - )), + )), Spacer(), Container( child: Text( diff --git a/lib/ui/home/home_title.dart b/lib/ui/home/home_title.dart index d9fdf6fb..df61b408 100644 --- a/lib/ui/home/home_title.dart +++ b/lib/ui/home/home_title.dart @@ -1,11 +1,8 @@ +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/utils/headers.dart'; - class HomeTitle extends StatelessWidget { final String title; final String suffixTitle; diff --git a/lib/ui/home/public_infomation/public_infomation_card.dart b/lib/ui/home/public_infomation/public_infomation_card.dart index f6299a95..9d66eb83 100644 --- a/lib/ui/home/public_infomation/public_infomation_card.dart +++ b/lib/ui/home/public_infomation/public_infomation_card.dart @@ -1,17 +1,16 @@ -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/models/news/news_item_model.dart'; +import 'package:aku_new_community/ui/home/public_infomation/public_information_detail_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flustars/flustars.dart'; +import 'package:flutter/material.dart'; import 'package:get/get.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/models/news/news_item_model.dart'; -import 'package:aku_community/ui/home/public_infomation/public_information_detail_page.dart'; -import 'package:aku_community/utils/headers.dart'; - class PublicInfomationCard extends StatelessWidget { final NewsItemModel model; + const PublicInfomationCard({Key? key, required this.model}) : super(key: key); @override diff --git a/lib/ui/home/public_infomation/public_infomation_page.dart b/lib/ui/home/public_infomation/public_infomation_page.dart index 6ccca0e4..e04961e8 100644 --- a/lib/ui/home/public_infomation/public_infomation_page.dart +++ b/lib/ui/home/public_infomation/public_infomation_page.dart @@ -1,12 +1,12 @@ +import 'package:aku_new_community/models/news/news_category_model.dart'; +import 'package:aku_new_community/ui/home/public_infomation/public_infomation_view.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/tab_bar/bee_tab_bar.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/models/news/news_category_model.dart'; -import 'package:aku_community/ui/home/public_infomation/public_infomation_view.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/tab_bar/bee_tab_bar.dart'; - class PublicInfomationPage extends StatefulWidget { final List models; + PublicInfomationPage({ Key? key, required this.models, @@ -19,6 +19,7 @@ class PublicInfomationPage extends StatefulWidget { class _PublicInfomationPageState extends State with TickerProviderStateMixin { TabController? _tabController; + @override void initState() { super.initState(); diff --git a/lib/ui/home/public_infomation/public_infomation_view.dart b/lib/ui/home/public_infomation/public_infomation_view.dart index aa9782b7..37463955 100644 --- a/lib/ui/home/public_infomation/public_infomation_view.dart +++ b/lib/ui/home/public_infomation/public_infomation_view.dart @@ -1,16 +1,15 @@ +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/models/news/news_category_model.dart'; +import 'package:aku_new_community/models/news/news_item_model.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/ui/home/public_infomation/public_infomation_card.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/news/news_category_model.dart'; -import 'package:aku_community/models/news/news_item_model.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/ui/home/public_infomation/public_infomation_card.dart'; -import 'package:aku_community/utils/headers.dart'; - class PublicInfomationView extends StatefulWidget { final NewsCategoryModel model; + PublicInfomationView({Key? key, required this.model}) : super(key: key); @override @@ -20,6 +19,7 @@ class PublicInfomationView extends StatefulWidget { class _PublicInfomationViewState extends State with AutomaticKeepAliveClientMixin { EasyRefreshController _refreshController = EasyRefreshController(); + @override Widget build(BuildContext context) { super.build(context); diff --git a/lib/ui/home/public_infomation/public_information_detail_page.dart b/lib/ui/home/public_infomation/public_information_detail_page.dart index 74005ef1..77827b80 100644 --- a/lib/ui/home/public_infomation/public_information_detail_page.dart +++ b/lib/ui/home/public_infomation/public_information_detail_page.dart @@ -1,25 +1,24 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/models/news/news_detail_model.dart'; +import 'package:aku_new_community/utils/link_text_parase.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:bot_toast/bot_toast.dart'; +import 'package:flustars/flustars.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; - -import 'package:bot_toast/bot_toast.dart'; -import 'package:flustars/flustars.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:url_launcher/url_launcher.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/news/news_detail_model.dart'; -import 'package:aku_community/utils/link_text_parase.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class PublicInformationDetailPage extends StatefulWidget { final int id; + PublicInformationDetailPage({Key? key, required this.id}) : super(key: key); @override @@ -51,14 +50,14 @@ class _PublicInformationDetailPageState @override Widget build(BuildContext context) { return BeeScaffold( - leading:Navigator.canPop(context) + leading: Navigator.canPop(context) ? IconButton( - onPressed: () => Get.back(result: true), - icon: Icon( - CupertinoIcons.chevron_back, - color: Colors.black, - ), - ) + onPressed: () => Get.back(result: true), + icon: Icon( + CupertinoIcons.chevron_back, + color: Colors.black, + ), + ) : SizedBox(), title: _onload ? '' : _detailModel.newsCategoryName, bodyColor: Colors.white, diff --git a/lib/ui/manager/advice/advice_add_comment_page.dart b/lib/ui/manager/advice/advice_add_comment_page.dart index c128b0d2..4d35a337 100644 --- a/lib/ui/manager/advice/advice_add_comment_page.dart +++ b/lib/ui/manager/advice/advice_add_comment_page.dart @@ -1,18 +1,17 @@ -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; import 'package:flustars/flustars.dart'; +import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; - class AdviceAddCommentPage extends StatefulWidget { final int? id; + AdviceAddCommentPage({Key? key, required this.id}) : super(key: key); @override diff --git a/lib/ui/manager/advice/advice_card.dart b/lib/ui/manager/advice/advice_card.dart index dc1ae8ef..882eb3bb 100644 --- a/lib/ui/manager/advice/advice_card.dart +++ b/lib/ui/manager/advice/advice_card.dart @@ -1,18 +1,17 @@ -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/model/manager/suggestion_or_complain_model.dart'; +import 'package:aku_new_community/ui/manager/advice/advice_detail_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/views/horizontal_image_view.dart'; import 'package:flustars/flustars.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_rating_bar/flutter_rating_bar.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/model/manager/suggestion_or_complain_model.dart'; -import 'package:aku_community/ui/manager/advice/advice_detail_page.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/views/horizontal_image_view.dart'; - class AdviceCard extends StatefulWidget { final SuggestionOrComplainModel? model; + AdviceCard({Key? key, this.model}) : super(key: key); @override diff --git a/lib/ui/manager/advice/advice_detail_page.dart b/lib/ui/manager/advice/advice_detail_page.dart index 43190c6e..f101d699 100644 --- a/lib/ui/manager/advice/advice_detail_page.dart +++ b/lib/ui/manager/advice/advice_detail_page.dart @@ -1,29 +1,28 @@ -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/constants/app_theme.dart'; +import 'package:aku_new_community/model/manager/advice_detail_model.dart'; +import 'package:aku_new_community/model/manager/suggestion_or_complain_model.dart'; +import 'package:aku_new_community/ui/manager/advice/advice_add_comment_page.dart'; +import 'package:aku_new_community/ui/manager/advice/advice_evaluate_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:aku_new_community/widget/views/bee_grid_image_view.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:dio/dio.dart'; import 'package:flustars/flustars.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart' hide Response; import 'package:shimmer/shimmer.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/constants/app_theme.dart'; -import 'package:aku_community/model/manager/advice_detail_model.dart'; -import 'package:aku_community/model/manager/suggestion_or_complain_model.dart'; -import 'package:aku_community/ui/manager/advice/advice_add_comment_page.dart'; -import 'package:aku_community/ui/manager/advice/advice_evaluate_page.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; -import 'package:aku_community/widget/views/bee_grid_image_view.dart'; - class AdviceDetailPage extends StatefulWidget { final SuggestionOrComplainModel? model; + AdviceDetailPage({Key? key, required this.model}) : super(key: key); @override @@ -34,6 +33,7 @@ class _AdviceDetailPageState extends State { bool _loading = true; EasyRefreshController _refreshController = EasyRefreshController(); late AdviceDetailModel _model; + String get adviceValue { switch (widget.model!.type) { case 1: diff --git a/lib/ui/manager/advice/advice_evaluate_page.dart b/lib/ui/manager/advice/advice_evaluate_page.dart index 9c39e8c2..54d85179 100644 --- a/lib/ui/manager/advice/advice_evaluate_page.dart +++ b/lib/ui/manager/advice/advice_evaluate_page.dart @@ -1,18 +1,17 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_rating_bar/flutter_rating_bar.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class AdviceEvaluatePage extends StatefulWidget { final int? id; + AdviceEvaluatePage({Key? key, required this.id}) : super(key: key); @override @@ -21,6 +20,7 @@ class AdviceEvaluatePage extends StatefulWidget { class _AdviceEvaluatePageState extends State { int _rating = 10; + @override Widget build(BuildContext context) { return BeeScaffold( diff --git a/lib/ui/manager/advice/advice_page.dart b/lib/ui/manager/advice/advice_page.dart index 83216ea4..57ed84fd 100644 --- a/lib/ui/manager/advice/advice_page.dart +++ b/lib/ui/manager/advice/advice_page.dart @@ -1,26 +1,24 @@ -import 'package:aku_community/utils/hive_store.dart'; -import 'package:aku_community/utils/websocket/tips_dialog.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/constants/app_theme.dart'; +import 'package:aku_new_community/model/manager/suggestion_or_complain_model.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/ui/manager/advice/advice_card.dart'; +import 'package:aku_new_community/ui/manager/advice/new_advice_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/hive_store.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/utils/websocket/tips_dialog.dart'; +import 'package:aku_new_community/widget/animated/animated_transition.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:aku_new_community/widget/buttons/radio_button.dart'; +import 'package:aku_new_community/widget/tab_bar/bee_tab_bar.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/constants/app_theme.dart'; -import 'package:aku_community/model/manager/suggestion_or_complain_model.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/ui/manager/advice/advice_card.dart'; -import 'package:aku_community/ui/manager/advice/new_advice_page.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/animated/animated_transition.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; -import 'package:aku_community/widget/buttons/radio_button.dart'; -import 'package:aku_community/widget/tab_bar/bee_tab_bar.dart'; - enum AdviceType { SUGGESTION, COMPLAIN, @@ -28,6 +26,7 @@ enum AdviceType { class AdvicePage extends StatefulWidget { final AdviceType type; + AdvicePage({Key? key, required this.type}) : super(key: key); @override @@ -75,7 +74,7 @@ class _AdvicePageState extends State with TickerProviderStateMixin { var agreement = await HiveStore.appBox?.get('AdvicePage') ?? false; if (!agreement) { await TipsDialog.tipsDialog(); - HiveStore.appBox!.put('AdvicePage',true); + HiveStore.appBox!.put('AdvicePage', true); } }); _tabController = TabController(length: 2, vsync: this); diff --git a/lib/ui/manager/advice/new_advice_page.dart b/lib/ui/manager/advice/new_advice_page.dart index 8c7253e5..7ef6ae41 100644 --- a/lib/ui/manager/advice/new_advice_page.dart +++ b/lib/ui/manager/advice/new_advice_page.dart @@ -1,30 +1,29 @@ import 'dart:io'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/constants/app_theme.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/ui/manager/advice/advice_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:aku_new_community/widget/picker/grid_image_picker.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flustars/flustars.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/constants/app_theme.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/ui/manager/advice/advice_page.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; -import 'package:aku_community/widget/picker/grid_image_picker.dart'; - class NewAdvicePage extends StatefulWidget { final AdviceType type; final int initType; + NewAdvicePage({Key? key, required this.type, required this.initType}) : super(key: key); @@ -37,6 +36,7 @@ class _NewAdvicePageState extends State { List _files = []; TextEditingController _editingController = TextEditingController(); GlobalKey _formKey = GlobalKey(); + String get title { switch (widget.type) { case AdviceType.SUGGESTION: diff --git a/lib/ui/manager/house_keeping/add_house_keeping_page.dart b/lib/ui/manager/house_keeping/add_house_keeping_page.dart index 7ab81bce..9b89461d 100644 --- a/lib/ui/manager/house_keeping/add_house_keeping_page.dart +++ b/lib/ui/manager/house_keeping/add_house_keeping_page.dart @@ -1,17 +1,17 @@ import 'dart:io'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/extensions/widget_list_ext.dart'; -import 'package:aku_community/ui/manager/house_keeping/house_keeping_func.dart'; -import 'package:aku_community/ui/manager/house_keeping/house_keeping_submit_page.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bee_check_button.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; -import 'package:aku_community/widget/others/house_head_card.dart'; -import 'package:aku_community/widget/others/user_tool.dart'; -import 'package:aku_community/widget/picker/grid_image_picker.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/extensions/widget_list_ext.dart'; +import 'package:aku_new_community/ui/manager/house_keeping/house_keeping_func.dart'; +import 'package:aku_new_community/ui/manager/house_keeping/house_keeping_submit_page.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bee_check_button.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:aku_new_community/widget/others/house_head_card.dart'; +import 'package:aku_new_community/widget/others/user_tool.dart'; +import 'package:aku_new_community/widget/picker/grid_image_picker.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -31,6 +31,7 @@ class _AddHouseKeepingPageState extends State { List _buttons = ['室内清洁', '洗涤护理']; int? _selectType; List _files = []; + @override void initState() { super.initState(); diff --git a/lib/ui/manager/house_keeping/evaluate_page.dart b/lib/ui/manager/house_keeping/evaluate_page.dart index 2b9825e1..74c9d8a7 100644 --- a/lib/ui/manager/house_keeping/evaluate_page.dart +++ b/lib/ui/manager/house_keeping/evaluate_page.dart @@ -1,22 +1,21 @@ import 'dart:io'; -import 'package:aku_community/ui/manager/house_keeping/house_keeping_func.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/ui/manager/house_keeping/house_keeping_func.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:aku_new_community/widget/picker/grid_image_picker.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_rating_bar/flutter_rating_bar.dart'; - -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/picker/grid_image_picker.dart'; import 'package:get/get.dart'; import 'package:power_logger/power_logger.dart'; class EvaluatePage extends StatefulWidget { final int id; + EvaluatePage({Key? key, required this.id}) : super(key: key); @override @@ -27,6 +26,7 @@ class _EvaluatePageState extends State { late TextEditingController _textEditingController; int _rating = 10; List _files = []; + @override void initState() { super.initState(); diff --git a/lib/ui/manager/house_keeping/house_keeping_card.dart b/lib/ui/manager/house_keeping/house_keeping_card.dart index 686725f4..25d8c11d 100644 --- a/lib/ui/manager/house_keeping/house_keeping_card.dart +++ b/lib/ui/manager/house_keeping/house_keeping_card.dart @@ -1,28 +1,28 @@ -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/models/house_keeping/house_keeping_list_model.dart'; +import 'package:aku_new_community/models/house_keeping/house_keeping_process_model.dart'; +import 'package:aku_new_community/ui/manager/house_keeping/house_keeping_detail_page.dart'; +import 'package:aku_new_community/ui/manager/house_keeping/house_keeping_func.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/buttons/card_bottom_button.dart'; +import 'package:aku_new_community/widget/others/aku_chip_box.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flustars/flustars.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/house_keeping/house_keeping_list_model.dart'; -import 'package:aku_community/models/house_keeping/house_keeping_process_model.dart'; -import 'package:aku_community/ui/manager/house_keeping/house_keeping_detail_page.dart'; -import 'package:aku_community/ui/manager/house_keeping/house_keeping_func.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/buttons/card_bottom_button.dart'; -import 'package:aku_community/widget/others/aku_chip_box.dart'; - class HouseKeepingCard extends StatelessWidget { final HouseKeepingListModel model; final VoidCallback callRefresh; + const HouseKeepingCard( {Key? key, required this.model, required this.callRefresh}) : super(key: key); + String get dateStart => DateUtil.formatDateStr(model.createDate, format: 'yyyy-MM-dd HH:mm:ss'); diff --git a/lib/ui/manager/house_keeping/house_keeping_detail_page.dart b/lib/ui/manager/house_keeping/house_keeping_detail_page.dart index d418b960..359ee9b6 100644 --- a/lib/ui/manager/house_keeping/house_keeping_detail_page.dart +++ b/lib/ui/manager/house_keeping/house_keeping_detail_page.dart @@ -1,33 +1,32 @@ -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/pages/life_pay/pay_finish_page.dart'; -import 'package:aku_community/pages/life_pay/pay_util.dart'; -import 'package:aku_community/ui/manager/house_keeping/house_keeping_func.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/models/house_keeping/house_keeping_list_model.dart'; +import 'package:aku_new_community/models/house_keeping/house_keeping_process_model.dart'; +import 'package:aku_new_community/pages/life_pay/pay_finish_page.dart'; +import 'package:aku_new_community/pages/life_pay/pay_util.dart'; +import 'package:aku_new_community/ui/manager/house_keeping/evaluate_page.dart'; +import 'package:aku_new_community/ui/manager/house_keeping/house_keeping_func.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:aku_new_community/widget/views/bee_grid_image_view.dart'; import 'package:bot_toast/bot_toast.dart'; +import 'package:flustars/flustars.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - -import 'package:flustars/flustars.dart'; import 'package:flutter_rating_bar/flutter_rating_bar.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:power_logger/power_logger.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/models/house_keeping/house_keeping_list_model.dart'; -import 'package:aku_community/models/house_keeping/house_keeping_process_model.dart'; -import 'package:aku_community/ui/manager/house_keeping/evaluate_page.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_divider.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; -import 'package:aku_community/widget/views/bee_grid_image_view.dart'; - class HouseKeepingDetailPage extends StatefulWidget { final HouseKeepingListModel model; final List processModels; final VoidCallback callRefresh; + HouseKeepingDetailPage( {Key? key, required this.model, @@ -256,9 +255,7 @@ class _HouseKeepingDetailPageState extends State { .make(), 16.w.heightBox, BeeGridImageView( - urls: widget.model.evaluationImgList - .map((e) => e.url) - .toList()) + urls: widget.model.evaluationImgList.map((e) => e.url).toList()) ], ), ); @@ -320,9 +317,7 @@ class _HouseKeepingDetailPageState extends State { .softWrap(true) .make(), BeeGridImageView( - urls: widget.model.handlerImgList - .map((e) => e.url) - .toList()) + urls: widget.model.handlerImgList.map((e) => e.url).toList()) ], ), ); diff --git a/lib/ui/manager/house_keeping/house_keeping_func.dart b/lib/ui/manager/house_keeping/house_keeping_func.dart index 239a22cb..e1535ca7 100644 --- a/lib/ui/manager/house_keeping/house_keeping_func.dart +++ b/lib/ui/manager/house_keeping/house_keeping_func.dart @@ -1,12 +1,11 @@ import 'dart:io'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/models/house_keeping/house_keeping_process_model.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; import 'package:bot_toast/bot_toast.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/house_keeping/house_keeping_process_model.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; - class HouseKeepingFunc { ///提交新增家政服务 static Future submitHouseKeeping( @@ -78,12 +77,17 @@ class HouseKeepingFunc { return baseModel.status ?? false; } - ///支付宝支付:app 家政服务-服务费用支付 完成订单支付宝支付(生成 APP 支付订单信息) + ///支付宝支付:app 家政服务-服务费用支付 完成订单支付宝支付(生成 APP 支付订单信息) ///支付方式暂写死为1 ///支付方式:1.支付宝 2.微信 3.现金 4.pos - static Future houseKeepingOrderAlipay(int id, int type, double price) async { - BaseModel baseModel = await NetUtil().post(API.pay.houseKeepingServiceOrderAlipay, - params: {"housekeepingServiceId": id, "payType": type, "payPrice": price}); + static Future houseKeepingOrderAlipay( + int id, int type, double price) async { + BaseModel baseModel = await NetUtil() + .post(API.pay.houseKeepingServiceOrderAlipay, params: { + "housekeepingServiceId": id, + "payType": type, + "payPrice": price + }); if (baseModel.status ?? false) { return baseModel.message!; } else { diff --git a/lib/ui/manager/house_keeping/house_keeping_page.dart b/lib/ui/manager/house_keeping/house_keeping_page.dart index a465972a..41b86877 100644 --- a/lib/ui/manager/house_keeping/house_keeping_page.dart +++ b/lib/ui/manager/house_keeping/house_keeping_page.dart @@ -1,18 +1,16 @@ -import 'package:aku_community/utils/hive_store.dart'; -import 'package:aku_community/utils/websocket/tips_dialog.dart'; +import 'package:aku_new_community/ui/manager/house_keeping/add_house_keeping_page.dart'; +import 'package:aku_new_community/ui/manager/house_keeping/house_keeping_view.dart'; +import 'package:aku_new_community/utils/hive_store.dart'; +import 'package:aku_new_community/utils/websocket/tips_dialog.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:aku_new_community/widget/tab_bar/bee_tab_bar.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/ui/manager/house_keeping/add_house_keeping_page.dart'; -import 'package:aku_community/ui/manager/house_keeping/house_keeping_view.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; -import 'package:aku_community/widget/tab_bar/bee_tab_bar.dart'; - class HouseKeepingPage extends StatefulWidget { HouseKeepingPage({Key? key}) : super(key: key); @@ -24,6 +22,7 @@ class _HouseKeepingPageState extends State with TickerProviderStateMixin { List _tabs = ['全部', '待派单', '已派单', '处理中', '待支付', '待评价', '已完成']; late TabController _controller; + @override void initState() { super.initState(); @@ -31,7 +30,7 @@ class _HouseKeepingPageState extends State var agreement = await HiveStore.appBox?.get('HouseKeepingPage') ?? false; if (!agreement) { await TipsDialog.tipsDialog(); - HiveStore.appBox!.put('HouseKeepingPage',true); + HiveStore.appBox!.put('HouseKeepingPage', true); } }); _controller = TabController(length: _tabs.length, vsync: this); diff --git a/lib/ui/manager/house_keeping/house_keeping_submit_page.dart b/lib/ui/manager/house_keeping/house_keeping_submit_page.dart index 7c3a84bc..c82b3225 100644 --- a/lib/ui/manager/house_keeping/house_keeping_submit_page.dart +++ b/lib/ui/manager/house_keeping/house_keeping_submit_page.dart @@ -1,12 +1,10 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/others/finish_result_image.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/others/finish_result_image.dart'; - class HouseKeepingSubmitPage extends StatefulWidget { HouseKeepingSubmitPage({Key? key}) : super(key: key); diff --git a/lib/ui/manager/house_keeping/house_keeping_view.dart b/lib/ui/manager/house_keeping/house_keeping_view.dart index 140829bb..47fadc4d 100644 --- a/lib/ui/manager/house_keeping/house_keeping_view.dart +++ b/lib/ui/manager/house_keeping/house_keeping_view.dart @@ -1,16 +1,15 @@ +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/models/house_keeping/house_keeping_list_model.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/ui/manager/house_keeping/house_keeping_card.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/house_keeping/house_keeping_list_model.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/ui/manager/house_keeping/house_keeping_card.dart'; - class HouseKeepingView extends StatefulWidget { final int index; + HouseKeepingView({Key? key, required this.index}) : super(key: key); @override @@ -20,6 +19,7 @@ class HouseKeepingView extends StatefulWidget { class _HouseKeepingViewState extends State with AutomaticKeepAliveClientMixin { late EasyRefreshController _controller; + @override void initState() { super.initState(); diff --git a/lib/ui/manager/questionnaire/questionnaire_detail_page.dart b/lib/ui/manager/questionnaire/questionnaire_detail_page.dart index 3715a8a7..c996171a 100644 --- a/lib/ui/manager/questionnaire/questionnaire_detail_page.dart +++ b/lib/ui/manager/questionnaire/questionnaire_detail_page.dart @@ -1,29 +1,28 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/constants/app_theme.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/manager/questionnaire_detail_model.dart'; +import 'package:aku_new_community/model/manager/quetionnaire_submit_model.dart'; +import 'package:aku_new_community/pages/manager_func.dart'; +import 'package:aku_new_community/ui/manager/questionnaire/questionnaire_siglecheck.dart'; +import 'package:aku_new_community/ui/manager/questionnaire/questionnaire_truefalse.dart'; +import 'package:aku_new_community/ui/manager/questionnaire/questionnarie_raido_check.dart'; +import 'package:aku_new_community/ui/manager/questionnaire/submit_complish_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/constants/app_theme.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/model/manager/questionnaire_detail_model.dart'; -import 'package:aku_community/model/manager/quetionnaire_submit_model.dart'; -import 'package:aku_community/pages/manager_func.dart'; -import 'package:aku_community/ui/manager/questionnaire/questionnaire_siglecheck.dart'; -import 'package:aku_community/ui/manager/questionnaire/questionnaire_truefalse.dart'; -import 'package:aku_community/ui/manager/questionnaire/questionnarie_raido_check.dart'; -import 'package:aku_community/ui/manager/questionnaire/submit_complish_page.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/widget/bee_divider.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; - class QuestionnaireDetailPage extends StatefulWidget { final int? id; final int? status; + QuestionnaireDetailPage({Key? key, this.id, this.status}) : super(key: key); @override @@ -36,6 +35,7 @@ class _QuestionnaireDetailPageState extends State { bool _onload = true; List _submitModels = []; + Widget _emptyWidget() { return Container(); } diff --git a/lib/ui/manager/questionnaire/questionnaire_page.dart b/lib/ui/manager/questionnaire/questionnaire_page.dart index 1ddd1ddc..2914a76f 100644 --- a/lib/ui/manager/questionnaire/questionnaire_page.dart +++ b/lib/ui/manager/questionnaire/questionnaire_page.dart @@ -1,21 +1,19 @@ -import 'package:aku_community/utils/hive_store.dart'; -import 'package:aku_community/utils/websocket/tips_dialog.dart'; -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/manager/questinnaire_model.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/ui/manager/questionnaire/questionnaire_detail_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/hive_store.dart'; +import 'package:aku_new_community/utils/websocket/tips_dialog.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/others/stack_avatar.dart'; import 'package:flustars/flustars.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/model/manager/questinnaire_model.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/ui/manager/questionnaire/questionnaire_detail_page.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/others/stack_avatar.dart'; - class QuestionnairePage extends StatefulWidget { QuestionnairePage({Key? key}) : super(key: key); @@ -25,6 +23,7 @@ class QuestionnairePage extends StatefulWidget { class _QuestionnairePageState extends State { EasyRefreshController _easyRefreshController = EasyRefreshController(); + @override void initState() { super.initState(); @@ -32,10 +31,9 @@ class _QuestionnairePageState extends State { var agreement = await HiveStore.appBox?.get('QuestionnairePage') ?? false; if (!agreement) { await TipsDialog.tipsDialog(); - HiveStore.appBox!.put('QuestionnairePage',true); + HiveStore.appBox!.put('QuestionnairePage', true); } }); - } String _getButtonText(int? status) { diff --git a/lib/ui/manager/questionnaire/questionnaire_siglecheck.dart b/lib/ui/manager/questionnaire/questionnaire_siglecheck.dart index c2acf5b8..7ad00d06 100644 --- a/lib/ui/manager/questionnaire/questionnaire_siglecheck.dart +++ b/lib/ui/manager/questionnaire/questionnaire_siglecheck.dart @@ -1,14 +1,14 @@ +import 'package:aku_new_community/model/manager/questionnaire_detail_model.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/buttons/bee_single_check.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/model/manager/questionnaire_detail_model.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/buttons/bee_single_check.dart'; - class QuestionnaireSingleCheck extends StatefulWidget { final String? title; final List? answers; final int? selected; final Function(int? id) onPressed; + QuestionnaireSingleCheck( {Key? key, required this.title, diff --git a/lib/ui/manager/questionnaire/questionnaire_truefalse.dart b/lib/ui/manager/questionnaire/questionnaire_truefalse.dart index 86dad16e..cec5c473 100644 --- a/lib/ui/manager/questionnaire/questionnaire_truefalse.dart +++ b/lib/ui/manager/questionnaire/questionnaire_truefalse.dart @@ -1,14 +1,13 @@ +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/buttons/bee_single_check.dart'; import 'package:flutter/material.dart'; - import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/buttons/bee_single_check.dart'; - class QuestionnaireTruefalse extends StatefulWidget { final String? title; final int? selected; final Function(int id)? onPressed; + QuestionnaireTruefalse({Key? key, this.title, this.selected, this.onPressed}) : super(key: key); diff --git a/lib/ui/manager/questionnaire/questionnarie_raido_check.dart b/lib/ui/manager/questionnaire/questionnarie_raido_check.dart index c473f1fe..9e7ca506 100644 --- a/lib/ui/manager/questionnaire/questionnarie_raido_check.dart +++ b/lib/ui/manager/questionnaire/questionnarie_raido_check.dart @@ -1,14 +1,14 @@ +import 'package:aku_new_community/model/manager/questionnaire_detail_model.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/buttons/bee_check_radio.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/model/manager/questionnaire_detail_model.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/buttons/bee_check_radio.dart'; - class QuestionnaireRadioCheck extends StatefulWidget { final String? title; final List? answers; final List? selected; final Function(int? id) onPressed; + QuestionnaireRadioCheck( {Key? key, required this.title, diff --git a/lib/ui/manager/questionnaire/submit_complish_page.dart b/lib/ui/manager/questionnaire/submit_complish_page.dart index 0acb00be..8ef5ba4e 100644 --- a/lib/ui/manager/questionnaire/submit_complish_page.dart +++ b/lib/ui/manager/questionnaire/submit_complish_page.dart @@ -1,17 +1,16 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/others/finish_result_image.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/others/finish_result_image.dart'; - class SubmitComplishPage extends StatelessWidget { final bool? status; final String? message; + const SubmitComplishPage({Key? key, this.status, this.message}) : super(key: key); diff --git a/lib/ui/manager/visitor/visitor_list_item.dart b/lib/ui/manager/visitor/visitor_list_item.dart index e1d70035..669dfb5e 100644 --- a/lib/ui/manager/visitor/visitor_list_item.dart +++ b/lib/ui/manager/visitor/visitor_list_item.dart @@ -1,21 +1,20 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/manager/visitor_list_item_model.dart'; +import 'package:aku_new_community/ui/manager/visitor/visitor_passport_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flustars/flustars.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/manager/visitor_list_item_model.dart'; -import 'package:aku_community/ui/manager/visitor/visitor_passport_page.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; - class VisitorListItem extends StatefulWidget { final VisitorListItemModel model; final int type; + VisitorListItem({Key? key, required this.model, required this.type}) : super(key: key); diff --git a/lib/ui/manager/visitor/visitor_passport_page.dart b/lib/ui/manager/visitor/visitor_passport_page.dart index 04509409..c8929f93 100644 --- a/lib/ui/manager/visitor/visitor_passport_page.dart +++ b/lib/ui/manager/visitor/visitor_passport_page.dart @@ -1,28 +1,27 @@ import 'dart:typed_data'; import 'dart:ui' as ui; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/app_theme.dart'; +import 'package:aku_new_community/model/manager/visitor_list_item_model.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_back_button.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:bot_toast/bot_toast.dart'; +import 'package:flustars/flustars.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; - -import 'package:bot_toast/bot_toast.dart'; -import 'package:flustars/flustars.dart'; import 'package:fluwx/fluwx.dart'; import 'package:qr_flutter/qr_flutter.dart'; import 'package:velocity_x/velocity_x.dart'; - -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/app_theme.dart'; -import 'package:aku_community/model/manager/visitor_list_item_model.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_back_button.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; // import 'package:qr_flutter/qr_flutter.dart'; class VisitorPassportPage extends StatefulWidget { final VisitorListItemModel model; final String? code; + VisitorPassportPage({Key? key, required this.model, this.code}) : super(key: key); @@ -51,8 +50,19 @@ class _VisitorPassportPageState extends State { child: ListView( children: [ 64.hb, - '${S.of(context)!.tempPlotName}'.text.size(40.sp).white.bold.make().centered(), - '${widget.model.roomName}'.text.size(30.sp).white.make().centered(), + '${S.of(context)!.tempPlotName}' + .text + .size(40.sp) + .white + .bold + .make() + .centered(), + '${widget.model.roomName}' + .text + .size(30.sp) + .white + .make() + .centered(), 32.hb, Container( width: 600.w, diff --git a/lib/ui/manager/visitor/visitor_record_page.dart b/lib/ui/manager/visitor/visitor_record_page.dart index 68ac23ba..9fe3942d 100644 --- a/lib/ui/manager/visitor/visitor_record_page.dart +++ b/lib/ui/manager/visitor/visitor_record_page.dart @@ -1,10 +1,9 @@ +import 'package:aku_new_community/ui/manager/visitor/visitor_record_view.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/tab_bar/bee_tab_bar.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/ui/manager/visitor/visitor_record_view.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/tab_bar/bee_tab_bar.dart'; - class VisitorRecordPage extends StatefulWidget { VisitorRecordPage({Key? key}) : super(key: key); @@ -18,6 +17,7 @@ class _VisitorRecordPageState extends State //导航标签 List _tabs = ['已分享', '已提交', '已过期']; + @override void initState() { _controller = TabController(length: _tabs.length, vsync: this); diff --git a/lib/ui/manager/visitor/visitor_record_view.dart b/lib/ui/manager/visitor/visitor_record_view.dart index 64d33dd9..4d595cab 100644 --- a/lib/ui/manager/visitor/visitor_record_view.dart +++ b/lib/ui/manager/visitor/visitor_record_view.dart @@ -1,16 +1,15 @@ +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/manager/visitor_list_item_model.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/ui/manager/visitor/visitor_list_item.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/manager/visitor_list_item_model.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/ui/manager/visitor/visitor_list_item.dart'; -import 'package:aku_community/utils/headers.dart'; - class VisitorRecordView extends StatefulWidget { ///访客状态(1.已分享,2.已提交,3.已到期) final int type; + VisitorRecordView({Key? key, required this.type}) : super(key: key); @override diff --git a/lib/ui/market/category/category_card.dart b/lib/ui/market/category/category_card.dart index 26378f62..7e00be02 100644 --- a/lib/ui/market/category/category_card.dart +++ b/lib/ui/market/category/category_card.dart @@ -1,17 +1,16 @@ -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/models/market/display_category_model.dart'; +import 'package:aku_new_community/models/market/market_category_model.dart'; +import 'package:aku_new_community/ui/market/goods/goods_list_view.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:bot_toast/bot_toast.dart'; +import 'package:flutter/material.dart'; import 'package:get/get.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/models/market/display_category_model.dart'; -import 'package:aku_community/models/market/market_category_model.dart'; -import 'package:aku_community/ui/market/goods/goods_list_view.dart'; -import 'package:aku_community/utils/headers.dart'; - class CategoryCard extends StatelessWidget { final MarketCategoryModel model; + const CategoryCard({Key? key, required this.model}) : super(key: key); @override diff --git a/lib/ui/market/category/category_page.dart b/lib/ui/market/category/category_page.dart index aed800a1..6b7c750a 100644 --- a/lib/ui/market/category/category_page.dart +++ b/lib/ui/market/category/category_page.dart @@ -1,17 +1,16 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/models/market/market_category_model.dart'; +import 'package:aku_new_community/ui/market/category/category_sub_view.dart'; +import 'package:aku_new_community/ui/market/search/search_goods_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:get/get.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/models/market/market_category_model.dart'; -import 'package:aku_community/ui/market/category/category_sub_view.dart'; -import 'package:aku_community/ui/market/search/search_goods_page.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class CategoryPage extends StatefulWidget { final List models; + CategoryPage({Key? key, required this.models}) : super(key: key); @override @@ -22,6 +21,7 @@ class _CategoryPageState extends State with TickerProviderStateMixin { int _index = 0; late TabController _tabController; + @override void initState() { super.initState(); @@ -104,7 +104,7 @@ class _CategoryPageState extends State controller: _tabController, physics: NeverScrollableScrollPhysics(), children: - widget.models.map((e) => CategorySubView(model: e)).toList(), + widget.models.map((e) => CategorySubView(model: e)).toList(), ).expand(), ], ), diff --git a/lib/ui/market/category/category_sub_card.dart b/lib/ui/market/category/category_sub_card.dart index a2829f90..93e99236 100644 --- a/lib/ui/market/category/category_sub_card.dart +++ b/lib/ui/market/category/category_sub_card.dart @@ -1,17 +1,16 @@ +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/models/market/market_category_model.dart'; +import 'package:aku_new_community/ui/market/goods/goods_list_view.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/material.dart'; - import 'package:get/get.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/models/market/market_category_model.dart'; -import 'package:aku_community/ui/market/goods/goods_list_view.dart'; -import 'package:aku_community/utils/headers.dart'; - class CategorySubCard extends StatelessWidget { final List subModels; final MarketCategoryModel selectModel; final MarketCategoryModel model; + const CategorySubCard({ Key? key, required this.model, diff --git a/lib/ui/market/category/category_sub_view.dart b/lib/ui/market/category/category_sub_view.dart index ef3b0e81..05c6c01b 100644 --- a/lib/ui/market/category/category_sub_view.dart +++ b/lib/ui/market/category/category_sub_view.dart @@ -1,13 +1,12 @@ +import 'package:aku_new_community/models/market/display_category_model.dart'; +import 'package:aku_new_community/models/market/market_category_model.dart'; +import 'package:aku_new_community/ui/market/category/category_sub_card.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; -import 'package:aku_community/models/market/display_category_model.dart'; -import 'package:aku_community/models/market/market_category_model.dart'; -import 'package:aku_community/ui/market/category/category_sub_card.dart'; - class CategorySubView extends StatefulWidget { final MarketCategoryModel model; + CategorySubView({Key? key, required this.model}) : super(key: key); @override @@ -17,6 +16,7 @@ class CategorySubView extends StatefulWidget { class _CategorySubViewState extends State with AutomaticKeepAliveClientMixin { List _models = []; + @override Widget build(BuildContext context) { super.build(context); diff --git a/lib/ui/market/category/new_category_page.dart b/lib/ui/market/category/new_category_page.dart index b71f0736..8413e124 100644 --- a/lib/ui/market/category/new_category_page.dart +++ b/lib/ui/market/category/new_category_page.dart @@ -1,22 +1,18 @@ -import 'package:aku_community/model/good/category_model.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/model/good/category_model.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:get/get.dart'; - -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/models/market/market_category_model.dart'; -import 'package:aku_community/ui/market/category/category_sub_view.dart'; -import 'package:aku_community/ui/market/search/search_goods_page.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - import 'new_category_sub_view.dart'; class NewCategoryPage extends StatefulWidget { final List models; final int index; - NewCategoryPage({Key? key, required this.models, required this.index}) : super(key: key); + + NewCategoryPage({Key? key, required this.models, required this.index}) + : super(key: key); @override _NewCategoryPageState createState() => _NewCategoryPageState(); @@ -26,11 +22,13 @@ class _NewCategoryPageState extends State with TickerProviderStateMixin { int _index = 0; late TabController _tabController; + @override void initState() { super.initState(); - _index=widget.index; - _tabController = TabController(length: widget.models.length, vsync: this,initialIndex: widget.index); + _index = widget.index; + _tabController = TabController( + length: widget.models.length, vsync: this, initialIndex: widget.index); } @override @@ -76,7 +74,7 @@ class _NewCategoryPageState extends State setState(() {}); }, child: Text( - item.name??'', + item.name ?? '', style: TextStyle( color: sameIndex ? kPrimaryColor : ktextPrimary, ), diff --git a/lib/ui/market/category/new_category_sub_card.dart b/lib/ui/market/category/new_category_sub_card.dart index 2bc68719..9bc8b918 100644 --- a/lib/ui/market/category/new_category_sub_card.dart +++ b/lib/ui/market/category/new_category_sub_card.dart @@ -1,22 +1,16 @@ -import 'package:aku_community/model/good/category_model.dart'; -import 'package:aku_community/ui/market/search/search_goods_page.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/good/category_model.dart'; +import 'package:aku_new_community/ui/market/search/search_goods_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/material.dart'; - import 'package:get/get.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/models/market/market_category_model.dart'; -import 'package:aku_community/ui/market/goods/goods_list_view.dart'; -import 'package:aku_community/utils/headers.dart'; - class NewCategorySubCard extends StatelessWidget { final CategoryListSecond subModels; + const NewCategorySubCard({ Key? key, - required this.subModels, - }) : super(key: key); @override @@ -26,7 +20,9 @@ class NewCategorySubCard extends StatelessWidget { children: [ Spacer(), FadeInImage.assetNetwork( - image:API.image(subModels.imgUrls!.isNotEmpty? subModels.imgUrls!.first :''),//subModels.imgUrls!.isNotEmpty? subModels.imgUrls!.first :'', + image: API.image( + subModels.imgUrls!.isNotEmpty ? subModels.imgUrls!.first : ''), + //subModels.imgUrls!.isNotEmpty? subModels.imgUrls!.first :'', placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, height: 75.w, width: 75.w, @@ -36,7 +32,7 @@ class NewCategorySubCard extends StatelessWidget { alignment: Alignment.center, width: 110.w, child: Text( - subModels.name??'', + subModels.name ?? '', style: TextStyle( fontSize: 24.sp, color: Color(0xFF4A4B51), @@ -49,7 +45,10 @@ class NewCategorySubCard extends StatelessWidget { ], ), onPressed: () async { - Get.to(()=> SearchGoodsPage(categoryName:subModels.name ,categoryId:subModels.id ,)); + Get.to(() => SearchGoodsPage( + categoryName: subModels.name, + categoryId: subModels.id, + )); // await Get.to( // () => GoodsListView( // model: model, diff --git a/lib/ui/market/category/new_category_sub_view.dart b/lib/ui/market/category/new_category_sub_view.dart index 169ea0b1..8993a495 100644 --- a/lib/ui/market/category/new_category_sub_view.dart +++ b/lib/ui/market/category/new_category_sub_view.dart @@ -1,17 +1,12 @@ -import 'package:aku_community/model/good/category_model.dart'; +import 'package:aku_new_community/model/good/category_model.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/models/market/market_category_model.dart'; -import 'package:aku_community/ui/market/category/category_sub_view.dart'; -import 'package:aku_community/ui/market/search/search_goods_page.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/ui/market/category/category_sub_card.dart'; - import 'new_category_sub_card.dart'; class NewCategorySubView extends StatefulWidget { final CategoryModel model; + NewCategorySubView({Key? key, required this.model}) : super(key: key); @override @@ -24,16 +19,14 @@ class _NewCategorySubViewState extends State Widget build(BuildContext context) { super.build(context); return ListView.builder( - itemBuilder: (context, index) { - return _SecondCard( - widget.model.categoryList![index] - ); - }, - itemCount: widget.model.categoryList!.length, + itemBuilder: (context, index) { + return _SecondCard(widget.model.categoryList![index]); + }, + itemCount: widget.model.categoryList!.length, ); } - - _SecondCard(CategoryList item){ + + _SecondCard(CategoryList item) { return Container( padding: EdgeInsets.only(top: 20.w), decoration: BoxDecoration( @@ -46,7 +39,7 @@ class _NewCategorySubViewState extends State children: [ 20.wb, Text( - item.name??'', + item.name ?? '', style: TextStyle( fontSize: 28.sp, color: Color(0xFF333333), @@ -67,7 +60,6 @@ class _NewCategorySubViewState extends State ); }, itemCount: item.categoryListSecond!.length, - ), ], ), diff --git a/lib/ui/market/collection/collection_func.dart b/lib/ui/market/collection/collection_func.dart index 546d0452..00dffd37 100644 --- a/lib/ui/market/collection/collection_func.dart +++ b/lib/ui/market/collection/collection_func.dart @@ -1,9 +1,7 @@ -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/collection/collection_goods_model.dart'; -import 'package:aku_community/models/market/goods_item.dart'; -import 'package:aku_community/models/market/order/order_detail_model.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/models/collection/collection_goods_model.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; class CollectionFunc { ///加入和取消收藏 @@ -12,11 +10,9 @@ class CollectionFunc { params: {"jcookGoodsId": jcookGoodsId}, showMessage: true); } - /// 获取此供应商热度最高的商品 static Future> getCollectionList() async { - BaseModel baseModel = - await NetUtil().get(API.market.collectionList); + BaseModel baseModel = await NetUtil().get(API.market.collectionList); if (baseModel.status == true && baseModel.data != null) { return (baseModel.data as List) .map((e) => CollectionGoodsModel.fromJson(e)) @@ -25,66 +21,65 @@ class CollectionFunc { return []; } - - // ///确认收货 - // static Future confirmReceive(int goodsAppointmentId) async { - // await NetUtil().get(API.market.confirmReceive, - // params: {"goodsAppointmentId": goodsAppointmentId}, showMessage: true); - // } - // - // ///申请退换 - // static Future refundOrder( - // int goodsAppointmentId, String reson, int type) async { - // BaseModel baseModel = await NetUtil().get(API.market.refundOrder, - // params: { - // "goodsAppointmentId": goodsAppointmentId, - // "backReason": reson, - // "backType": type - // }, - // showMessage: true); - // return baseModel; - // } - // - // ///取消预约 - // static Future cancelOrder(int goodsAppointmentId) async { - // BaseModel baseModel = await NetUtil().get(API.market.cancleOrder, - // params: {"goodsAppointmentId": goodsAppointmentId}, showMessage: true); - // return baseModel; - // } - // - // ///商品评价 - // static Future goodsEvalution( - // int goodsAppointmentId, int rating, String evaluationReason) async { - // BaseModel baseModel = await NetUtil().get(API.market.goodsEvaluation, - // params: { - // "goodsAppointmentId": goodsAppointmentId, - // "score": rating, - // "evaluationReason": evaluationReason - // }, - // showMessage: true); - // return baseModel; - // } - // - // /// 获取此供应商热度最高的商品 - // static Future> getHotTops(int supplierId) async { - // BaseModel baseModel = - // await NetUtil().get(API.market.suppliyerHotTop, params: { - // "supplierId": supplierId, - // }); - // if (baseModel.status == true && baseModel.data != null) { - // return (baseModel.data as List) - // .map((e) => GoodsItem.fromJson(e)) - // .toList(); - // } - // return []; - // } - // - // ///获取商品详情 - // static Future getOrderDetail(int goodsAppointmentId) async { - // BaseModel baseModel = await NetUtil().get(API.market.orderDetail, - // params: {"goodsAppointmentId": goodsAppointmentId}); - // if (baseModel.status! && baseModel.data != null) { - // return OrderDetailModel.fromJson(baseModel.data); - // } - // } +// ///确认收货 +// static Future confirmReceive(int goodsAppointmentId) async { +// await NetUtil().get(API.market.confirmReceive, +// params: {"goodsAppointmentId": goodsAppointmentId}, showMessage: true); +// } +// +// ///申请退换 +// static Future refundOrder( +// int goodsAppointmentId, String reson, int type) async { +// BaseModel baseModel = await NetUtil().get(API.market.refundOrder, +// params: { +// "goodsAppointmentId": goodsAppointmentId, +// "backReason": reson, +// "backType": type +// }, +// showMessage: true); +// return baseModel; +// } +// +// ///取消预约 +// static Future cancelOrder(int goodsAppointmentId) async { +// BaseModel baseModel = await NetUtil().get(API.market.cancleOrder, +// params: {"goodsAppointmentId": goodsAppointmentId}, showMessage: true); +// return baseModel; +// } +// +// ///商品评价 +// static Future goodsEvalution( +// int goodsAppointmentId, int rating, String evaluationReason) async { +// BaseModel baseModel = await NetUtil().get(API.market.goodsEvaluation, +// params: { +// "goodsAppointmentId": goodsAppointmentId, +// "score": rating, +// "evaluationReason": evaluationReason +// }, +// showMessage: true); +// return baseModel; +// } +// +// /// 获取此供应商热度最高的商品 +// static Future> getHotTops(int supplierId) async { +// BaseModel baseModel = +// await NetUtil().get(API.market.suppliyerHotTop, params: { +// "supplierId": supplierId, +// }); +// if (baseModel.status == true && baseModel.data != null) { +// return (baseModel.data as List) +// .map((e) => GoodsItem.fromJson(e)) +// .toList(); +// } +// return []; +// } +// +// ///获取商品详情 +// static Future getOrderDetail(int goodsAppointmentId) async { +// BaseModel baseModel = await NetUtil().get(API.market.orderDetail, +// params: {"goodsAppointmentId": goodsAppointmentId}); +// if (baseModel.status! && baseModel.data != null) { +// return OrderDetailModel.fromJson(baseModel.data); +// } +// } } diff --git a/lib/ui/market/collection/collection_list_card.dart b/lib/ui/market/collection/collection_list_card.dart index 241f9a86..be4635f4 100644 --- a/lib/ui/market/collection/collection_list_card.dart +++ b/lib/ui/market/collection/collection_list_card.dart @@ -1,21 +1,17 @@ -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/models/collection/collection_goods_model.dart'; -import 'package:aku_community/models/search/search_goods_model.dart'; -import 'package:aku_community/ui/market/collection/collection_func.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/models/collection/collection_goods_model.dart'; +import 'package:aku_new_community/ui/market/collection/collection_func.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/material.dart'; - -import 'package:bot_toast/bot_toast.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; -import 'package:get/get.dart'; - -import 'package:aku_community/constants/api.dart'; - -import 'package:aku_community/utils/headers.dart'; class CollectionListCard extends StatelessWidget { final CollectionGoodsModel model; final EasyRefreshController refreshController; - const CollectionListCard({Key? key, required this.model, required this.refreshController}) : super(key: key); + + const CollectionListCard( + {Key? key, required this.model, required this.refreshController}) + : super(key: key); @override Widget build(BuildContext context) { @@ -74,26 +70,26 @@ class CollectionListCard extends StatelessWidget { Spacer(), 20.hb, RichText( - text: TextSpan( - children: [ - TextSpan( - text: '¥', - style: TextStyle( - color: Colors.red, - fontSize: 28.sp, - ), + text: TextSpan( + children: [ + TextSpan( + text: '¥', + style: TextStyle( + color: Colors.red, + fontSize: 28.sp, ), - TextSpan( - text: '${model.sellPrice ?? 0} ', - style: TextStyle( - color: Colors.red, - fontWeight: FontWeight.bold, - fontSize: 40.sp, - ), + ), + TextSpan( + text: '${model.sellPrice ?? 0} ', + style: TextStyle( + color: Colors.red, + fontWeight: FontWeight.bold, + fontSize: 40.sp, ), - ], - ), + ), + ], ), + ), Row( mainAxisAlignment: MainAxisAlignment.start, @@ -133,7 +129,8 @@ class CollectionListCard extends StatelessWidget { ), ), TextSpan( - text: (model.discountPrice??0)>(model.sellPrice??0) + text: (model.discountPrice ?? 0) > + (model.sellPrice ?? 0) ? _getDiscount(model.sellPrice ?? -1, model.discountPrice ?? -1) : '暂无折扣', @@ -158,19 +155,16 @@ class CollectionListCard extends StatelessWidget { // ), // 24.wb, GestureDetector( - onTap: () async { - await CollectionFunc.collection(model.id!); - + onTap: () async { + await CollectionFunc.collection(model.id!); refreshController.callRefresh(); - - }, - child:Image.asset( - R.ASSETS_ICONS_DELETE_PNG, - width: 44.w, - height: 44.w, - ) - ), + }, + child: Image.asset( + R.ASSETS_ICONS_DELETE_PNG, + width: 44.w, + height: 44.w, + )), ], ), 44.wb, diff --git a/lib/ui/market/collection/my_collection.dart b/lib/ui/market/collection/my_collection.dart index 34b0b89b..2b689f9e 100644 --- a/lib/ui/market/collection/my_collection.dart +++ b/lib/ui/market/collection/my_collection.dart @@ -1,30 +1,14 @@ -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/models/collection/collection_goods_model.dart'; -import 'package:aku_community/models/search/search_goods_model.dart'; -import 'package:aku_community/provider/user_provider.dart'; -import 'package:aku_community/ui/market/search/goods_list_card.dart'; -import 'package:aku_community/utils/hive_store.dart'; -import 'package:aku_community/widget/bee_back_button.dart'; +import 'package:aku_new_community/models/collection/collection_goods_model.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; -import 'package:provider/provider.dart'; -import 'package:waterfall_flow/waterfall_flow.dart'; - -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/market/goods_item.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/ui/market/goods/goods_card.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; import 'collection_func.dart'; import 'collection_list_card.dart'; - class MyCollectionPage extends StatefulWidget { MyCollectionPage({Key? key}) : super(key: key); @@ -35,12 +19,12 @@ class MyCollectionPage extends StatefulWidget { class MyCollectionPageState extends State { // TextEditingController _editingController = TextEditingController(); EasyRefreshController _refreshController = EasyRefreshController(); + // List _searchHistory = []; String _searchText = ""; late List _models; bool _onload = true; - @override void initState() { super.initState(); @@ -54,74 +38,77 @@ class MyCollectionPageState extends State { @override Widget build(BuildContext context) { - return BeeScaffold( - leading: Navigator.canPop(context) - ? IconButton( - onPressed: () => Get.back(result: true), - icon: Icon( - CupertinoIcons.chevron_back, - color: Colors.black, - ), - ) - : SizedBox(), - titleSpacing: 0, - bgColor: Color(0xFFF9F9F9), - bodyColor: Color(0xFFF9F9F9), - title: '收藏的商品', - body:Container( - color: Color(0xFFF2F3F4), - child: EasyRefresh( - firstRefresh: true, - header: MaterialHeader(), - controller: _refreshController, - onRefresh: () async { - _models = await CollectionFunc.getCollectionList(); - _onload = false; - setState(() {}); - }, - child: _onload - ? Container() - : ListView( - padding: EdgeInsets.symmetric(horizontal: 20.w), - children: [..._models.map((e) => CollectionListCard( model: e,refreshController: _refreshController,)).toList()], + leading: Navigator.canPop(context) + ? IconButton( + onPressed: () => Get.back(result: true), + icon: Icon( + CupertinoIcons.chevron_back, + color: Colors.black, + ), + ) + : SizedBox(), + titleSpacing: 0, + bgColor: Color(0xFFF9F9F9), + bodyColor: Color(0xFFF9F9F9), + title: '收藏的商品', + body: Container( + color: Color(0xFFF2F3F4), + child: EasyRefresh( + firstRefresh: true, + header: MaterialHeader(), + controller: _refreshController, + onRefresh: () async { + _models = await CollectionFunc.getCollectionList(); + _onload = false; + setState(() {}); + }, + child: _onload + ? Container() + : ListView( + padding: EdgeInsets.symmetric(horizontal: 20.w), + children: [ + ..._models + .map((e) => CollectionListCard( + model: e, + refreshController: _refreshController, + )) + .toList() + ], + ), ), - ), - // BeeListView( - // path: API.market.collectionList, - // controller: _refreshController, - // extraParams: { - // "keyword":_searchText, - // }, - // convert: (model) => model.tableList! - // .map((e) => CollectionGoodsModel.fromJson(e)) - // .toList(), - // builder: (items) { - // return ListView.separated( - // padding: EdgeInsets.only(top: 10.w, - // left: 20.w, right: 20.w, bottom: 32.w), - // // gridDelegate: SliverWaterfallFlowDelegateWithFixedCrossAxisCount( - // // crossAxisCount: 2, - // // mainAxisSpacing: 20.w, - // // crossAxisSpacing: 20.w, - // // ), - // itemBuilder: (context, index) { - // final item = items[index]; - // return Container(width: 100.w,height: 100.w,color: Colors.red,); - // CollectionListCard( - // model: item,); //GoodsCard(item: item); - // }, - // separatorBuilder: (_, __) { - // return 32.w.heightBox; - // }, - // itemCount: items.length, - // ); - // }, - // ), - ) - ); + // BeeListView( + // path: API.market.collectionList, + // controller: _refreshController, + // extraParams: { + // "keyword":_searchText, + // }, + // convert: (model) => model.tableList! + // .map((e) => CollectionGoodsModel.fromJson(e)) + // .toList(), + // builder: (items) { + // return ListView.separated( + // padding: EdgeInsets.only(top: 10.w, + // left: 20.w, right: 20.w, bottom: 32.w), + // // gridDelegate: SliverWaterfallFlowDelegateWithFixedCrossAxisCount( + // // crossAxisCount: 2, + // // mainAxisSpacing: 20.w, + // // crossAxisSpacing: 20.w, + // // ), + // itemBuilder: (context, index) { + // final item = items[index]; + // return Container(width: 100.w,height: 100.w,color: Colors.red,); + // CollectionListCard( + // model: item,); //GoodsCard(item: item); + // }, + // separatorBuilder: (_, __) { + // return 32.w.heightBox; + // }, + // itemCount: items.length, + // ); + // }, + // ), + )); } - - } diff --git a/lib/ui/market/goods/goods_card.dart b/lib/ui/market/goods/goods_card.dart index a9d671d5..136ae5f8 100644 --- a/lib/ui/market/goods/goods_card.dart +++ b/lib/ui/market/goods/goods_card.dart @@ -1,17 +1,15 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/models/market/goods_item.dart'; +import 'package:aku_new_community/ui/market/goods/goods_detail_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/material.dart'; - import 'package:get/get.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/models/market/goods_item.dart'; -import 'package:aku_community/ui/market/goods/goods_detail_page.dart'; -import 'package:aku_community/utils/headers.dart'; - class GoodsCard extends StatelessWidget { final GoodsItem item; final bool? border; + const GoodsCard({Key? key, required this.item, this.border}) : super(key: key); @@ -41,9 +39,9 @@ class GoodsCard extends StatelessWidget { child: Stack( children: [ FadeInImage.assetNetwork( - placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, - image: ImgModel.first(item.imgList), - fit: BoxFit.fill, + placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, + image: ImgModel.first(item.imgList), + fit: BoxFit.fill, imageErrorBuilder: (context, error, stackTrace) { return Image.asset(R.ASSETS_IMAGES_PLACEHOLDER_WEBP); }, @@ -72,30 +70,26 @@ class GoodsCard extends StatelessWidget { ), Container( padding: EdgeInsets.only( - left: 16.w,right: 16.w, + left: 16.w, + right: 16.w, top: 10.w, ), child: Text( item.title, maxLines: 2, overflow: TextOverflow.ellipsis, - style: TextStyle( - fontSize: 28.sp, - color: ktextPrimary - ), + style: TextStyle(fontSize: 28.sp, color: ktextPrimary), ), ), - Padding( - padding: EdgeInsets.only( - left: 16.w,right: 16.w, - top: 10.w, - ), - child: Container( + padding: EdgeInsets.only( + left: 16.w, + right: 16.w, + top: 10.w, + ), + child: Container( child: _getIcon(1), - ) - ), - + )), 10.hb, Padding( padding: EdgeInsets.symmetric( @@ -123,7 +117,6 @@ class GoodsCard extends StatelessWidget { ), ), ), - Padding( padding: EdgeInsets.symmetric( horizontal: 16.w, @@ -136,7 +129,6 @@ class GoodsCard extends StatelessWidget { style: TextStyle( color: ktextSubColor, fontSize: 20.sp, - ), ), TextSpan( @@ -151,7 +143,7 @@ class GoodsCard extends StatelessWidget { ), ), ), - Padding( + Padding( padding: EdgeInsets.symmetric( horizontal: 16.w, ), @@ -163,7 +155,6 @@ class GoodsCard extends StatelessWidget { style: TextStyle( color: ktextSubColor, fontSize: 20.sp, - ), ), TextSpan( @@ -171,28 +162,27 @@ class GoodsCard extends StatelessWidget { style: TextStyle( color: ktextSubColor, fontSize: 20.sp, - ), ), ], ), ), ), - ], ), ); } - - Widget _getIcon(int type){ - if(type==1){ + Widget _getIcon(int type) { + if (type == 1) { return Container( width: 86.w, height: 26.w, alignment: Alignment.center, decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(4.w), ), + borderRadius: BorderRadius.all( + Radius.circular(4.w), + ), gradient: LinearGradient( begin: FractionalOffset.centerLeft, end: FractionalOffset.centerRight, @@ -200,21 +190,19 @@ class GoodsCard extends StatelessWidget { ), ), child: Text( - '京东自营', - style: TextStyle( - fontSize: 18.sp, - color: kForeGroundColor - ), + '京东自营', + style: TextStyle(fontSize: 18.sp, color: kForeGroundColor), ), ); - } - else if(type==2){ + } else if (type == 2) { return Container( alignment: Alignment.center, width: 86.w, height: 30.w, decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(4.w), ), + borderRadius: BorderRadius.all( + Radius.circular(4.w), + ), gradient: LinearGradient( begin: FractionalOffset.centerLeft, end: FractionalOffset.centerRight, @@ -223,18 +211,10 @@ class GoodsCard extends StatelessWidget { ), child: Text( '京东POP', - style: TextStyle( - fontSize: 18.sp, - color: kForeGroundColor - ), + style: TextStyle(fontSize: 18.sp, color: kForeGroundColor), ), ); - - } - else + } else return SizedBox(); } - - - } diff --git a/lib/ui/market/goods/goods_detail_page.dart b/lib/ui/market/goods/goods_detail_page.dart index 39fe65c5..aa6a2f1c 100644 --- a/lib/ui/market/goods/goods_detail_page.dart +++ b/lib/ui/market/goods/goods_detail_page.dart @@ -1,21 +1,21 @@ -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/models/market/goods_detail_model.dart'; -import 'package:aku_community/models/market/goods_item.dart'; -import 'package:aku_community/pages/sign/sign_in_page.dart'; -import 'package:aku_community/provider/user_provider.dart'; -import 'package:aku_community/ui/market/goods/goods_card.dart'; -import 'package:aku_community/ui/market/goods/goods_order_detail_page.dart'; -import 'package:aku_community/ui/market/search/search_goods_page.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_back_button.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; -import 'package:aku_community/widget/others/user_tool.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/models/market/goods_detail_model.dart'; +import 'package:aku_new_community/models/market/goods_item.dart'; +import 'package:aku_new_community/pages/sign/sign_in_page.dart'; +import 'package:aku_new_community/provider/user_provider.dart'; +import 'package:aku_new_community/ui/market/goods/goods_card.dart'; +import 'package:aku_new_community/ui/market/goods/goods_order_detail_page.dart'; +import 'package:aku_new_community/ui/market/search/search_goods_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_back_button.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/ui/market/goods/goods_list_view.dart b/lib/ui/market/goods/goods_list_view.dart index 1a9b98d2..55bce192 100644 --- a/lib/ui/market/goods/goods_list_view.dart +++ b/lib/ui/market/goods/goods_list_view.dart @@ -1,21 +1,20 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/models/market/market_category_model.dart'; +import 'package:aku_new_community/ui/market/goods/goods_tab_list_view.dart'; +import 'package:aku_new_community/ui/market/search/search_goods_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:get/get.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/models/market/market_category_model.dart'; -import 'package:aku_community/ui/market/goods/goods_tab_list_view.dart'; -import 'package:aku_community/ui/market/search/search_goods_page.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class GoodsListView extends StatefulWidget { final MarketCategoryModel model; final MarketCategoryModel? selectSubModel; final List subModels; + GoodsListView({ Key? key, required this.model, @@ -106,6 +105,7 @@ class GoodsSubTypeButton extends StatelessWidget { final MarketCategoryModel model; final MarketCategoryModel? groupValue; final VoidCallback onTap; + const GoodsSubTypeButton({ Key? key, required this.model, diff --git a/lib/ui/market/goods/goods_order_detail_page.dart b/lib/ui/market/goods/goods_order_detail_page.dart index 0faea93d..12022244 100644 --- a/lib/ui/market/goods/goods_order_detail_page.dart +++ b/lib/ui/market/goods/goods_order_detail_page.dart @@ -1,19 +1,19 @@ -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/extensions/widget_list_ext.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/models/market/goods_detail_model.dart'; -import 'package:aku_community/pages/life_pay/pay_finish_page.dart'; -import 'package:aku_community/pages/life_pay/pay_util.dart'; -import 'package:aku_community/ui/profile/house/house_owners_page.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_divider.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bee_numberic_button.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; -import 'package:aku_community/widget/others/user_tool.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/extensions/widget_list_ext.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/models/market/goods_detail_model.dart'; +import 'package:aku_new_community/pages/life_pay/pay_finish_page.dart'; +import 'package:aku_new_community/pages/life_pay/pay_util.dart'; +import 'package:aku_new_community/ui/profile/house/house_owners_page.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bee_numberic_button.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; @@ -25,6 +25,7 @@ class GoodsOrderDetailPage extends StatefulWidget { final GoodsDetailModel model; final String name; final String phone; + GoodsOrderDetailPage( {Key? key, required this.model, required this.name, required this.phone}) : super(key: key); @@ -39,6 +40,7 @@ class _GoodsOrderDetailPageState extends State { ///商品数量 int _num = 1; + @override void initState() { super.initState(); diff --git a/lib/ui/market/goods/goods_tab_list_view.dart b/lib/ui/market/goods/goods_tab_list_view.dart index ff44cfb8..25c5c306 100644 --- a/lib/ui/market/goods/goods_tab_list_view.dart +++ b/lib/ui/market/goods/goods_tab_list_view.dart @@ -1,17 +1,16 @@ +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/models/market/goods_item.dart'; +import 'package:aku_new_community/models/market/market_category_model.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/ui/market/goods/goods_card.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:waterfall_flow/waterfall_flow.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/market/goods_item.dart'; -import 'package:aku_community/models/market/market_category_model.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/ui/market/goods/goods_card.dart'; -import 'package:aku_community/utils/headers.dart'; - class GoodsTabListView extends StatefulWidget { final MarketCategoryModel model; + GoodsTabListView({Key? key, required this.model}) : super(key: key); @override @@ -21,6 +20,7 @@ class GoodsTabListView extends StatefulWidget { class _GoodsTabListViewState extends State with AutomaticKeepAliveClientMixin { EasyRefreshController _refreshController = EasyRefreshController(); + @override Widget build(BuildContext context) { super.build(context); diff --git a/lib/ui/market/market_home_goods_card.dart b/lib/ui/market/market_home_goods_card.dart index 8cfad035..1e4332c9 100644 --- a/lib/ui/market/market_home_goods_card.dart +++ b/lib/ui/market/market_home_goods_card.dart @@ -1,19 +1,14 @@ -import 'package:aku_community/models/market/order/goods_home_model.dart'; -import 'package:aku_community/ui/market/search/good_detail_page.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/models/market/order/goods_home_model.dart'; +import 'package:aku_new_community/ui/market/search/good_detail_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/material.dart'; - import 'package:get/get.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/models/market/goods_item.dart'; -import 'package:aku_community/ui/market/goods/goods_detail_page.dart'; -import 'package:aku_community/utils/headers.dart'; - class MarketHomeGoodsCard extends StatelessWidget { final GoodsHomeModel item; final bool? border; + const MarketHomeGoodsCard({Key? key, required this.item, this.border}) : super(key: key); @@ -25,12 +20,12 @@ class MarketHomeGoodsCard extends StatelessWidget { shape: !(border ?? false) ? null : RoundedRectangleBorder( - borderRadius: BorderRadius.circular(8.w), - side: BorderSide(color: Color(0xFFC4C4C4))), + borderRadius: BorderRadius.circular(8.w), + side: BorderSide(color: Color(0xFFC4C4C4))), padding: EdgeInsets.zero, onPressed: () { Get.to( - () => GoodDetailPage(goodId: item.id!), + () => GoodDetailPage(goodId: item.id!), ); }, child: Column( @@ -45,7 +40,7 @@ class MarketHomeGoodsCard extends StatelessWidget { children: [ FadeInImage.assetNetwork( placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, - image: item.mainPhoto??'', + image: item.mainPhoto ?? '', fit: BoxFit.fill, imageErrorBuilder: (context, error, stackTrace) { return Image.asset(R.ASSETS_IMAGES_PLACEHOLDER_WEBP); @@ -75,30 +70,26 @@ class MarketHomeGoodsCard extends StatelessWidget { ), Container( padding: EdgeInsets.only( - left: 16.w,right: 16.w, + left: 16.w, + right: 16.w, top: 10.w, ), child: Text( - item.skuName??'', + item.skuName ?? '', maxLines: 2, overflow: TextOverflow.ellipsis, - style: TextStyle( - fontSize: 28.sp, - color: ktextPrimary - ), + style: TextStyle(fontSize: 28.sp, color: ktextPrimary), ), ), - Padding( padding: EdgeInsets.only( - left: 16.w,right: 16.w, + left: 16.w, + right: 16.w, top: 10.w, ), child: Container( child: _getIcon(1), - ) - ), - + )), 10.hb, Padding( padding: EdgeInsets.symmetric( @@ -115,7 +106,7 @@ class MarketHomeGoodsCard extends StatelessWidget { ), ), TextSpan( - text: '${item.sellPrice??''} ', + text: '${item.sellPrice ?? ''} ', style: TextStyle( color: Colors.red, fontWeight: FontWeight.bold, @@ -126,7 +117,6 @@ class MarketHomeGoodsCard extends StatelessWidget { ), ), ), - Padding( padding: EdgeInsets.symmetric( horizontal: 16.w, @@ -139,11 +129,12 @@ class MarketHomeGoodsCard extends StatelessWidget { style: TextStyle( color: ktextSubColor, fontSize: 20.sp, - ), ), TextSpan( - text: item.discountPrice==null?'':'¥${item.discountPrice??''}', + text: item.discountPrice == null + ? '' + : '¥${item.discountPrice ?? ''}', style: TextStyle( color: ktextSubColor, fontSize: 20.sp, @@ -166,25 +157,22 @@ class MarketHomeGoodsCard extends StatelessWidget { style: TextStyle( color: ktextSubColor, fontSize: 20.sp, - ), ), TextSpan( - text: (item.discountPrice??0)>(item.sellPrice??0) - ? _getDiscount(item.sellPrice ?? -1, - item.discountPrice ?? -1) + text: (item.discountPrice ?? 0) > (item.sellPrice ?? 0) + ? _getDiscount( + item.sellPrice ?? -1, item.discountPrice ?? -1) : '暂无折扣', style: TextStyle( color: ktextSubColor, fontSize: 20.sp, - ), ), ], ), ), ), - ], ), ); @@ -197,15 +185,16 @@ class MarketHomeGoodsCard extends StatelessWidget { return count + '折'; } - - Widget _getIcon(int type){ - if(type==1){ + Widget _getIcon(int type) { + if (type == 1) { return Container( width: 86.w, height: 26.w, alignment: Alignment.center, decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(4.w), ), + borderRadius: BorderRadius.all( + Radius.circular(4.w), + ), gradient: LinearGradient( begin: FractionalOffset.centerLeft, end: FractionalOffset.centerRight, @@ -214,20 +203,18 @@ class MarketHomeGoodsCard extends StatelessWidget { ), child: Text( '京东自营', - style: TextStyle( - fontSize: 18.sp, - color: kForeGroundColor - ), + style: TextStyle(fontSize: 18.sp, color: kForeGroundColor), ), ); - } - else if(type==2){ + } else if (type == 2) { return Container( alignment: Alignment.center, width: 86.w, height: 30.w, decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(4.w), ), + borderRadius: BorderRadius.all( + Radius.circular(4.w), + ), gradient: LinearGradient( begin: FractionalOffset.centerLeft, end: FractionalOffset.centerRight, @@ -236,18 +223,10 @@ class MarketHomeGoodsCard extends StatelessWidget { ), child: Text( '京东POP', - style: TextStyle( - fontSize: 18.sp, - color: kForeGroundColor - ), + style: TextStyle(fontSize: 18.sp, color: kForeGroundColor), ), ); - - } - else + } else return SizedBox(); } - - - } diff --git a/lib/ui/market/market_page.dart b/lib/ui/market/market_page.dart index f4826056..da14bb2e 100644 --- a/lib/ui/market/market_page.dart +++ b/lib/ui/market/market_page.dart @@ -1,27 +1,24 @@ -// import 'package:aku_community/base/base_style.dart'; - -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/model/community/swiper_model.dart'; -import 'package:aku_community/model/good/category_model.dart'; -import 'package:aku_community/model/good/market_swiper_model.dart'; -import 'package:aku_community/models/market/goods_classification.dart'; -import 'package:aku_community/models/market/goods_popular_model.dart'; -import 'package:aku_community/models/market/order/goods_home_model.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/ui/community/community_func.dart'; -import 'package:aku_community/ui/home/public_infomation/public_information_detail_page.dart'; -import 'package:aku_community/ui/market/search/good_detail_page.dart'; -import 'package:aku_community/ui/market/search/search_goods_page.dart'; -import 'package:aku_community/ui/market/shop_car/shop_car_page.dart'; -import 'package:aku_community/ui/market/widget/animated_home_background.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/base_list_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/home/home_sliver_app_bar.dart'; -import 'package:aku_community/widget/others/rectIndicator.dart'; -import 'package:bot_toast/bot_toast.dart'; +// import 'package:aku_new_community/base/base_style.dart'; + +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/good/category_model.dart'; +import 'package:aku_new_community/model/good/market_swiper_model.dart'; +import 'package:aku_new_community/models/market/goods_classification.dart'; +import 'package:aku_new_community/models/market/goods_popular_model.dart'; +import 'package:aku_new_community/models/market/order/goods_home_model.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/ui/community/community_func.dart'; +import 'package:aku_new_community/ui/market/search/good_detail_page.dart'; +import 'package:aku_new_community/ui/market/search/search_goods_page.dart'; +import 'package:aku_new_community/ui/market/shop_car/shop_car_page.dart'; +import 'package:aku_new_community/ui/market/widget/animated_home_background.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_list_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/home/home_sliver_app_bar.dart'; +import 'package:aku_new_community/widget/others/rectIndicator.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; @@ -29,11 +26,10 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_swiper_null_safety/flutter_swiper_null_safety.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; +import 'package:velocity_x/velocity_x.dart'; import 'category/new_category_page.dart'; import 'market_home_goods_card.dart'; -import 'package:velocity_x/velocity_x.dart'; - import 'order/order_page.dart'; class MarketPage extends StatefulWidget { @@ -63,7 +59,7 @@ class _MarketPageState extends State double tabBarHeight = 40.w; late TabController _tabController; - // List _swiperModels = []; + // List _swiperModels = []; List _marketSwiperModels = []; List _categoryModels = []; @@ -81,7 +77,7 @@ class _MarketPageState extends State int? orderByPrice; Future updateMarketInfo() async { - _pageNum =1; + _pageNum = 1; BaseListModel baseListModel = await NetUtil().getList( API.market.findRecommendGoodsList, params: { @@ -186,10 +182,9 @@ class _MarketPageState extends State _categoryModels = await CommunityFunc.getCategory(); + var list = await CommunityFunc.getGoodsClassificationList(0); //0获取根目录下的分类 - var list = await CommunityFunc.getGoodsClassificationList(0); //0获取根目录下的分类 - - _goodsClassificationList.replaceRange(0, list.length, list); + _goodsClassificationList.replaceRange(0, list.length, list); _goodsPopularModelList = await CommunityFunc.getGoodsPopularModel(6); @@ -224,7 +219,7 @@ class _MarketPageState extends State _orderType = OrderType.SALES; orderBySalesVolume = 2; orderByPrice = null; - priceIcon = R.ASSETS_ICONS_ICON_PRICE_NORMAL_PNG; + priceIcon = R.ASSETS_ICONS_ICON_PRICE_NORMAL_PNG; await updateMarketInfo(); setState(() {}); }, @@ -287,7 +282,11 @@ class _MarketPageState extends State : FontWeight.normal, ), ), - Image.asset(priceIcon,width: 32.w,height: 32.w,) + Image.asset( + priceIcon, + width: 32.w, + height: 32.w, + ) ], ), height: 80.w, @@ -381,7 +380,9 @@ class _MarketPageState extends State padding: EdgeInsets.only(left: 32.w, right: 32.w), child: GestureDetector( onTap: () { - Get.to(() => OrderPage(initIndex: 0,)); + Get.to(() => OrderPage( + initIndex: 0, + )); }, child: Image.asset(R.ASSETS_ICONS_SHOP_ORDER_PNG, height: 40.w, width: 40.w), @@ -643,9 +644,10 @@ class _MarketPageState extends State // control: new SwiperControl(), autoplay: true, onTap: (index) { - if(_marketSwiperModels[index].jcookGoodsId!=null){ + if (_marketSwiperModels[index].jcookGoodsId != null) { Get.to( - () => GoodDetailPage(goodId: _marketSwiperModels[index].jcookGoodsId!), + () => GoodDetailPage( + goodId: _marketSwiperModels[index].jcookGoodsId!), ); } }, @@ -663,7 +665,9 @@ class _MarketPageState extends State ), child: FadeInImage.assetNetwork( placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, - image:API.image(swiperModel.imgList!.isNotEmpty? swiperModel.imgList!.first.url :''), + image: API.image(swiperModel.imgList!.isNotEmpty + ? swiperModel.imgList!.first.url + : ''), fit: BoxFit.fill, imageErrorBuilder: (context, error, stackTrace) { return Image.asset( @@ -677,7 +681,7 @@ class _MarketPageState extends State _buttonTitle() { Container titles = Container( - key:UniqueKey(), + key: UniqueKey(), alignment: Alignment.center, decoration: BoxDecoration( color: Colors.white, @@ -692,7 +696,7 @@ class _MarketPageState extends State if (index == 9) { return _buildAllTile(); } else { - return _buildTile(_goodsClassificationList[index],index); + return _buildTile(_goodsClassificationList[index], index); } }, itemCount: 10, @@ -708,10 +712,13 @@ class _MarketPageState extends State ); } - _buildTile(GoodsClassification item,int index) { + _buildTile(GoodsClassification item, int index) { return GestureDetector( - onTap: (){ - Get.to(() => NewCategoryPage(models: _categoryModels,index: index,)); + onTap: () { + Get.to(() => NewCategoryPage( + models: _categoryModels, + index: index, + )); }, child: Column( mainAxisAlignment: MainAxisAlignment.center, @@ -741,8 +748,11 @@ class _MarketPageState extends State _buildAllTile() { return GestureDetector( - onTap: () async{ - Get.to(() => NewCategoryPage(models: _categoryModels,index: 0,)); + onTap: () async { + Get.to(() => NewCategoryPage( + models: _categoryModels, + index: 0, + )); }, child: Column( mainAxisAlignment: MainAxisAlignment.center, @@ -842,15 +852,16 @@ class _MarketPageState extends State mainAxisAlignment: MainAxisAlignment.center, children: [ GestureDetector( - onTap:(){ + onTap: () { Get.to( - () => GoodDetailPage(goodId: _goodsPopularModelList[index].id!), + () => GoodDetailPage( + goodId: _goodsPopularModelList[index].id!), ); - }, + }, child: Container( width: 96.w, height: 96.w, - key:UniqueKey(), + key: UniqueKey(), child: FadeInImage.assetNetwork( placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, image: _goodsPopularModelList[index].mainPhoto ?? '', @@ -914,7 +925,6 @@ class _MarketPageState extends State normalTypeButton, salesTypeButton, priceButton, - ], ), ), diff --git a/lib/ui/market/market_page111.dart b/lib/ui/market/market_page111.dart index 2065ac4c..c4a2f208 100644 --- a/lib/ui/market/market_page111.dart +++ b/lib/ui/market/market_page111.dart @@ -1,4 +1,4 @@ -// // import 'package:aku_community/base/base_style.dart'; +// // import 'package:aku_new_community/base/base_style.dart'; // // import 'package:flutter/cupertino.dart'; // import 'package:flutter/material.dart'; @@ -9,23 +9,23 @@ // import 'package:get/get.dart'; // import 'package:waterfall_flow/waterfall_flow.dart'; // -// import 'package:aku_community/constants/api.dart'; -// import 'package:aku_community/models/market/display_category_model.dart'; -// import 'package:aku_community/models/market/goods_item.dart'; -// import 'package:aku_community/models/market/market_category_model.dart'; -// import 'package:aku_community/ui/market/category/category_card.dart'; -// import 'package:aku_community/ui/market/category/category_page.dart'; -// import 'package:aku_community/ui/market/goods/goods_card.dart'; -// import 'package:aku_community/ui/market/order/my_order_page.dart'; -// import 'package:aku_community/ui/market/search/search_goods_page.dart'; -// import 'package:aku_community/utils/headers.dart'; -// import 'package:aku_community/utils/network/base_list_model.dart'; -// import 'package:aku_community/utils/network/net_util.dart'; -// import 'package:aku_community/widget/bee_scaffold.dart'; +// import 'package:aku_new_community/constants/api.dart'; +// import 'package:aku_new_community/models/market/display_category_model.dart'; +// import 'package:aku_new_community/models/market/goods_item.dart'; +// import 'package:aku_new_community/models/market/market_category_model.dart'; +// import 'package:aku_new_community/ui/market/category/category_card.dart'; +// import 'package:aku_new_community/ui/market/category/category_page.dart'; +// import 'package:aku_new_community/ui/market/goods/goods_card.dart'; +// import 'package:aku_new_community/ui/market/order/my_order_page.dart'; +// import 'package:aku_new_community/ui/market/search/search_goods_page.dart'; +// import 'package:aku_new_community/utils/headers.dart'; +// import 'package:aku_new_community/utils/network/base_list_model.dart'; +// import 'package:aku_new_community/utils/network/net_util.dart'; +// import 'package:aku_new_community/widget/bee_scaffold.dart'; // -// // import 'package:aku_community/ui/market/goods/goods_detail_page.dart'; +// // import 'package:aku_new_community/ui/market/goods/goods_detail_page.dart'; // -// // import 'package:aku_community/widget/tab_bar/bee_tab_bar.dart'; +// // import 'package:aku_new_community/widget/tab_bar/bee_tab_bar.dart'; // // class MarketPage111 extends StatefulWidget { // MarketPage111({Key? key}) : super(key: key); diff --git a/lib/ui/market/order/logistics_page.dart b/lib/ui/market/order/logistics_page.dart index b6d2a6f0..a15d1d44 100644 --- a/lib/ui/market/order/logistics_page.dart +++ b/lib/ui/market/order/logistics_page.dart @@ -1,37 +1,24 @@ import 'dart:ui'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/model/order/logistics_model.dart'; -import 'package:aku_community/model/order/order_list_model.dart'; -import 'package:aku_community/model/user/adress_model.dart'; -import 'package:aku_community/models/market/order/goods_home_model.dart'; -import 'package:aku_community/pages/tab_navigator.dart'; -import 'package:aku_community/utils/network/base_list_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/end_button.dart'; -import 'package:aku_community/widget/buttons/line_button.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/model/order/logistics_model.dart'; +import 'package:aku_new_community/model/order/order_list_model.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_easyrefresh/easy_refresh.dart'; -import 'package:get/get.dart'; - -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/model/community/community_topic_model.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/ui/community/community_views/topic/topic_detail_page.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:waterfall_flow/waterfall_flow.dart'; - -import '../market_home_goods_card.dart'; - class LogisticsPage extends StatefulWidget { final List models; final OrderListModel orderModel; final MyOrderListVoList goods; - LogisticsPage({Key? key, required this.models, required this.goods, required this.orderModel}) : super(key: key); + + LogisticsPage( + {Key? key, + required this.models, + required this.goods, + required this.orderModel}) + : super(key: key); @override _LogisticsPageState createState() => _LogisticsPageState(); @@ -50,17 +37,16 @@ class _LogisticsPageState extends State { @override Widget build(BuildContext context) { - - return BeeScaffold( + return BeeScaffold( title: '物流详情', - body:ListView( + body: ListView( children: [ Column( children: [ Container( - padding: - EdgeInsets.only(left: 22.w, right: 22.w, top: 20.w, bottom: 20.w), - margin: EdgeInsets.only(left: 20.w,right: 20.w,top: 20.w), + padding: EdgeInsets.only( + left: 22.w, right: 22.w, top: 20.w, bottom: 20.w), + margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w), width: double.infinity, height: 180.w, decoration: BoxDecoration( @@ -95,174 +81,168 @@ class _LogisticsPageState extends State { text: TextSpan(children: [ TextSpan( text: widget.goods.skuName, - style: TextStyle(fontSize: 28.sp, color: ktextPrimary)), + style: TextStyle( + fontSize: 28.sp, color: ktextPrimary)), ]), maxLines: 1, overflow: TextOverflow.ellipsis, ), ), - '包裹离目的地越来越近了'.text.size(28.sp).color(ktextPrimary).make(), + '包裹离目的地越来越近了' + .text + .size(28.sp) + .color(ktextPrimary) + .make(), ], ), - ], ), ), - - ...widget.models.map((e) => _logisticsView( - e - ), - + ...widget.models.map( + (e) => _logisticsView(e), ) - ], ) ], ), - - - - ); - - - - } - _logisticsView(LogisticsModel model ){ - return - Container( - padding: - EdgeInsets.only(left: 22.w, right: 22.w, bottom: 20.w,top: 20.w), - margin: EdgeInsets.only(left: 20.w,right: 20.w,top: 20.w), - width: double.infinity, - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(24.w)), - color: Colors.white), - alignment: Alignment.topCenter, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - - Container( - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - 75.wb, - (model.logisticsName??'未获取到快递公司').text.size(28.sp).color(ktextPrimary).make(), - 50.wb, - (model.waybillCode??'未获取到快递单号').text.size(28.sp).color(ktextPrimary).make(), - ], - ), - ), - 20.hb, - Row( + _logisticsView(LogisticsModel model) { + return Container( + padding: + EdgeInsets.only(left: 22.w, right: 22.w, bottom: 20.w, top: 20.w), + margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w), + width: double.infinity, + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(24.w)), + color: Colors.white), + alignment: Alignment.topCenter, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Container( - child: Text('收',style: TextStyle(color: Color(0xFFBBBBBB),fontSize: 28.sp),), - decoration: BoxDecoration( - border: Border.all( - width: 2.w, color:Color(0xFFBBBBBB)), - borderRadius: BorderRadius.all(Radius.circular(28.w)) - ), - width: 56.w, - height: 56.w, - alignment: Alignment.center, - ), - 20.wb, - Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - SizedBox( - width: 580.w, - child: Text( - widget.orderModel.locationName ?? '', - style: - TextStyle(fontSize: 28.sp, color: ktextPrimary), - maxLines: 1, - overflow: TextOverflow.ellipsis, - ), - ), - - 5.hb, - SizedBox( - width: 580.w, - child: Text( - (widget.orderModel.addressDetail ?? ''), - style: - TextStyle(fontSize: 28.sp, color: ktextPrimary), - maxLines: 1, - overflow: TextOverflow.ellipsis, - ), - ), - - 5.hb, - Row( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - Text(widget.orderModel.receiverName ?? '', - style: TextStyle( - fontSize: 28.sp, color: ktextPrimary)), - 30.wb, - Text(widget.orderModel.receiverTel ?? '', - style: TextStyle( - fontSize: 28.sp, color: ktextPrimary)), - ], - ), - - ], - ), + 75.wb, + (model.logisticsName ?? '未获取到快递公司') + .text + .size(28.sp) + .color(ktextPrimary) + .make(), + 50.wb, + (model.waybillCode ?? '未获取到快递单号') + .text + .size(28.sp) + .color(ktextPrimary) + .make(), ], ), - 30.hb, - if(model.operatorNodeList!=null) - ...model.operatorNodeList!.map((e) => - - Container( - color: Colors.white, - width: double.infinity, - alignment: Alignment.centerLeft, - margin: EdgeInsets.only(bottom: 30.w), - child: Row( - mainAxisAlignment: MainAxisAlignment.start, + ), + 20.hb, + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: Text( + '收', + style: TextStyle(color: Color(0xFFBBBBBB), fontSize: 28.sp), + ), + decoration: BoxDecoration( + border: Border.all(width: 2.w, color: Color(0xFFBBBBBB)), + borderRadius: BorderRadius.all(Radius.circular(28.w))), + width: 56.w, + height: 56.w, + alignment: Alignment.center, + ), + 20.wb, + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, children: [ - - Image.asset(R.ASSETS_ICONS_ICON_MARKET_SUCCESS_PNG,width: 50.w,height: 50.w,), - 20.wb, - Container( - width: 500.w, - child: RichText( - text: TextSpan(children: [ - TextSpan( - text: DateTime.fromMillisecondsSinceEpoch(int.parse(e.msgTime.toString()+'000')).toString().substring(0,19), - style: TextStyle(fontSize: 28.sp, color: ktextPrimary)), - WidgetSpan( - child: SizedBox(width: 20.w,), - ), - TextSpan( - text: e.content, - style: TextStyle(fontSize: 28.sp, color: ktextPrimary)), - ]), - maxLines: 5, + SizedBox( + width: 580.w, + child: Text( + widget.orderModel.locationName ?? '', + style: TextStyle(fontSize: 28.sp, color: ktextPrimary), + maxLines: 1, + overflow: TextOverflow.ellipsis, ), ), + 5.hb, + SizedBox( + width: 580.w, + child: Text( + (widget.orderModel.addressDetail ?? ''), + style: TextStyle(fontSize: 28.sp, color: ktextPrimary), + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), + ), + 5.hb, + Row( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Text(widget.orderModel.receiverName ?? '', + style: TextStyle( + fontSize: 28.sp, color: ktextPrimary)), + 30.wb, + Text(widget.orderModel.receiverTel ?? '', + style: TextStyle( + fontSize: 28.sp, color: ktextPrimary)), + ], + ), ], ), - ) - - - ), - - ], - ) - ); - - + ], + ), + 30.hb, + if (model.operatorNodeList != null) + ...model.operatorNodeList!.map((e) => Container( + color: Colors.white, + width: double.infinity, + alignment: Alignment.centerLeft, + margin: EdgeInsets.only(bottom: 30.w), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Image.asset( + R.ASSETS_ICONS_ICON_MARKET_SUCCESS_PNG, + width: 50.w, + height: 50.w, + ), + 20.wb, + Container( + width: 500.w, + child: RichText( + text: TextSpan(children: [ + TextSpan( + text: DateTime.fromMillisecondsSinceEpoch( + int.parse( + e.msgTime.toString() + '000')) + .toString() + .substring(0, 19), + style: TextStyle( + fontSize: 28.sp, color: ktextPrimary)), + WidgetSpan( + child: SizedBox( + width: 20.w, + ), + ), + TextSpan( + text: e.content, + style: TextStyle( + fontSize: 28.sp, color: ktextPrimary)), + ]), + maxLines: 5, + ), + ), + ], + ), + )), + ], + )); } - - } diff --git a/lib/ui/market/order/my_order_card.dart b/lib/ui/market/order/my_order_card.dart index 87c1f867..6c7e2244 100644 --- a/lib/ui/market/order/my_order_card.dart +++ b/lib/ui/market/order/my_order_card.dart @@ -1,25 +1,24 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/extensions/widget_list_ext.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/models/market/order/my_order_list_model.dart'; +import 'package:aku_new_community/ui/market/order/my_order_detail_page.dart'; +import 'package:aku_new_community/ui/market/order/my_order_evaluation_page.dart'; +import 'package:aku_new_community/ui/market/order/my_order_func.dart'; +import 'package:aku_new_community/ui/market/order/my_order_refund_page.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; +import 'package:aku_new_community/widget/buttons/card_bottom_button.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/extensions/widget_list_ext.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/models/market/order/my_order_list_model.dart'; -import 'package:aku_community/ui/market/order/my_order_detail_page.dart'; -import 'package:aku_community/ui/market/order/my_order_evaluation_page.dart'; -import 'package:aku_community/ui/market/order/my_order_func.dart'; -import 'package:aku_community/ui/market/order/my_order_refund_page.dart'; -import 'package:aku_community/widget/bee_divider.dart'; -import 'package:aku_community/widget/buttons/card_bottom_button.dart'; - class MyOrderCard extends StatefulWidget { final MyOrderListModel model; final VoidCallback callRefresh; + MyOrderCard({Key? key, required this.model, required this.callRefresh}) : super(key: key); diff --git a/lib/ui/market/order/my_order_detail_page.dart b/lib/ui/market/order/my_order_detail_page.dart index ebf59f72..a5f416dd 100644 --- a/lib/ui/market/order/my_order_detail_page.dart +++ b/lib/ui/market/order/my_order_detail_page.dart @@ -1,27 +1,26 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/extensions/widget_list_ext.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/models/market/goods_item.dart'; +import 'package:aku_new_community/models/market/order/my_order_list_model.dart'; +import 'package:aku_new_community/models/market/order/order_detail_model.dart'; +import 'package:aku_new_community/ui/market/goods/goods_card.dart'; +import 'package:aku_new_community/ui/market/order/my_order_func.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_rating_bar/flutter_rating_bar.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; import 'package:waterfall_flow/waterfall_flow.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/extensions/widget_list_ext.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/models/market/goods_item.dart'; -import 'package:aku_community/models/market/order/my_order_list_model.dart'; -import 'package:aku_community/models/market/order/order_detail_model.dart'; -import 'package:aku_community/ui/market/goods/goods_card.dart'; -import 'package:aku_community/ui/market/order/my_order_func.dart'; -import 'package:aku_community/widget/bee_divider.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class MyOrderDetailPage extends StatefulWidget { final MyOrderListModel model; + MyOrderDetailPage({Key? key, required this.model}) : super(key: key); @override @@ -33,6 +32,7 @@ class _MyOrderDetailPageState extends State { late List _topGoods; late OrderDetailModel _detailModel; bool _onload = true; + @override void initState() { super.initState(); diff --git a/lib/ui/market/order/my_order_evaluation_page.dart b/lib/ui/market/order/my_order_evaluation_page.dart index 8c310553..2d2a3d45 100644 --- a/lib/ui/market/order/my_order_evaluation_page.dart +++ b/lib/ui/market/order/my_order_evaluation_page.dart @@ -1,22 +1,21 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/models/market/order/my_order_list_model.dart'; +import 'package:aku_new_community/ui/market/order/my_order_func.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:aku_new_community/widget/others/bee_text_field.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_rating_bar/flutter_rating_bar.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/models/market/order/my_order_list_model.dart'; -import 'package:aku_community/ui/market/order/my_order_func.dart'; -import 'package:aku_community/widget/bee_divider.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; -import 'package:aku_community/widget/others/bee_text_field.dart'; - class MyOrderEvaluationPage extends StatefulWidget { final MyOrderListModel model; + MyOrderEvaluationPage({Key? key, required this.model}) : super(key: key); @override @@ -26,6 +25,7 @@ class MyOrderEvaluationPage extends StatefulWidget { class _MyOrderEvaluationPageState extends State { late TextEditingController _editingController; int _rating = 10; + @override void initState() { super.initState(); diff --git a/lib/ui/market/order/my_order_func.dart b/lib/ui/market/order/my_order_func.dart index cb47bff4..44551a17 100644 --- a/lib/ui/market/order/my_order_func.dart +++ b/lib/ui/market/order/my_order_func.dart @@ -1,8 +1,8 @@ -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/market/goods_item.dart'; -import 'package:aku_community/models/market/order/order_detail_model.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/models/market/goods_item.dart'; +import 'package:aku_new_community/models/market/order/order_detail_model.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; class MyOrderFunc { ///确认收货 @@ -54,8 +54,8 @@ class MyOrderFunc { return (baseModel.data as List) .map((e) => GoodsItem.fromJson(e)) .toList(); - }else - return []; + } else + return []; } ///获取商品详情 diff --git a/lib/ui/market/order/my_order_page.dart b/lib/ui/market/order/my_order_page.dart index 730760ce..c0ffc377 100644 --- a/lib/ui/market/order/my_order_page.dart +++ b/lib/ui/market/order/my_order_page.dart @@ -1,11 +1,9 @@ +import 'package:aku_new_community/ui/market/order/my_order_view.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/tab_bar/bee_tab_bar.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:aku_community/ui/market/order/my_order_view.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/tab_bar/bee_tab_bar.dart'; - class MyOrderPage extends StatefulWidget { MyOrderPage({Key? key}) : super(key: key); diff --git a/lib/ui/market/order/my_order_refund_page.dart b/lib/ui/market/order/my_order_refund_page.dart index 4cbeb6c1..463ba70e 100644 --- a/lib/ui/market/order/my_order_refund_page.dart +++ b/lib/ui/market/order/my_order_refund_page.dart @@ -1,24 +1,23 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/models/market/order/my_order_list_model.dart'; +import 'package:aku_new_community/ui/market/order/my_order_func.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/aku_single_check_button.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:aku_new_community/widget/others/bee_text_field.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/models/market/order/my_order_list_model.dart'; -import 'package:aku_community/ui/market/order/my_order_func.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/widget/bee_divider.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/aku_single_check_button.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; -import 'package:aku_community/widget/others/bee_text_field.dart'; - class MyOrderRefundPage extends StatefulWidget { final MyOrderListModel model; + MyOrderRefundPage({Key? key, required this.model}) : super(key: key); @override @@ -28,6 +27,7 @@ class MyOrderRefundPage extends StatefulWidget { class _MyOrderRefundPageState extends State { int _type = 1; //退换类型,1为退款,2为换货 late TextEditingController _editingController; + @override void initState() { super.initState(); diff --git a/lib/ui/market/order/my_order_view.dart b/lib/ui/market/order/my_order_view.dart index 894629c4..4a754e67 100644 --- a/lib/ui/market/order/my_order_view.dart +++ b/lib/ui/market/order/my_order_view.dart @@ -1,16 +1,15 @@ +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/models/market/order/my_order_list_model.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/ui/market/order/my_order_card.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/market/order/my_order_list_model.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/ui/market/order/my_order_card.dart'; - class MyOrderView extends StatefulWidget { final int index; + MyOrderView({Key? key, required this.index}) : super(key: key); @override @@ -19,6 +18,7 @@ class MyOrderView extends StatefulWidget { class _MyOrderViewState extends State { late EasyRefreshController _refreshController; + @override void initState() { super.initState(); diff --git a/lib/ui/market/order/order_card.dart b/lib/ui/market/order/order_card.dart index d8098b2c..8fdefedc 100644 --- a/lib/ui/market/order/order_card.dart +++ b/lib/ui/market/order/order_card.dart @@ -1,24 +1,20 @@ -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/order/order_list_model.dart'; -import 'package:aku_community/pages/life_pay/pay_finish_page.dart'; -import 'package:aku_community/pages/life_pay/pay_util.dart'; -import 'package:aku_community/ui/market/search/settlementGoodsDTO.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/buttons/line_button.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/order/order_list_model.dart'; +import 'package:aku_new_community/pages/life_pay/pay_finish_page.dart'; +import 'package:aku_new_community/pages/life_pay/pay_util.dart'; +import 'package:aku_new_community/ui/market/search/settlementGoodsDTO.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/buttons/line_button.dart'; import 'package:bot_toast/bot_toast.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_easyrefresh/easy_refresh.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/utils/headers.dart'; - -import 'package:flutter/cupertino.dart'; - import 'order_detail_page.dart'; class OrderCard extends StatefulWidget { @@ -37,6 +33,7 @@ class OrderCard extends StatefulWidget { class _OrderCardState extends State { List _goodsList = []; + @override Widget build(BuildContext context) { switch (widget.model.tradeStatus) { @@ -63,23 +60,23 @@ class _OrderCardState extends State { void initState() { super.initState(); widget.model.myOrderListVoList!.forEach((element) { - _goodsList.add(SettlementGoodsDTO(jcookGoodsId: element.jcookGoodsId,num: element.num)); + _goodsList.add(SettlementGoodsDTO( + jcookGoodsId: element.jcookGoodsId, num: element.num)); }); - } Future _pay() async { Function cancel = BotToast.showLoading(); - BaseModel baseModel = await NetUtil() - .post(API.pay.jcookOrderCreateOrder, params: { - "addressId":widget.model.jcookAddressId, + BaseModel baseModel = + await NetUtil().post(API.pay.jcookOrderCreateOrder, params: { + "addressId": widget.model.jcookAddressId, "settlementGoodsDTOList": _goodsList.map((v) => v.toJson()).toList(), "payType": 1, //暂时写死 等待后续补充 - "payPrice": widget.model.payPrice + "payPrice": widget.model.payPrice }); if (baseModel.status ?? false) { - bool result = await PayUtil().callAliPay( - baseModel.message!, API.pay.sharePayOrderCodeCheck); + bool result = await PayUtil() + .callAliPay(baseModel.message!, API.pay.sharePayOrderCodeCheck); if (result) { Get.off(() => PayFinishPage()); } @@ -87,8 +84,6 @@ class _OrderCardState extends State { cancel(); } - - Future _deleteOrder() async { bool? result = await Get.dialog( CupertinoAlertDialog( @@ -106,12 +101,11 @@ class _OrderCardState extends State { ], ), ); - if(result==true){ - + if (result == true) { Function cancel = BotToast.showLoading(); - BaseModel baseModel = await NetUtil() - .get(API.market.deleteOrder, params: { - "orderId":widget.model.id, + BaseModel baseModel = + await NetUtil().get(API.market.deleteOrder, params: { + "orderId": widget.model.id, }); if (baseModel.status ?? false) { BotToast.showText(text: '删除成功'); @@ -138,14 +132,10 @@ class _OrderCardState extends State { ], ), ); - if(result==true){ - + if (result == true) { Function cancel = BotToast.showLoading(); - BaseModel baseModel = await NetUtil() - .get(API.market.cancelOrder, params: { - "orderId":widget.model.id, - 'cancelReasonCode':4 - }); + BaseModel baseModel = await NetUtil().get(API.market.cancelOrder, + params: {"orderId": widget.model.id, 'cancelReasonCode': 4}); if (baseModel.status ?? false) { BotToast.showText(text: '取消成功'); widget.callRefresh(); @@ -173,8 +163,10 @@ class _OrderCardState extends State { ); if (result == true) { Function cancel = BotToast.showLoading(); - BaseModel baseModel = await NetUtil().get(API.market.confirmOrder, - params: {"orderId": widget.model.id,}); + BaseModel baseModel = + await NetUtil().get(API.market.confirmOrder, params: { + "orderId": widget.model.id, + }); if (baseModel.status ?? false) { BotToast.showText(text: '收货成功'); Get.back(); @@ -186,8 +178,11 @@ class _OrderCardState extends State { _yiquxiao() { return GestureDetector( - onTap: (){ - Get.to(()=>OrderDetailPage(orderModel: widget.model,callRefresh: widget.callRefresh,)); + onTap: () { + Get.to(() => OrderDetailPage( + orderModel: widget.model, + callRefresh: widget.callRefresh, + )); }, child: Container( width: double.infinity, @@ -220,13 +215,11 @@ class _OrderCardState extends State { children: [ Spacer(), LineButton( - onPressed: ()async { - + onPressed: () async { _deleteOrder(); - - }, - text: ('删除订单').text.size(28.sp).color(Color(0xFF666666)).make(), + text: + ('删除订单').text.size(28.sp).color(Color(0xFF666666)).make(), color: Color(0xFFBBBBBB), ), ], @@ -239,8 +232,11 @@ class _OrderCardState extends State { _yiwancheng() { return GestureDetector( - onTap: (){ - Get.to(()=>OrderDetailPage(orderModel: widget.model,callRefresh: widget.callRefresh,)); + onTap: () { + Get.to(() => OrderDetailPage( + orderModel: widget.model, + callRefresh: widget.callRefresh, + )); }, child: Container( width: double.infinity, @@ -290,8 +286,11 @@ class _OrderCardState extends State { _daishouhuo() { return GestureDetector( - onTap: (){ - Get.to(()=>OrderDetailPage(orderModel: widget.model,callRefresh: widget.callRefresh,)); + onTap: () { + Get.to(() => OrderDetailPage( + orderModel: widget.model, + callRefresh: widget.callRefresh, + )); }, child: Container( width: double.infinity, @@ -333,7 +332,8 @@ class _OrderCardState extends State { onPressed: () { _confirmOrder(); }, - text: ('确认收货').text.size(28.sp).color(Color(0xFFE52E2E)).make(), + text: + ('确认收货').text.size(28.sp).color(Color(0xFFE52E2E)).make(), color: Color(0xFFE52E2E), ), ], @@ -346,8 +346,11 @@ class _OrderCardState extends State { _daifahuo() { return GestureDetector( - onTap: (){ - Get.to(()=>OrderDetailPage(orderModel: widget.model,callRefresh: widget.callRefresh,)); + onTap: () { + Get.to(() => OrderDetailPage( + orderModel: widget.model, + callRefresh: widget.callRefresh, + )); }, child: Container( width: double.infinity, @@ -383,7 +386,8 @@ class _OrderCardState extends State { onPressed: () { _cancelOrder(); }, - text: ('取消订单').text.size(28.sp).color(Color(0xFF666666)).make(), + text: + ('取消订单').text.size(28.sp).color(Color(0xFF666666)).make(), color: Color(0xFFBBBBBB), ), ], @@ -396,8 +400,11 @@ class _OrderCardState extends State { _yiguanbi() { return GestureDetector( - onTap: (){ - Get.to(()=>OrderDetailPage(orderModel: widget.model,callRefresh: widget.callRefresh,)); + onTap: () { + Get.to(() => OrderDetailPage( + orderModel: widget.model, + callRefresh: widget.callRefresh, + )); }, child: Container( width: double.infinity, @@ -433,7 +440,8 @@ class _OrderCardState extends State { onPressed: () { _deleteOrder(); }, - text: ('删除订单').text.size(28.sp).color(Color(0xFF666666)).make(), + text: + ('删除订单').text.size(28.sp).color(Color(0xFF666666)).make(), color: Color(0xFFBBBBBB), ), ], @@ -446,8 +454,11 @@ class _OrderCardState extends State { _daifukuan() { return GestureDetector( - onTap: (){ - Get.to(()=>OrderDetailPage(orderModel: widget.model,callRefresh: widget.callRefresh,)); + onTap: () { + Get.to(() => OrderDetailPage( + orderModel: widget.model, + callRefresh: widget.callRefresh, + )); }, child: Container( width: double.infinity, @@ -483,7 +494,8 @@ class _OrderCardState extends State { onPressed: () { _cancelOrder(); }, - text: ('取消订单').text.size(28.sp).color(Color(0xFF666666)).make(), + text: + ('取消订单').text.size(28.sp).color(Color(0xFF666666)).make(), color: Color(0xFFBBBBBB), width: 168.w, ), diff --git a/lib/ui/market/order/order_detail_page.dart b/lib/ui/market/order/order_detail_page.dart index c721942b..a457d9dd 100644 --- a/lib/ui/market/order/order_detail_page.dart +++ b/lib/ui/market/order/order_detail_page.dart @@ -1,35 +1,23 @@ import 'dart:async'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/good/good_detail_model.dart'; -import 'package:aku_community/model/order/create_order_model.dart'; -import 'package:aku_community/model/order/logistics_model.dart'; -import 'package:aku_community/model/order/order_list_model.dart'; -import 'package:aku_community/model/user/adress_model.dart'; -import 'package:aku_community/models/market/shop_car/shop_car_list_model.dart'; -import 'package:aku_community/pages/life_pay/pay_finish_page.dart'; -import 'package:aku_community/pages/life_pay/pay_util.dart'; -import 'package:aku_community/pages/personal/address/address_list_page.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/ui/market/search/settlementGoodsDTO.dart'; -import 'package:aku_community/ui/market/shop_car/shop_car_func.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/line_button.dart'; -import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/widget/buttons/end_button.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/order/logistics_model.dart'; +import 'package:aku_new_community/model/order/order_list_model.dart'; +import 'package:aku_new_community/pages/life_pay/pay_util.dart'; +import 'package:aku_new_community/ui/market/search/settlementGoodsDTO.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/line_button.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/utils/headers.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; -import 'package:provider/provider.dart'; +import 'package:velocity_x/velocity_x.dart'; import 'logistics_page.dart'; import 'order_page.dart'; @@ -78,7 +66,7 @@ class _OrderDetailPageState extends State { .callAliPay(baseModel.message!, API.pay.jcookOrderCheckAlipay); if (result) { Get.off(() => OrderPage(initIndex: 2)); - }else{ + } else { Get.off(() => OrderPage(initIndex: 1)); } } @@ -183,8 +171,8 @@ class _OrderDetailPageState extends State { void initState() { super.initState(); widget.orderModel.myOrderListVoList!.forEach((element) { - _goodsList - .add(SettlementGoodsDTO(jcookGoodsId: element.jcookGoodsId, num: element.num)); + _goodsList.add(SettlementGoodsDTO( + jcookGoodsId: element.jcookGoodsId, num: element.num)); }); if (widget.orderModel.tradeStatus == 0) { timer = Timer.periodic(Duration(seconds: 1), (Timer t) => _checkTime()); @@ -193,8 +181,7 @@ class _OrderDetailPageState extends State { @override void dispose() { - if(timer!=null) - timer!.cancel(); + if (timer != null) timer!.cancel(); super.dispose(); } @@ -218,13 +205,13 @@ class _OrderDetailPageState extends State { titleSpacing: 0, body: ListView( children: [ - widget.orderModel.tradeStatus == 0 ? _head() : widget.orderModel.tradeStatus == 2 - ? _headDaifahuo(): widget.orderModel.tradeStatus == 4 - ? _headDaishouhuo() - : SizedBox(), + ? _headDaifahuo() + : widget.orderModel.tradeStatus == 4 + ? _headDaishouhuo() + : SizedBox(), 20.hb, _address(context), 20.hb, @@ -235,11 +222,10 @@ class _OrderDetailPageState extends State { ], ), bottomNavi: Container( - width: double.infinity, - height: 120.w, - color: Colors.white, - child: _getBtn() - ), + width: double.infinity, + height: 120.w, + color: Colors.white, + child: _getBtn()), ); } @@ -309,53 +295,52 @@ class _OrderDetailPageState extends State { child: Column( children: [ ...widget.orderModel.myOrderListVoList!.map((e) => _goodCard(e)), - _priceView(), - ], ), ); } + _priceView() { return Column( - children: [ - Row( - children: [ - Spacer(), - '商品金额:'.text.size(28.sp).color(Color(0xFF666666)).make(), - '¥${((widget.orderModel.payPrice ?? 0) - (widget.orderModel.freightFee ?? 0)).toStringAsFixed(2)}' - .text.size(28.sp).color(Color(0xFF333333)).make(), - - - ], - ), - 8.hb, - Row( - children: [ - Spacer(), - '运费:'.text.size(28.sp).color(Color(0xFF666666)).make(), - '¥${((widget.orderModel.freightFee ?? 0)).toStringAsFixed(2)}' - .text - .size(28.sp) - .color(Color(0xFF666666)) - .make(), - ], - ), - 8.hb, - Row( - children: [ - Spacer(), - '实付款:'.text.size(32.sp).color(Color(0xFF333333)).bold.make(), - '¥${((widget.orderModel.payPrice ?? 0)).toStringAsFixed(2)}' - .text - .size(28.sp) - .color(Color(0xFFE52E2E)) - .make(), - ], - ), - 16.hb, - ], - + children: [ + Row( + children: [ + Spacer(), + '商品金额:'.text.size(28.sp).color(Color(0xFF666666)).make(), + '¥${((widget.orderModel.payPrice ?? 0) - (widget.orderModel.freightFee ?? 0)).toStringAsFixed(2)}' + .text + .size(28.sp) + .color(Color(0xFF333333)) + .make(), + ], + ), + 8.hb, + Row( + children: [ + Spacer(), + '运费:'.text.size(28.sp).color(Color(0xFF666666)).make(), + '¥${((widget.orderModel.freightFee ?? 0)).toStringAsFixed(2)}' + .text + .size(28.sp) + .color(Color(0xFF666666)) + .make(), + ], + ), + 8.hb, + Row( + children: [ + Spacer(), + '实付款:'.text.size(32.sp).color(Color(0xFF333333)).bold.make(), + '¥${((widget.orderModel.payPrice ?? 0)).toStringAsFixed(2)}' + .text + .size(28.sp) + .color(Color(0xFFE52E2E)) + .make(), + ], + ), + 16.hb, + ], ); } @@ -388,8 +373,9 @@ class _OrderDetailPageState extends State { mainAxisAlignment: MainAxisAlignment.center, children: [ Padding( - padding: - EdgeInsets.symmetric(horizontal: 20.w, ), + padding: EdgeInsets.symmetric( + horizontal: 20.w, + ), child: SizedBox( width: 518.w, child: Text( @@ -403,8 +389,9 @@ class _OrderDetailPageState extends State { ), 5.hb, Padding( - padding: - EdgeInsets.symmetric(horizontal: 20.w, ), + padding: EdgeInsets.symmetric( + horizontal: 20.w, + ), child: SizedBox( width: 518.w, child: Text( @@ -418,8 +405,9 @@ class _OrderDetailPageState extends State { ), 5.hb, Padding( - padding: - EdgeInsets.symmetric(horizontal: 20.w, ), + padding: EdgeInsets.symmetric( + horizontal: 20.w, + ), child: Row( crossAxisAlignment: CrossAxisAlignment.end, children: [ @@ -482,7 +470,7 @@ class _OrderDetailPageState extends State { return Container( padding: EdgeInsets.only(left: 20.w, right: 16.w, top: 20.w, bottom: 20.w), - margin: EdgeInsets.only(left: 20.w,right: 20.w,top: 20.w), + margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w), width: double.infinity, height: 150.w, decoration: BoxDecoration( @@ -508,7 +496,7 @@ class _OrderDetailPageState extends State { return Container( padding: EdgeInsets.only(left: 20.w, right: 16.w, top: 20.w, bottom: 20.w), - margin: EdgeInsets.only(left: 20.w,right: 20.w,top: 20.w), + margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w), width: double.infinity, height: 150.w, decoration: BoxDecoration( @@ -530,7 +518,7 @@ class _OrderDetailPageState extends State { return Container( padding: EdgeInsets.only(left: 22.w, right: 22.w, top: 20.w, bottom: 20.w), - margin: EdgeInsets.only(left: 20.w,right: 20.w,top: 20.w), + margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w), width: double.infinity, height: 150.w, decoration: BoxDecoration( @@ -539,14 +527,17 @@ class _OrderDetailPageState extends State { child: Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Image.asset(R.ASSETS_ICONS_ICON_LOGISTICS_PNG,width: 56.w,height: 56.w,), + Image.asset( + R.ASSETS_ICONS_ICON_LOGISTICS_PNG, + width: 56.w, + height: 56.w, + ), 20.wb, Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.center, children: [ '已发货'.text.size(32.sp).color(ktextPrimary).bold.make(), - '包裹正在等待揽收'.text.size(28.sp).color(ktextPrimary).make(), ], ), @@ -558,21 +549,21 @@ class _OrderDetailPageState extends State { "orderId": widget.orderModel.id, }); if (baseModel.status == true && baseModel.data != null) { - logisticsModels = (baseModel.data as List) + logisticsModels = (baseModel.data as List) .map((e) => LogisticsModel.fromJson(e)) .toList(); - if(logisticsModels.isNotEmpty){ - Get.to(()=> LogisticsPage(models: logisticsModels,goods: widget.orderModel.myOrderListVoList!.first,orderModel:widget.orderModel)); - }else{ + if (logisticsModels.isNotEmpty) { + Get.to(() => LogisticsPage( + models: logisticsModels, + goods: widget.orderModel.myOrderListVoList!.first, + orderModel: widget.orderModel)); + } else { BotToast.showText(text: '未获取到物流信息'); } - - }else{ + } else { BotToast.showText(text: '未获取到物流信息'); } - }, - text: '查看物流'.text.size(32.sp).color(Color(0xFFE52E2E)).make(), color: Color(0xFFE52E2E), ), @@ -684,7 +675,6 @@ class _OrderDetailPageState extends State { ) ], ), - ], ), ); diff --git a/lib/ui/market/order/order_page.dart b/lib/ui/market/order/order_page.dart index 24218a36..e55a0acd 100644 --- a/lib/ui/market/order/order_page.dart +++ b/lib/ui/market/order/order_page.dart @@ -1,28 +1,22 @@ +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/tab_bar/bee_tab_bar.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/tab_bar/bee_tab_bar.dart'; + import 'order_view.dart'; class OrderPage extends StatefulWidget { final int initIndex; + OrderPage({Key? key, required this.initIndex}) : super(key: key); @override _OrderPageState createState() => _OrderPageState(); } -class _OrderPageState extends State - with TickerProviderStateMixin { +class _OrderPageState extends State with TickerProviderStateMixin { late TabController _tabController; - List _tabs = [ - '全部', - '待付款', - '待发货', - '待收货', - '已完成' - ]; + List _tabs = ['全部', '待付款', '待发货', '待收货', '已完成']; @override void initState() { diff --git a/lib/ui/market/order/order_view.dart b/lib/ui/market/order/order_view.dart index 352759ad..3632fad3 100644 --- a/lib/ui/market/order/order_view.dart +++ b/lib/ui/market/order/order_view.dart @@ -1,19 +1,15 @@ -import 'package:aku_community/model/order/order_list_model.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/order/order_list_model.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:velocity_x/velocity_x.dart'; - -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/market/order/my_order_list_model.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/ui/market/order/my_order_card.dart'; import 'order_card.dart'; class OrderView extends StatefulWidget { final int? index; + OrderView({Key? key, required this.index}) : super(key: key); @override @@ -22,6 +18,7 @@ class OrderView extends StatefulWidget { class _OrderViewState extends State { late EasyRefreshController _refreshController; + @override void initState() { super.initState(); @@ -39,7 +36,7 @@ class _OrderViewState extends State { return BeeListView( path: API.market.myOrder, controller: _refreshController, - extraParams: {"tradeStatus": widget.index,'orderCode':null}, + extraParams: {"tradeStatus": widget.index, 'orderCode': null}, convert: (models) { return models.tableList! .map((e) => OrderListModel.fromJson(e)) @@ -47,11 +44,11 @@ class _OrderViewState extends State { }, builder: (items) { return ListView.builder( - padding: EdgeInsets.symmetric( horizontal: 20.w), + padding: EdgeInsets.symmetric(horizontal: 20.w), itemBuilder: (context, index) { return Container( color: Colors.transparent, - margin: EdgeInsets.only(top:20.w), + margin: EdgeInsets.only(top: 20.w), child: OrderCard( model: items[index], callRefresh: () { diff --git a/lib/ui/market/search/good_detail_bottomSheet.dart b/lib/ui/market/search/good_detail_bottomSheet.dart index 5b0c35a1..4e7665fc 100644 --- a/lib/ui/market/search/good_detail_bottomSheet.dart +++ b/lib/ui/market/search/good_detail_bottomSheet.dart @@ -6,13 +6,11 @@ * remark : * ==================================================== */ -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/model/good/good_detail_model.dart'; -import 'package:aku_community/model/user/province_model.dart'; -import 'package:aku_community/utils/text_utils.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/model/good/good_detail_model.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/utils/headers.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; class GoodDetailBottomSheet extends StatefulWidget { final GoodDetailModel goodDetail; diff --git a/lib/ui/market/search/good_detail_page.dart b/lib/ui/market/search/good_detail_page.dart index 931e900e..c566622e 100644 --- a/lib/ui/market/search/good_detail_page.dart +++ b/lib/ui/market/search/good_detail_page.dart @@ -1,23 +1,20 @@ - -import 'package:aku_community/model/good/good_detail_model.dart'; -import 'package:aku_community/model/user/adress_model.dart'; -import 'package:aku_community/pages/personal/address/address_list_page.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/ui/market/collection/collection_func.dart'; -import 'package:aku_community/ui/market/search/search_func.dart'; -import 'package:aku_community/ui/market/search/submit_order_page.dart'; -import 'package:aku_community/ui/market/search/submit_order_page_normal.dart'; -import 'package:aku_community/ui/market/shop_car/shop_car_page.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/model/good/good_detail_model.dart'; +import 'package:aku_new_community/model/user/adress_model.dart'; +import 'package:aku_new_community/pages/personal/address/address_list_page.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/ui/market/collection/collection_func.dart'; +import 'package:aku_new_community/ui/market/search/search_func.dart'; +import 'package:aku_new_community/ui/market/search/submit_order_page_normal.dart'; +import 'package:aku_new_community/ui/market/shop_car/shop_car_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - import 'good_detail_bottomSheet.dart'; @@ -39,8 +36,8 @@ class _GoodDetailPageState extends State { late GoodDetailModel? _goodDetail; bool _onload = true; late ScrollController _sliverListController; - AddressModel? _addressModel; - List _imageList = []; + AddressModel? _addressModel; + List _imageList = []; @override void initState() { @@ -55,9 +52,9 @@ class _GoodDetailPageState extends State { _pageController = PageController(); _sliverListController = ScrollController(); _refreshController = EasyRefreshController(); - if(appProvider.addressModel!=null){ + if (appProvider.addressModel != null) { _addressModel = appProvider.addressModel!; - }else{ + } else { _addressModel = null; } } @@ -72,8 +69,6 @@ class _GoodDetailPageState extends State { @override Widget build(BuildContext context) { - - return BeeScaffold( titleSpacing: 0, bgColor: Color(0xFFF9F9F9), @@ -82,7 +77,7 @@ class _GoodDetailPageState extends State { // children: [ // ], // ), - bottomNavi: _onload?SizedBox(): _bottomButton(), + bottomNavi: _onload ? SizedBox() : _bottomButton(), body: Stack( children: [ @@ -99,27 +94,29 @@ class _GoodDetailPageState extends State { setState(() {}); }, - child: _onload?SizedBox():_buildBody(context)), + child: _onload ? SizedBox() : _buildBody(context)), Positioned( - top: (kToolbarHeight+16).w, + top: (kToolbarHeight + 16).w, left: 24.w, child: Row( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, children: [ - Container( - padding: EdgeInsets.all(10.w), + padding: EdgeInsets.all(10.w), decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(52.w)), color: Color(0x80000000)), child: GestureDetector( - onTap: (){ + onTap: () { Get.back(); }, - child: Image.asset(R.ASSETS_ICONS_ICON_BACK_PNG,width: 52.w,height: 52.w,), - ) - ) + child: Image.asset( + R.ASSETS_ICONS_ICON_BACK_PNG, + width: 52.w, + height: 52.w, + ), + )) ], ), ), @@ -131,7 +128,7 @@ class _GoodDetailPageState extends State { Widget _buildBody(BuildContext context) { return Column( children: [ - _imageView(_goodDetail!.goodsDetailImageVos??[]), + _imageView(_goodDetail!.goodsDetailImageVos ?? []), 20.hb, _goodInfo(), 20.hb, @@ -142,16 +139,15 @@ class _GoodDetailPageState extends State { ); } - _goodInfo(){ + _goodInfo() { return Container( padding: EdgeInsets.all(20.w), - margin: EdgeInsets.symmetric(horizontal:20.w ), + margin: EdgeInsets.symmetric(horizontal: 20.w), width: double.infinity, height: 256.w, decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(24.w)), - color: Colors.white - ), + borderRadius: BorderRadius.all(Radius.circular(24.w)), + color: Colors.white), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -161,14 +157,16 @@ class _GoodDetailPageState extends State { 16.wb, '¥'.text.color(Color(0xFFE52E2E)).size(28.sp).make(), Text( - _goodDetail!.sellPrice==null?'':(_goodDetail!.sellPrice!).toStringAsFixed(2), - style: TextStyle(fontSize: 40.sp,color: Color(0xFFE52E2E)), + _goodDetail!.sellPrice == null + ? '' + : (_goodDetail!.sellPrice!).toStringAsFixed(2), + style: TextStyle(fontSize: 40.sp, color: Color(0xFFE52E2E)), ), Spacer(), '已售:'.text.color(Color(0xFFBBBBBB)).size(24.sp).make(), Text( - (_goodDetail!.sellNum??0).toString(), - style: TextStyle(fontSize: 24.sp,color: Color(0xFFBBBBBB)), + (_goodDetail!.sellNum ?? 0).toString(), + style: TextStyle(fontSize: 24.sp, color: Color(0xFFBBBBBB)), ), 16.wb, ], @@ -178,16 +176,14 @@ class _GoodDetailPageState extends State { padding: EdgeInsets.symmetric(horizontal: 16.w), height: 80.w, width: double.infinity, - child: - Text( - (_goodDetail!.skuName??''), - style: TextStyle(fontSize: 28.sp,color: ktextPrimary), + child: Text( + (_goodDetail!.skuName ?? ''), + style: TextStyle(fontSize: 28.sp, color: ktextPrimary), maxLines: 2, overflow: TextOverflow.ellipsis, ), ), - - _getIcon(_goodDetail!.kind??0), + _getIcon(_goodDetail!.kind ?? 0), Spacer(), Row( crossAxisAlignment: CrossAxisAlignment.center, @@ -195,59 +191,56 @@ class _GoodDetailPageState extends State { 16.wb, '原价:'.text.color(Color(0xFFBBBBBB)).size(24.sp).make(), Text( - _goodDetail!.discountPrice==null?'':(_goodDetail!.discountPrice!).toStringAsFixed(2), - style: TextStyle(fontSize: 24.sp,color: Color(0xFFBBBBBB)), + _goodDetail!.discountPrice == null + ? '' + : (_goodDetail!.discountPrice!).toStringAsFixed(2), + style: TextStyle(fontSize: 24.sp, color: Color(0xFFBBBBBB)), ), 50.wb, - '折扣:'.text.color(Color(0xFFBBBBBB)).size(24.sp).make(), Text( - (_goodDetail!.discountPrice??0)>(_goodDetail!.sellPrice??0) + (_goodDetail!.discountPrice ?? 0) > + (_goodDetail!.sellPrice ?? 0) ? _getDiscount(_goodDetail!.sellPrice ?? -1, - _goodDetail!.discountPrice ?? -1) + _goodDetail!.discountPrice ?? -1) : '暂无折扣', - style: TextStyle(fontSize: 24.sp,color: Color(0xFFBBBBBB)), + style: TextStyle(fontSize: 24.sp, color: Color(0xFFBBBBBB)), ), 16.wb, ], ), - ], ), ); } - - _address(BuildContext context){ - + _address(BuildContext context) { return Container( padding: EdgeInsets.all(20.w), - margin: EdgeInsets.symmetric(horizontal:20.w ), + margin: EdgeInsets.symmetric(horizontal: 20.w), width: double.infinity, height: 184.w, decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(24.w)), - color: Colors.white - ), + color: Colors.white), child: Column( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: [ GestureDetector( - onTap: () async{ + onTap: () async { //跳转到地址界面,点击地址然后返回地址 - var result = await Get.to(()=>AddressListPage(canBack: true,)); - if(result!=null){ + var result = await Get.to(() => AddressListPage( + canBack: true, + )); + if (result != null) { _addressModel = result; } - setState(() { - - }); + setState(() {}); }, child: Container( color: Colors.white, child: Column( - children: [ Row( crossAxisAlignment: CrossAxisAlignment.center, @@ -255,26 +248,30 @@ class _GoodDetailPageState extends State { 16.wb, '送至'.text.color(Color(0xFFBBBBBB)).size(28.sp).make(), 20.wb, - Image.asset(R.ASSETS_ICONS_ICON_GOOD_LOCATION_PNG,width: 30.w,height: 30.w,), - + Image.asset( + R.ASSETS_ICONS_ICON_GOOD_LOCATION_PNG, + width: 30.w, + height: 30.w, + ), Container( width: 430.w, child: Text( - _addressModel==null?'请先选择地址':(_addressModel!.locationName??'') - +(_addressModel!.addressDetail??''), - style: TextStyle(fontSize: 24.sp,color: ktextPrimary), + _addressModel == null + ? '请先选择地址' + : (_addressModel!.locationName ?? '') + + (_addressModel!.addressDetail ?? ''), + style: + TextStyle(fontSize: 24.sp, color: ktextPrimary), maxLines: 1, overflow: TextOverflow.ellipsis, ), - ), - + ), Spacer(), Icon( CupertinoIcons.chevron_forward, size: 32.w, color: Color(0xFF999999), ), - 16.wb, ], ), @@ -282,8 +279,17 @@ class _GoodDetailPageState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ 120.wb, - _goodDetail!.stockStatus==1?'有货'.text.color(Color(0xFFE52E2E)).size(28.sp).make() - :'无货'.text.color(Color(0xFFE52E2E)).size(28.sp).make(), + _goodDetail!.stockStatus == 1 + ? '有货' + .text + .color(Color(0xFFE52E2E)) + .size(28.sp) + .make() + : '无货' + .text + .color(Color(0xFFE52E2E)) + .size(28.sp) + .make(), ], ), ], @@ -291,14 +297,13 @@ class _GoodDetailPageState extends State { ), ), 20.hb, - GestureDetector( - onTap: (){ - showModalBottomSheet( - context: context, - builder: (context) { - return GoodDetailBottomSheet(goodDetail:_goodDetail!); - }); + onTap: () { + showModalBottomSheet( + context: context, + builder: (context) { + return GoodDetailBottomSheet(goodDetail: _goodDetail!); + }); }, child: Container( color: Colors.white, @@ -307,10 +312,10 @@ class _GoodDetailPageState extends State { children: [ 16.wb, '参数'.text.color(Color(0xFFBBBBBB)).size(28.sp).make(), - 48.wb, + 48.wb, Text( '品牌、规格', - style: TextStyle(fontSize: 24.sp,color: ktextPrimary), + style: TextStyle(fontSize: 24.sp, color: ktextPrimary), ), Spacer(), Icon( @@ -323,22 +328,18 @@ class _GoodDetailPageState extends State { ), ), ), - - - ], ), ); } - _getDetailImage(){ + _getDetailImage() { return Container( padding: EdgeInsets.all(20.w), - margin: EdgeInsets.symmetric(horizontal:20.w ), + margin: EdgeInsets.symmetric(horizontal: 20.w), decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(24.w)), - color: Colors.white - ), + color: Colors.white), width: double.infinity, child: Column( children: [ @@ -356,19 +357,19 @@ class _GoodDetailPageState extends State { 2.wb, Text( '商品详情', - style: TextStyle(fontSize: 28.sp,color: ktextPrimary), + style: TextStyle(fontSize: 28.sp, color: ktextPrimary), ), Spacer(), ], ), 10.hb, - ..._imageList.map((e) => _image(_getRightUrl(e)??'')) + ..._imageList.map((e) => _image(_getRightUrl(e) ?? '')) ], ), ); } - _image(String url){ + _image(String url) { print(url); return Container( width: double.infinity, @@ -378,29 +379,30 @@ class _GoodDetailPageState extends State { }, child: FadeInImage.assetNetwork( placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, - image: 'https://'+url, + image: 'https://' + url, fit: BoxFit.cover, ), ), ); } + ///获取的地址//img30.360buyimg.com/sku/jfs/t1/144443/40/4086/433571/5f22204bEd3a409dc/3090e34cf8c4187c.jpg ///多两个斜杠 - _getRightUrl(String url){ + _getRightUrl(String url) { return url.substring(2); } - - - Widget _getIcon(int type){ - if(type==1){ + Widget _getIcon(int type) { + if (type == 1) { return Container( margin: EdgeInsets.only(left: 15.w), width: 86.w, height: 26.w, alignment: Alignment.center, decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(4.w), ), + borderRadius: BorderRadius.all( + Radius.circular(4.w), + ), gradient: LinearGradient( begin: FractionalOffset.centerLeft, end: FractionalOffset.centerRight, @@ -409,20 +411,18 @@ class _GoodDetailPageState extends State { ), child: Text( '京东自营', - style: TextStyle( - fontSize: 18.sp, - color: kForeGroundColor - ), + style: TextStyle(fontSize: 18.sp, color: kForeGroundColor), ), ); - } - else if(type==2){ + } else if (type == 2) { return Container( alignment: Alignment.center, width: 86.w, height: 30.w, decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(4.w), ), + borderRadius: BorderRadius.all( + Radius.circular(4.w), + ), gradient: LinearGradient( begin: FractionalOffset.centerLeft, end: FractionalOffset.centerRight, @@ -431,76 +431,73 @@ class _GoodDetailPageState extends State { ), child: Text( '京东POP', - style: TextStyle( - fontSize: 18.sp, - color: kForeGroundColor - ), + style: TextStyle(fontSize: 18.sp, color: kForeGroundColor), ), ); - - } - else + } else return SizedBox(); } - - - _bottomButton() { - return Container( + return Container( width: double.infinity, height: 100.w, - - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Color(0x4D000000), - offset: Offset(0.0, -1), //阴影xy轴偏移量 - blurRadius: 0, //阴影模糊程度 - spreadRadius: 0 //阴影扩散程度 + decoration: BoxDecoration(color: Colors.white, boxShadow: [ + BoxShadow( + color: Color(0x4D000000), + offset: Offset(0.0, -1), //阴影xy轴偏移量 + blurRadius: 0, //阴影模糊程度 + spreadRadius: 0 //阴影扩散程度 ) - ] - // border: Border(top:BorderSide( width: 2.w, - // color: kPrimaryColor,)) - ), + ] + // border: Border(top:BorderSide( width: 2.w, + // color: kPrimaryColor,)) + ), child: Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ 40.wb, GestureDetector( - onTap: () async{ + onTap: () async { await CollectionFunc.collection(_goodDetail!.id!); _refreshController.callRefresh(); - }, child: Column( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: [ - Image.asset(_goodDetail!.isCollection==0? R.ASSETS_ICONS_ICON_GOOD_FAVOR_PNG:R.ASSETS_ICONS_SHOP_FAVORFILL_PNG,width: 48.w,height: 48.w,), + Image.asset( + _goodDetail!.isCollection == 0 + ? R.ASSETS_ICONS_ICON_GOOD_FAVOR_PNG + : R.ASSETS_ICONS_SHOP_FAVORFILL_PNG, + width: 48.w, + height: 48.w, + ), Text( '加入收藏', - style: TextStyle(fontSize: 20.sp,color: ktextPrimary), + style: TextStyle(fontSize: 20.sp, color: ktextPrimary), ), ], ), ), 40.wb, GestureDetector( - onTap: ()async{ + onTap: () async { //跳转到购物车界面 - Get.to(()=> ShopCarPage()); - + Get.to(() => ShopCarPage()); }, child: Column( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: [ - Image.asset(R.ASSETS_ICONS_ICON_GOOD_CAR_PNG,width: 48.w,height: 48.w,), + Image.asset( + R.ASSETS_ICONS_ICON_GOOD_CAR_PNG, + width: 48.w, + height: 48.w, + ), Text( '购物车', - style: TextStyle(fontSize: 20.sp,color: ktextPrimary), + style: TextStyle(fontSize: 20.sp, color: ktextPrimary), ), ], ), @@ -509,47 +506,49 @@ class _GoodDetailPageState extends State { Row( children: [ GestureDetector( - onTap: () async{ - + onTap: () async { await SearchFunc.addGoodsCar(_goodDetail!.id!); }, child: Container( width: 230.w, height: 84.w, decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.horizontal(left: Radius.circular(84.w)), - border: Border.all(color: Color(0xFFE52E2E),width: 2.w) - // border: Border(top:BorderSide(color: Color(0xFFE52E2E),width: 2.w), - // left: BorderSide(color: Color(0xFFE52E2E),width: 2.w),bottom: BorderSide(color: Color(0xFFE52E2E),width: 2.w)) - ), + color: Colors.white, + borderRadius: + BorderRadius.horizontal(left: Radius.circular(84.w)), + border: Border.all(color: Color(0xFFE52E2E), width: 2.w) + // border: Border(top:BorderSide(color: Color(0xFFE52E2E),width: 2.w), + // left: BorderSide(color: Color(0xFFE52E2E),width: 2.w),bottom: BorderSide(color: Color(0xFFE52E2E),width: 2.w)) + ), alignment: Alignment.center, - child:Text( + child: Text( '加入购物车', - style: TextStyle(fontSize: 32.sp,color: Color(0xFFE52E2E)), + style: TextStyle(fontSize: 32.sp, color: Color(0xFFE52E2E)), ), ), ), GestureDetector( - onTap: (){ - if(_goodDetail!.stockStatus==0){ + onTap: () { + if (_goodDetail!.stockStatus == 0) { BotToast.showText(text: '商品库存不足'); - }else{ - Get.to(()=>SubmitOrderNormalPage(goodModel: _goodDetail!,)); + } else { + Get.to(() => SubmitOrderNormalPage( + goodModel: _goodDetail!, + )); } }, child: Container( width: 230.w, height: 84.w, decoration: BoxDecoration( - borderRadius: BorderRadius.horizontal(right: Radius.circular(84.w)), - color:Color(0xFFE52E2E), - + borderRadius: + BorderRadius.horizontal(right: Radius.circular(84.w)), + color: Color(0xFFE52E2E), ), alignment: Alignment.center, - child:Text( + child: Text( '立即购买', - style: TextStyle(fontSize: 32.sp,color: Colors.white), + style: TextStyle(fontSize: 32.sp, color: Colors.white), ), ), ) @@ -557,7 +556,6 @@ class _GoodDetailPageState extends State { ) ], ), - ); } @@ -606,6 +604,7 @@ class _GoodDetailPageState extends State { ], ); } + _getDiscount(double sellPrice, double discountPrice) { String count = ''; count = ((sellPrice / discountPrice) * 10).toStringAsFixed(1); @@ -613,7 +612,5 @@ class _GoodDetailPageState extends State { return count + '折'; } - _getSpecifications(){ - - } + _getSpecifications() {} } diff --git a/lib/ui/market/search/goods_grid_card.dart b/lib/ui/market/search/goods_grid_card.dart index 8160638f..72036557 100644 --- a/lib/ui/market/search/goods_grid_card.dart +++ b/lib/ui/market/search/goods_grid_card.dart @@ -1,17 +1,16 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/models/market/goods_item.dart'; +import 'package:aku_new_community/ui/market/goods/goods_detail_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/material.dart'; - import 'package:get/get.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/models/market/goods_item.dart'; -import 'package:aku_community/ui/market/goods/goods_detail_page.dart'; -import 'package:aku_community/utils/headers.dart'; - class GoodsCard extends StatelessWidget { final GoodsItem item; final bool? border; + const GoodsCard({Key? key, required this.item, this.border}) : super(key: key); @@ -23,11 +22,11 @@ class GoodsCard extends StatelessWidget { shape: !(border ?? false) ? null : RoundedRectangleBorder( - borderRadius: BorderRadius.circular(8.w), - side: BorderSide(color: Color(0xFFC4C4C4))), + borderRadius: BorderRadius.circular(8.w), + side: BorderSide(color: Color(0xFFC4C4C4))), padding: EdgeInsets.zero, onPressed: () => Get.to( - () => GoodsDetailPage(id: item.id), + () => GoodsDetailPage(id: item.id), preventDuplicates: false, ), child: Column( @@ -72,30 +71,26 @@ class GoodsCard extends StatelessWidget { ), Container( padding: EdgeInsets.only( - left: 16.w,right: 16.w, + left: 16.w, + right: 16.w, top: 10.w, ), child: Text( item.title, maxLines: 2, overflow: TextOverflow.ellipsis, - style: TextStyle( - fontSize: 28.sp, - color: ktextPrimary - ), + style: TextStyle(fontSize: 28.sp, color: ktextPrimary), ), ), - Padding( padding: EdgeInsets.only( - left: 16.w,right: 16.w, + left: 16.w, + right: 16.w, top: 10.w, ), child: Container( child: _getIcon(1), - ) - ), - + )), 10.hb, Padding( padding: EdgeInsets.symmetric( @@ -123,7 +118,6 @@ class GoodsCard extends StatelessWidget { ), ), ), - Padding( padding: EdgeInsets.symmetric( horizontal: 16.w, @@ -136,7 +130,6 @@ class GoodsCard extends StatelessWidget { style: TextStyle( color: ktextSubColor, fontSize: 20.sp, - ), ), TextSpan( @@ -163,7 +156,6 @@ class GoodsCard extends StatelessWidget { style: TextStyle( color: ktextSubColor, fontSize: 20.sp, - ), ), TextSpan( @@ -171,28 +163,27 @@ class GoodsCard extends StatelessWidget { style: TextStyle( color: ktextSubColor, fontSize: 20.sp, - ), ), ], ), ), ), - ], ), ); } - - Widget _getIcon(int type){ - if(type==1){ + Widget _getIcon(int type) { + if (type == 1) { return Container( width: 86.w, height: 26.w, alignment: Alignment.center, decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(4.w), ), + borderRadius: BorderRadius.all( + Radius.circular(4.w), + ), gradient: LinearGradient( begin: FractionalOffset.centerLeft, end: FractionalOffset.centerRight, @@ -201,20 +192,18 @@ class GoodsCard extends StatelessWidget { ), child: Text( '京东自营', - style: TextStyle( - fontSize: 18.sp, - color: kForeGroundColor - ), + style: TextStyle(fontSize: 18.sp, color: kForeGroundColor), ), ); - } - else if(type==2){ + } else if (type == 2) { return Container( alignment: Alignment.center, width: 86.w, height: 30.w, decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(4.w), ), + borderRadius: BorderRadius.all( + Radius.circular(4.w), + ), gradient: LinearGradient( begin: FractionalOffset.centerLeft, end: FractionalOffset.centerRight, @@ -223,18 +212,10 @@ class GoodsCard extends StatelessWidget { ), child: Text( '京东POP', - style: TextStyle( - fontSize: 18.sp, - color: kForeGroundColor - ), + style: TextStyle(fontSize: 18.sp, color: kForeGroundColor), ), ); - - } - else + } else return SizedBox(); } - - - } diff --git a/lib/ui/market/search/goods_list_card.dart b/lib/ui/market/search/goods_list_card.dart index 4b99060e..f9f1ef86 100644 --- a/lib/ui/market/search/goods_list_card.dart +++ b/lib/ui/market/search/goods_list_card.dart @@ -1,16 +1,11 @@ -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/models/search/search_goods_model.dart'; -import 'package:aku_community/ui/market/collection/collection_func.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/models/search/search_goods_model.dart'; +import 'package:aku_new_community/ui/market/collection/collection_func.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/material.dart'; - -import 'package:bot_toast/bot_toast.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; -import 'package:aku_community/constants/api.dart'; - -import 'package:aku_community/utils/headers.dart'; - import 'good_detail_page.dart'; class GoodsListCard extends StatefulWidget { @@ -25,12 +20,13 @@ class GoodsListCard extends StatefulWidget { } class GoodsListCardState extends State { - @override Widget build(BuildContext context) { return GestureDetector( - onTap: (){ - Get.to(() => GoodDetailPage(goodId: widget.model.id!,)); + onTap: () { + Get.to(() => GoodDetailPage( + goodId: widget.model.id!, + )); }, child: Container( height: 280.w, @@ -144,9 +140,10 @@ class GoodsListCardState extends State { ), ), TextSpan( - text: (widget.model.discountPrice??0)>(widget.model.sellPrice??0) + text: (widget.model.discountPrice ?? 0) > + (widget.model.sellPrice ?? 0) ? _getDiscount(widget.model.sellPrice ?? -1, - widget.model.discountPrice ?? -1) + widget.model.discountPrice ?? -1) : '暂无折扣', style: TextStyle( color: ktextSubColor, @@ -242,6 +239,4 @@ class GoodsListCardState extends State { } else return SizedBox(); } - - } diff --git a/lib/ui/market/search/search_func.dart b/lib/ui/market/search/search_func.dart index 61ff6eb5..f5730471 100644 --- a/lib/ui/market/search/search_func.dart +++ b/lib/ui/market/search/search_func.dart @@ -1,38 +1,44 @@ -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/good/good_detail_model.dart'; -import 'package:aku_community/models/market/goods_item.dart'; -import 'package:aku_community/models/market/order/order_detail_model.dart'; -import 'package:aku_community/models/search/search_goods_model.dart'; -import 'package:aku_community/utils/network/base_list_model.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/utils/text_utils.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/good/good_detail_model.dart'; +import 'package:aku_new_community/models/market/order/order_detail_model.dart'; +import 'package:aku_new_community/models/search/search_goods_model.dart'; +import 'package:aku_new_community/utils/network/base_list_model.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/utils/text_utils.dart'; class SearchFunc { /// 搜索商品 根据关键字 - static Future> getGoodsList(int pageNum,int size - ,int orderBySalesVolume,int orderByPrice,String keyword, int brandId,double minPrice,double maxPrice) async { + static Future> getGoodsList( + int pageNum, + int size, + int orderBySalesVolume, + int orderByPrice, + String keyword, + int brandId, + double minPrice, + double maxPrice) async { //orderBySalesVolume 1降序 2升序 Map params = { "pageNum": pageNum, - "size":size, + "size": size, }; - if(orderBySalesVolume!=-1){ + if (orderBySalesVolume != -1) { params.putIfAbsent("orderBySalesVolume", () => orderBySalesVolume); } - if(orderByPrice!=-1){ + if (orderByPrice != -1) { params.putIfAbsent("orderByPrice", () => orderByPrice); } if (!TextUtils.isEmpty(keyword)) { params.putIfAbsent("keyword", () => keyword); } - if(brandId!=-1){ + if (brandId != -1) { params.putIfAbsent("brandId", () => brandId); } - if(minPrice!=-1){ + if (minPrice != -1) { params.putIfAbsent("minPrice", () => minPrice); } - if(maxPrice!=-1){ + if (maxPrice != -1) { params.putIfAbsent("maxPrice", () => maxPrice); } @@ -66,20 +72,12 @@ class SearchFunc { ///加入购物车 static Future addGoodsCar(int jcookGoodsId) async { - BaseModel model = await NetUtil().post( - API.market.insertShoppingCart, - params: {'jcookGoodsId': jcookGoodsId}, - showMessage: true - ); + BaseModel model = await NetUtil().post(API.market.insertShoppingCart, + params: {'jcookGoodsId': jcookGoodsId}, showMessage: true); if (model.message == null) return ''; return model.message as String; } - - - - - ///确认收货 static Future confirmReceive(int goodsAppointmentId) async { await NetUtil().get(API.market.confirmReceive, @@ -119,7 +117,6 @@ class SearchFunc { return baseModel; } - ///获取商品详情 static Future getOrderDetail(int goodsAppointmentId) async { BaseModel baseModel = await NetUtil().get(API.market.orderDetail, diff --git a/lib/ui/market/search/search_goods_page.dart b/lib/ui/market/search/search_goods_page.dart index b3ecab60..f048054d 100644 --- a/lib/ui/market/search/search_goods_page.dart +++ b/lib/ui/market/search/search_goods_page.dart @@ -1,31 +1,20 @@ -import 'dart:math'; - -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/models/market/goods_popular_model.dart'; -import 'package:aku_community/models/search/search_goods_model.dart'; -import 'package:aku_community/provider/user_provider.dart'; -import 'package:aku_community/ui/community/community_func.dart'; - -import 'package:aku_community/ui/market/collection/my_collection.dart'; - -import 'package:aku_community/utils/hive_store.dart'; - -import 'package:aku_community/utils/text_utils.dart'; - +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/models/market/goods_popular_model.dart'; +import 'package:aku_new_community/models/search/search_goods_model.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/provider/user_provider.dart'; +import 'package:aku_new_community/ui/community/community_func.dart'; +import 'package:aku_new_community/ui/market/collection/my_collection.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/hive_store.dart'; +import 'package:aku_new_community/utils/text_utils.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; - -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/market/goods_item.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/ui/market/goods/goods_card.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; import 'package:waterfall_flow/waterfall_flow.dart'; import '../search_goods_card.dart'; @@ -73,7 +62,7 @@ class SearchGoodsPageState extends State { List goodsPopularModels = []; int? categoryThirdId; bool _showCategory = false; - bool _showListOrGrid = true;//true list false grid + bool _showListOrGrid = true; //true list false grid @override void initState() { @@ -257,7 +246,7 @@ class SearchGoodsPageState extends State { fontWeight: FontWeight.w300), prefixIcon: _showCategory ? GestureDetector( - child: Container( + child: Container( padding: EdgeInsets.only(left: 18.w, right: 18.w), margin: EdgeInsets.all(12.w), decoration: BoxDecoration( @@ -282,7 +271,7 @@ class SearchGoodsPageState extends State { ), height: 44.w, ), - ) + ) : null, //isDense: true, @@ -425,17 +414,18 @@ class SearchGoodsPageState extends State { priceButton, Spacer(), GestureDetector( - onTap: (){ + onTap: () { _showListOrGrid = !_showListOrGrid; - setState(() { - - }); + setState(() {}); }, - child: Image.asset(_showListOrGrid? - R.ASSETS_ICONS_ICON_CHANGE_LIST_PNG: - R.ASSETS_ICONS_ICON_CHANGE_GRID_PNG,width: 40.w,height: 40.w,), + child: Image.asset( + _showListOrGrid + ? R.ASSETS_ICONS_ICON_CHANGE_LIST_PNG + : R.ASSETS_ICONS_ICON_CHANGE_GRID_PNG, + width: 40.w, + height: 40.w, + ), ), - 30.wb, ], ), @@ -460,47 +450,52 @@ class SearchGoodsPageState extends State { .map((e) => SearchGoodsModel.fromJson(e)) .toList(), builder: (items) { - return - _showListOrGrid?ListView.separated( - controller: _scrollController, - padding: EdgeInsets.only( - top: 10.w, - left: 20.w, - right: 20.w, - bottom: 32.w), - // gridDelegate: SliverWaterfallFlowDelegateWithFixedCrossAxisCount( - // crossAxisCount: 2, - // mainAxisSpacing: 20.w, - // crossAxisSpacing: 20.w, - // ), - itemBuilder: (context, index) { - final item = items[index]; - return GoodsListCard( - model: item, - refreshController: _refreshController1, - ); //GoodsCard(item: item); - }, - separatorBuilder: (_, __) { - return 32.w.heightBox; - }, - itemCount: items.length, - ):WaterfallFlow.builder( - gridDelegate: SliverWaterfallFlowDelegateWithFixedCrossAxisCount( - crossAxisCount: 2, - mainAxisSpacing: 20.w, - crossAxisSpacing: 20.w, - ), - padding: EdgeInsets.only( - top: 10.w, - left: 20.w, - right: 20.w, - bottom: 32.w), - itemBuilder: (context, index) { - final item = _models[index]; - return SearchGoodsCard(item: item,refreshController: _refreshController1,); - }, - itemCount: _models.length, - ); + return _showListOrGrid + ? ListView.separated( + controller: _scrollController, + padding: EdgeInsets.only( + top: 10.w, + left: 20.w, + right: 20.w, + bottom: 32.w), + // gridDelegate: SliverWaterfallFlowDelegateWithFixedCrossAxisCount( + // crossAxisCount: 2, + // mainAxisSpacing: 20.w, + // crossAxisSpacing: 20.w, + // ), + itemBuilder: (context, index) { + final item = items[index]; + return GoodsListCard( + model: item, + refreshController: _refreshController1, + ); //GoodsCard(item: item); + }, + separatorBuilder: (_, __) { + return 32.w.heightBox; + }, + itemCount: items.length, + ) + : WaterfallFlow.builder( + gridDelegate: + SliverWaterfallFlowDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + mainAxisSpacing: 20.w, + crossAxisSpacing: 20.w, + ), + padding: EdgeInsets.only( + top: 10.w, + left: 20.w, + right: 20.w, + bottom: 32.w), + itemBuilder: (context, index) { + final item = _models[index]; + return SearchGoodsCard( + item: item, + refreshController: _refreshController1, + ); + }, + itemCount: _models.length, + ); }, ), ).expand(), diff --git a/lib/ui/market/search/settlementGoodsDTO.dart b/lib/ui/market/search/settlementGoodsDTO.dart index abeaa272..d0aabc7d 100644 --- a/lib/ui/market/search/settlementGoodsDTO.dart +++ b/lib/ui/market/search/settlementGoodsDTO.dart @@ -2,13 +2,16 @@ class SettlementGoodsDTO { int? jcookGoodsId; int? num; - SettlementGoodsDTO( - {this.jcookGoodsId, this.num,}); + SettlementGoodsDTO({ + this.jcookGoodsId, + this.num, + }); SettlementGoodsDTO.fromJson(Map json) { jcookGoodsId = json['jcookGoodsId']; num = json['num']; } + Map toJson() { final Map data = new Map(); data['jcookGoodsId'] = this.jcookGoodsId; @@ -16,5 +19,4 @@ class SettlementGoodsDTO { return data; } - } diff --git a/lib/ui/market/search/submit_order_page.dart b/lib/ui/market/search/submit_order_page.dart index 58ee053d..5f0dc1d9 100644 --- a/lib/ui/market/search/submit_order_page.dart +++ b/lib/ui/market/search/submit_order_page.dart @@ -1,41 +1,39 @@ -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/order/create_order_model.dart'; -import 'package:aku_community/model/user/adress_model.dart'; -import 'package:aku_community/models/market/shop_car/shop_car_list_model.dart'; -import 'package:aku_community/pages/life_pay/pay_finish_page.dart'; -import 'package:aku_community/pages/life_pay/pay_util.dart'; -import 'package:aku_community/pages/personal/address/address_list_page.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/ui/market/order/order_page.dart'; -import 'package:aku_community/ui/market/search/settlementGoodsDTO.dart'; -import 'package:aku_community/ui/market/shop_car/shop_car_func.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/widget/buttons/end_button.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/order/create_order_model.dart'; +import 'package:aku_new_community/model/user/adress_model.dart'; +import 'package:aku_new_community/models/market/shop_car/shop_car_list_model.dart'; +import 'package:aku_new_community/pages/life_pay/pay_util.dart'; +import 'package:aku_new_community/pages/personal/address/address_list_page.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/ui/market/order/order_page.dart'; +import 'package:aku_new_community/ui/market/search/settlementGoodsDTO.dart'; +import 'package:aku_new_community/ui/market/shop_car/shop_car_func.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/end_button.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/utils/headers.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; +import 'package:velocity_x/velocity_x.dart'; class SubmitOrderPage extends StatefulWidget { final List models; - SubmitOrderPage({Key? key, required this.models}) : super(key: key); + + SubmitOrderPage({Key? key, required this.models}) : super(key: key); @override _SubmitOrderPageState createState() => _SubmitOrderPageState(); } class _SubmitOrderPageState extends State { - List _controllers = []; List _goodsList = []; AddressModel? _addressModel; @@ -48,78 +46,68 @@ class _SubmitOrderPageState extends State { super.initState(); final appProvider = Provider.of(Get.context!); - _controllers.forEach((element) { element.dispose(); }); _controllers.clear(); widget.models.forEach((element) { - _controllers.add( - TextEditingController(text: element.num.toString())); - _goodsList.add(SettlementGoodsDTO(jcookGoodsId: element.id,num: element.num)); + _controllers.add(TextEditingController(text: element.num.toString())); + _goodsList + .add(SettlementGoodsDTO(jcookGoodsId: element.id, num: element.num)); }); - - if(appProvider.addressModel!=null){ + if (appProvider.addressModel != null) { _addressModel = appProvider.addressModel!; - createOrder(_addressModel!.id!,_goodsList); - }else{ + createOrder(_addressModel!.id!, _goodsList); + } else { _addressModel = null; } + } -} @override void dispose() { - super.dispose(); } - - Future createOrder(int addressId,List goodsList) async { - - BaseModel model = await NetUtil().post( - API.market.shopCarSettlement, - params: {'addressId': addressId,'settlementGoodsDTOList':goodsList.map((v) => v.toJson()).toList()}, - ); - if (model.data == null){ - _createOrderModel = null; - setState(() { - - }); - return false; - - }else{ - _createOrderModel = CreateOrderModel.fromJson(model.data); - setState(() { - - }); - return true; - } - - + Future createOrder( + int addressId, List goodsList) async { + BaseModel model = await NetUtil().post( + API.market.shopCarSettlement, + params: { + 'addressId': addressId, + 'settlementGoodsDTOList': goodsList.map((v) => v.toJson()).toList() + }, + ); + if (model.data == null) { + _createOrderModel = null; + setState(() {}); + return false; + } else { + _createOrderModel = CreateOrderModel.fromJson(model.data); + setState(() {}); + return true; } - + } @override Widget build(BuildContext context) { return BeeScaffold( - title: '确认订单'.text.size(32.sp).black.bold.make(), + title: '确认订单'.text.size(32.sp).black.bold.make(), titleSpacing: 0, - - body: ListView( - children: [ - 20.hb, - _address(context), - 20.hb, - ...widget.models.mapIndexed((currentValue, index) => _goodCard(currentValue,index,_createOrderModel)), - 20.hb, - _priceView(), - 20.hb, - _payWay(), - 20.hb, - ], - ), - + body: ListView( + children: [ + 20.hb, + _address(context), + 20.hb, + ...widget.models.mapIndexed((currentValue, index) => + _goodCard(currentValue, index, _createOrderModel)), + 20.hb, + _priceView(), + 20.hb, + _payWay(), + 20.hb, + ], + ), bottomNavi: Container( width: double.infinity, height: 120.w, @@ -127,42 +115,38 @@ class _SubmitOrderPageState extends State { child: Row( children: [ Spacer(), - EndButton( - onPressed: () async { - if(_addressModel==null){ + onPressed: () async { + if (_addressModel == null) { BotToast.showText(text: '请先选择地址'); return; } - if(!haveStock){ + if (!haveStock) { BotToast.showText(text: '下单失败,订单内有商品无库存'); return; } Function cancel = BotToast.showLoading(); - BaseModel baseModel = - await NetUtil().post(API.pay.jcookOrderCreateOrder, params: { + BaseModel baseModel = await NetUtil() + .post(API.pay.jcookOrderCreateOrder, params: { "addressId": _addressModel!.id!, - "settlementGoodsDTOList": _goodsList.map((v) => v.toJson()).toList(), + "settlementGoodsDTOList": + _goodsList.map((v) => v.toJson()).toList(), "payType": 1, //暂时写死 等待后续补充 "payPrice": _allPrice }); if (baseModel.status ?? false) { - bool result = await PayUtil() - .callAliPay(baseModel.message!, API.pay.jcookOrderCheckAlipay); + bool result = await PayUtil().callAliPay( + baseModel.message!, API.pay.jcookOrderCheckAlipay); if (result) { Get.off(() => OrderPage(initIndex: 2)); - }else{ + } else { ///跳到待付款页面 Get.off(() => OrderPage(initIndex: 1)); } } cancel(); }, - text: '提交订单' - .text - .size(32.sp) - .color(Colors.white) - .make()), + text: '提交订单'.text.size(32.sp).color(Colors.white).make()), 10.widthBox, ], ), @@ -170,160 +154,150 @@ class _SubmitOrderPageState extends State { ); } - _address(BuildContext context){ - + _address(BuildContext context) { return Container( - padding: EdgeInsets.only(left: 16.w,right: 16.w,top: 20.w,bottom: 20.w), - margin: EdgeInsets.symmetric(horizontal:20.w ), + padding: + EdgeInsets.only(left: 16.w, right: 16.w, top: 20.w, bottom: 20.w), + margin: EdgeInsets.symmetric(horizontal: 20.w), width: double.infinity, height: 182.w, decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(24.w)), - color: Colors.white - ), - child: - GestureDetector( - onTap: () async{ - //跳转到地址界面,点击地址然后返回地址 - var result = await Get.to(()=>AddressListPage(canBack: true,)); - if(result!=null){ - _addressModel = result; - createOrder(_addressModel!.id!,_goodsList); - }else{ - _addressModel =null; - } - setState(() { - - }); - }, - child: Container( - color: Colors.white, - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Image.asset(R.ASSETS_ICONS_ICON_GOOD_LOCATION_PNG,width: 60.w,height: 60.w,), - - _addressModel!=null?Column( + color: Colors.white), + child: GestureDetector( + onTap: () async { + //跳转到地址界面,点击地址然后返回地址 + var result = await Get.to(() => AddressListPage( + canBack: true, + )); + if (result != null) { + _addressModel = result; + createOrder(_addressModel!.id!, _goodsList); + } else { + _addressModel = null; + } + setState(() {}); + }, + child: Container( + color: Colors.white, + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Image.asset( + R.ASSETS_ICONS_ICON_GOOD_LOCATION_PNG, + width: 60.w, + height: 60.w, + ), + _addressModel != null + ? Column( children: [ Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: - EdgeInsets.symmetric(horizontal: 20.w, vertical:6.w), + padding: EdgeInsets.symmetric( + horizontal: 20.w, vertical: 6.w), child: SizedBox( width: 518.w, child: Text( - _addressModel!.locationName??'', - style:TextStyle(fontSize: 24.sp,color: ktextPrimary), + _addressModel!.locationName ?? '', + style: TextStyle( + fontSize: 24.sp, color: ktextPrimary), maxLines: 1, overflow: TextOverflow.ellipsis, ), ), ), Padding( - padding: - EdgeInsets.symmetric(horizontal: 20.w, vertical:6.w), + padding: EdgeInsets.symmetric( + horizontal: 20.w, vertical: 6.w), child: SizedBox( width: 518.w, child: Text( - ( _addressModel!.addressDetail??''), - style:TextStyle(fontSize: 32.sp,color: ktextPrimary), + (_addressModel!.addressDetail ?? ''), + style: TextStyle( + fontSize: 32.sp, color: ktextPrimary), maxLines: 1, overflow: TextOverflow.ellipsis, - ), ), ), Padding( - padding: EdgeInsets.symmetric(horizontal: 20.w, vertical:6.w), + padding: EdgeInsets.symmetric( + horizontal: 20.w, vertical: 6.w), child: Row( crossAxisAlignment: CrossAxisAlignment.end, children: [ - Text( - _addressModel!.name??'', - style: TextStyle(fontSize: 24.sp,color: ktextPrimary) - ), + Text(_addressModel!.name ?? '', + style: TextStyle( + fontSize: 24.sp, + color: ktextPrimary)), 30.wb, - Text( - _addressModel!.tel??'', - style: TextStyle(fontSize: 24.sp,color: ktextPrimary) - ), + Text(_addressModel!.tel ?? '', + style: TextStyle( + fontSize: 24.sp, + color: ktextPrimary)), ], ), ), ], ), ], - ):Center( + ) + : Center( child: Text( - '请先选择地址', - style:TextStyle(fontSize: 32.sp,color: ktextPrimary), - maxLines: 1, - overflow: TextOverflow.ellipsis, - - ) - ), - - Spacer(), - Icon( - CupertinoIcons.chevron_forward, - size: 40.w, - color: Color(0xFF999999), - ), - - - ], - ), - ), - + '请先选择地址', + style: TextStyle(fontSize: 32.sp, color: ktextPrimary), + maxLines: 1, + overflow: TextOverflow.ellipsis, + )), + Spacer(), + Icon( + CupertinoIcons.chevron_forward, + size: 40.w, + color: Color(0xFF999999), + ), + ], ), + ), + ), ); } - _priceView(){ + _priceView() { double allPrice = 0; int allNum = 0; double fee = 0; - if(_createOrderModel!=null){ - fee =_createOrderModel!.fee??0; + if (_createOrderModel != null) { + fee = _createOrderModel!.fee ?? 0; } _controllers.forEachIndexed((index, element) { int num = int.parse(_controllers[index].text); print(num); allNum += num; - allPrice += ((widget.models[index].sellPrice??0) * num); + allPrice += ((widget.models[index].sellPrice ?? 0) * num); print(allPrice); }); - _allPrice = allPrice+fee; - + _allPrice = allPrice + fee; return Container( - padding: EdgeInsets.only(left: 16.w,right: 16.w,top: 20.w,bottom: 20.w), - margin: EdgeInsets.symmetric(horizontal:20.w ), + padding: + EdgeInsets.only(left: 16.w, right: 16.w, top: 20.w, bottom: 20.w), + margin: EdgeInsets.symmetric(horizontal: 20.w), width: double.infinity, height: 200.w, decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(24.w)), - color: Colors.white - ), + color: Colors.white), child: Column( children: [ Row( children: [ Spacer(), - '共${allNum}件' - .text - .size(28.sp) - .color(Color(0xFFBBBBBB)) - .make(), + '共${allNum}件'.text.size(28.sp).color(Color(0xFFBBBBBB)).make(), 5.wb, - '商品金额:' - .text - .size(28.sp) - .color(Color(0xFF333333)) - .make(), + '商品金额:'.text.size(28.sp).color(Color(0xFF333333)).make(), '¥${(_allPrice).toStringAsFixed(2)}' .text .size(28.sp) @@ -333,22 +307,20 @@ class _SubmitOrderPageState extends State { ], ), 16.hb, - _createOrderModel!=null? Row( - children: [ - Spacer(), - '运费:' - .text - .size(28.sp) - .color(Color(0xFF333333)) - .make(), - ( '¥${_createOrderModel!.fee}') - .text - .size(28.sp) - .color(Color(0xFF333333)) - .make(), - 16.wb, - ], - ):SizedBox(), + _createOrderModel != null + ? Row( + children: [ + Spacer(), + '运费:'.text.size(28.sp).color(Color(0xFF333333)).make(), + ('¥${_createOrderModel!.fee}') + .text + .size(28.sp) + .color(Color(0xFF333333)) + .make(), + 16.wb, + ], + ) + : SizedBox(), 16.hb, // Row( // children: [ @@ -364,72 +336,61 @@ class _SubmitOrderPageState extends State { Row( children: [ Spacer(), - '应付金额:' + '应付金额:'.text.size(32.sp).color(Color(0xFF333333)).bold.make(), + '¥${_allPrice + fee}' .text .size(32.sp) - .color(Color(0xFF333333)).bold - .make(), - '¥${_allPrice+fee}' - .text - .size(32.sp) - .color(Color(0xFFE52E2E)).bold + .color(Color(0xFFE52E2E)) + .bold .make(), 16.wb, ], ) ], ), - ); } - - _payWay(){ + _payWay() { return Container( - padding: EdgeInsets.only(left: 16.w,right: 16.w,top: 20.w,bottom: 20.w), - margin: EdgeInsets.symmetric(horizontal:20.w ), + padding: + EdgeInsets.only(left: 16.w, right: 16.w, top: 20.w, bottom: 20.w), + margin: EdgeInsets.symmetric(horizontal: 20.w), width: double.infinity, height: 72.w, decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(24.w)), - color: Colors.white - ), + color: Colors.white), child: Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - '支付方式' - .text - .size(28.sp) - .color(Color(0xFF333333)) - .make(), + '支付方式'.text.size(28.sp).color(Color(0xFF333333)).make(), Spacer(), - Image.asset(R.ASSETS_ICONS_ALIPAY_ROUND_PNG,width: 40.w,height: 40.w,), + Image.asset( + R.ASSETS_ICONS_ALIPAY_ROUND_PNG, + width: 40.w, + height: 40.w, + ), 16.wb, - '支付宝' - .text - .size(28.sp) - .color(Color(0xFF333333)) - .make(), + '支付宝'.text.size(28.sp).color(Color(0xFF333333)).make(), ], ), - ); } - - Widget _goodCard(ShopCarListModel model, int index,CreateOrderModel? createOrderModel) { + Widget _goodCard( + ShopCarListModel model, int index, CreateOrderModel? createOrderModel) { bool haveGoods = true; - if(createOrderModel!=null){ - if(createOrderModel.myShoppingCartVoList![index].stockStatus==0){ + if (createOrderModel != null) { + if (createOrderModel.myShoppingCartVoList![index].stockStatus == 0) { haveGoods = false; haveStock = false; } - } var top = RichText( text: TextSpan(children: [ WidgetSpan( - child: _getKindWd(model.kind??0), + child: _getKindWd(model.kind ?? 0), ), TextSpan( text: model.skuName, @@ -448,71 +409,49 @@ class _SubmitOrderPageState extends State { .color(Color(0xFFBBBBBB)) .make(), ); - var bottom = - Column( + var bottom = Column( children: [ Row( children: [ 92.wb, - '购买数量' - .text - .size(28.sp) - .color(Color(0xFF333333)) - .make(), + '购买数量'.text.size(28.sp).color(Color(0xFF333333)).make(), Spacer(), - haveGoods? - _getBottomSuffix(model.goodStatus, model.id!, index): - '该规格商品无库存' - .text - .size(24.sp) - .color(Color(0xFFF58123)) - .make(), + haveGoods + ? _getBottomSuffix(model.goodStatus, model.id!, index) + : '该规格商品无库存'.text.size(24.sp).color(Color(0xFFF58123)).make(), ], ), 48.hb, Row( children: [ 92.wb, - '配送方式' - .text - .size(28.sp) - .color(Color(0xFF333333)) - .make(), + '配送方式'.text.size(28.sp).color(Color(0xFF333333)).make(), Spacer(), - '快递配送' - .text - .size(28.sp) - .color(Color(0xFFBBBBBB)) - .make(), + '快递配送'.text.size(28.sp).color(Color(0xFFBBBBBB)).make(), 10.wb, ], ), ], ); int num = int.parse(_controllers[index].text); - double sellPrice = model.sellPrice??0; - var price = - Row( - children: [ - Spacer(), - '共${_controllers[index].text}件' - .text - .size(28.sp) - .color(Color(0xFFBBBBBB)) - .make(), - 5.wb, - '商品金额:' - .text - .size(28.sp) - .color(Color(0xFF333333)) - .make(), - '¥${(num * sellPrice).toStringAsFixed(2)}' - .text - .size(28.sp) - .color(Color(0xFF333333)) - .make(), - 16.wb, - ], + double sellPrice = model.sellPrice ?? 0; + var price = Row( + children: [ + Spacer(), + '共${_controllers[index].text}件' + .text + .size(28.sp) + .color(Color(0xFFBBBBBB)) + .make(), + 5.wb, + '商品金额:'.text.size(28.sp).color(Color(0xFF333333)).make(), + '¥${(num * sellPrice).toStringAsFixed(2)}' + .text + .size(28.sp) + .color(Color(0xFF333333)) + .make(), + 16.wb, + ], ); return Container( alignment: Alignment.center, @@ -550,7 +489,7 @@ class _SubmitOrderPageState extends State { ), child: FadeInImage.assetNetwork( placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, - image: model.mainPhoto??'', + image: model.mainPhoto ?? '', height: 188.w, width: 188.w, ), @@ -566,17 +505,18 @@ class _SubmitOrderPageState extends State { child: _getGoodsStatusImg(model.goodStatus) ?? SizedBox())) ], - ), 20.wb, Container( - child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, children: [ - - Container(child: top,width:sellPrice>9999?300.w:320.w,alignment: Alignment.topCenter,), + Container( + child: top, + width: sellPrice > 9999 ? 300.w : 320.w, + alignment: Alignment.topCenter, + ), 10.hb, mid, @@ -589,19 +529,20 @@ class _SubmitOrderPageState extends State { Spacer(), Container( - child:Column( + child: Column( crossAxisAlignment: CrossAxisAlignment.end, children: [ 8.hb, '¥' .richText .withTextSpanChildren([ - sellPrice.toStringAsFixed(2) - .textSpan - .size(28.sp) - .color(ktextPrimary) - .make(), - ]) + sellPrice + .toStringAsFixed(2) + .textSpan + .size(28.sp) + .color(ktextPrimary) + .make(), + ]) .color(ktextPrimary) .size(28.sp) .make(), @@ -613,7 +554,6 @@ class _SubmitOrderPageState extends State { ], ), ) - ], ), bottom, @@ -692,12 +632,12 @@ class _SubmitOrderPageState extends State { GestureDetector( onTap: () async { int num = int.parse(_controllers[index].text); - if(num>1){ + if (num > 1) { var result = await changeNum(id, num - 1); if (result) { _controllers[index].text = (num - 1).toString(); _goodsList[index].num = num - 1; - createOrder(_addressModel!.id!,_goodsList); + createOrder(_addressModel!.id!, _goodsList); } } @@ -718,7 +658,7 @@ class _SubmitOrderPageState extends State { color: Color(0xFFF2F2F2), borderRadius: BorderRadius.circular(4.w)), child: TextField( - readOnly:true, + readOnly: true, inputFormatters: [FilteringTextInputFormatter.digitsOnly], onChanged: (text) async { var result = await changeNum(id, int.parse(text)); @@ -740,14 +680,14 @@ class _SubmitOrderPageState extends State { GestureDetector( onTap: () async { int num = int.parse(_controllers[index].text); - if(num<10){ + if (num < 10) { var result = await changeNum( id, int.parse(_controllers[index].text) + 1); if (result) { _controllers[index].text = (int.parse(_controllers[index].text) + 1).toString(); _goodsList[index].num = num + 1; - createOrder(_addressModel!.id!,_goodsList); + createOrder(_addressModel!.id!, _goodsList); } setState(() {}); } diff --git a/lib/ui/market/search/submit_order_page_normal.dart b/lib/ui/market/search/submit_order_page_normal.dart index 9d035383..e4f2f07a 100644 --- a/lib/ui/market/search/submit_order_page_normal.dart +++ b/lib/ui/market/search/submit_order_page_normal.dart @@ -1,31 +1,28 @@ -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/good/good_detail_model.dart'; -import 'package:aku_community/model/order/create_order_model.dart'; -import 'package:aku_community/model/user/adress_model.dart'; -import 'package:aku_community/models/market/shop_car/shop_car_list_model.dart'; -import 'package:aku_community/pages/life_pay/pay_finish_page.dart'; -import 'package:aku_community/pages/life_pay/pay_util.dart'; -import 'package:aku_community/pages/personal/address/address_list_page.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/ui/market/order/order_page.dart'; -import 'package:aku_community/ui/market/search/settlementGoodsDTO.dart'; -import 'package:aku_community/ui/market/shop_car/shop_car_func.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/widget/buttons/end_button.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/model/good/good_detail_model.dart'; +import 'package:aku_new_community/model/order/create_order_model.dart'; +import 'package:aku_new_community/model/user/adress_model.dart'; +import 'package:aku_new_community/pages/life_pay/pay_util.dart'; +import 'package:aku_new_community/pages/personal/address/address_list_page.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/ui/market/order/order_page.dart'; +import 'package:aku_new_community/ui/market/search/settlementGoodsDTO.dart'; +import 'package:aku_new_community/ui/market/shop_car/shop_car_func.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/end_button.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/utils/headers.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; +import 'package:velocity_x/velocity_x.dart'; class SubmitOrderNormalPage extends StatefulWidget { final GoodDetailModel goodModel; @@ -130,7 +127,7 @@ class _SubmitOrderNormalPageState extends State { baseModel.message!, API.pay.jcookOrderCheckAlipay); if (result) { Get.off(() => OrderPage(initIndex: 2)); - }else{ + } else { ///跳到待付款页面 Get.off(() => OrderPage(initIndex: 1)); } diff --git a/lib/ui/market/search_goods_card.dart b/lib/ui/market/search_goods_card.dart index 327f8296..63492c45 100644 --- a/lib/ui/market/search_goods_card.dart +++ b/lib/ui/market/search_goods_card.dart @@ -1,43 +1,40 @@ -import 'package:aku_community/models/market/order/goods_home_model.dart'; -import 'package:aku_community/models/search/search_goods_model.dart'; -import 'package:aku_community/ui/market/search/good_detail_page.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/models/search/search_goods_model.dart'; +import 'package:aku_new_community/ui/market/search/good_detail_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; - import 'package:get/get.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/models/market/goods_item.dart'; -import 'package:aku_community/ui/market/goods/goods_detail_page.dart'; -import 'package:aku_community/utils/headers.dart'; - import 'collection/collection_func.dart'; class SearchGoodsCard extends StatefulWidget { final SearchGoodsModel item; final EasyRefreshController? refreshController; - const SearchGoodsCard({Key? key, required this.item, this.refreshController,}) - : super(key: key); + const SearchGoodsCard({ + Key? key, + required this.item, + this.refreshController, + }) : super(key: key); @override _SearchGoodsCardState createState() => _SearchGoodsCardState(); } + class _SearchGoodsCardState extends State { @override Widget build(BuildContext context) { return MaterialButton( color: Colors.white, elevation: 0, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(24.w), - ), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(24.w), + ), padding: EdgeInsets.zero, onPressed: () { Get.to( - () => GoodDetailPage(goodId: widget.item.id!), + () => GoodDetailPage(goodId: widget.item.id!), ); }, child: Column( @@ -82,30 +79,26 @@ class _SearchGoodsCardState extends State { ), Container( padding: EdgeInsets.only( - left: 16.w, right: 16.w, + left: 16.w, + right: 16.w, top: 10.w, ), child: Text( widget.item.skuName ?? '', maxLines: 2, overflow: TextOverflow.ellipsis, - style: TextStyle( - fontSize: 28.sp, - color: ktextPrimary - ), + style: TextStyle(fontSize: 28.sp, color: ktextPrimary), ), ), - Padding( padding: EdgeInsets.only( - left: 16.w, right: 16.w, + left: 16.w, + right: 16.w, top: 10.w, ), child: Container( - child: _getIcon(widget.item.kind??0), - ) - ), - + child: _getIcon(widget.item.kind ?? 0), + )), 10.hb, Padding( padding: EdgeInsets.symmetric( @@ -149,12 +142,12 @@ class _SearchGoodsCardState extends State { style: TextStyle( color: ktextSubColor, fontSize: 20.sp, - ), ), TextSpan( - text: widget.item.discountPrice == null ? '' : '¥${widget.item - .discountPrice ?? ''}', + text: widget.item.discountPrice == null + ? '' + : '¥${widget.item.discountPrice ?? ''}', style: TextStyle( color: ktextSubColor, fontSize: 20.sp, @@ -177,18 +170,17 @@ class _SearchGoodsCardState extends State { style: TextStyle( color: ktextSubColor, fontSize: 20.sp, - ), ), TextSpan( - text: (widget.item.discountPrice ?? 0) > (widget.item.sellPrice ?? 0) + text: (widget.item.discountPrice ?? 0) > + (widget.item.sellPrice ?? 0) ? _getDiscount(widget.item.sellPrice ?? -1, - widget.item.discountPrice ?? -1) + widget.item.discountPrice ?? -1) : '暂无折扣', style: TextStyle( color: ktextSubColor, fontSize: 20.sp, - ), ), ], @@ -208,20 +200,19 @@ class _SearchGoodsCardState extends State { }, child: (widget.item.isCollection ?? 0) != 0 ? Image.asset( - R.ASSETS_ICONS_SHOP_FAVORFILL_PNG, - width: 42.w, - height: 42.w, - ) + R.ASSETS_ICONS_SHOP_FAVORFILL_PNG, + width: 42.w, + height: 42.w, + ) : Image.asset( - R.ASSETS_ICONS_ICON_FAVOR_CHOOSE_PNG, - width: 42.w, - height: 42.w, - ), + R.ASSETS_ICONS_ICON_FAVOR_CHOOSE_PNG, + width: 42.w, + height: 42.w, + ), ), 20.wb, ], ), - 20.hb, ], ), @@ -235,7 +226,6 @@ class _SearchGoodsCardState extends State { return count + '折'; } - Widget _getIcon(int type) { if (type == 1) { return Container( @@ -243,7 +233,9 @@ class _SearchGoodsCardState extends State { height: 26.w, alignment: Alignment.center, decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(4.w),), + borderRadius: BorderRadius.all( + Radius.circular(4.w), + ), gradient: LinearGradient( begin: FractionalOffset.centerLeft, end: FractionalOffset.centerRight, @@ -252,20 +244,18 @@ class _SearchGoodsCardState extends State { ), child: Text( '京东自营', - style: TextStyle( - fontSize: 18.sp, - color: kForeGroundColor - ), + style: TextStyle(fontSize: 18.sp, color: kForeGroundColor), ), ); - } - else if (type == 2) { + } else if (type == 2) { return Container( alignment: Alignment.center, width: 86.w, height: 30.w, decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(4.w),), + borderRadius: BorderRadius.all( + Radius.circular(4.w), + ), gradient: LinearGradient( begin: FractionalOffset.centerLeft, end: FractionalOffset.centerRight, @@ -274,16 +264,10 @@ class _SearchGoodsCardState extends State { ), child: Text( '京东POP', - style: TextStyle( - fontSize: 18.sp, - color: kForeGroundColor - ), + style: TextStyle(fontSize: 18.sp, color: kForeGroundColor), ), ); - } - else + } else return SizedBox(); } } - - diff --git a/lib/ui/market/second_hand/add_second_hand_goods_page.dart b/lib/ui/market/second_hand/add_second_hand_goods_page.dart index cdaf4772..d4db0de2 100644 --- a/lib/ui/market/second_hand/add_second_hand_goods_page.dart +++ b/lib/ui/market/second_hand/add_second_hand_goods_page.dart @@ -1,15 +1,13 @@ import 'dart:io'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:aku_new_community/widget/picker/grid_image_picker.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; -import 'package:aku_community/widget/picker/grid_image_picker.dart'; - class AddSecondGoodsPage extends StatefulWidget { AddSecondGoodsPage({Key? key}) : super(key: key); @@ -21,6 +19,7 @@ class _AddSecondGoodsPageState extends State { late TextEditingController _titleController; late TextEditingController _contentController; List _files = []; + @override void initState() { super.initState(); diff --git a/lib/ui/market/second_hand/second_hand_page.dart b/lib/ui/market/second_hand/second_hand_page.dart index 70d407c9..7150d9ad 100644 --- a/lib/ui/market/second_hand/second_hand_page.dart +++ b/lib/ui/market/second_hand/second_hand_page.dart @@ -1,15 +1,13 @@ +import 'package:aku_new_community/models/market/goods_item.dart'; +import 'package:aku_new_community/ui/market/goods/goods_card.dart'; +import 'package:aku_new_community/ui/market/second_hand/add_second_hand_goods_page.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:waterfall_flow/waterfall_flow.dart'; -import 'package:aku_community/models/market/goods_item.dart'; -import 'package:aku_community/ui/market/goods/goods_card.dart'; -import 'package:aku_community/ui/market/second_hand/add_second_hand_goods_page.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class SecondHandPage extends StatefulWidget { SecondHandPage({Key? key}) : super(key: key); diff --git a/lib/ui/market/shop_car/shop_car_func.dart b/lib/ui/market/shop_car/shop_car_func.dart index afb51f6f..262317a0 100644 --- a/lib/ui/market/shop_car/shop_car_func.dart +++ b/lib/ui/market/shop_car/shop_car_func.dart @@ -1,7 +1,3 @@ -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; - class ShopCarFunc { static GoodStatus getGoodsStatus(int jcook, int bee) { if (jcook == 0) { diff --git a/lib/ui/market/shop_car/shop_car_page.dart b/lib/ui/market/shop_car/shop_car_page.dart index 16a035e6..adcbbade 100644 --- a/lib/ui/market/shop_car/shop_car_page.dart +++ b/lib/ui/market/shop_car/shop_car_page.dart @@ -1,14 +1,15 @@ -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/market/shop_car/shop_car_list_model.dart'; -import 'package:aku_community/ui/market/search/submit_order_page.dart'; -import 'package:aku_community/ui/market/shop_car/shop_car_func.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bee_check_radio.dart'; -import 'package:aku_community/widget/buttons/end_button.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/models/market/shop_car/shop_car_list_model.dart'; +import 'package:aku_new_community/ui/market/search/submit_order_page.dart'; +import 'package:aku_new_community/ui/market/shop_car/shop_car_func.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bee_check_radio.dart'; +import 'package:aku_new_community/widget/buttons/end_button.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -17,7 +18,6 @@ import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/utils/headers.dart'; class ShopCarPage extends StatefulWidget { const ShopCarPage({Key? key}) : super(key: key); @@ -338,55 +338,51 @@ class _ShopCarPageState extends State { } setState(() {}); }, - child: - model.goodStatus==GoodStatus.unSell? - Container( - color: Colors.transparent, - height: double.infinity, - child: Container( - padding: EdgeInsets.symmetric(horizontal: 16.w), - height: double.infinity, - alignment: Alignment.center, - child:Container( - height: 40.w, - width: 40.w, - decoration: BoxDecoration( - color:Color(0xFFBBBBBB), - - borderRadius: BorderRadius.circular(20.w), - ), - alignment: Alignment.center, - child: Container( - color: Color(0xFFEEEEEE), - width: 26.w, - height: 8.w, + child: model.goodStatus == GoodStatus.unSell + ? Container( + color: Colors.transparent, + height: double.infinity, + child: Container( + padding: EdgeInsets.symmetric(horizontal: 16.w), + height: double.infinity, + alignment: Alignment.center, + child: Container( + height: 40.w, + width: 40.w, + decoration: BoxDecoration( + color: Color(0xFFBBBBBB), + borderRadius: BorderRadius.circular(20.w), + ), + alignment: Alignment.center, + child: Container( + color: Color(0xFFEEEEEE), + width: 26.w, + height: 8.w, + )), + ), ) - ), - - ), - ): - Container( - color: Colors.transparent, - height: double.infinity, - child: Container( - padding: EdgeInsets.symmetric(horizontal: 16.w), - height: double.infinity, - alignment: Alignment.center, - child: BeeCheckRadio( - value: index, - groupValue: _selectIndex, - backColor: Colors.white, - indent: Container( - width: 24.w, - height: 24.w, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(12.w), - color: Color(0xFFE52E2E), + : Container( + color: Colors.transparent, + height: double.infinity, + child: Container( + padding: EdgeInsets.symmetric(horizontal: 16.w), + height: double.infinity, + alignment: Alignment.center, + child: BeeCheckRadio( + value: index, + groupValue: _selectIndex, + backColor: Colors.white, + indent: Container( + width: 24.w, + height: 24.w, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12.w), + color: Color(0xFFE52E2E), + ), + ), + ), ), ), - ), - ), - ), ), // Container( // width: 220.w, @@ -504,7 +500,7 @@ class _ShopCarPageState extends State { children: [ GestureDetector( onTap: () async { - if(_controllers[index].text.isEmpty){ + if (_controllers[index].text.isEmpty) { _controllers[index].text = '1'; } int num = int.parse(_controllers[index].text); @@ -535,11 +531,12 @@ class _ShopCarPageState extends State { //readOnly: true, inputFormatters: [FilteringTextInputFormatter.digitsOnly], onChanged: (text) async { - if(text.isNotEmpty){ - if(int.parse(text)>10){ + if (text.isNotEmpty) { + if (int.parse(text) > 10) { _controllers[index].text = '10'; } - var result = await changeNum(id, int.parse(_controllers[index].text)); + var result = await changeNum( + id, int.parse(_controllers[index].text)); if (!result) { // _controllers[index].text= @@ -559,7 +556,7 @@ class _ShopCarPageState extends State { ), GestureDetector( onTap: () async { - if(_controllers[index].text.isEmpty){ + if (_controllers[index].text.isEmpty) { _controllers[index].text = '0'; } int num = int.parse(_controllers[index].text); @@ -572,8 +569,8 @@ class _ShopCarPageState extends State { (int.parse(_controllers[index].text) + 1).toString(); } setState(() {}); - }else{ - BotToast.showText(text: '一次最多购买10个商品'); + } else { + BotToast.showText(text: '一次最多购买10个商品'); } }, child: Padding( @@ -619,7 +616,6 @@ class _ShopCarPageState extends State { return base.status ?? false; } - Future _changeNum() async { if (_selectIndex.isNotEmpty) { bool? result = await Get.dialog(CupertinoAlertDialog( diff --git a/lib/ui/market/user/adress/my_adress.dart b/lib/ui/market/user/adress/my_adress.dart index e69de29b..8b137891 100644 --- a/lib/ui/market/user/adress/my_adress.dart +++ b/lib/ui/market/user/adress/my_adress.dart @@ -0,0 +1 @@ + diff --git a/lib/ui/market/widget/animated_home_background.dart b/lib/ui/market/widget/animated_home_background.dart index ebd68247..ee6e1839 100644 --- a/lib/ui/market/widget/animated_home_background.dart +++ b/lib/ui/market/widget/animated_home_background.dart @@ -1,10 +1,11 @@ import 'package:flutter/material.dart'; - class AnimatedHomeBackground extends StatefulWidget { final double height; final Color backgroundColor; - AnimatedHomeBackground({Key? key, required this.height, required this.backgroundColor}) + + AnimatedHomeBackground( + {Key? key, required this.height, required this.backgroundColor}) : super(key: key); @override @@ -13,6 +14,7 @@ class AnimatedHomeBackground extends StatefulWidget { class AnimatedHomeBackgroundState extends State { late Color displayColor; + @override void initState() { super.initState(); diff --git a/lib/ui/market/widget/market_app_bar.dart b/lib/ui/market/widget/market_app_bar.dart index a15e5b69..41d30f1b 100644 --- a/lib/ui/market/widget/market_app_bar.dart +++ b/lib/ui/market/widget/market_app_bar.dart @@ -1,17 +1,16 @@ +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:provider/provider.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/utils/headers.dart'; - class MarketAppBar extends StatefulWidget with PreferredSizeWidget { final List? actions; final Widget? flexibleSpace; final PreferredSizeWidget bottom; - MarketAppBar({Key? key,this.actions, this.flexibleSpace, required this.bottom}) + MarketAppBar( + {Key? key, this.actions, this.flexibleSpace, required this.bottom}) : super(key: key); @override @@ -33,32 +32,31 @@ class _MarketAppBarState extends State { Widget build(BuildContext context) { final appProvider = Provider.of(context); return PreferredSize( - preferredSize: Size.fromHeight(60.w), child: AppBar( titleSpacing: 10.0, - title: Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - if (appProvider.location != null) - Padding( - padding: const EdgeInsets.only(right: 5), - child: Image.asset( - R.ASSETS_ICONS_SHOP_LOCATION_PNG, - width: 24.w, - height: 24.w, - ), - ), - Text( - appProvider.location?['city']==null?'':appProvider.location?['city'] as String? ?? '', - style: TextStyle( - fontWeight: FontWeight.w600, - fontSize: 28.sp, - color: Colors.white, - ), - textAlign: TextAlign.center, - ), - ]), + title: Row(crossAxisAlignment: CrossAxisAlignment.center, children: [ + if (appProvider.location != null) + Padding( + padding: const EdgeInsets.only(right: 5), + child: Image.asset( + R.ASSETS_ICONS_SHOP_LOCATION_PNG, + width: 24.w, + height: 24.w, + ), + ), + Text( + appProvider.location?['city'] == null + ? '' + : appProvider.location?['city'] as String? ?? '', + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 28.sp, + color: Colors.white, + ), + textAlign: TextAlign.center, + ), + ]), backgroundColor: Colors.transparent, actions: widget.actions, flexibleSpace: widget.flexibleSpace, diff --git a/lib/ui/market/widget/market_success_page.dart b/lib/ui/market/widget/market_success_page.dart index 1f7c246b..803e8d49 100644 --- a/lib/ui/market/widget/market_success_page.dart +++ b/lib/ui/market/widget/market_success_page.dart @@ -1,32 +1,25 @@ import 'dart:ui'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/model/user/adress_model.dart'; -import 'package:aku_community/models/market/order/goods_home_model.dart'; -import 'package:aku_community/pages/tab_navigator.dart'; -import 'package:aku_community/utils/network/base_list_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/end_button.dart'; -import 'package:aku_community/widget/buttons/line_button.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/models/market/order/goods_home_model.dart'; +import 'package:aku_new_community/pages/tab_navigator.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_list_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/end_button.dart'; +import 'package:aku_new_community/widget/buttons/line_button.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; -import 'package:get/get.dart'; - -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/model/community/community_topic_model.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/ui/community/community_views/topic/topic_detail_page.dart'; -import 'package:aku_community/utils/headers.dart'; import 'package:waterfall_flow/waterfall_flow.dart'; import '../market_home_goods_card.dart'; class MarketSuccessPage extends StatefulWidget { final int index; + MarketSuccessPage({Key? key, required this.index}) : super(key: key); @override @@ -45,97 +38,94 @@ class _MarketSuccessPageState extends State @override Widget build(BuildContext context) { super.build(context); - return BeeScaffold( + return BeeScaffold( title: '返回', - body:Column( + body: Column( children: [ - EasyRefresh( firstRefresh: true, header: MaterialHeader(), controller: _refreshController, onRefresh: () async { await updateMarketInfo(); - _onload =false; + _onload = false; setState(() {}); }, child: _onload ? SizedBox() : ListView( - padding: EdgeInsets.all(20.w), - children: [ - Container( - child:Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, + padding: EdgeInsets.all(20.w), children: [ - Row( - children: [ - - Text( - _getTitle(widget.index), - style:TextStyle(fontSize: 32.sp,color: ktextPrimary), - maxLines: 1, - overflow: TextOverflow.ellipsis, - ), - - - ], + Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + children: [ + Text( + _getTitle(widget.index), + style: TextStyle( + fontSize: 32.sp, color: ktextPrimary), + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), + ], + ), + 50.hb, + Row( + children: [ + LineButton( + onPressed: () async { + Navigator.of(context).pushAndRemoveUntil( + MaterialPageRoute( + builder: (context) => TabNavigator( + index: 1, + )), + (Route route) => false); + }, + width: 168.w, + text: '返回首页' + .text + .size(32.sp) + .color(Color(0xFFE52E2E)) + .make(), + color: Color(0xFFE52E2E), + ), + 32.wb, + EndButton( + onPressed: () async {}, + text: '查看详情' + .text + .size(32.sp) + .color(Colors.white) + .make()), + ], + ) + ], + ), ), - 50.hb, - - Row( - children: [ - LineButton( - onPressed: () async { - Navigator.of(context).pushAndRemoveUntil(MaterialPageRoute(builder: (context) => - TabNavigator(index: 1,)), (Route route) => false); - }, - width: 168.w, - text: '返回首页'.text.size(32.sp).color(Color(0xFFE52E2E)).make(), - color: Color(0xFFE52E2E), - ), - 32.wb, - EndButton( - onPressed: () async { - - }, - text: '查看详情' - .text - .size(32.sp) - .color(Colors.white) - .make()), - ], - ) + _buildSliverGrid(), ], - ) , - ), - _buildSliverGrid(), - ], - ), + ), ), ], ), - ); - - - - } - _buildSliverGrid() { - return WaterfallFlow.builder( - gridDelegate: SliverWaterfallFlowDelegateWithFixedCrossAxisCount( - crossAxisCount: 2, - mainAxisSpacing: 20.w, - crossAxisSpacing: 20.w, - ), - padding: EdgeInsets.all(32.w), - itemBuilder: (context, index) { - return MarketHomeGoodsCard(item: _goodsHomeModelList[index]); - }, - itemCount: _goodsHomeModelList.length, + _buildSliverGrid() { + return WaterfallFlow.builder( + gridDelegate: SliverWaterfallFlowDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + mainAxisSpacing: 20.w, + crossAxisSpacing: 20.w, + ), + padding: EdgeInsets.all(32.w), + itemBuilder: (context, index) { + return MarketHomeGoodsCard(item: _goodsHomeModelList[index]); + }, + itemCount: _goodsHomeModelList.length, // gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( // crossAxisCount: 2, @@ -158,12 +148,11 @@ class _MarketSuccessPageState extends State // // ///子Item的个数 // childCount: _goodsHomeModelList.length, - ); } Future updateMarketInfo() async { - _pageNum =1; + _pageNum = 1; BaseListModel baseListModel = await NetUtil().getList( API.market.findRecommendGoodsList, params: { @@ -199,8 +188,8 @@ class _MarketSuccessPageState extends State _pageCount = baseListModel.pageCount!; } - _getTitle(int index){ - switch(index){ + _getTitle(int index) { + switch (index) { case 1: return '支付成功'; case 2: @@ -213,6 +202,7 @@ class _MarketSuccessPageState extends State return ''; } } + @override bool get wantKeepAlive => true; } diff --git a/lib/ui/profile/car/car_manage_card.dart b/lib/ui/profile/car/car_manage_card.dart index 70cefc1e..ec6e2a32 100644 --- a/lib/ui/profile/car/car_manage_card.dart +++ b/lib/ui/profile/car/car_manage_card.dart @@ -1,10 +1,10 @@ +import 'package:aku_new_community/model/user/car_parking_model.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/model/user/car_parking_model.dart'; -import 'package:aku_community/utils/headers.dart'; - class CarManageCard extends StatelessWidget { final CarParkingModel model; + const CarManageCard({Key? key, required this.model}) : super(key: key); String get _assetImage { diff --git a/lib/ui/profile/car/car_manage_page.dart b/lib/ui/profile/car/car_manage_page.dart index 444c4907..21251f45 100644 --- a/lib/ui/profile/car/car_manage_page.dart +++ b/lib/ui/profile/car/car_manage_page.dart @@ -1,13 +1,11 @@ +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/ui/profile/car/car_manage_card.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:provider/provider.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/ui/profile/car/car_manage_card.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class CarManagePage extends StatefulWidget { CarManagePage({Key? key}) : super(key: key); diff --git a/lib/ui/profile/car_parking/car_parking_card.dart b/lib/ui/profile/car_parking/car_parking_card.dart index ee0b3ea2..779ba893 100644 --- a/lib/ui/profile/car_parking/car_parking_card.dart +++ b/lib/ui/profile/car_parking/car_parking_card.dart @@ -1,10 +1,10 @@ +import 'package:aku_new_community/model/user/car_parking_model.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/model/user/car_parking_model.dart'; -import 'package:aku_community/utils/headers.dart'; - class CarparkingCard extends StatelessWidget { final CarParkingModel model; + const CarparkingCard({Key? key, required this.model}) : super(key: key); String get _assetImage { diff --git a/lib/ui/profile/car_parking/car_parking_page.dart b/lib/ui/profile/car_parking/car_parking_page.dart index 4681bc5e..0c4e04a5 100644 --- a/lib/ui/profile/car_parking/car_parking_page.dart +++ b/lib/ui/profile/car_parking/car_parking_page.dart @@ -1,13 +1,11 @@ +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/ui/profile/car_parking/car_parking_card.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:provider/provider.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/ui/profile/car_parking/car_parking_card.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class CarParkingPage extends StatefulWidget { CarParkingPage({Key? key}) : super(key: key); diff --git a/lib/ui/profile/car_parking/manage_car_parking_page.dart b/lib/ui/profile/car_parking/manage_car_parking_page.dart index 051373bf..5b4a1023 100644 --- a/lib/ui/profile/car_parking/manage_car_parking_page.dart +++ b/lib/ui/profile/car_parking/manage_car_parking_page.dart @@ -1,7 +1,6 @@ +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class ManageCarParkingPage extends StatefulWidget { ManageCarParkingPage({Key? key}) : super(key: key); diff --git a/lib/ui/profile/house/add_house_page.dart b/lib/ui/profile/house/add_house_page.dart index 401bab4b..3e7aa5bd 100644 --- a/lib/ui/profile/house/add_house_page.dart +++ b/lib/ui/profile/house/add_house_page.dart @@ -1,11 +1,11 @@ -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/ui/profile/house/house_item.dart'; -import 'package:aku_community/ui/profile/house/pick_building_page.dart'; -import 'package:aku_community/ui/profile/house/pick_role_page.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/ui/profile/house/house_item.dart'; +import 'package:aku_new_community/ui/profile/house/pick_building_page.dart'; +import 'package:aku_new_community/ui/profile/house/pick_role_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flustars/flustars.dart'; import 'package:flutter/cupertino.dart'; diff --git a/lib/ui/profile/house/contract_stop/contract_stop_page.dart b/lib/ui/profile/house/contract_stop/contract_stop_page.dart index ba250f49..97129613 100644 --- a/lib/ui/profile/house/contract_stop/contract_stop_page.dart +++ b/lib/ui/profile/house/contract_stop/contract_stop_page.dart @@ -1,13 +1,11 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/ui/profile/house/contract_stop/upload_empty_list_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; import 'package:flutter/material.dart'; - import 'package:get/get.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/ui/profile/house/contract_stop/upload_empty_list_page.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; - class ContractStopPage extends StatefulWidget { ContractStopPage({ Key? key, diff --git a/lib/ui/profile/house/contract_stop/pay_result_page.dart b/lib/ui/profile/house/contract_stop/pay_result_page.dart index eff1c37d..89d242f4 100644 --- a/lib/ui/profile/house/contract_stop/pay_result_page.dart +++ b/lib/ui/profile/house/contract_stop/pay_result_page.dart @@ -1,19 +1,18 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/ui/profile/house/contract_stop/refund_bond_page.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/others/finish_result_image.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/ui/profile/house/contract_stop/refund_bond_page.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/others/finish_result_image.dart'; - class PayResultPage extends StatefulWidget { final String name; final double bond; final String date; final int id; + PayResultPage( {Key? key, required this.name, diff --git a/lib/ui/profile/house/contract_stop/pay_surplus_rent_page.dart b/lib/ui/profile/house/contract_stop/pay_surplus_rent_page.dart index 25d3ecba..273b958a 100644 --- a/lib/ui/profile/house/contract_stop/pay_surplus_rent_page.dart +++ b/lib/ui/profile/house/contract_stop/pay_surplus_rent_page.dart @@ -1,24 +1,22 @@ -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/extensions/widget_list_ext.dart'; +import 'package:aku_new_community/pages/life_pay/pay_finish_page.dart'; +import 'package:aku_new_community/pages/life_pay/pay_util.dart'; +import 'package:aku_new_community/ui/profile/house/house_func.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/bottom_sheets/pay_mothod_bottom_sheet.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:aku_new_community/widget/others/bee_input_row.dart'; +import 'package:aku_new_community/widget/others/house_head_card.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flustars/flustars.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:power_logger/power_logger.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/extensions/widget_list_ext.dart'; -import 'package:aku_community/pages/life_pay/pay_finish_page.dart'; -import 'package:aku_community/pages/life_pay/pay_util.dart'; -import 'package:aku_community/ui/profile/house/house_func.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/bottom_sheets/pay_mothod_bottom_sheet.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; -import 'package:aku_community/widget/others/bee_input_row.dart'; -import 'package:aku_community/widget/others/house_head_card.dart'; - class PaySuerplusRentPage extends StatefulWidget { ///不再计租时间 final String time; @@ -27,6 +25,7 @@ class PaySuerplusRentPage extends StatefulWidget { final num amount; final int id; + PaySuerplusRentPage( {Key? key, required this.time, required this.amount, required this.id}) : super(key: key); @@ -37,6 +36,7 @@ class PaySuerplusRentPage extends StatefulWidget { class _PaySuerplusRentPageState extends State { String _payMethod = '支付宝'; + @override Widget build(BuildContext context) { return BeeScaffold( diff --git a/lib/ui/profile/house/contract_stop/refund_bond_page.dart b/lib/ui/profile/house/contract_stop/refund_bond_page.dart index b9523599..13a84fc9 100644 --- a/lib/ui/profile/house/contract_stop/refund_bond_page.dart +++ b/lib/ui/profile/house/contract_stop/refund_bond_page.dart @@ -1,23 +1,22 @@ -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/extensions/widget_list_ext.dart'; +import 'package:aku_new_community/ui/profile/house/house_func.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:aku_new_community/widget/others/bee_input_row.dart'; +import 'package:aku_new_community/widget/others/house_head_card.dart'; import 'package:bot_toast/bot_toast.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/extensions/widget_list_ext.dart'; -import 'package:aku_community/ui/profile/house/house_func.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; -import 'package:aku_community/widget/others/bee_input_row.dart'; -import 'package:aku_community/widget/others/house_head_card.dart'; - class RefundBondPage extends StatefulWidget { final String name; final double bond; final String date; final int id; + RefundBondPage( {Key? key, required this.name, diff --git a/lib/ui/profile/house/contract_stop/refund_bond_result_page.dart b/lib/ui/profile/house/contract_stop/refund_bond_result_page.dart index 7badf060..2ba0b7ba 100644 --- a/lib/ui/profile/house/contract_stop/refund_bond_result_page.dart +++ b/lib/ui/profile/house/contract_stop/refund_bond_result_page.dart @@ -1,20 +1,19 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/ui/profile/house/contract_stop/refund_bond_page.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/others/finish_result_image.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/ui/profile/house/contract_stop/refund_bond_page.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/others/finish_result_image.dart'; - class RefundBondResultPage extends StatefulWidget { final int status; final String name; final double bond; final String date; final int id; + RefundBondResultPage( {Key? key, required this.status, diff --git a/lib/ui/profile/house/contract_stop/submit_finish_page.dart b/lib/ui/profile/house/contract_stop/submit_finish_page.dart index b17cd603..2955a12f 100644 --- a/lib/ui/profile/house/contract_stop/submit_finish_page.dart +++ b/lib/ui/profile/house/contract_stop/submit_finish_page.dart @@ -1,20 +1,19 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/models/house/lease_detail_model.dart'; +import 'package:aku_new_community/ui/profile/house/contract_stop/contract_stop_page.dart'; +import 'package:aku_new_community/ui/profile/house/contract_stop/pay_surplus_rent_page.dart'; +import 'package:aku_new_community/ui/profile/house/house_func.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/others/finish_result_image.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/models/house/lease_detail_model.dart'; -import 'package:aku_community/ui/profile/house/contract_stop/contract_stop_page.dart'; -import 'package:aku_community/ui/profile/house/contract_stop/pay_surplus_rent_page.dart'; -import 'package:aku_community/ui/profile/house/house_func.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/others/finish_result_image.dart'; - class SubmitFinishPage extends StatefulWidget { final int status; final int leaseId; + SubmitFinishPage({Key? key, required this.status, required this.leaseId}) : super(key: key); diff --git a/lib/ui/profile/house/contract_stop/upload_empty_list_page.dart b/lib/ui/profile/house/contract_stop/upload_empty_list_page.dart index 236f3afa..6134114a 100644 --- a/lib/ui/profile/house/contract_stop/upload_empty_list_page.dart +++ b/lib/ui/profile/house/contract_stop/upload_empty_list_page.dart @@ -1,27 +1,25 @@ import 'dart:io'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/extensions/widget_list_ext.dart'; +import 'package:aku_new_community/ui/profile/house/house_func.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:aku_new_community/widget/others/bee_input_row.dart'; +import 'package:aku_new_community/widget/others/house_head_card.dart'; +import 'package:aku_new_community/widget/others/upload_widget.dart'; +import 'package:aku_new_community/widget/others/user_tool.dart'; +import 'package:aku_new_community/widget/picker/bee_date_picker.dart'; +import 'package:aku_new_community/widget/views/doc_view.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flustars/flustars.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:open_file/open_file.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/extensions/widget_list_ext.dart'; -import 'package:aku_community/ui/profile/house/house_func.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; -import 'package:aku_community/widget/others/bee_input_row.dart'; -import 'package:aku_community/widget/others/house_head_card.dart'; -import 'package:aku_community/widget/others/upload_widget.dart'; -import 'package:aku_community/widget/others/user_tool.dart'; -import 'package:aku_community/widget/picker/bee_date_picker.dart'; -import 'package:aku_community/widget/views/doc_view.dart'; - class UploadEmptyListPage extends StatefulWidget { UploadEmptyListPage({Key? key}) : super(key: key); @@ -32,8 +30,10 @@ class UploadEmptyListPage extends StatefulWidget { class _UploadEmptyListPageState extends State { List _files = []; List _urls = []; + int get sysLeaseId => UserTool.appProveider.selectedHouse!.sysLeaseId ?? 0; DateTime? _date = DateTime.now(); + @override void initState() { super.initState(); diff --git a/lib/ui/profile/house/house_card.dart b/lib/ui/profile/house/house_card.dart index a4835724..66398e11 100644 --- a/lib/ui/profile/house/house_card.dart +++ b/lib/ui/profile/house/house_card.dart @@ -1,7 +1,7 @@ -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/models/user/passed_house_list_model.dart'; -import 'package:aku_community/ui/profile/house/pick_my_house_page.dart'; -import 'package:aku_community/utils/headers.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/models/user/passed_house_list_model.dart'; +import 'package:aku_new_community/ui/profile/house/pick_my_house_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flustars/flustars.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; @@ -15,6 +15,7 @@ class HouseCard extends StatelessWidget { final PassedHouseListModel? model; final CardAuthType type; final bool isOwner; + const HouseCard({ Key? key, required this.model, @@ -28,6 +29,7 @@ class HouseCard extends StatelessWidget { required this.isOwner, }) : type = CardAuthType.FAIL, super(key: key); + const HouseCard.success({ Key? key, required this.model, diff --git a/lib/ui/profile/house/house_func.dart b/lib/ui/profile/house/house_func.dart index ed9d6b0d..e489b552 100644 --- a/lib/ui/profile/house/house_func.dart +++ b/lib/ui/profile/house/house_func.dart @@ -1,14 +1,14 @@ import 'dart:io'; import 'dart:typed_data'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/house/lease_detail_model.dart'; -import 'package:aku_community/models/house/lease_echo_model.dart'; -import 'package:aku_community/models/house/submit_model.dart'; -import 'package:aku_community/models/user/passed_house_list_model.dart'; -import 'package:aku_community/utils/network/base_file_model.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/models/house/lease_detail_model.dart'; +import 'package:aku_new_community/models/house/lease_echo_model.dart'; +import 'package:aku_new_community/models/house/submit_model.dart'; +import 'package:aku_new_community/models/user/passed_house_list_model.dart'; +import 'package:aku_new_community/utils/network/base_file_model.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; import 'package:bot_toast/bot_toast.dart'; class HouseFunc { diff --git a/lib/ui/profile/house/house_item.dart b/lib/ui/profile/house/house_item.dart index aa16b985..a14fac77 100644 --- a/lib/ui/profile/house/house_item.dart +++ b/lib/ui/profile/house/house_item.dart @@ -1,4 +1,4 @@ -import 'package:aku_community/model/user/pick_building_model.dart'; +import 'package:aku_new_community/model/user/pick_building_model.dart'; class HouseItem { PickBuildingModel building; diff --git a/lib/ui/profile/house/house_owners_page.dart b/lib/ui/profile/house/house_owners_page.dart index 1be176cc..72083e26 100644 --- a/lib/ui/profile/house/house_owners_page.dart +++ b/lib/ui/profile/house/house_owners_page.dart @@ -1,21 +1,21 @@ -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/models/house/lease_detail_model.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/ui/profile/house/add_house_page.dart'; -import 'package:aku_community/ui/profile/house/contract_stop/contract_stop_page.dart'; -import 'package:aku_community/ui/profile/house/contract_stop/pay_result_page.dart'; -import 'package:aku_community/ui/profile/house/contract_stop/refund_bond_result_page.dart'; -import 'package:aku_community/ui/profile/house/contract_stop/submit_finish_page.dart'; -import 'package:aku_community/ui/profile/house/house_card.dart'; -import 'package:aku_community/ui/profile/house/house_func.dart'; -import 'package:aku_community/ui/profile/house/identify_selection_page.dart'; -import 'package:aku_community/ui/profile/house/lease_pay_query/lease_pay_query_page.dart'; -import 'package:aku_community/ui/profile/house/lease_relevation/tenant_house_list_page.dart'; -import 'package:aku_community/ui/profile/house/my_house_list.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/others/user_tool.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/models/house/lease_detail_model.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/ui/profile/house/add_house_page.dart'; +import 'package:aku_new_community/ui/profile/house/contract_stop/contract_stop_page.dart'; +import 'package:aku_new_community/ui/profile/house/contract_stop/pay_result_page.dart'; +import 'package:aku_new_community/ui/profile/house/contract_stop/refund_bond_result_page.dart'; +import 'package:aku_new_community/ui/profile/house/contract_stop/submit_finish_page.dart'; +import 'package:aku_new_community/ui/profile/house/house_card.dart'; +import 'package:aku_new_community/ui/profile/house/house_func.dart'; +import 'package:aku_new_community/ui/profile/house/identify_selection_page.dart'; +import 'package:aku_new_community/ui/profile/house/lease_pay_query/lease_pay_query_page.dart'; +import 'package:aku_new_community/ui/profile/house/lease_relevation/tenant_house_list_page.dart'; +import 'package:aku_new_community/ui/profile/house/my_house_list.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flustars/flustars.dart'; import 'package:flutter/material.dart'; diff --git a/lib/ui/profile/house/identify_selection_page.dart b/lib/ui/profile/house/identify_selection_page.dart index 5d1b7f60..68e5711a 100644 --- a/lib/ui/profile/house/identify_selection_page.dart +++ b/lib/ui/profile/house/identify_selection_page.dart @@ -1,16 +1,14 @@ +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/extensions/widget_list_ext.dart'; +import 'package:aku_new_community/ui/profile/house/lease_relevation/user_identify_page.dart'; +import 'package:aku_new_community/ui/profile/house/my_house_list.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/extensions/widget_list_ext.dart'; -import 'package:aku_community/ui/profile/house/lease_relevation/user_identify_page.dart'; -import 'package:aku_community/ui/profile/house/my_house_list.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class IdentifySelectionPage extends StatelessWidget { const IdentifySelectionPage({Key? key}) : super(key: key); diff --git a/lib/ui/profile/house/lease_pay_query/lease_pay_query_detail_page.dart b/lib/ui/profile/house/lease_pay_query/lease_pay_query_detail_page.dart index f1052b0b..d48134a5 100644 --- a/lib/ui/profile/house/lease_pay_query/lease_pay_query_detail_page.dart +++ b/lib/ui/profile/house/lease_pay_query/lease_pay_query_detail_page.dart @@ -1,24 +1,23 @@ -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/models/house/lease_fee_list_model.dart'; +import 'package:aku_new_community/pages/life_pay/pay_finish_page.dart'; +import 'package:aku_new_community/pages/life_pay/pay_util.dart'; +import 'package:aku_new_community/ui/profile/house/house_func.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flustars/flustars.dart'; +import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:power_logger/power_logger.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/house/lease_fee_list_model.dart'; -import 'package:aku_community/pages/life_pay/pay_finish_page.dart'; -import 'package:aku_community/pages/life_pay/pay_util.dart'; -import 'package:aku_community/ui/profile/house/house_func.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_divider.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; -import 'package:aku_community/widget/others/user_tool.dart'; - class LeasePayQueryDetailPage extends StatefulWidget { final LeaseFeeListModel model; + LeasePayQueryDetailPage({Key? key, required this.model}) : super(key: key); @override diff --git a/lib/ui/profile/house/lease_pay_query/lease_pay_query_page.dart b/lib/ui/profile/house/lease_pay_query/lease_pay_query_page.dart index b3591b3f..ddbab7e3 100644 --- a/lib/ui/profile/house/lease_pay_query/lease_pay_query_page.dart +++ b/lib/ui/profile/house/lease_pay_query/lease_pay_query_page.dart @@ -1,25 +1,24 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/models/house/lease_fee_list_model.dart'; +import 'package:aku_new_community/ui/profile/house/lease_pay_query/lease_pay_query_detail_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/base_list_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/others/user_tool.dart'; +import 'package:flustars/flustars.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - -import 'package:flustars/flustars.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/house/lease_fee_list_model.dart'; -import 'package:aku_community/ui/profile/house/lease_pay_query/lease_pay_query_detail_page.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/base_list_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_divider.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/others/user_tool.dart'; - class LeasePayQueryPage extends StatefulWidget { final int id; + LeasePayQueryPage({Key? key, required this.id}) : super(key: key); @override @@ -32,6 +31,7 @@ class _LeasePayQueryPageState extends State { int _years = DateTime.now().year; List _models = []; late EasyRefreshController _controller; + @override void initState() { super.initState(); diff --git a/lib/ui/profile/house/lease_relevation/contract_pay_page.dart b/lib/ui/profile/house/lease_relevation/contract_pay_page.dart index 003afbb5..086ab1c7 100644 --- a/lib/ui/profile/house/lease_relevation/contract_pay_page.dart +++ b/lib/ui/profile/house/lease_relevation/contract_pay_page.dart @@ -1,24 +1,22 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/extensions/widget_list_ext.dart'; +import 'package:aku_new_community/models/house/lease_detail_model.dart'; +import 'package:aku_new_community/pages/life_pay/pay_finish_page.dart'; +import 'package:aku_new_community/pages/life_pay/pay_util.dart'; +import 'package:aku_new_community/ui/profile/house/house_func.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/bottom_sheets/pay_mothod_bottom_sheet.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:aku_new_community/widget/others/bee_input_row.dart'; +import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - -import 'package:bot_toast/bot_toast.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:power_logger/power_logger.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/extensions/widget_list_ext.dart'; -import 'package:aku_community/models/house/lease_detail_model.dart'; -import 'package:aku_community/pages/life_pay/pay_finish_page.dart'; -import 'package:aku_community/pages/life_pay/pay_util.dart'; -import 'package:aku_community/ui/profile/house/house_func.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/bottom_sheets/pay_mothod_bottom_sheet.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; -import 'package:aku_community/widget/others/bee_input_row.dart'; - class ContractPayPage extends StatefulWidget { final int id; @@ -33,6 +31,7 @@ class _ContractPayPageState extends State { num _payTotal = 0; LeaseDetailModel? _model; String _payMethod = '选择支付方式'; + @override void initState() { super.initState(); diff --git a/lib/ui/profile/house/lease_relevation/contract_preview_page.dart b/lib/ui/profile/house/lease_relevation/contract_preview_page.dart index 7a8f42f2..4a2ee3a3 100644 --- a/lib/ui/profile/house/lease_relevation/contract_preview_page.dart +++ b/lib/ui/profile/house/lease_relevation/contract_preview_page.dart @@ -1,26 +1,25 @@ import 'dart:typed_data'; -import 'package:flutter/material.dart'; - import 'package:advance_pdf_viewer/advance_pdf_viewer.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/ui/profile/house/house_func.dart'; +import 'package:aku_new_community/ui/profile/house/lease_relevation/download_contract_page.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:aku_new_community/widget/others/sign_name_board.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:dotted_border/dotted_border.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:power_logger/power_logger.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/ui/profile/house/house_func.dart'; -import 'package:aku_community/ui/profile/house/lease_relevation/download_contract_page.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; -import 'package:aku_community/widget/others/sign_name_board.dart'; - class ContractPreviewPage extends StatefulWidget { final String url; final int id; + ContractPreviewPage({Key? key, required this.url, required this.id}) : super(key: key); @@ -32,6 +31,7 @@ class _ContractPreviewPageState extends State { Uint8List? _signName; PDFDocument? doc; int _currentPage = -1; + @override void initState() { Future.delayed(Duration(milliseconds: 300), () async { diff --git a/lib/ui/profile/house/lease_relevation/download_contract_page.dart b/lib/ui/profile/house/lease_relevation/download_contract_page.dart index 91fd2f39..aaa65e9e 100644 --- a/lib/ui/profile/house/lease_relevation/download_contract_page.dart +++ b/lib/ui/profile/house/lease_relevation/download_contract_page.dart @@ -1,19 +1,18 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/ui/profile/house/lease_relevation/upload_contracts_page.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/others/finish_result_image.dart'; +import 'package:aku_new_community/widget/views/%20bee_download_view.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:open_file/open_file.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/ui/profile/house/lease_relevation/upload_contracts_page.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/others/finish_result_image.dart'; -import 'package:aku_community/widget/views/%20bee_download_view.dart'; - class DownLoadContractPage extends StatefulWidget { final String path; final int id; + DownLoadContractPage({ Key? key, required this.path, diff --git a/lib/ui/profile/house/lease_relevation/house_information_check_page.dart b/lib/ui/profile/house/lease_relevation/house_information_check_page.dart index 9ae64d6a..d5f19e22 100644 --- a/lib/ui/profile/house/lease_relevation/house_information_check_page.dart +++ b/lib/ui/profile/house/lease_relevation/house_information_check_page.dart @@ -1,13 +1,13 @@ -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/models/house/lease_detail_model.dart'; -import 'package:aku_community/models/house/submit_model.dart'; -import 'package:aku_community/ui/profile/house/house_func.dart'; -import 'package:aku_community/ui/profile/house/lease_relevation/contract_preview_page.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_divider.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/models/house/lease_detail_model.dart'; +import 'package:aku_new_community/models/house/submit_model.dart'; +import 'package:aku_new_community/ui/profile/house/house_func.dart'; +import 'package:aku_new_community/ui/profile/house/lease_relevation/contract_preview_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -18,6 +18,7 @@ import 'package:velocity_x/velocity_x.dart'; class HouseInformationCheckPage extends StatefulWidget { final SubmitModel submitModel; final LeaseDetailModel detailModel; + HouseInformationCheckPage( {Key? key, required this.submitModel, required this.detailModel}) : super(key: key); @@ -29,6 +30,7 @@ class HouseInformationCheckPage extends StatefulWidget { class _HouseInformationCheckPageState extends State { late SubmitModel _submitModel; + @override void initState() { super.initState(); diff --git a/lib/ui/profile/house/lease_relevation/identify_selection_page.dart b/lib/ui/profile/house/lease_relevation/identify_selection_page.dart index 5d1b7f60..68e5711a 100644 --- a/lib/ui/profile/house/lease_relevation/identify_selection_page.dart +++ b/lib/ui/profile/house/lease_relevation/identify_selection_page.dart @@ -1,16 +1,14 @@ +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/extensions/widget_list_ext.dart'; +import 'package:aku_new_community/ui/profile/house/lease_relevation/user_identify_page.dart'; +import 'package:aku_new_community/ui/profile/house/my_house_list.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/extensions/widget_list_ext.dart'; -import 'package:aku_community/ui/profile/house/lease_relevation/user_identify_page.dart'; -import 'package:aku_community/ui/profile/house/my_house_list.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class IdentifySelectionPage extends StatelessWidget { const IdentifySelectionPage({Key? key}) : super(key: key); diff --git a/lib/ui/profile/house/lease_relevation/lease_house_card.dart b/lib/ui/profile/house/lease_relevation/lease_house_card.dart index 4646a3e6..6103f313 100644 --- a/lib/ui/profile/house/lease_relevation/lease_house_card.dart +++ b/lib/ui/profile/house/lease_relevation/lease_house_card.dart @@ -1,20 +1,19 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/models/house/lease_list_model.dart'; +import 'package:aku_new_community/ui/profile/house/lease_relevation/contract_pay_page.dart'; +import 'package:aku_new_community/ui/profile/house/lease_relevation/supplement_information_page.dart'; +import 'package:aku_new_community/ui/profile/house/lease_relevation/upload_contracts_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/buttons/card_bottom_button.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/models/house/lease_list_model.dart'; -import 'package:aku_community/ui/profile/house/lease_relevation/contract_pay_page.dart'; -import 'package:aku_community/ui/profile/house/lease_relevation/supplement_information_page.dart'; -import 'package:aku_community/ui/profile/house/lease_relevation/upload_contracts_page.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/buttons/card_bottom_button.dart'; - class LeaseHouseCard extends StatelessWidget { final LeaseListModel model; + const LeaseHouseCard({Key? key, required this.model}) : super(key: key); @override diff --git a/lib/ui/profile/house/lease_relevation/supplement_information_page.dart b/lib/ui/profile/house/lease_relevation/supplement_information_page.dart index 5e7b0af0..13db2596 100644 --- a/lib/ui/profile/house/lease_relevation/supplement_information_page.dart +++ b/lib/ui/profile/house/lease_relevation/supplement_information_page.dart @@ -1,17 +1,17 @@ import 'dart:io'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/extensions/widget_list_ext.dart'; -import 'package:aku_community/models/house/lease_detail_model.dart'; -import 'package:aku_community/models/house/submit_model.dart'; -import 'package:aku_community/ui/profile/house/house_func.dart'; -import 'package:aku_community/ui/profile/house/lease_relevation/house_information_check_page.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/bottom_sheets/sex_bottom_sheet.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; -import 'package:aku_community/widget/others/bee_input_row.dart'; -import 'package:aku_community/widget/others/user_tool.dart'; -import 'package:aku_community/widget/picker/identify_card_picker.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/extensions/widget_list_ext.dart'; +import 'package:aku_new_community/models/house/lease_detail_model.dart'; +import 'package:aku_new_community/models/house/submit_model.dart'; +import 'package:aku_new_community/ui/profile/house/house_func.dart'; +import 'package:aku_new_community/ui/profile/house/lease_relevation/house_information_check_page.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/bottom_sheets/sex_bottom_sheet.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:aku_new_community/widget/others/bee_input_row.dart'; +import 'package:aku_new_community/widget/others/user_tool.dart'; +import 'package:aku_new_community/widget/picker/identify_card_picker.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -21,6 +21,7 @@ import 'package:velocity_x/velocity_x.dart'; class SupplementInformationPage extends StatefulWidget { final int leaseId; + SupplementInformationPage({Key? key, required this.leaseId}) : super(key: key); @@ -65,6 +66,7 @@ class _SupplementInformationPageState extends State { File? _idCardBack; SubmitModel _submitModel = SubmitModel.init(); LeaseDetailModel? _model; + @override void initState() { Future.delayed(Duration(milliseconds: 300), () async { diff --git a/lib/ui/profile/house/lease_relevation/tenant_house_list_page.dart b/lib/ui/profile/house/lease_relevation/tenant_house_list_page.dart index b59ef178..fa503f9d 100644 --- a/lib/ui/profile/house/lease_relevation/tenant_house_list_page.dart +++ b/lib/ui/profile/house/lease_relevation/tenant_house_list_page.dart @@ -1,8 +1,8 @@ -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/models/house/lease_list_model.dart'; -import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; -import 'package:aku_community/ui/profile/house/lease_relevation/lease_house_card.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/models/house/lease_list_model.dart'; +import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/ui/profile/house/lease_relevation/lease_house_card.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -10,6 +10,7 @@ import 'package:velocity_x/velocity_x.dart'; class TenantHouseListPage extends StatefulWidget { final int leaseId; + TenantHouseListPage({Key? key, this.leaseId = 0}) : super(key: key); @override @@ -18,6 +19,7 @@ class TenantHouseListPage extends StatefulWidget { class _TenantHouseListPageState extends State { late EasyRefreshController _refreshController; + @override void initState() { _refreshController = EasyRefreshController(); diff --git a/lib/ui/profile/house/lease_relevation/upload_contracts_page.dart b/lib/ui/profile/house/lease_relevation/upload_contracts_page.dart index 5390a907..b107f2a5 100644 --- a/lib/ui/profile/house/lease_relevation/upload_contracts_page.dart +++ b/lib/ui/profile/house/lease_relevation/upload_contracts_page.dart @@ -1,24 +1,23 @@ import 'dart:io'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/extensions/widget_list_ext.dart'; +import 'package:aku_new_community/ui/profile/house/house_func.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:aku_new_community/widget/others/upload_widget.dart'; +import 'package:aku_new_community/widget/views/doc_view.dart'; +import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - -import 'package:bot_toast/bot_toast.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:open_file/open_file.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/extensions/widget_list_ext.dart'; -import 'package:aku_community/ui/profile/house/house_func.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; -import 'package:aku_community/widget/others/upload_widget.dart'; -import 'package:aku_community/widget/views/doc_view.dart'; - class UploadContractsPage extends StatefulWidget { final int id; + UploadContractsPage({Key? key, required this.id}) : super(key: key); @override @@ -28,6 +27,7 @@ class UploadContractsPage extends StatefulWidget { class _UploadContractsPageState extends State { List _files = []; List _urls = []; + @override Widget build(BuildContext context) { return BeeScaffold( diff --git a/lib/ui/profile/house/lease_relevation/user_identify_page.dart b/lib/ui/profile/house/lease_relevation/user_identify_page.dart index e29bac33..f1362af4 100644 --- a/lib/ui/profile/house/lease_relevation/user_identify_page.dart +++ b/lib/ui/profile/house/lease_relevation/user_identify_page.dart @@ -1,12 +1,12 @@ -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/extensions/widget_list_ext.dart'; -import 'package:aku_community/models/house/lease_echo_model.dart'; -import 'package:aku_community/ui/profile/house/house_func.dart'; -import 'package:aku_community/ui/profile/house/lease_relevation/tenant_house_list_page.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/bottom_sheets/sex_bottom_sheet.dart'; -import 'package:aku_community/widget/buttons/bottom_button.dart'; -import 'package:aku_community/widget/others/bee_input_row.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/extensions/widget_list_ext.dart'; +import 'package:aku_new_community/models/house/lease_echo_model.dart'; +import 'package:aku_new_community/ui/profile/house/house_func.dart'; +import 'package:aku_new_community/ui/profile/house/lease_relevation/tenant_house_list_page.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/bottom_sheets/sex_bottom_sheet.dart'; +import 'package:aku_new_community/widget/buttons/bottom_button.dart'; +import 'package:aku_new_community/widget/others/bee_input_row.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -27,6 +27,7 @@ class _UserIdentifyPageState extends State { TextEditingController _indentifyCodeController = TextEditingController(); String _sex = '请选择性别'; String _tel = ''; + @override void initState() { super.initState(); diff --git a/lib/ui/profile/house/my_house_list.dart b/lib/ui/profile/house/my_house_list.dart index 962a3c20..6d6b5991 100644 --- a/lib/ui/profile/house/my_house_list.dart +++ b/lib/ui/profile/house/my_house_list.dart @@ -1,11 +1,11 @@ -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/models/user/passed_house_list_model.dart'; -import 'package:aku_community/ui/profile/house/add_house_page.dart'; -import 'package:aku_community/ui/profile/house/house_func.dart'; -import 'package:aku_community/widget/bee_divider.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/others/bee_row_tile.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/models/user/passed_house_list_model.dart'; +import 'package:aku_new_community/ui/profile/house/add_house_page.dart'; +import 'package:aku_new_community/ui/profile/house/house_func.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/others/bee_row_tile.dart'; import 'package:flustars/flustars.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; @@ -24,6 +24,7 @@ class _MyHouseListState extends State { late EasyRefreshController _refreshController; List models = []; + @override void initState() { super.initState(); diff --git a/lib/ui/profile/house/pick_building_page.dart b/lib/ui/profile/house/pick_building_page.dart index f8c99def..58ba0b33 100644 --- a/lib/ui/profile/house/pick_building_page.dart +++ b/lib/ui/profile/house/pick_building_page.dart @@ -1,8 +1,8 @@ -import 'package:aku_community/model/user/pick_building_model.dart'; -import 'package:aku_community/pages/sign/sign_func.dart'; -import 'package:aku_community/ui/profile/house/house_item.dart'; -import 'package:aku_community/ui/profile/house/pick_unit_page.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/model/user/pick_building_model.dart'; +import 'package:aku_new_community/pages/sign/sign_func.dart'; +import 'package:aku_new_community/ui/profile/house/house_item.dart'; +import 'package:aku_new_community/ui/profile/house/pick_unit_page.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; @@ -17,6 +17,7 @@ class PickBuildingPage extends StatefulWidget { class _PickBuildingPageState extends State { List _buildingModels = []; + _buildItem(PickBuildingModel model) { return ListTile( title: model.label!.text.make(), diff --git a/lib/ui/profile/house/pick_my_house_page.dart b/lib/ui/profile/house/pick_my_house_page.dart index 375e8a11..55307e0f 100644 --- a/lib/ui/profile/house/pick_my_house_page.dart +++ b/lib/ui/profile/house/pick_my_house_page.dart @@ -1,12 +1,12 @@ -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/constants/app_theme.dart'; -import 'package:aku_community/models/user/passed_house_list_model.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/ui/profile/house/add_house_page.dart'; -import 'package:aku_community/ui/profile/house/house_func.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/constants/app_theme.dart'; +import 'package:aku_new_community/models/user/passed_house_list_model.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/ui/profile/house/add_house_page.dart'; +import 'package:aku_new_community/ui/profile/house/house_func.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -24,6 +24,7 @@ class PickMyHousePage extends StatefulWidget { class _PickMyHousePageState extends State { EasyRefreshController _refreshController = EasyRefreshController(); + _renderTitle(String title) { return SliverPadding( padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 16.w), @@ -115,12 +116,14 @@ class _HouseCard extends StatelessWidget { final PassedHouseListModel? model; final bool highlight; final EasyRefreshController controller; + const _HouseCard({ Key? key, required this.model, this.highlight = false, required this.controller, }) : super(key: key); + bool get canTapSlide { if (model == null) return false; return true; diff --git a/lib/ui/profile/house/pick_plot_page.dart b/lib/ui/profile/house/pick_plot_page.dart index 704a711c..17d7080d 100644 --- a/lib/ui/profile/house/pick_plot_page.dart +++ b/lib/ui/profile/house/pick_plot_page.dart @@ -1,7 +1,6 @@ +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - class PickPlotPage extends StatefulWidget { PickPlotPage({Key? key}) : super(key: key); diff --git a/lib/ui/profile/house/pick_role_page.dart b/lib/ui/profile/house/pick_role_page.dart index 1e49a08e..a4e7ce4e 100644 --- a/lib/ui/profile/house/pick_role_page.dart +++ b/lib/ui/profile/house/pick_role_page.dart @@ -1,11 +1,9 @@ +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; - ///选择身份 /// ///业主 亲属 租客 @@ -38,6 +36,7 @@ class _PickRolePageState extends State { 3: '租客', }; int? _pickedValue; + Widget _renderTile(int index, String title) { return MaterialButton( padding: EdgeInsets.symmetric( diff --git a/lib/ui/profile/house/pick_room_page.dart b/lib/ui/profile/house/pick_room_page.dart index 85e1c84b..2473ffb5 100644 --- a/lib/ui/profile/house/pick_room_page.dart +++ b/lib/ui/profile/house/pick_room_page.dart @@ -1,6 +1,6 @@ -import 'package:aku_community/model/user/pick_building_model.dart'; -import 'package:aku_community/pages/sign/sign_func.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/model/user/pick_building_model.dart'; +import 'package:aku_new_community/pages/sign/sign_func.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; @@ -8,6 +8,7 @@ import 'package:velocity_x/velocity_x.dart'; class PickRoomPage extends StatefulWidget { final int unitId; + const PickRoomPage({Key? key, required this.unitId}) : super(key: key); @override @@ -16,6 +17,7 @@ class PickRoomPage extends StatefulWidget { class _PickRoomPageState extends State { List _buildingModels = []; + @override Widget build(BuildContext context) { return BeeScaffold( diff --git a/lib/ui/profile/house/pick_unit_page.dart b/lib/ui/profile/house/pick_unit_page.dart index 877bb272..7b3720b8 100644 --- a/lib/ui/profile/house/pick_unit_page.dart +++ b/lib/ui/profile/house/pick_unit_page.dart @@ -1,7 +1,7 @@ -import 'package:aku_community/model/user/pick_building_model.dart'; -import 'package:aku_community/pages/sign/sign_func.dart'; -import 'package:aku_community/ui/profile/house/pick_room_page.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/model/user/pick_building_model.dart'; +import 'package:aku_new_community/pages/sign/sign_func.dart'; +import 'package:aku_new_community/ui/profile/house/pick_room_page.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; diff --git a/lib/ui/profile/order/order_page.dart b/lib/ui/profile/order/order_page.dart index a17ff6d1..d332a7e1 100644 --- a/lib/ui/profile/order/order_page.dart +++ b/lib/ui/profile/order/order_page.dart @@ -1,10 +1,10 @@ +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/tab_bar/bee_tab_bar.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/widget/bee_scaffold.dart'; -import 'package:aku_community/widget/tab_bar/bee_tab_bar.dart'; - class OrderPage extends StatefulWidget { final int initIndex; + OrderPage({Key? key, required this.initIndex}) : super(key: key); @override @@ -14,6 +14,7 @@ class OrderPage extends StatefulWidget { class _OrderPageState extends State with TickerProviderStateMixin { late TabController _tabController; List _tabs = ['全部', '待付款', '待收货', '待评价', '售后']; + @override void initState() { super.initState(); diff --git a/lib/ui/search/bee_search.dart b/lib/ui/search/bee_search.dart index 6ad67d16..d04406f2 100644 --- a/lib/ui/search/bee_search.dart +++ b/lib/ui/search/bee_search.dart @@ -1,24 +1,22 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/constants/application_objects.dart'; +import 'package:aku_new_community/model/common/img_model.dart'; +import 'package:aku_new_community/model/community/activity_item_model.dart'; +import 'package:aku_new_community/model/community/community_topic_model.dart'; +import 'package:aku_new_community/models/search/search_model.dart'; +import 'package:aku_new_community/ui/community/activity/activity_detail_page.dart'; +import 'package:aku_new_community/ui/community/community_views/topic/topic_detail_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/login_util.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/bee_back_button.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/constants/application_objects.dart'; -import 'package:aku_community/model/common/img_model.dart'; -import 'package:aku_community/model/community/activity_item_model.dart'; -import 'package:aku_community/model/community/community_topic_model.dart'; -import 'package:aku_community/models/search/search_model.dart'; -import 'package:aku_community/ui/community/activity/activity_detail_page.dart'; -import 'package:aku_community/ui/community/community_views/topic/topic_detail_page.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/login_util.dart'; -import 'package:aku_community/utils/network/base_model.dart'; -import 'package:aku_community/utils/network/net_util.dart'; -import 'package:aku_community/widget/bee_back_button.dart'; - class BeeSearch extends StatefulWidget { BeeSearch({Key? key}) : super(key: key); @@ -30,6 +28,7 @@ class _BeeSearchState extends State { late EasyRefreshController _refreshController; TextEditingController _textEditingController = TextEditingController(); SearchModel _searchModel = SearchModel.init(); + @override void initState() { _refreshController = EasyRefreshController(); diff --git a/lib/utils/bee_date_util.dart b/lib/utils/bee_date_util.dart index e76f0d95..3c412294 100644 --- a/lib/utils/bee_date_util.dart +++ b/lib/utils/bee_date_util.dart @@ -2,15 +2,22 @@ import 'package:flustars/flustars.dart'; class BeeDateUtil { DateTime? date; + BeeDateUtil(this.date); + DateTime get _now => DateTime.now(); + bool get sameYear => _now.year == this.date!.year; + bool get sameMonth => sameYear && _now.month == this.date!.month; + bool get sameDay => sameMonth && _now.day == this.date!.day; + bool get isYesterday => (DateTime(_now.year, _now.month, _now.day - 1).compareTo( DateTime(this.date!.year, this.date!.month, this.date!.day)) == 0); + bool get isDoubleYesterday => (DateTime(_now.year, _now.month, _now.day - 2).compareTo( DateTime(this.date!.year, this.date!.month, this.date!.day)) == diff --git a/lib/utils/bee_map.dart b/lib/utils/bee_map.dart index fae34d3a..180b8440 100644 --- a/lib/utils/bee_map.dart +++ b/lib/utils/bee_map.dart @@ -41,9 +41,23 @@ class BeeMap { }; static Map goodsOutStatus = {1: '审核中', 2: '审核通过', 3: '审核驳回'}; - static Map borrowStatus = {-1: '出借审核中',0: '出借审核驳回',1: '出借中', 2: '已归还', 3: '归还审核中',4:'归还审核驳回'}; + static Map borrowStatus = { + -1: '出借审核中', + 0: '出借审核驳回', + 1: '出借中', + 2: '已归还', + 3: '归还审核中', + 4: '归还审核驳回' + }; - static Map borrowStatusColor = {-1: Color(0xFFFF8200),0: Color(0xFFE60E0E),1: Color(0xD9000000), 2: Color(0xFF999999), 3: Color(0xFFFF8200),4:Color(0xFFE60E0E)}; + static Map borrowStatusColor = { + -1: Color(0xFFFF8200), + 0: Color(0xFFE60E0E), + 1: Color(0xD9000000), + 2: Color(0xFF999999), + 3: Color(0xFFFF8200), + 4: Color(0xFFE60E0E) + }; static Map votingStatus = { 1: '未开始', diff --git a/lib/utils/developer_util.dart b/lib/utils/developer_util.dart index a1e3c47f..b7ac7998 100644 --- a/lib/utils/developer_util.dart +++ b/lib/utils/developer_util.dart @@ -1,5 +1,6 @@ class DeveloperUtil { static bool _dev = false; + static setDev(bool state) { _dev = state; } diff --git a/lib/utils/file_utils.dart b/lib/utils/file_utils.dart index fd1c072f..4989bf90 100644 --- a/lib/utils/file_utils.dart +++ b/lib/utils/file_utils.dart @@ -49,7 +49,7 @@ class FileUtils { static Future readJSON(String path) async { try { String filePath = await appDocPath(); - final File file = await localFile(filePath+path); + final File file = await localFile(filePath + path); String str = await file.readAsString(); return FileOperationResult(str, "读取成功", true); } catch (err) { @@ -58,10 +58,11 @@ class FileUtils { } // 写入 json 数据 - static Future writeJSON(String path, String jsonStr) async { + static Future writeJSON( + String path, String jsonStr) async { try { String filePath = await appDocPath(); - final File file = await localFile(filePath+path); + final File file = await localFile(filePath + path); await file.writeAsString(jsonStr); return FileOperationResult(file, "写入成功", true); } catch (err) { diff --git a/lib/utils/headers.dart b/lib/utils/headers.dart index 8e9f0acb..8ba432fb 100644 --- a/lib/utils/headers.dart +++ b/lib/utils/headers.dart @@ -1,6 +1,6 @@ +export 'package:aku_new_community/const/resource.dart'; +export 'package:aku_new_community/extensions/num_ext.dart'; +export 'package:aku_new_community/extensions/widget_list_ext.dart'; +export 'package:flutter_gen/gen_l10n/app_localizations.dart'; export 'package:flutter_screenutil/flutter_screenutil.dart'; -export 'package:aku_community/extensions/num_ext.dart'; -export 'package:aku_community/extensions/widget_list_ext.dart'; export 'package:velocity_x/velocity_x.dart'; -export 'package:aku_community/const/resource.dart'; -export 'package:flutter_gen/gen_l10n/app_localizations.dart'; diff --git a/lib/utils/hive_store.dart b/lib/utils/hive_store.dart index 1f068589..76b8d560 100644 --- a/lib/utils/hive_store.dart +++ b/lib/utils/hive_store.dart @@ -1,11 +1,13 @@ -import 'package:aku_community/model/user/province_model.dart'; +import 'package:aku_new_community/model/user/province_model.dart'; import 'package:flutter/foundation.dart'; import 'package:hive/hive.dart'; import 'package:path_provider/path_provider.dart'; class HiveStore { static Box? _appBox; + static Box? get appBox => _appBox; + static Future init() async { if (!kIsWeb) { var dir = await getApplicationDocumentsDirectory(); @@ -15,8 +17,5 @@ class HiveStore { Hive.registerAdapter(DistrictAdapter()); _appBox = await Hive.openBox('app'); } - - } - } diff --git a/lib/utils/login_util.dart b/lib/utils/login_util.dart index cc01ea9e..c6dceef5 100644 --- a/lib/utils/login_util.dart +++ b/lib/utils/login_util.dart @@ -1,14 +1,13 @@ +import 'package:aku_new_community/pages/sign/sign_in_page.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/provider/user_provider.dart'; +import 'package:aku_new_community/ui/profile/house/add_house_page.dart'; +import 'package:aku_new_community/ui/profile/house/house_owners_page.dart'; +import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; -import 'package:aku_community/pages/sign/sign_in_page.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/provider/user_provider.dart'; -import 'package:aku_community/ui/profile/house/add_house_page.dart'; -import 'package:aku_community/ui/profile/house/house_owners_page.dart'; -import 'package:aku_community/widget/others/user_tool.dart'; - /// | 名称 | 函数 | /// |-----|------| /// | 验证登录(登录状态)| LoginnUtil.isLogin | diff --git a/lib/utils/message_parser.dart b/lib/utils/message_parser.dart index ff06e8d6..114d7bde 100644 --- a/lib/utils/message_parser.dart +++ b/lib/utils/message_parser.dart @@ -1,6 +1,6 @@ import 'dart:convert'; -import 'package:aku_community/utils/websocket/fire_dialog.dart'; +import 'package:aku_new_community/utils/websocket/fire_dialog.dart'; class MessageParser { final Map message; @@ -8,6 +8,7 @@ class MessageParser { String type = '0'; MessageParser(rawMessage) : message = Map.from(rawMessage); + //TODO 只支持Android端显示消息,需要适配iOS Future shot() async { ///副标题 diff --git a/lib/utils/network/base_file_model.dart b/lib/utils/network/base_file_model.dart index d7d74aa5..17573342 100644 --- a/lib/utils/network/base_file_model.dart +++ b/lib/utils/network/base_file_model.dart @@ -2,6 +2,7 @@ class BaseFileModel { String? message; String? url; bool? status; + BaseFileModel({ this.message, this.url, diff --git a/lib/utils/network/base_list_model.dart b/lib/utils/network/base_list_model.dart index 5864b137..3f1dc396 100644 --- a/lib/utils/network/base_list_model.dart +++ b/lib/utils/network/base_list_model.dart @@ -2,11 +2,13 @@ class BaseListModel { int? pageCount; int? rowCount; List? tableList; + BaseListModel({ this.pageCount, this.rowCount, this.tableList, }); + BaseListModel.zero({ this.pageCount = 0, this.rowCount = 0, diff --git a/lib/utils/network/base_model.dart b/lib/utils/network/base_model.dart index 1b22c35d..af386218 100644 --- a/lib/utils/network/base_model.dart +++ b/lib/utils/network/base_model.dart @@ -3,6 +3,7 @@ class BaseModel { String? message; bool? status; dynamic data; + BaseModel({ this.code, this.message, diff --git a/lib/utils/network/net_util.dart b/lib/utils/network/net_util.dart index b29921ae..c6f259b0 100644 --- a/lib/utils/network/net_util.dart +++ b/lib/utils/network/net_util.dart @@ -1,6 +1,13 @@ import 'dart:io'; import 'dart:typed_data'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/pages/sign/sign_in_page.dart'; +import 'package:aku_new_community/provider/user_provider.dart'; +import 'package:aku_new_community/utils/developer_util.dart'; +import 'package:aku_new_community/utils/network/base_file_model.dart'; +import 'package:aku_new_community/utils/network/base_list_model.dart'; +import 'package:aku_new_community/utils/network/base_model.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:dio/dio.dart'; import 'package:flustars/flustars.dart'; @@ -8,14 +15,6 @@ import 'package:get/get.dart' hide Response, FormData, MultipartFile; import 'package:power_logger/power_logger.dart'; import 'package:provider/provider.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/pages/sign/sign_in_page.dart'; -import 'package:aku_community/provider/user_provider.dart'; -import 'package:aku_community/utils/developer_util.dart'; -import 'package:aku_community/utils/network/base_file_model.dart'; -import 'package:aku_community/utils/network/base_list_model.dart'; -import 'package:aku_community/utils/network/base_model.dart'; - class NetUtil { Dio? _dio; static final NetUtil _netUtil = NetUtil._internal(); diff --git a/lib/utils/text_utils.dart b/lib/utils/text_utils.dart index fa9e33f7..9a8f9a99 100644 --- a/lib/utils/text_utils.dart +++ b/lib/utils/text_utils.dart @@ -1,4 +1,3 @@ - class TextUtils { ///判断空字符串 /// diff --git a/lib/utils/websocket/AlarmModel.dart b/lib/utils/websocket/AlarmModel.dart index 3c95d3d2..90fe198b 100644 --- a/lib/utils/websocket/AlarmModel.dart +++ b/lib/utils/websocket/AlarmModel.dart @@ -8,11 +8,11 @@ class AlarmModel { AlarmModel( {this.alarmNo, - this.alarmType, - this.deviceName, - this.deviceNo, - this.time, - this.type}); + this.alarmType, + this.deviceName, + this.deviceNo, + this.time, + this.type}); AlarmModel.fromJson(Map json) { alarmNo = json['alarmNo']; diff --git a/lib/utils/websocket/fire_dialog.dart b/lib/utils/websocket/fire_dialog.dart index f0eb3d35..39cce13e 100644 --- a/lib/utils/websocket/fire_dialog.dart +++ b/lib/utils/websocket/fire_dialog.dart @@ -1,21 +1,18 @@ import 'dart:convert'; +import 'package:aku_new_community/extensions/num_ext.dart'; +import 'package:aku_new_community/pages/tab_navigator.dart'; +import 'package:aku_new_community/utils/developer_util.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; -import 'package:aku_community/extensions/num_ext.dart'; -import 'package:aku_community/pages/tab_navigator.dart'; -import 'package:aku_community/utils/developer_util.dart'; -import 'package:aku_community/utils/headers.dart'; - import 'AlarmModel.dart'; class FireDialog { static fireAlarm(String content) async { - var json = jsonDecode(content); AlarmModel alarmModel = AlarmModel.fromJson(json); @@ -25,10 +22,8 @@ class FireDialog { content: Column( children: [ Text(getTitle(alarmModel)), - 10.hb, Text(getContent(alarmModel)), - ], ), actions: [ @@ -48,8 +43,9 @@ class FireDialog { barrierDismissible: false, ); } - static String getTitle(AlarmModel alarmModel){ - switch(alarmModel.type){ + + static String getTitle(AlarmModel alarmModel) { + switch (alarmModel.type) { case 1: return '发现火灾!请立刻组织疏散人群!'; case 2: @@ -58,39 +54,50 @@ class FireDialog { return '管家端APP报警'; default: return ''; - } } - static String getContent(AlarmModel alarmModel){ - switch(alarmModel.type){ + static String getContent(AlarmModel alarmModel) { + switch (alarmModel.type) { case 1: return '于${alarmModel.time},${alarmModel.deviceName}附近出现了火灾报警,请各位业主、租户保持镇静,不要慌乱,有序开始撤离!'; case 2: return '于${alarmModel.time},小区内有设备${alarmModel.deviceName}发生了报警,请物业负责人员尽快前往现场排查故障!'; case 3: - return '注意:\n于${alarmModel.time},${alarmModel.deviceNo}${alarmModel.deviceName}'+ - '在管家端app上点击了"一键报警",请尽快联系他沟通情况。\n'+ - '${alarmModel.deviceName}联系方式:${alarmModel.alarmNo}\n'+ - '如未能联系到${alarmModel.deviceName}。可择情报警' - ; + return '注意:\n于${alarmModel.time},${alarmModel.deviceNo}${alarmModel.deviceName}' + + '在管家端app上点击了"一键报警",请尽快联系他沟通情况。\n' + + '${alarmModel.deviceName}联系方式:${alarmModel.alarmNo}\n' + + '如未能联系到${alarmModel.deviceName}。可择情报警'; default: return ''; - } } - static Widget getImage(AlarmModel alarmModel){ - switch(alarmModel.type){ + + static Widget getImage(AlarmModel alarmModel) { + switch (alarmModel.type) { case 1: - return Image.asset(R.ASSETS_ICONS_FIRE_ALARM_PNG,width: 110.w,height: 110.w,fit: BoxFit.fill,); + return Image.asset( + R.ASSETS_ICONS_FIRE_ALARM_PNG, + width: 110.w, + height: 110.w, + fit: BoxFit.fill, + ); case 2: - return Image.asset(R.ASSETS_ICONS_DEVICE_ALARM_PNG,width: 110.w,height: 110.w,fit: BoxFit.fill,); + return Image.asset( + R.ASSETS_ICONS_DEVICE_ALARM_PNG, + width: 110.w, + height: 110.w, + fit: BoxFit.fill, + ); case 3: - return Image.asset(R.ASSETS_ICONS_APP_ALARM_PNG,width: 110.w,height: 110.w,fit: BoxFit.fill,); + return Image.asset( + R.ASSETS_ICONS_APP_ALARM_PNG, + width: 110.w, + height: 110.w, + fit: BoxFit.fill, + ); default: return SizedBox(); - } } - } diff --git a/lib/utils/websocket/tips_dialog.dart b/lib/utils/websocket/tips_dialog.dart index a6dec60e..428d02d2 100644 --- a/lib/utils/websocket/tips_dialog.dart +++ b/lib/utils/websocket/tips_dialog.dart @@ -1,13 +1,9 @@ +import 'package:aku_new_community/extensions/num_ext.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; -import 'package:aku_community/extensions/num_ext.dart'; -import 'package:aku_community/pages/tab_navigator.dart'; -import 'package:aku_community/utils/developer_util.dart'; - class TipsDialog { static tipsDialog() async { await Get.dialog( @@ -19,23 +15,25 @@ class TipsDialog { 20.hb, Row( children: [ - Text('请各位住户注意:' - ,style: TextStyle(color: Color(0xA6000000),fontSize: 26.sp),), + Text( + '请各位住户注意:', + style: TextStyle(color: Color(0xA6000000), fontSize: 26.sp), + ), ], ), 20.hb, - - Text('本功能已实现,但当前小区不具备能够使用该功能使用的条件,页面内容仅供参考。' - ,style: TextStyle(color: Color(0xA6000000),fontSize: 26.sp),textAlign: TextAlign.start,), - + Text( + '本功能已实现,但当前小区不具备能够使用该功能使用的条件,页面内容仅供参考。', + style: TextStyle(color: Color(0xA6000000), fontSize: 26.sp), + textAlign: TextAlign.start, + ), 20.hb, - ], ), actions: [ CupertinoDialogAction( child: Text('确定'), - textStyle: TextStyle(color: Color(0xFF007AFF),fontSize: 28.sp), + textStyle: TextStyle(color: Color(0xFF007AFF), fontSize: 28.sp), onPressed: () => Get.back(), ), ], diff --git a/lib/utils/websocket/web_socket_util.dart b/lib/utils/websocket/web_socket_util.dart index 88ac82ed..fe5e00f4 100644 --- a/lib/utils/websocket/web_socket_util.dart +++ b/lib/utils/websocket/web_socket_util.dart @@ -1,12 +1,11 @@ import 'dart:async'; +import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:power_logger/power_logger.dart'; import 'package:web_socket_channel/io.dart'; import 'package:web_socket_channel/web_socket_channel.dart'; -import 'package:aku_community/widget/others/user_tool.dart'; - const String baseUri = 'wss://test.kaidalai.cn/websocket/app'; enum SOCKETSTATUS { CONNECTED, //已连接 @@ -19,6 +18,7 @@ class WebSocketUtil { //内部构造函数 WebSocketUtil._(); + //单例模式 factory WebSocketUtil() => _socket; diff --git a/lib/widget/animated/OverlayWidget.dart b/lib/widget/animated/OverlayWidget.dart index b05cd65d..1bece2c6 100644 --- a/lib/widget/animated/OverlayWidget.dart +++ b/lib/widget/animated/OverlayWidget.dart @@ -1,48 +1,42 @@ - -import 'package:aku_community/pages/opening_code_page/opening_code_page.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/pages/opening_code_page/opening_code_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; - - -import 'package:aku_community/const/resource.dart'; - -import 'package:aku_community/utils/headers.dart'; import 'package:get/get.dart'; - - class OverlayLivingBtnWidget extends StatefulWidget { - - - OverlayLivingBtnWidget({Key? key, }) : super(key: key); + OverlayLivingBtnWidget({ + Key? key, + }) : super(key: key); @override _OverlayLivingBtnWidgetState createState() => _OverlayLivingBtnWidgetState(); } -class _OverlayLivingBtnWidgetState extends State with TickerProviderStateMixin{ +class _OverlayLivingBtnWidgetState extends State + with TickerProviderStateMixin { double _topPos = 0; double _leftPos = 0; bool _isMoving = false; double _width = 65; + double get _subWidth => _width / 2; double _height = 65; + double get _subHeight => _height / 2; bool _isHide = false; - @override void initState() { super.initState(); - _topPos = ScreenUtil().screenHeight - 20 - _height -50; - _leftPos = _leftPos = ScreenUtil().screenWidth-20 - _width; + _topPos = ScreenUtil().screenHeight - 20 - _height - 50; + _leftPos = _leftPos = ScreenUtil().screenWidth - 20 - _width; } @override void dispose() { - super.dispose(); } @@ -52,7 +46,6 @@ class _OverlayLivingBtnWidgetState extends State with Ti left: _isHide ? -_width : _leftPos, top: _topPos, child: Container( - child: Stack( children: [ Positioned( @@ -65,17 +58,14 @@ class _OverlayLivingBtnWidgetState extends State with Ti height: 65.w, decoration: BoxDecoration( image: DecorationImage( - fit: BoxFit.fill, - image: - AssetImage(R.ASSETS_ICONS_ICON_MAIN_OPEN_PNG),) - ), + fit: BoxFit.fill, + image: AssetImage(R.ASSETS_ICONS_ICON_MAIN_OPEN_PNG), + )), ), - ), GestureDetector( onTap: () { Get.to(OpeningCodePage()); - }, onPanUpdate: (detail) { setState(() { @@ -96,7 +86,7 @@ class _OverlayLivingBtnWidgetState extends State with Ti if ((_leftPos + _width + 20) > ScreenUtil().screenWidth) _leftPos = ScreenUtil().screenWidth - 20 - _width; if ((_topPos + _height + 55 + 20) > ScreenUtil().screenHeight) - _topPos = ScreenUtil().screenHeight- 20 - _height - 55; + _topPos = ScreenUtil().screenHeight - 20 - _height - 55; setState(() {}); }, child: Container( diff --git a/lib/widget/animated/animated_scale.dart b/lib/widget/animated/animated_scale.dart index 591d0cce..ca4f091c 100644 --- a/lib/widget/animated/animated_scale.dart +++ b/lib/widget/animated/animated_scale.dart @@ -8,6 +8,7 @@ class AnimatedScale extends ImplicitlyAnimatedWidget { : super( duration: Duration(milliseconds: 300), ); + @override ImplicitlyAnimatedWidgetState createState() => _AnimatedScaleState(); @@ -15,6 +16,7 @@ class AnimatedScale extends ImplicitlyAnimatedWidget { class _AnimatedScaleState extends AnimatedWidgetBaseState { Tween? scaleTween; + @override Widget build(BuildContext context) { return Transform.scale( diff --git a/lib/widget/animated/animated_transition.dart b/lib/widget/animated/animated_transition.dart index 83526cd3..e6ff6189 100644 --- a/lib/widget/animated/animated_transition.dart +++ b/lib/widget/animated/animated_transition.dart @@ -8,6 +8,7 @@ class AnimatedTranslate extends ImplicitlyAnimatedWidget { : super( duration: Duration(milliseconds: 300), ); + @override ImplicitlyAnimatedWidgetState createState() => _AnimatedTranslateState(); @@ -16,6 +17,7 @@ class AnimatedTranslate extends ImplicitlyAnimatedWidget { class _AnimatedTranslateState extends AnimatedWidgetBaseState { Tween? _offsetTween; + @override Widget build(BuildContext context) { return Transform.translate( diff --git a/lib/widget/bee_back_button.dart b/lib/widget/bee_back_button.dart index 5c37b970..a432bb60 100644 --- a/lib/widget/bee_back_button.dart +++ b/lib/widget/bee_back_button.dart @@ -1,10 +1,10 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:get/get.dart'; class BeeBackButton extends StatelessWidget { final Color color; + const BeeBackButton({Key? key, this.color = Colors.black}) : super(key: key); @override diff --git a/lib/widget/bee_divider.dart b/lib/widget/bee_divider.dart index 222ecc36..2043059b 100644 --- a/lib/widget/bee_divider.dart +++ b/lib/widget/bee_divider.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; class BeeDivider extends StatelessWidget { @@ -8,6 +7,7 @@ class BeeDivider extends StatelessWidget { final double? endIndent; final Color? color; final bool? isHorizontal; + BeeDivider( {Key? key, this.thickness, @@ -16,6 +16,7 @@ class BeeDivider extends StatelessWidget { this.color, this.isHorizontal = true}) : super(key: key); + BeeDivider.horizontal({ Key? key, this.indent, @@ -24,6 +25,7 @@ class BeeDivider extends StatelessWidget { color = Color(0xFFE8E8E8), isHorizontal = true, super(key: key); + BeeDivider.vertical({ Key? key, this.indent, @@ -32,6 +34,7 @@ class BeeDivider extends StatelessWidget { color = Color(0xFFE8E8E8), isHorizontal = false, super(key: key); + @override Widget build(BuildContext context) { return isHorizontal! diff --git a/lib/widget/bee_scaffold.dart b/lib/widget/bee_scaffold.dart index b6ed8626..4a6e21df 100644 --- a/lib/widget/bee_scaffold.dart +++ b/lib/widget/bee_scaffold.dart @@ -1,9 +1,8 @@ +import 'package:aku_new_community/constants/app_theme.dart'; +import 'package:aku_new_community/widget/bee_back_button.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:aku_community/constants/app_theme.dart'; -import 'package:aku_community/widget/bee_back_button.dart'; - class BeeScaffold extends StatelessWidget { final dynamic title; final Widget? body; @@ -21,8 +20,8 @@ class BeeScaffold extends StatelessWidget { final FloatingActionButton? fab; final double? titleSpacing; - final SystemUiOverlayStyle systemStyle; + BeeScaffold({ Key? key, this.title, @@ -36,7 +35,6 @@ class BeeScaffold extends StatelessWidget { this.fab, this.titleSpacing, this.systemStyle = SystemStyle.initial, - }) : super(key: key); BeeScaffold.white({ @@ -82,7 +80,6 @@ class BeeScaffold extends StatelessWidget { body: body, bottomNavigationBar: bottomNavi, floatingActionButton: fab, - ), ); } diff --git a/lib/widget/bottom_sheets/pay_mothod_bottom_sheet.dart b/lib/widget/bottom_sheets/pay_mothod_bottom_sheet.dart index 7f3320fb..1a5f86f2 100644 --- a/lib/widget/bottom_sheets/pay_mothod_bottom_sheet.dart +++ b/lib/widget/bottom_sheets/pay_mothod_bottom_sheet.dart @@ -1,13 +1,12 @@ +import 'package:aku_new_community/base/base_style.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; - class PayMethodBottomSheet extends StatelessWidget { final Function(String value) onChoose; + const PayMethodBottomSheet({Key? key, required this.onChoose}) : super(key: key); diff --git a/lib/widget/bottom_sheets/sex_bottom_sheet.dart b/lib/widget/bottom_sheets/sex_bottom_sheet.dart index b465af2d..623ea990 100644 --- a/lib/widget/bottom_sheets/sex_bottom_sheet.dart +++ b/lib/widget/bottom_sheets/sex_bottom_sheet.dart @@ -1,14 +1,13 @@ +import 'package:aku_new_community/base/base_style.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; - class SexBottomSheet extends StatelessWidget { final Function(String value) onChoose; + const SexBottomSheet({Key? key, required this.onChoose}) : super(key: key); @override diff --git a/lib/widget/buttons/aku_single_check_button.dart b/lib/widget/buttons/aku_single_check_button.dart index ce08ba15..56176524 100644 --- a/lib/widget/buttons/aku_single_check_button.dart +++ b/lib/widget/buttons/aku_single_check_button.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; @@ -8,6 +7,7 @@ class AkuSingleCheckButton extends StatefulWidget { final T value; final T gropValue; final VoidCallback onPressed; + AkuSingleCheckButton( {Key? key, required this.text, @@ -22,6 +22,7 @@ class AkuSingleCheckButton extends StatefulWidget { class _AkuSingleCheckButtonState extends State { bool get isSelect => widget.value == widget.gropValue; + @override Widget build(BuildContext context) { return Container( diff --git a/lib/widget/buttons/bee_check_box.dart b/lib/widget/buttons/bee_check_box.dart index f7ca5a38..2a9df00c 100644 --- a/lib/widget/buttons/bee_check_box.dart +++ b/lib/widget/buttons/bee_check_box.dart @@ -1,18 +1,20 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/utils/headers.dart'; - class BeeCheckBox extends StatefulWidget { final Function(bool)? onChange; final bool? isRound; final double? size; + BeeCheckBox({Key? key, this.onChange, this.isRound, this.size}) : super(key: key); + BeeCheckBox.round({Key? key, this.onChange, this.size}) : this.isRound = true, super(key: key); + @override _BeeCheckBoxState createState() => _BeeCheckBoxState(); } @@ -20,6 +22,7 @@ class BeeCheckBox extends StatefulWidget { class _BeeCheckBoxState extends State { double get boxSize => widget.size ?? 28.w; bool _isSelect = false; + @override Widget build(BuildContext context) { return GestureDetector( diff --git a/lib/widget/buttons/bee_check_button.dart b/lib/widget/buttons/bee_check_button.dart index 47be659e..86669741 100644 --- a/lib/widget/buttons/bee_check_button.dart +++ b/lib/widget/buttons/bee_check_button.dart @@ -1,13 +1,13 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/utils/headers.dart'; - class BeeCheckButton extends StatefulWidget { final Function(T value) onChange; final T value; final T groupValue; final String title; + BeeCheckButton( {Key? key, required this.onChange, @@ -22,6 +22,7 @@ class BeeCheckButton extends StatefulWidget { class _BeeCheckButtonState extends State { bool get isSelect => widget.groupValue == widget.value; + @override Widget build(BuildContext context) { return MaterialButton( diff --git a/lib/widget/buttons/bee_check_radio.dart b/lib/widget/buttons/bee_check_radio.dart index ffd25563..38f571cf 100644 --- a/lib/widget/buttons/bee_check_radio.dart +++ b/lib/widget/buttons/bee_check_radio.dart @@ -1,5 +1,5 @@ -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/utils/headers.dart'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/widget/buttons/bee_numberic_button.dart b/lib/widget/buttons/bee_numberic_button.dart index 9972231a..20556bdb 100644 --- a/lib/widget/buttons/bee_numberic_button.dart +++ b/lib/widget/buttons/bee_numberic_button.dart @@ -1,11 +1,9 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/painters/as_numberic_painter.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/painters/as_numberic_painter.dart'; - ///## 数量选择组件 class BeeNumberPickerButton extends StatefulWidget { ///初始值 @@ -39,6 +37,7 @@ class BeeNumberPickerButton extends StatefulWidget { ///圆形或方形 final bool circle; + BeeNumberPickerButton({ Key? key, required this.initValue, @@ -48,7 +47,7 @@ class BeeNumberPickerButton extends StatefulWidget { this.reachMax, this.reachMin, required this.onChange, - }) : this.circle = false, + }) : this.circle = false, super(key: key); BeeNumberPickerButton.circle({ @@ -60,7 +59,7 @@ class BeeNumberPickerButton extends StatefulWidget { this.reachMin, this.suffix, required this.onChange, - }) : this.circle = true, + }) : this.circle = true, super(key: key); @override diff --git a/lib/widget/buttons/bee_single_check.dart b/lib/widget/buttons/bee_single_check.dart index cf8fbde7..e98a3142 100644 --- a/lib/widget/buttons/bee_single_check.dart +++ b/lib/widget/buttons/bee_single_check.dart @@ -1,12 +1,12 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/utils/headers.dart'; - class BeeSingleCheck extends StatefulWidget { final T? value; final T? groupValue; + BeeSingleCheck({Key? key, this.value, this.groupValue}) : super(key: key); @override @@ -15,6 +15,7 @@ class BeeSingleCheck extends StatefulWidget { class _BeeSingleCheckState extends State { bool get _selected => widget.value == widget.groupValue; + @override Widget build(BuildContext context) { return AnimatedContainer( diff --git a/lib/widget/buttons/bottom_button.dart b/lib/widget/buttons/bottom_button.dart index 60d301e6..8a612b9a 100644 --- a/lib/widget/buttons/bottom_button.dart +++ b/lib/widget/buttons/bottom_button.dart @@ -1,14 +1,13 @@ +import 'package:aku_new_community/base/base_style.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:aku_community/base/base_style.dart'; - class BottomButton extends StatelessWidget { final VoidCallback? onPressed; final Widget child; final Color bgColor; final Color textColor; + const BottomButton({ Key? key, required this.onPressed, diff --git a/lib/widget/buttons/card_bottom_button.dart b/lib/widget/buttons/card_bottom_button.dart index 2a2f1788..68d0b457 100644 --- a/lib/widget/buttons/card_bottom_button.dart +++ b/lib/widget/buttons/card_bottom_button.dart @@ -1,10 +1,8 @@ +import 'package:aku_new_community/base/base_style.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; - //各种卡片下方的button组 class CardBottomButton extends StatelessWidget { final String text; @@ -12,6 +10,7 @@ class CardBottomButton extends StatelessWidget { final Color bgColor; final bool hasBorder; final VoidCallback onPressed; + const CardBottomButton( {Key? key, required this.text, @@ -20,22 +19,25 @@ class CardBottomButton extends StatelessWidget { this.hasBorder = false, required this.onPressed}) : super(key: key); + CardBottomButton.white({ Key? key, required this.text, required this.onPressed, - }) : this.bgColor = Colors.white, + }) : this.bgColor = Colors.white, this.textColor = ktextPrimary, this.hasBorder = true, super(key: key); + CardBottomButton.yellow({ Key? key, required this.text, required this.onPressed, - }) : this.bgColor = Color(0xFFFFC40C), + }) : this.bgColor = Color(0xFFFFC40C), this.textColor = ktextPrimary, this.hasBorder = false, super(key: key); + @override Widget build(BuildContext context) { return MaterialButton( diff --git a/lib/widget/buttons/column_action_button.dart b/lib/widget/buttons/column_action_button.dart index e2c375d5..f3c19c7a 100644 --- a/lib/widget/buttons/column_action_button.dart +++ b/lib/widget/buttons/column_action_button.dart @@ -1,14 +1,13 @@ +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/material.dart'; - import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/utils/headers.dart'; - ///上图片 下文字 的button class ColumnActionButton extends StatelessWidget { final VoidCallback? onPressed; final String? title; final String? path; + const ColumnActionButton({Key? key, this.onPressed, this.title, this.path}) : super(key: key); diff --git a/lib/widget/buttons/end_button.dart b/lib/widget/buttons/end_button.dart index 6be40e61..a99eb3fc 100644 --- a/lib/widget/buttons/end_button.dart +++ b/lib/widget/buttons/end_button.dart @@ -7,6 +7,7 @@ class EndButton extends StatelessWidget { final double? width; final EdgeInsetsGeometry? padding; final Color? color; + const EndButton( {Key? key, required this.onPressed, diff --git a/lib/widget/buttons/line_button.dart b/lib/widget/buttons/line_button.dart index 9996e429..36eaf5f7 100644 --- a/lib/widget/buttons/line_button.dart +++ b/lib/widget/buttons/line_button.dart @@ -7,6 +7,7 @@ class LineButton extends StatelessWidget { final double? width; final EdgeInsetsGeometry? padding; final Color? color; + const LineButton( {Key? key, required this.onPressed, @@ -26,11 +27,11 @@ class LineButton extends StatelessWidget { disabledTextColor: Colors.white.withOpacity(0.3), minWidth: width ?? 168.w, height: 70.w, - padding: - padding ?? EdgeInsets.symmetric(horizontal: 20.w, vertical: 0.w), - color: Colors.white, - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(34.w), - side: BorderSide(color: color??Color(0xFFBBBBBB),width: 2.w)), + padding: padding ?? EdgeInsets.symmetric(horizontal: 20.w, vertical: 0.w), + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(34.w), + side: BorderSide(color: color ?? Color(0xFFBBBBBB), width: 2.w)), onPressed: onPressed, child: text, ); diff --git a/lib/widget/buttons/radio_button.dart b/lib/widget/buttons/radio_button.dart index d404318d..0d32f8c0 100644 --- a/lib/widget/buttons/radio_button.dart +++ b/lib/widget/buttons/radio_button.dart @@ -1,12 +1,12 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/animated/animated_scale.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/animated/animated_scale.dart'; - class BeeRadio extends StatefulWidget { final T value; final List? groupValues; + BeeRadio({Key? key, required this.value, required this.groupValues}) : super(key: key); diff --git a/lib/widget/common_input.dart b/lib/widget/common_input.dart index fb1ca40f..8b1c17b8 100644 --- a/lib/widget/common_input.dart +++ b/lib/widget/common_input.dart @@ -1,14 +1,14 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/utils/headers.dart'; - @Deprecated("DO NOT USE THIS WIDGET") class CommonInput extends StatefulWidget { final TextEditingController? inputController; final String? hintText; final FormFieldValidator? validator; + CommonInput({Key? key, this.inputController, this.hintText, this.validator}) : super(key: key); @@ -38,7 +38,8 @@ class _CommonInputState extends State { bottom: 0.w, ), hintText: widget.hintText, - border: InputBorder.none, //去掉输入框的下滑线 + border: InputBorder.none, + //去掉输入框的下滑线 fillColor: Colors.white, filled: true, hintStyle: TextStyle( diff --git a/lib/widget/home/home_sliver_app_bar.dart b/lib/widget/home/home_sliver_app_bar.dart index 6d538c92..d23db326 100644 --- a/lib/widget/home/home_sliver_app_bar.dart +++ b/lib/widget/home/home_sliver_app_bar.dart @@ -7,6 +7,7 @@ class HomeSliverAppBar extends StatefulWidget { final Widget? flexibleSpace; final PreferredSizeWidget? bottom; final double? expandedHeight; + HomeSliverAppBar( {Key? key, this.actions, @@ -48,7 +49,7 @@ class HomeSliverAppBarState extends State { elevation: 0, backgroundColor: _displayColor, flexibleSpace: widget.flexibleSpace, - collapsedHeight: kToolbarHeight+10, + collapsedHeight: kToolbarHeight + 10, expandedHeight: widget.expandedHeight, bottom: widget.bottom, ); diff --git a/lib/widget/others/aku_chip_box.dart b/lib/widget/others/aku_chip_box.dart index e6f869d1..361e6441 100644 --- a/lib/widget/others/aku_chip_box.dart +++ b/lib/widget/others/aku_chip_box.dart @@ -1,11 +1,11 @@ import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; class AkuChipBox extends StatelessWidget { final String title; final Color? borderClor; final Color? textColor; + const AkuChipBox( {Key? key, required this.title, this.borderClor, this.textColor}) : super(key: key); diff --git a/lib/widget/others/bee_input_row.dart b/lib/widget/others/bee_input_row.dart index f31746a6..7394f0d2 100644 --- a/lib/widget/others/bee_input_row.dart +++ b/lib/widget/others/bee_input_row.dart @@ -1,20 +1,22 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/bee_divider.dart'; - class BeeInputRow extends StatefulWidget { final String title; final TextEditingController? controller; final List? formatters; final String? hintText; final bool isRequire; + //输入框还是按钮(点击弹窗选择 final bool isButton; + //是按钮时的回调 final VoidCallback? onPressed; + BeeInputRow({ Key? key, required this.title, @@ -25,6 +27,7 @@ class BeeInputRow extends StatefulWidget { }) : this.isButton = false, this.onPressed = null, super(key: key); + BeeInputRow.button( {Key? key, required this.title, @@ -35,6 +38,7 @@ class BeeInputRow extends StatefulWidget { this.formatters = null, this.controller = null, super(key: key); + @override _BeeInputRowState createState() => _BeeInputRowState(); } diff --git a/lib/widget/others/bee_row_tile.dart b/lib/widget/others/bee_row_tile.dart index 6b795af5..6c684ddf 100644 --- a/lib/widget/others/bee_row_tile.dart +++ b/lib/widget/others/bee_row_tile.dart @@ -1,14 +1,13 @@ +import 'package:aku_new_community/base/base_style.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; - class BeeRowTile extends StatelessWidget { final String assetPath; final String titile; final Widget content; + const BeeRowTile( {Key? key, required this.assetPath, diff --git a/lib/widget/others/bee_text_field.dart b/lib/widget/others/bee_text_field.dart index 98c98a5b..2b59e70e 100644 --- a/lib/widget/others/bee_text_field.dart +++ b/lib/widget/others/bee_text_field.dart @@ -1,15 +1,14 @@ +import 'package:aku_new_community/base/base_style.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:aku_community/base/base_style.dart'; - class BeeTextField extends StatefulWidget { final TextEditingController controller; final VoidCallback? onChange; final String hintText; final int? minLines; final int? maxLines; + BeeTextField( {Key? key, required this.controller, diff --git a/lib/widget/others/finish_result_image.dart b/lib/widget/others/finish_result_image.dart index a5244d4a..877bdbe8 100644 --- a/lib/widget/others/finish_result_image.dart +++ b/lib/widget/others/finish_result_image.dart @@ -1,10 +1,8 @@ +import 'package:aku_new_community/base/base_style.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:aku_community/base/base_style.dart'; - class FinishResultImage extends StatelessWidget { const FinishResultImage({ Key? key, @@ -14,6 +12,7 @@ class FinishResultImage extends StatelessWidget { final bool status; final bool haveInHandStatus; + @override Widget build(BuildContext context) { return Container( diff --git a/lib/widget/others/house_head_card.dart b/lib/widget/others/house_head_card.dart index b04d653f..b5ed1354 100644 --- a/lib/widget/others/house_head_card.dart +++ b/lib/widget/others/house_head_card.dart @@ -1,17 +1,15 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/ui/profile/house/pick_my_house_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/ui/profile/house/pick_my_house_page.dart'; -import 'package:aku_community/utils/headers.dart'; - class HouseHeadCard extends StatelessWidget { const HouseHeadCard({ Key? key, diff --git a/lib/widget/others/rectIndicator.dart b/lib/widget/others/rectIndicator.dart index 5971c78e..00f10a14 100644 --- a/lib/widget/others/rectIndicator.dart +++ b/lib/widget/others/rectIndicator.dart @@ -1,4 +1,3 @@ - import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -27,7 +26,8 @@ class RectIndicator extends StatelessWidget { _indicator(bool isActive) { return AnimatedContainer( - margin: EdgeInsets.symmetric(horizontal: 3.0), //指示器间距 + margin: EdgeInsets.symmetric(horizontal: 3.0), + //指示器间距 height: height, width: isActive ? activeWidth : width, decoration: BoxDecoration( @@ -38,7 +38,7 @@ class RectIndicator extends StatelessWidget { offset: Offset(0.0, 2.0), blurRadius: 0.0) ], - borderRadius: BorderRadius.circular(radius )), + borderRadius: BorderRadius.circular(radius)), duration: Duration(milliseconds: 150), ); } diff --git a/lib/widget/others/sign_name_board.dart b/lib/widget/others/sign_name_board.dart index c8562599..c60de567 100644 --- a/lib/widget/others/sign_name_board.dart +++ b/lib/widget/others/sign_name_board.dart @@ -1,7 +1,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:signature/signature.dart'; @@ -36,6 +35,7 @@ class SignNameBoard extends StatefulWidget { final bool forceToHorizontal; final double width; final double height; + SignNameBoard( {Key? key, required this.signatureController, diff --git a/lib/widget/others/stack_avatar.dart b/lib/widget/others/stack_avatar.dart index 5aea1124..39fbae16 100644 --- a/lib/widget/others/stack_avatar.dart +++ b/lib/widget/others/stack_avatar.dart @@ -1,14 +1,17 @@ +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/utils/headers.dart'; - class StackAvatar extends StatelessWidget { final List avatars; + const StackAvatar({Key? key, required this.avatars}) : super(key: key); + double get offset => 35.w; + int get length => avatars.length; + @override Widget build(BuildContext context) { return Stack( diff --git a/lib/widget/others/upload_widget.dart b/lib/widget/others/upload_widget.dart index 4e6296c9..b3b5f39c 100644 --- a/lib/widget/others/upload_widget.dart +++ b/lib/widget/others/upload_widget.dart @@ -1,17 +1,16 @@ import 'dart:io'; -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/painters/upload_painter.dart'; +import 'package:aku_new_community/widget/picker/bee_image_picker.dart'; import 'package:dotted_border/dotted_border.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/painters/upload_painter.dart'; -import 'package:aku_community/widget/picker/bee_image_picker.dart'; - class UploadWidget extends StatelessWidget { final String sheetTitle; final Function(File file) onPicked; + const UploadWidget( {Key? key, required this.sheetTitle, required this.onPicked}) : super(key: key); diff --git a/lib/widget/others/user_tool.dart b/lib/widget/others/user_tool.dart index 5585e4e2..2a922c88 100644 --- a/lib/widget/others/user_tool.dart +++ b/lib/widget/others/user_tool.dart @@ -1,12 +1,12 @@ +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/provider/user_provider.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/provider/user_provider.dart'; - class UserTool { static UserProvider get userProvider => Provider.of(Get.context!, listen: false); + static AppProvider get appProveider => Provider.of(Get.context!, listen: false); } diff --git a/lib/widget/picker/bee_custom_picker.dart b/lib/widget/picker/bee_custom_picker.dart index 7b83339b..755c4092 100644 --- a/lib/widget/picker/bee_custom_picker.dart +++ b/lib/widget/picker/bee_custom_picker.dart @@ -1,12 +1,11 @@ +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/material.dart'; - import 'package:get/get.dart'; -import 'package:aku_community/utils/headers.dart'; - class BeeCustomPicker extends StatefulWidget { final Widget? body; final VoidCallback? onPressed; + BeeCustomPicker({Key? key, this.body, this.onPressed}) : super(key: key); @override diff --git a/lib/widget/picker/bee_date_picker.dart b/lib/widget/picker/bee_date_picker.dart index 04e24b7a..d60059ca 100644 --- a/lib/widget/picker/bee_date_picker.dart +++ b/lib/widget/picker/bee_date_picker.dart @@ -1,11 +1,9 @@ +import 'package:aku_new_community/widget/picker/bee_custom_picker.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/widget/picker/bee_custom_picker.dart'; - class BeeDatePicker { static Future pick( DateTime initDate, { @@ -37,6 +35,7 @@ class _BeeDatePicker extends StatefulWidget { final DateTime? max; final DateTime? min; final CupertinoDatePickerMode? mode; + _BeeDatePicker({ Key? key, required this.date, @@ -52,6 +51,7 @@ class _BeeDatePicker extends StatefulWidget { class __BeeDatePickerState extends State<_BeeDatePicker> { DateTime _date = DateTime.now(); + @override void initState() { super.initState(); diff --git a/lib/widget/picker/bee_house_picker.dart b/lib/widget/picker/bee_house_picker.dart index 732cb90a..fae30905 100644 --- a/lib/widget/picker/bee_house_picker.dart +++ b/lib/widget/picker/bee_house_picker.dart @@ -1,14 +1,12 @@ +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/ui/profile/house/pick_my_house_page.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:get/get.dart'; import 'package:provider/provider.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/ui/profile/house/pick_my_house_page.dart'; -import 'package:aku_community/utils/headers.dart'; - @Deprecated('use HouseHeadCard instead') class BeeHousePicker extends StatelessWidget { const BeeHousePicker({Key? key}) : super(key: key); diff --git a/lib/widget/picker/bee_image_picker.dart b/lib/widget/picker/bee_image_picker.dart index 0e80875b..b85b6145 100644 --- a/lib/widget/picker/bee_image_picker.dart +++ b/lib/widget/picker/bee_image_picker.dart @@ -1,13 +1,11 @@ import 'dart:io'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/cupertino.dart'; - import 'package:get/get.dart'; import 'package:image_picker/image_picker.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/utils/headers.dart'; - class BeeImagePicker { static Future pick( {required String title, diff --git a/lib/widget/picker/bee_image_preview.dart b/lib/widget/picker/bee_image_preview.dart index 1cd00cce..32ca32de 100644 --- a/lib/widget/picker/bee_image_preview.dart +++ b/lib/widget/picker/bee_image_preview.dart @@ -1,12 +1,10 @@ import 'dart:io'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; import 'package:flutter/material.dart'; - import 'package:get/get.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; - ///图片点击放大预览 class BeeImagePreview extends StatefulWidget { static Future toFile({required File file, String? tag}) async { @@ -48,6 +46,7 @@ class BeeImagePreview extends StatefulWidget { final File? file; final String? path; final String? tag; + BeeImagePreview.file({Key? key, required this.file, this.tag}) : path = null, super(key: key); diff --git a/lib/widget/picker/grid_image_picker.dart b/lib/widget/picker/grid_image_picker.dart index f906c88a..a2bfd9b4 100644 --- a/lib/widget/picker/grid_image_picker.dart +++ b/lib/widget/picker/grid_image_picker.dart @@ -1,16 +1,14 @@ import 'dart:io'; +import 'package:aku_new_community/painters/plus_painter.dart'; +import 'package:aku_new_community/widget/picker/bee_image_picker.dart'; +import 'package:aku_new_community/widget/picker/bee_image_preview.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/painters/plus_painter.dart'; -import 'package:aku_community/widget/picker/bee_image_picker.dart'; -import 'package:aku_community/widget/picker/bee_image_preview.dart'; - ///网格图片选择 /// ///返回`File`数组 @@ -29,6 +27,7 @@ class GridImagePicker extends StatefulWidget { ///Padding final EdgeInsetsGeometry padding; + GridImagePicker({ Key? key, required this.onChange, @@ -41,7 +40,9 @@ class GridImagePicker extends StatefulWidget { class _GridImagePickerState extends State { List _files = []; + int get displayLength => _files.length < 9 ? (_files.length + 1) : 9; + Widget _buildSelect() { return MaterialButton( materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, diff --git a/lib/widget/picker/identify_card_picker.dart b/lib/widget/picker/identify_card_picker.dart index 44ad6f88..cfce991b 100644 --- a/lib/widget/picker/identify_card_picker.dart +++ b/lib/widget/picker/identify_card_picker.dart @@ -1,14 +1,12 @@ import 'dart:io'; +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/widget/picker/bee_image_picker.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/base/base_style.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/widget/picker/bee_image_picker.dart'; - class IdentifyCardPicker extends StatefulWidget { static Widget front(Function(File? file) onChange) { return Column( @@ -38,6 +36,7 @@ class IdentifyCardPicker extends StatefulWidget { final Function(File? file) onChange; final String path; + IdentifyCardPicker({Key? key, required this.onChange, required this.path}) : super(key: key); @@ -47,6 +46,7 @@ class IdentifyCardPicker extends StatefulWidget { class _IdentifyCardPickerState extends State { File? _file; + @override Widget build(BuildContext context) { return GestureDetector( diff --git a/lib/widget/tab_bar/bee_tab_bar.dart b/lib/widget/tab_bar/bee_tab_bar.dart index 6366b3a7..2f2b41d6 100644 --- a/lib/widget/tab_bar/bee_tab_bar.dart +++ b/lib/widget/tab_bar/bee_tab_bar.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; class BeeTabBar extends StatefulWidget with PreferredSizeWidget { @@ -7,6 +6,7 @@ class BeeTabBar extends StatefulWidget with PreferredSizeWidget { final List tabs; final Function(int index)? onTap; final bool scrollable; + BeeTabBar({ Key? key, required this.controller, diff --git a/lib/widget/views/ bee_download_view.dart b/lib/widget/views/ bee_download_view.dart index 5aab0290..3aaa4750 100644 --- a/lib/widget/views/ bee_download_view.dart +++ b/lib/widget/views/ bee_download_view.dart @@ -1,15 +1,14 @@ import 'dart:io'; -import 'package:flutter/material.dart'; - +import 'package:aku_new_community/constants/api.dart'; import 'package:dio/dio.dart'; +import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:path_provider/path_provider.dart'; -import 'package:aku_community/constants/api.dart'; - class BeeDownloadView extends StatefulWidget { final String? file; + BeeDownloadView({Key? key, this.file}) : super(key: key); @override @@ -19,6 +18,7 @@ class BeeDownloadView extends StatefulWidget { class _BeeDownloadViewState extends State { Dio dio = Dio(); double? progress; + Future download() async { Directory dir = await getApplicationDocumentsDirectory(); Directory docPath = Directory('${dir.path}/docs'); diff --git a/lib/widget/views/application_box.dart b/lib/widget/views/application_box.dart index 60aedefb..118322d5 100644 --- a/lib/widget/views/application_box.dart +++ b/lib/widget/views/application_box.dart @@ -1,12 +1,11 @@ +import 'package:aku_new_community/utils/headers.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:aku_community/utils/headers.dart'; - class ApplicationBox extends StatelessWidget { final Widget? child; + ApplicationBox({Key? key, this.child}) : super(key: key); @override diff --git a/lib/widget/views/application_view.dart b/lib/widget/views/application_view.dart index e946495f..2cd04cc5 100644 --- a/lib/widget/views/application_view.dart +++ b/lib/widget/views/application_view.dart @@ -1,17 +1,16 @@ +import 'package:aku_new_community/constants/application_objects.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/utils/login_util.dart'; import 'package:flutter/material.dart'; - import 'package:get/get.dart'; import 'package:provider/provider.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/constants/application_objects.dart'; -import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/utils/login_util.dart'; - class ApplicationView extends StatefulWidget { final List? items; final bool needAllApp; + ApplicationView({Key? key, this.needAllApp = true}) : items = null, super(key: key); @@ -50,6 +49,7 @@ class _ApplicationViewState extends State { } bool get _isCustom => widget.items != null; + List? get _items { final appProvider = Provider.of(context); diff --git a/lib/widget/views/bee_grid_image_view.dart b/lib/widget/views/bee_grid_image_view.dart index 25d1fa40..49acedb8 100644 --- a/lib/widget/views/bee_grid_image_view.dart +++ b/lib/widget/views/bee_grid_image_view.dart @@ -1,13 +1,13 @@ +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/picker/bee_image_preview.dart'; import 'package:flutter/material.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/picker/bee_image_preview.dart'; - class BeeGridImageView extends StatelessWidget { final List urls; final EdgeInsetsGeometry padding; + const BeeGridImageView({ Key? key, required this.urls, diff --git a/lib/widget/views/doc_view.dart b/lib/widget/views/doc_view.dart index 794b40a9..47ddc721 100644 --- a/lib/widget/views/doc_view.dart +++ b/lib/widget/views/doc_view.dart @@ -1,10 +1,8 @@ +import 'package:aku_new_community/const/resource.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:aku_community/const/resource.dart'; - class DocViw extends StatelessWidget { const DocViw({ Key? key, @@ -18,6 +16,7 @@ class DocViw extends StatelessWidget { final VoidCallback onPressed; final EdgeInsetsGeometry? margin; final VoidCallback? onLongPress; + @override Widget build(BuildContext context) { // if (title?.isEmpty ?? true) return SizedBox(); diff --git a/lib/widget/views/horizontal_image_view.dart b/lib/widget/views/horizontal_image_view.dart index 77d3f5db..7fdf3ed1 100644 --- a/lib/widget/views/horizontal_image_view.dart +++ b/lib/widget/views/horizontal_image_view.dart @@ -1,15 +1,14 @@ +import 'package:aku_new_community/const/resource.dart'; +import 'package:aku_new_community/constants/api.dart'; +import 'package:aku_new_community/utils/headers.dart'; +import 'package:aku_new_community/widget/picker/bee_image_preview.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:aku_community/const/resource.dart'; -import 'package:aku_community/constants/api.dart'; -import 'package:aku_community/utils/headers.dart'; -import 'package:aku_community/widget/picker/bee_image_preview.dart'; - class HorizontalImageView extends StatelessWidget { final List urls; + HorizontalImageView( this.urls, { Key? key, diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index d91cc14f..a9ed3335 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -59,7 +59,7 @@ 3174FE62638194051FE703FD /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; - 33CC10ED2044A3C60003C045 /* aku_community.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = aku_community.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10ED2044A3C60003C045 /* aku_new_community.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = aku_new_community.app; sourceTree = BUILT_PRODUCTS_DIR; }; 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; @@ -115,7 +115,7 @@ 33CC10EE2044A3C60003C045 /* Products */ = { isa = PBXGroup; children = ( - 33CC10ED2044A3C60003C045 /* aku_community.app */, + 33CC10ED2044A3C60003C045 /* aku_new_community.app */, ); name = Products; sourceTree = ""; @@ -195,7 +195,7 @@ ); name = Runner; productName = Runner; - productReference = 33CC10ED2044A3C60003C045 /* aku_community.app */; + productReference = 33CC10ED2044A3C60003C045 /* aku_new_community.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ diff --git a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index d351a250..49d9acbd 100644 --- a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -15,7 +15,7 @@ @@ -31,7 +31,7 @@ @@ -54,7 +54,7 @@ @@ -73,7 +73,7 @@ diff --git a/macos/Runner/Base.lproj/MainMenu.xib b/macos/Runner/Base.lproj/MainMenu.xib index db5b4acc..65fefd3e 100644 --- a/macos/Runner/Base.lproj/MainMenu.xib +++ b/macos/Runner/Base.lproj/MainMenu.xib @@ -13,7 +13,7 @@ - + @@ -78,7 +78,7 @@ - + diff --git a/macos/Runner/Configs/AppInfo.xcconfig b/macos/Runner/Configs/AppInfo.xcconfig index f14b1fba..dea936a9 100644 --- a/macos/Runner/Configs/AppInfo.xcconfig +++ b/macos/Runner/Configs/AppInfo.xcconfig @@ -5,7 +5,7 @@ // 'flutter create' template. // The application's name. By default this is also the title of the Flutter window. -PRODUCT_NAME = aku_community +PRODUCT_NAME = aku_new_community // The application's bundle identifier PRODUCT_BUNDLE_IDENTIFIER = com.akuCommunity.akuCommunity diff --git a/pubspec.yaml b/pubspec.yaml index 4fad6db2..dfd9d2a9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,4 +1,4 @@ -name: aku_community +name: aku_new_community description: A new Flutter project. publish_to: "none" @@ -88,9 +88,6 @@ dependencies: amap_flutter_base: ^2.0.0 #动态文字 animated_text_kit: ^4.2.1 -# #谷歌崩溃记录分析 -# firebase_core: ^1.1.1 -# firebase_crashlytics: ^2.0.3 #分享功能 share: ^2.0.1 collection: ^1.15.0 diff --git a/test/widget_test.dart b/test/widget_test.dart index 86774a43..df0bd1ad 100644 --- a/test/widget_test.dart +++ b/test/widget_test.dart @@ -5,12 +5,10 @@ // gestures. You can also use WidgetTester to find child widgets in the widget // tree, read text, and verify that the values of widget properties are correct. +import 'package:aku_new_community/main.dart'; import 'package:flutter/material.dart'; - import 'package:flutter_test/flutter_test.dart'; -import 'package:aku_community/main.dart'; - void main() { testWidgets('Counter increments smoke test', (WidgetTester tester) async { // Build our app and trigger a frame. diff --git a/tool/config.dart b/tool/config.dart index 331ca7c6..366d7472 100644 --- a/tool/config.dart +++ b/tool/config.dart @@ -3,7 +3,7 @@ class Config { static const String homeDir = '/users/datang'; ///包名 - static const String packageName = 'aku_community'; + static const String packageName = 'aku_new_community'; ///打包目录 static String get buildPath => @@ -11,9 +11,9 @@ class Config { ///测试包文件夹 static String get apkDevDir => - '/users/datang/team/bee/app/aku_community/dev'; + '/users/datang/team/bee/app/aku_new_community/dev'; ///正式包文件夹 static String get apkDir => - '/users/datang/team/bee/app/aku_community/release'; + '/users/datang/team/bee/app/aku_new_community/release'; } diff --git a/web/index.html b/web/index.html index 1650a6fe..850c48de 100644 --- a/web/index.html +++ b/web/index.html @@ -1,45 +1,46 @@ - - + Fore more details: + * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base + --> + - - - + + + - - - - - + + + + + - - + + - aku_community - + aku_new_community + - - - + + + diff --git a/web/manifest.json b/web/manifest.json index 47c74a60..266e07fa 100644 --- a/web/manifest.json +++ b/web/manifest.json @@ -1,23 +1,23 @@ { - "name": "aku_community", - "short_name": "aku_community", - "start_url": ".", - "display": "standalone", - "background_color": "#0175C2", - "theme_color": "#0175C2", - "description": "A new Flutter project.", - "orientation": "portrait-primary", - "prefer_related_applications": false, - "icons": [ - { - "src": "icons/Icon-192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "icons/Icon-512.png", - "sizes": "512x512", - "type": "image/png" - } - ] + "name": "aku_new_community", + "short_name": "aku_new_community", + "start_url": ".", + "display": "standalone", + "background_color": "#0175C2", + "theme_color": "#0175C2", + "description": "A new Flutter project.", + "orientation": "portrait-primary", + "prefer_related_applications": false, + "icons": [ + { + "src": "icons/Icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "icons/Icon-512.png", + "sizes": "512x512", + "type": "image/png" + } + ] }