diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index a0583eb0..38b75006 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -3,5 +3,8 @@ + + + diff --git a/android/app/src/main/assets/data/dcloud_control.xml b/android/app/src/main/assets/data/dcloud_control.xml index cad88735..468997c4 100644 --- a/android/app/src/main/assets/data/dcloud_control.xml +++ b/android/app/src/main/assets/data/dcloud_control.xml @@ -1,4 +1,4 @@ - + diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml index a0583eb0..38b75006 100644 --- a/android/app/src/profile/AndroidManifest.xml +++ b/android/app/src/profile/AndroidManifest.xml @@ -3,5 +3,8 @@ + + + diff --git a/assets/image/2x/icon_founder.png b/assets/image/2x/icon_founder.png new file mode 100644 index 00000000..eeba4c51 Binary files /dev/null and b/assets/image/2x/icon_founder.png differ diff --git a/assets/image/3x/icon_founder.png b/assets/image/3x/icon_founder.png new file mode 100644 index 00000000..bb364ddd Binary files /dev/null and b/assets/image/3x/icon_founder.png differ diff --git a/assets/image/icon_founder.png b/assets/image/icon_founder.png new file mode 100644 index 00000000..68bbf30d Binary files /dev/null and b/assets/image/icon_founder.png differ diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 7f87646e..465dd376 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -45,6 +45,7 @@ 6EE8F376269581FB00237A5E /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE8F375269581FB00237A5E /* AddressBook.framework */; }; 6EE8F3782695820600237A5E /* libiconv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE8F3772695820600237A5E /* libiconv.tbd */; }; 6EE8F37F269582C200237A5E /* UniappPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE8F37E269582C200237A5E /* UniappPlugin.m */; }; + 899C4C3C26A5179900B44087 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 899C4C3E26A5179900B44087 /* InfoPlist.strings */; }; 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; @@ -187,6 +188,13 @@ 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 81880E8F5E90EA6E5E0D57EB /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 89847A4826A14482008C8077 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; }; + 899C4C3826A5171500B44087 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Main.strings"; sourceTree = ""; }; + 899C4C3926A5171500B44087 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/LaunchScreen.strings"; sourceTree = ""; }; + 899C4C3A26A5174A00B44087 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/Main.strings"; sourceTree = ""; }; + 899C4C3B26A5174A00B44087 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/LaunchScreen.strings"; sourceTree = ""; }; + 899C4C3D26A5179900B44087 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 899C4C3F26A5179F00B44087 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/InfoPlist.strings"; sourceTree = ""; }; + 899C4C4026A517A000B44087 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/InfoPlist.strings"; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -429,6 +437,7 @@ 97C146E51CF9000F007C117D = { isa = PBXGroup; children = ( + 899C4C3E26A5179900B44087 /* InfoPlist.strings */, 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, @@ -518,6 +527,8 @@ knownRegions = ( en, Base, + "zh-Hans", + "zh-Hant", ); mainGroup = 97C146E51CF9000F007C117D; productRefGroup = 97C146EF1CF9000F007C117D /* Products */; @@ -543,6 +554,7 @@ 6EE8F3482695816000237A5E /* unincomponents.ttf in Resources */, 6EE8F34A2695816000237A5E /* weexUniJs.js in Resources */, 6EE8F3492695816000237A5E /* weex-polyfill.js in Resources */, + 899C4C3C26A5179900B44087 /* InfoPlist.strings in Resources */, 6EE8F3462695816000237A5E /* uni-jsframework.js in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -634,10 +646,22 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ + 899C4C3E26A5179900B44087 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 899C4C3D26A5179900B44087 /* en */, + 899C4C3F26A5179F00B44087 /* zh-Hans */, + 899C4C4026A517A000B44087 /* zh-Hant */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; 97C146FA1CF9000F007C117D /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( 97C146FB1CF9000F007C117D /* Base */, + 899C4C3826A5171500B44087 /* zh-Hans */, + 899C4C3A26A5174A00B44087 /* zh-Hant */, ); name = Main.storyboard; sourceTree = ""; @@ -646,6 +670,8 @@ isa = PBXVariantGroup; children = ( 97C147001CF9000F007C117D /* Base */, + 899C4C3926A5171500B44087 /* zh-Hans */, + 899C4C3B26A5174A00B44087 /* zh-Hant */, ); name = LaunchScreen.storyboard; sourceTree = ""; @@ -657,6 +683,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -800,6 +827,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -855,6 +883,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index fb2dffc4..c5375023 100644 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -40,7 +40,7 @@ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName - 回乡 + 迴響 CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -52,7 +52,7 @@ NSLocationAlwaysUsageDescription 是否允许访问位置信息 NSLocationUsageDescription - + 定位 NSLocationWhenInUseUsageDescription 定位 NSMicrophoneUsageDescription diff --git a/ios/Runner/zh-Hans.lproj/LaunchScreen.strings b/ios/Runner/zh-Hans.lproj/LaunchScreen.strings new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/ios/Runner/zh-Hans.lproj/LaunchScreen.strings @@ -0,0 +1 @@ + diff --git a/ios/Runner/zh-Hans.lproj/Main.strings b/ios/Runner/zh-Hans.lproj/Main.strings new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/ios/Runner/zh-Hans.lproj/Main.strings @@ -0,0 +1 @@ + diff --git a/ios/Runner/zh-Hant.lproj/LaunchScreen.strings b/ios/Runner/zh-Hant.lproj/LaunchScreen.strings new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/ios/Runner/zh-Hant.lproj/LaunchScreen.strings @@ -0,0 +1 @@ + diff --git a/ios/Runner/zh-Hant.lproj/Main.strings b/ios/Runner/zh-Hant.lproj/Main.strings new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/ios/Runner/zh-Hant.lproj/Main.strings @@ -0,0 +1 @@ + diff --git a/ios/en.lproj/InfoPlist.strings b/ios/en.lproj/InfoPlist.strings new file mode 100644 index 00000000..ae9959f1 --- /dev/null +++ b/ios/en.lproj/InfoPlist.strings @@ -0,0 +1,14 @@ +/* + InfoPlist.strings + Runner + + Created by 冯美坎 on 2021/7/19. + +*/ + +CFBundleName="huixiang"; +CFBundleDisplayName="huixiang"; +NSCameraUsageDescription="您的相机权限将用于更新头像使用"; +NSPhotoLibraryUsageDescription="您的照片信息将用于更新头像使用"; +NSLocationWhenInUseUsageDescription="您的定位位置信息将用于查看周围的门店"; +NSLocationAlwaysAndWhenInUseUsageDescription="您的定位位置信息将用于查看周围的门店"; diff --git a/ios/zh-Hans.lproj/InfoPlist.strings b/ios/zh-Hans.lproj/InfoPlist.strings new file mode 100644 index 00000000..96d8f302 --- /dev/null +++ b/ios/zh-Hans.lproj/InfoPlist.strings @@ -0,0 +1,15 @@ +/* + InfoPlist.strings + Runner + + Created by 冯美坎 on 2021/7/19. + +*/ + + +CFBundleName="回乡"; +CFBundleDisplayName="回乡"; +NSCameraUsageDescription="您的相机权限将用于更新头像使用"; +NSPhotoLibraryUsageDescription="您的照片信息将用于更新头像使用"; +NSLocationWhenInUseUsageDescription="您的定位位置信息将用于查看周围的门店"; +NSLocationAlwaysAndWhenInUseUsageDescription="您的定位位置信息将用于查看周围的门店"; diff --git a/ios/zh-Hant.lproj/InfoPlist.strings b/ios/zh-Hant.lproj/InfoPlist.strings new file mode 100644 index 00000000..80d3ccca --- /dev/null +++ b/ios/zh-Hant.lproj/InfoPlist.strings @@ -0,0 +1,14 @@ +/* + InfoPlist.strings + Runner + + Created by 冯美坎 on 2021/7/19. + +*/ + +CFBundleName="迴響"; +CFBundleDisplayName="迴響"; +NSCameraUsageDescription="您的相机权限将用于更新头像使用"; +NSPhotoLibraryUsageDescription="您的照片信息将用于更新头像使用"; +NSLocationWhenInUseUsageDescription="您的定位位置信息将用于查看周围的门店"; +NSLocationAlwaysAndWhenInUseUsageDescription="您的定位位置信息将用于查看周围的门店"; diff --git a/lib/generated/intl/messages_en.dart b/lib/generated/intl/messages_en.dart index b66a7522..3bd73bd6 100644 --- a/lib/generated/intl/messages_en.dart +++ b/lib/generated/intl/messages_en.dart @@ -179,6 +179,7 @@ class MessageLookup extends MessageLookupByLibrary { "input_phone_hide" : MessageLookupByLibrary.simpleMessage("请输入你的手机号"), "jian" : MessageLookupByLibrary.simpleMessage("件"), "jiazaishibai" : MessageLookupByLibrary.simpleMessage("加载失败"), + "jiesuan" : MessageLookupByLibrary.simpleMessage("结算"), "jiesuanjine" : MessageLookupByLibrary.simpleMessage("结算金额"), "jifen" : MessageLookupByLibrary.simpleMessage("积分"), "jifen_" : m8, @@ -234,6 +235,7 @@ class MessageLookup extends MessageLookupByLibrary { "mingxi" : MessageLookupByLibrary.simpleMessage("明细"), "morenpaixu" : MessageLookupByLibrary.simpleMessage("默认排序"), "nindingweigongnengweikaiqi" : MessageLookupByLibrary.simpleMessage("您定位功能开关未开启,请点击去打開定位"), + "nindingweiquanxianweiyunxu" : MessageLookupByLibrary.simpleMessage("您未开启位置权限,请点击确定申请权限"), "ninyouyigedingdanyaolingqu" : MessageLookupByLibrary.simpleMessage("您有一个订单需要前往门店领取"), "ninyouyigexindedingdan" : MessageLookupByLibrary.simpleMessage("您有一个新的订单"), "peisong" : MessageLookupByLibrary.simpleMessage("配送"), @@ -253,6 +255,7 @@ class MessageLookup extends MessageLookupByLibrary { "qiandaolingqujinfen" : MessageLookupByLibrary.simpleMessage("签到领取积分"), "qianjinmaiwei" : MessageLookupByLibrary.simpleMessage("前进麦味"), "qianwanghuixiangmendianduihuanhexiao" : MessageLookupByLibrary.simpleMessage("前往一心回乡旗下任意门店对工作人员出示商品兑换码,核实无误后,可领取对应商品"), + "qinglihuancun" : MessageLookupByLibrary.simpleMessage("清理缓存"), "qingshurubeizhuyaoqiu" : MessageLookupByLibrary.simpleMessage("请输入备注要求"), "qingshuruchongzhijine" : MessageLookupByLibrary.simpleMessage("输入充值金额(元)"), "qingshurushoujihao" : MessageLookupByLibrary.simpleMessage("请输入手机号"), @@ -272,6 +275,7 @@ class MessageLookup extends MessageLookupByLibrary { "quanbuduihuan" : MessageLookupByLibrary.simpleMessage("全部兑换"), "quanchangtongyong" : MessageLookupByLibrary.simpleMessage("全场通用"), "quanchangzhe" : m15, + "quantian" : MessageLookupByLibrary.simpleMessage("全天"), "quanxian" : MessageLookupByLibrary.simpleMessage("权限"), "quanxianshezhi" : MessageLookupByLibrary.simpleMessage("权限设置"), "qucanhao" : MessageLookupByLibrary.simpleMessage("取餐号"), @@ -405,6 +409,7 @@ class MessageLookup extends MessageLookupByLibrary { "yue" : MessageLookupByLibrary.simpleMessage("余额"), "yue_" : m28, "yuemingxi" : MessageLookupByLibrary.simpleMessage("余额明细"), + "yunfei" : MessageLookupByLibrary.simpleMessage("运费"), "yuyan" : MessageLookupByLibrary.simpleMessage("语言"), "zailaiyidan" : MessageLookupByLibrary.simpleMessage("再来一单"), "zaixiankefu" : MessageLookupByLibrary.simpleMessage("在线客服"), diff --git a/lib/generated/intl/messages_zh_CN.dart b/lib/generated/intl/messages_zh_CN.dart index 1c633f41..69555931 100644 --- a/lib/generated/intl/messages_zh_CN.dart +++ b/lib/generated/intl/messages_zh_CN.dart @@ -179,6 +179,7 @@ class MessageLookup extends MessageLookupByLibrary { "input_phone_hide" : MessageLookupByLibrary.simpleMessage("请输入你的手机号"), "jian" : MessageLookupByLibrary.simpleMessage("件"), "jiazaishibai" : MessageLookupByLibrary.simpleMessage("加载失败"), + "jiesuan" : MessageLookupByLibrary.simpleMessage("结算"), "jiesuanjine" : MessageLookupByLibrary.simpleMessage("结算金额"), "jifen" : MessageLookupByLibrary.simpleMessage("积分"), "jifen_" : m8, @@ -234,6 +235,7 @@ class MessageLookup extends MessageLookupByLibrary { "mingxi" : MessageLookupByLibrary.simpleMessage("明细"), "morenpaixu" : MessageLookupByLibrary.simpleMessage("默认排序"), "nindingweigongnengweikaiqi" : MessageLookupByLibrary.simpleMessage("您定位功能开关未开启,请点击去打開定位"), + "nindingweiquanxianweiyunxu" : MessageLookupByLibrary.simpleMessage("您未开启位置权限,请点击确定申请权限"), "ninyouyigedingdanyaolingqu" : MessageLookupByLibrary.simpleMessage("您有一个订单需要前往门店领取"), "ninyouyigexindedingdan" : MessageLookupByLibrary.simpleMessage("您有一个新的订单"), "peisong" : MessageLookupByLibrary.simpleMessage("配送"), @@ -253,6 +255,7 @@ class MessageLookup extends MessageLookupByLibrary { "qiandaolingqujinfen" : MessageLookupByLibrary.simpleMessage("签到领取积分"), "qianjinmaiwei" : MessageLookupByLibrary.simpleMessage("前进麦味"), "qianwanghuixiangmendianduihuanhexiao" : MessageLookupByLibrary.simpleMessage("前往一心回乡旗下任意门店对工作人员出示商品兑换码,核实无误后,可领取对应商品"), + "qinglihuancun" : MessageLookupByLibrary.simpleMessage("清理缓存"), "qingshurubeizhuyaoqiu" : MessageLookupByLibrary.simpleMessage("请输入备注要求"), "qingshuruchongzhijine" : MessageLookupByLibrary.simpleMessage("输入充值金额(元)"), "qingshurushoujihao" : MessageLookupByLibrary.simpleMessage("请输入手机号"), @@ -272,6 +275,7 @@ class MessageLookup extends MessageLookupByLibrary { "quanbuduihuan" : MessageLookupByLibrary.simpleMessage("全部兑换"), "quanchangtongyong" : MessageLookupByLibrary.simpleMessage("全场通用"), "quanchangzhe" : m15, + "quantian" : MessageLookupByLibrary.simpleMessage("全天"), "quanxian" : MessageLookupByLibrary.simpleMessage("权限"), "quanxianshezhi" : MessageLookupByLibrary.simpleMessage("权限设置"), "qucanhao" : MessageLookupByLibrary.simpleMessage("取餐号"), @@ -405,12 +409,12 @@ class MessageLookup extends MessageLookupByLibrary { "yue" : MessageLookupByLibrary.simpleMessage("余额"), "yue_" : m28, "yuemingxi" : MessageLookupByLibrary.simpleMessage("余额明细"), + "yunfei" : MessageLookupByLibrary.simpleMessage("运费"), "yuyan" : MessageLookupByLibrary.simpleMessage("语言"), "zailaiyidan" : MessageLookupByLibrary.simpleMessage("再来一单"), "zaixiankefu" : MessageLookupByLibrary.simpleMessage("在线客服"), "zanbuzhichixianshangdiancan" : MessageLookupByLibrary.simpleMessage("暂不支持线上点餐"), "zhanghaoshouquan" : MessageLookupByLibrary.simpleMessage("账号授权"), - "zhanghaoxinxi" : MessageLookupByLibrary.simpleMessage("账号信息"), "zhanghuyue" : MessageLookupByLibrary.simpleMessage("账户余额"), "zhengzaihujiaoqishou" : MessageLookupByLibrary.simpleMessage("正在呼叫骑手"), "zhengzaijiazai" : MessageLookupByLibrary.simpleMessage("正在加载"), diff --git a/lib/generated/intl/messages_zh_TW.dart b/lib/generated/intl/messages_zh_TW.dart index d0e4a1e2..d3c52be7 100644 --- a/lib/generated/intl/messages_zh_TW.dart +++ b/lib/generated/intl/messages_zh_TW.dart @@ -53,7 +53,7 @@ class MessageLookup extends MessageLookupByLibrary { static m16(num) => "取膽號${num}"; - static m17(ren) => "${ren}/人"; + static m17(ren) => "¥${ren}/人"; static m18(second) => "${second}s后重新發送"; @@ -179,6 +179,7 @@ class MessageLookup extends MessageLookupByLibrary { "input_phone_hide" : MessageLookupByLibrary.simpleMessage("請輸入你的手機號"), "jian" : MessageLookupByLibrary.simpleMessage("件"), "jiazaishibai" : MessageLookupByLibrary.simpleMessage("加載失敗"), + "jiesuan" : MessageLookupByLibrary.simpleMessage("結算"), "jiesuanjine" : MessageLookupByLibrary.simpleMessage("結算金額"), "jifen" : MessageLookupByLibrary.simpleMessage("積分"), "jifen_" : m8, @@ -234,6 +235,7 @@ class MessageLookup extends MessageLookupByLibrary { "mingxi" : MessageLookupByLibrary.simpleMessage("明細"), "morenpaixu" : MessageLookupByLibrary.simpleMessage("默認排序"), "nindingweigongnengweikaiqi" : MessageLookupByLibrary.simpleMessage("您定位功能開關未開啟,請點擊去開啟定位"), + "nindingweiquanxianweiyunxu" : MessageLookupByLibrary.simpleMessage("您未开启位置权限,请点击确定申请权限"), "ninyouyigedingdanyaolingqu" : MessageLookupByLibrary.simpleMessage("您有一個訂單需要前往門店領取"), "ninyouyigexindedingdan" : MessageLookupByLibrary.simpleMessage("您有一個新訂單"), "peisong" : MessageLookupByLibrary.simpleMessage("配送"), @@ -253,6 +255,7 @@ class MessageLookup extends MessageLookupByLibrary { "qiandaolingqujinfen" : MessageLookupByLibrary.simpleMessage("簽到領取積分"), "qianjinmaiwei" : MessageLookupByLibrary.simpleMessage("前進麥味"), "qianwanghuixiangmendianduihuanhexiao" : MessageLookupByLibrary.simpleMessage("前往一心回乡旗下任意门店对工作人员出示商品兑换码,核实无误后,可领取对应商品"), + "qinglihuancun" : MessageLookupByLibrary.simpleMessage("清理緩存"), "qingshurubeizhuyaoqiu" : MessageLookupByLibrary.simpleMessage("請輸入備注要求"), "qingshuruchongzhijine" : MessageLookupByLibrary.simpleMessage("輸入充值金額(元)"), "qingshurushoujihao" : MessageLookupByLibrary.simpleMessage("請輸入手機號碼"), @@ -272,6 +275,7 @@ class MessageLookup extends MessageLookupByLibrary { "quanbuduihuan" : MessageLookupByLibrary.simpleMessage("全部兌換"), "quanchangtongyong" : MessageLookupByLibrary.simpleMessage("全場通用"), "quanchangzhe" : m15, + "quantian" : MessageLookupByLibrary.simpleMessage("全天"), "quanxian" : MessageLookupByLibrary.simpleMessage("權限"), "quanxianshezhi" : MessageLookupByLibrary.simpleMessage("權限設置"), "qucanhao" : MessageLookupByLibrary.simpleMessage("取餐號"), @@ -405,6 +409,7 @@ class MessageLookup extends MessageLookupByLibrary { "yue" : MessageLookupByLibrary.simpleMessage("餘額"), "yue_" : m28, "yuemingxi" : MessageLookupByLibrary.simpleMessage("餘額明細"), + "yunfei" : MessageLookupByLibrary.simpleMessage("運費"), "yuyan" : MessageLookupByLibrary.simpleMessage("語言"), "zailaiyidan" : MessageLookupByLibrary.simpleMessage("再來一單"), "zaixiankefu" : MessageLookupByLibrary.simpleMessage("在線客服"), diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart index 04f9bc13..f517811d 100644 --- a/lib/generated/l10n.dart +++ b/lib/generated/l10n.dart @@ -3435,6 +3435,16 @@ class S { ); } + /// `您未开启位置权限,请点击确定申请权限` + String get nindingweiquanxianweiyunxu { + return Intl.message( + '您未开启位置权限,请点击确定申请权限', + name: 'nindingweiquanxianweiyunxu', + desc: '', + args: [], + ); + } + /// `为了向您推荐附近的门店信息,推荐您在使用期间让我们使用位置信息` String get weilexiangnintuijianfujindemendianxinxi { return Intl.message( @@ -3495,6 +3505,46 @@ class S { ); } + /// `全天` + String get quantian { + return Intl.message( + '全天', + name: 'quantian', + desc: '', + args: [], + ); + } + + /// `运费` + String get yunfei { + return Intl.message( + '运费', + name: 'yunfei', + desc: '', + args: [], + ); + } + + /// `结算` + String get jiesuan { + return Intl.message( + '结算', + name: 'jiesuan', + desc: '', + args: [], + ); + } + + /// `清理缓存` + String get qinglihuancun { + return Intl.message( + '清理缓存', + name: 'qinglihuancun', + desc: '', + args: [], + ); + } + /// `关于创始人` String get guanyuchuangshiren { return Intl.message( diff --git a/lib/home/home_page.dart b/lib/home/home_page.dart index 2d08620a..ac3b7ccf 100644 --- a/lib/home/home_page.dart +++ b/lib/home/home_page.dart @@ -1,6 +1,7 @@ import 'package:dio/dio.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_swiper/flutter_swiper.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/main.dart'; import 'package:huixiang/retrofit/data/article.dart'; @@ -16,7 +17,6 @@ import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/hot_item.dart'; import 'package:huixiang/view_widget/item_title.dart'; -import 'package:flutter_swiper_null_safety/flutter_swiper_null_safety.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; @@ -157,7 +157,7 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { hotList(), ItemTitle( text: S.of(context).chuangshirendegushi, - imgPath: "assets/image/icon_today_task.png", + imgPath: "assets/image/icon_founder.png", ), GestureDetector( onTap: () { @@ -396,7 +396,7 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { ), ], ), - ), + ) ], ), ); @@ -453,42 +453,84 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { ); } + SwiperController swiperController = SwiperController(); + brands() { return Container( - margin: EdgeInsets.only(bottom: 18), - child: AspectRatio( - aspectRatio: 4.16, - child: Swiper( - key: UniqueKey(), - loop: false, - viewportFraction: 0.32, - scale: 0.70, - index: (brandData != null && brandData.length > 1) ? 1 : 0, - itemBuilder: (context, position) { - return Container( - margin: EdgeInsets.symmetric(horizontal: 3, vertical: 15), - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(37), - offset: Offset(0, 2), - blurRadius: 5, - spreadRadius: 0,) - ], - borderRadius: BorderRadius.all(Radius.circular(8)), - ), - child: MImage( - brandData != null ? brandData[position].image : "", - radius: BorderRadius.all(Radius.circular(8)), - fit: BoxFit.cover, - errorSrc: "assets/image/default_2_1.png", - fadeSrc: "assets/image/default_2_1.png", - ), - ); - }, - itemCount: brandData != null ? brandData.length : 0), + height: 90.h, + margin: EdgeInsets.only(bottom: 18.h), + child: ListView.builder( + padding: EdgeInsets.only(left: 10.w, right: 10.w), + scrollDirection: Axis.horizontal, + physics: BouncingScrollPhysics(), + itemBuilder: (context, position) { + return Container( + height: 60.h, + width: 120.w, + margin: EdgeInsets.symmetric(horizontal: 3.w, vertical: 15.h), + decoration: BoxDecoration( + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(37), + offset: Offset(0, 2), + blurRadius: 5, + spreadRadius: 0, + ) + ], + borderRadius: BorderRadius.circular(8), + ), + child: MImage( + brandData != null ? brandData[position].image : "", + radius: BorderRadius.circular(8), + fit: BoxFit.cover, + errorSrc: "assets/image/default_2_1.png", + fadeSrc: "assets/image/default_2_1.png", + ), + ); + }, + itemCount: + (brandData != null && brandData.length > 0) ? brandData.length : 0, ), + // child: AspectRatio( + // aspectRatio: 4.16, + // child: Swiper( + // scrollDirection: Axis.horizontal, + // controller: swiperController, + // loop: false, + // viewportFraction: 0.32, + // scale: 0.70, + // index: (brandData != null && brandData.length > 0) ? 1 : 0, + // itemBuilder: (context, position) { + // if (brandData == null || brandData.length == 0) { + // return Container(); + // } + // return Container( + // margin: EdgeInsets.symmetric(horizontal: 3.w, vertical: 15.h), + // decoration: BoxDecoration( + // color: Colors.white, + // boxShadow: [ + // BoxShadow( + // color: Colors.black.withAlpha(37), + // offset: Offset(0, 2), + // blurRadius: 5, + // spreadRadius: 0, + // ) + // ], + // borderRadius: BorderRadius.circular(8), + // ), + // child: MImage( + // brandData != null ? brandData[position].image : "", + // radius: BorderRadius.circular(8), + // fit: BoxFit.cover, + // errorSrc: "assets/image/default_2_1.png", + // fadeSrc: "assets/image/default_2_1.png", + // ), + // ); + // }, + // itemCount: (brandData != null && brandData.length > 0) ? brandData.length : 1, + // ), + // ), ); } diff --git a/lib/home/huixiang_brand_page.dart b/lib/home/huixiang_brand_page.dart index 23fae8ae..2c249cf7 100644 --- a/lib/home/huixiang_brand_page.dart +++ b/lib/home/huixiang_brand_page.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_html/flutter_html.dart'; import 'package:flutter_html/image_render.dart'; -import 'package:flutter_swiper_null_safety/flutter_swiper_null_safety.dart'; +import 'package:flutter_swiper/flutter_swiper.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/main.dart'; import 'package:huixiang/retrofit/data/banner.dart'; @@ -30,7 +30,7 @@ class BrandPage extends StatefulWidget { class _BrandPage extends State with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin { - ScrollController tabController; + ScrollController scrollController; List images = [ "assets/image/icon_chili.png", @@ -90,9 +90,10 @@ class _BrandPage extends State context: context, token: value.getString('token')), queryHome(), }); + if (scrollController == null) + scrollController = ScrollController(); - if (tabController == null) tabController = ScrollController(); - tabController.addListener(() { + scrollController.addListener(() { RenderBox chiliRenderBox = chiliGlobalKey.currentContext.findRenderObject(); RenderBox milkTeaRenderBox = @@ -172,9 +173,9 @@ class _BrandPage extends State enablePullDown: true, enablePullUp: false, header: MyHeader(), - physics: BouncingScrollPhysics(), + physics: ClampingScrollPhysics(), onRefresh: queryHome, - scrollController: tabController, + scrollController: scrollController, child: Container( child: SingleChildScrollView( physics: NeverScrollableScrollPhysics(), @@ -283,7 +284,7 @@ class _BrandPage extends State breadGlobalKey.currentContext.findRenderObject().parentData; } double offset = parendData.offset.dy - 52.h + 20.h; - tabController.animateTo(offset, + scrollController.animateTo(offset, duration: Duration(seconds: 1), curve: Curves.ease); }, child: tabItem(text, isSelected, index), diff --git a/lib/home/points_mall_page.dart b/lib/home/points_mall_page.dart index 3a7eb408..25e64be1 100644 --- a/lib/home/points_mall_page.dart +++ b/lib/home/points_mall_page.dart @@ -4,6 +4,7 @@ import 'dart:ui'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_swiper/flutter_swiper.dart'; import 'package:fluttertoast/fluttertoast.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/retrofit/data/base_data.dart'; @@ -14,7 +15,6 @@ import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/item_title.dart'; -import 'package:flutter_swiper_null_safety/flutter_swiper_null_safety.dart'; import 'package:huixiang/view_widget/my_footer.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -385,8 +385,8 @@ class _PointsMallPage extends State children: [ Image.asset( "assets/image/icon_an_crown.png", - width: 13, - height: 13, + width: 14, + height: 14, ), SizedBox( width: 5, diff --git a/lib/integral/integral_page.dart b/lib/integral/integral_page.dart index 4b93068b..c4e0c055 100644 --- a/lib/integral/integral_page.dart +++ b/lib/integral/integral_page.dart @@ -2,6 +2,7 @@ import 'dart:convert'; import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_swiper/flutter_swiper.dart'; import 'package:fluttertoast/fluttertoast.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/retrofit/data/base_data.dart'; @@ -12,7 +13,6 @@ import 'package:huixiang/retrofit/data/user_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/view_widget/round_button.dart'; import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; -import 'package:flutter_swiper_null_safety/flutter_swiper_null_safety.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; diff --git a/lib/integral_store/integral_store_details_page.dart b/lib/integral_store/integral_store_details_page.dart index 0596380b..eef10bc2 100644 --- a/lib/integral_store/integral_store_details_page.dart +++ b/lib/integral_store/integral_store_details_page.dart @@ -2,9 +2,9 @@ import 'dart:convert'; import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_swiper/flutter_swiper.dart'; import 'package:fluttertoast/fluttertoast.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:flutter_swiper_null_safety/flutter_swiper_null_safety.dart'; import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/goods.dart'; import 'package:huixiang/retrofit/data/user_info.dart'; diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index e4f1f66b..824aec27 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -356,12 +356,17 @@ "gong": "共", "jian": "件", "nindingweigongnengweikaiqi": "您定位功能开关未开启,请点击去打開定位", + "nindingweiquanxianweiyunxu": "您未开启位置权限,请点击确定申请权限", "weilexiangnintuijianfujindemendianxinxi": "为了向您推荐附近的门店信息,推荐您在使用期间让我们使用位置信息", "dengdaishangjiaqueren": "等待商家确认", "dingdandaifahuo": "订单待发货", "gengduo": "更多", "jituanchuangbanren": "集团创办人", "zhengzaijiazai": "正在加载", + "quantian": "全天", + "yunfei": "运费", + "jiesuan": "结算", + "qinglihuancun": "清理缓存", "guanyuchuangshiren": "关于创始人", diff --git a/lib/l10n/intl_zh_TW.arb b/lib/l10n/intl_zh_TW.arb index 9d1de163..088fb132 100644 --- a/lib/l10n/intl_zh_TW.arb +++ b/lib/l10n/intl_zh_TW.arb @@ -29,7 +29,7 @@ "jingbilianmenghuiyuandian": "净幣聯盟會員店", "gongli": "{km}公里", "manlijiandaijinquan": "滿{man}立減{jian}代金券", - "ren": "{ren}/人", + "ren": "¥{ren}/人", "youxiaoqizhi": "有效期至{date}", "huodongjinxingzhong": "活動進行中", "yiyoujifen": "已有積分", @@ -350,12 +350,17 @@ "gong": "共", "jian": "件", "nindingweigongnengweikaiqi": "您定位功能開關未開啟,請點擊去開啟定位", + "nindingweiquanxianweiyunxu": "您未开启位置权限,请点击确定申请权限", "weilexiangnintuijianfujindemendianxinxi": "為了向您推薦附近的門店信息,推薦您在使用期間讓我們使用位置信息", "dengdaishangjiaqueren": "等待商家確認", "dingdandaifahuo": "訂單待發貨", "gengduo": "更多", "jituanchuangbanren": "集团创办人", "zhengzaijiazai": "正在加載", + "quantian": "全天", + "yunfei": "運費", + "jiesuan": "結算", + "qinglihuancun": "清理緩存", "guanyuchuangshiren": "關於創始人", diff --git a/lib/login/login_page.dart b/lib/login/login_page.dart index 86d349de..48f9f91e 100644 --- a/lib/login/login_page.dart +++ b/lib/login/login_page.dart @@ -16,7 +16,7 @@ import 'package:huixiang/generated/l10n.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:dio/dio.dart'; import 'package:huixiang/view_widget/loading_view.dart'; -import 'package:photo_view/photo_view.dart'; +// import 'package:photo_view/photo_view.dart'; import 'package:shared_preferences/shared_preferences.dart'; class LoginPage extends StatefulWidget { @@ -380,11 +380,11 @@ class _MyLoginPageState extends State with TickerProviderStateMixin { child: Stack( alignment: Alignment.center, children: [ - PhotoView( - imageProvider: AssetImage("assets/image/laoban.png"), - initialScale: Platform.isAndroid ? 1.02 : 1.2, - basePosition: alignmentProgress, - ), + // PhotoView( + // imageProvider: AssetImage("assets/image/laoban.png"), + // initialScale: Platform.isAndroid ? 1.02 : 1.2, + // basePosition: alignmentProgress, + // ), Container( decoration: BoxDecoration( color: Color(0xFF32A060).withAlpha(changeAlpha), diff --git a/lib/main_page.dart b/lib/main_page.dart index 6fd96b67..8615e7db 100644 --- a/lib/main_page.dart +++ b/lib/main_page.dart @@ -136,6 +136,9 @@ class _MainPage extends State { onTap: () { setState(() { clickIndex = index; + // if (index == 1) { + // debugDumpApp(); + // } pageController.jumpToPage(clickIndex); }); }, diff --git a/lib/mine/mine_page.dart b/lib/mine/mine_page.dart index c3e19be4..2443d0a7 100644 --- a/lib/mine/mine_page.dart +++ b/lib/mine/mine_page.dart @@ -161,7 +161,7 @@ class _MinePage extends State with AutomaticKeepAliveClientMixin { mineList(context), ], ), - buildNotice(), + // buildNotice(), ], ), ), diff --git a/lib/mine/mine_vip_level_page.dart b/lib/mine/mine_vip_level_page.dart index 85a85afa..caab2f35 100644 --- a/lib/mine/mine_vip_level_page.dart +++ b/lib/mine/mine_vip_level_page.dart @@ -1,13 +1,13 @@ import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_swiper/flutter_swiper.dart'; import 'package:fluttertoast/fluttertoast.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/rank.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/view_widget/mine_vip_view.dart'; -import 'package:flutter_swiper_null_safety/flutter_swiper_null_safety.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:shared_preferences/shared_preferences.dart'; diff --git a/lib/order/logistics_information_page.dart b/lib/order/logistics_information_page.dart index 91f08faf..61a077ce 100644 --- a/lib/order/logistics_information_page.dart +++ b/lib/order/logistics_information_page.dart @@ -42,64 +42,75 @@ class _LogisticsInformationPage extends State { titleSpacing: 2, leadingWidth: 56, ), - body:Container( + body: Container( + height: MediaQuery.of(context).size.height, child: SingleChildScrollView( physics: BouncingScrollPhysics(), - child:Column( + child: Column( children: [ _orderInformation(), SizedBox( height: 16, ), - Container( - margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16), - padding: EdgeInsets.all(16), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(8), - bottomLeft: Radius.circular(4), - topRight: Radius.circular(8), - bottomRight: Radius.circular(4), + Expanded( + child: Container( + margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16), + padding: EdgeInsets.all(16), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(8), + bottomLeft: Radius.circular(4), + topRight: Radius.circular(8), + bottomRight: Radius.circular(4), + ), + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(12), + offset: Offset(0, 2), + blurRadius: 14, + spreadRadius: 0) + ], ), - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 2), - blurRadius: 14, - spreadRadius: 0) - ], - ), - child: Column( + child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Padding(padding:EdgeInsets.only(bottom: 32), - child:Text("订单跟踪",style: TextStyle(fontSize:16,fontWeight: FontWeight.bold,color: Color(0xff353535)),),), - SizedBox( - height: 500, - child: ListView.builder( - itemCount: 8, - scrollDirection: Axis.vertical, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return orderTrackItem(position); - }, + Padding( + padding: EdgeInsets.only(bottom: 32), + child: Text( + "订单跟踪", + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.bold, + color: Color(0xff353535)), ), ), - ] + ListView.builder( + itemCount: 8, + scrollDirection: Axis.vertical, + shrinkWrap: true, + physics: BouncingScrollPhysics(), + itemBuilder: (context, position) { + return Container( + child: orderTrackItem(position), + ); + }, + ), + ], + ), ), - ), + flex: 1, + ) ], ), ), - ), ); } Widget _orderInformation() { - return Container( - margin: EdgeInsets.only(left: 16,right: 16), + return Container( + margin: EdgeInsets.only(left: 16, right: 16), padding: EdgeInsets.all(16), decoration: BoxDecoration( color: Colors.white, @@ -128,8 +139,9 @@ class _LogisticsInformationPage extends State { fit: BoxFit.cover, ), Container( - padding: EdgeInsets.only(left: 32,right: 32,top: 5,bottom:5), - decoration:BoxDecoration( + padding: + EdgeInsets.only(left: 32, right: 32, top: 5, bottom: 5), + decoration: BoxDecoration( borderRadius: BorderRadius.only( topLeft: Radius.circular(0), bottomLeft: Radius.circular(4), @@ -138,9 +150,9 @@ class _LogisticsInformationPage extends State { ), color: Color(0x53000000), ), - child:Text( + child: Text( "共3件", - style:TextStyle( + style: TextStyle( fontSize: 12, color: Colors.white, ), @@ -173,8 +185,7 @@ class _LogisticsInformationPage extends State { style: TextStyle( color: Color(0xFF32A060), fontSize: 14, - fontWeight: FontWeight.bold - ), + fontWeight: FontWeight.bold), ) ], ), @@ -232,60 +243,86 @@ class _LogisticsInformationPage extends State { } Widget orderTrackItem(var position) { - return Row( - children: [ - Column( - children: [ - Text("11-27",style: TextStyle(fontSize:14,fontWeight: FontWeight.bold,color: Color(0xff353535)),), - SizedBox( - height:5, - ), - Text("12:23",style: TextStyle(fontSize:12,color: Color(0xff868686)),), - ], - ), - SizedBox( - width: 28, - ), - Column( - children: [ - Image.asset( - "assets/image/icon_sign.png", - width: 24, - height: 24, - ), - Container( - width: 1, - height: 30, - decoration: new BoxDecoration( - color: position < 7 ? Colors.black : Colors.white, - ), - ) - ], - ), - SizedBox( - width: 28, + return Container( + width: double.infinity, + height: 50, + child: Row( + children: [ + Column( + children: [ + Text( + "11-27", + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.bold, + color: Color(0xff353535)), + ), + SizedBox( + height: 5, + ), + Text( + "12:23", + style: TextStyle(fontSize: 12, color: Color(0xff868686)), + ), + ], + ), + SizedBox( + width: 28, + ), + Column( + children: [ + Image.asset( + "assets/image/icon_sign.png", + width: 24, + height: 24, + ), + Container( + width: 1, + height: 30, + decoration: new BoxDecoration( + color: position < 7 ? Colors.black : Colors.white, ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text("已签收",style: TextStyle(fontSize:14,fontWeight: FontWeight.bold,color: Colors.black),), - SizedBox( - height: 10, - ), - Row( - children: [ - Text("快件已在泉州市签收",style: TextStyle(fontSize:12,color: Color(0xff353535)),), - SizedBox( - width: 9, - ), - Text("签收人 张三",style: TextStyle(fontSize:12,color: Color(0xff353535)),), - ], + ) + ], + ), + SizedBox( + width: 28, + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "已签收", + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.bold, + color: Colors.black), + ), + SizedBox( + height: 10, + ), + Row( + children: [ + Expanded( + child: Text( + "快件已在泉州市签收", + style: TextStyle(fontSize: 12, color: Color(0xff353535)), ), - ], - ), - - ], - ); + flex: 1, + ), + SizedBox( + width: 9, + ), + Text( + "签收人 张三", + style: TextStyle(fontSize: 12, color: Color(0xff353535)), + ), + ], + ), + ], + ), + ], + ), + ); } - } diff --git a/lib/order/order_detail_page.dart b/lib/order/order_detail_page.dart index f8589cf2..be479aaa 100644 --- a/lib/order/order_detail_page.dart +++ b/lib/order/order_detail_page.dart @@ -168,11 +168,10 @@ class _OrderDetailPage extends State { children: timeWidget(), ), ), - visible: (orderStatus >= 4) ? false : (isTakeOut == 0) - ? !(payStatus == 1) + visible: (orderStatus >= 4 || isTakeOut == 2) ? false + : (isTakeOut == 0) ? !(payStatus == 1) : (isTakeOut == 1) - ? !(payStatus == 1 && - (sendStatus != 2 && sendStatus != 3)) + ? !(payStatus == 1 && (sendStatus != 2 && sendStatus != 3)) : !(payStatus == 1 && (sendStatus != 1)), ) ], @@ -252,15 +251,15 @@ class _OrderDetailPage extends State { minute = hourMinutes[1]; } } else if (isTakeOut == 2) { - if (sendStatus == 1) { - String hourMinute = AppUtils.getHourMinuteByString( - (orderInfo != null && orderInfo.orderDetail != null) - ? orderInfo.orderDetail.predictTime - : ""); - var hourMinutes = hourMinute.split(":"); - hour = hourMinutes[0]; - minute = hourMinutes[1]; - } + // if (sendStatus == 1) { + // String hourMinute = AppUtils.getHourMinuteByString( + // (orderInfo != null && orderInfo.orderDetail != null) + // ? orderInfo.orderDetail.predictTime + // : ""); + // var hourMinutes = hourMinute.split(":"); + // hour = hourMinutes[0]; + // minute = hourMinutes[1]; + // } } } return [ @@ -319,7 +318,7 @@ class _OrderDetailPage extends State { break; case 3: title = S.of(context).dengdaiyonghuqucan; - center = S.of(context).qucanhao; + center = S.of(context).qudanhao(orderInfo.dayFlowCode); break; case 4: title = S.of(context).dingdanyiwancheng; @@ -433,7 +432,7 @@ class _OrderDetailPage extends State { textBaseline: TextBaseline.alphabetic, children: [ Text( - "合计", + S.of(context).heji, style: TextStyle( fontSize: 12.sp, color: Colors.black, @@ -463,7 +462,7 @@ class _OrderDetailPage extends State { color: Color(0xFF32A060), padding: EdgeInsets.symmetric(horizontal: 36.w), child: Text( - "结算", + S.of(context).jiesuan, style: TextStyle( fontSize: 16.sp, color: Colors.white, @@ -855,8 +854,7 @@ class _OrderDetailPage extends State { if (orderInfo.isTakeOut != 0) { // 配送费 - widgets.add( - discountItem(Color(0xFFFF7A1A), "配送费", "", "+${orderInfo.postFee}")); + widgets.add(discountItem(Color(0xFFFF7A1A), orderInfo.isTakeOut == 1 ? S.of(context).peisongfei : S.of(context).yunfei, "", "+${orderInfo.postFee}")); } if (orderInfo.orderDetail != null && diff --git a/lib/order/order_history_page.dart b/lib/order/order_history_page.dart index 35b30ec5..48c71b1f 100644 --- a/lib/order/order_history_page.dart +++ b/lib/order/order_history_page.dart @@ -441,7 +441,8 @@ class _OrderHistoryList extends State orderInfo.isTakeOut, orderInfo.sendStatus, orderInfo.refundStatus, - ) + orderInfo.dayFlowCode + ) : [], ), ], @@ -545,7 +546,7 @@ class _OrderHistoryList extends State } List statusBtn( - payStatus, orderStatus, isTakeOut, sendStatus, refundStatus) { + payStatus, orderStatus, isTakeOut, sendStatus, refundStatus, dayFlowCode) { if (refundStatus == 1) { return [ RoundButton( @@ -671,7 +672,7 @@ class _OrderHistoryList extends State margin: EdgeInsets.only(left: 37.w), alignment: Alignment.centerLeft, child: Text( - S.of(context).qudanhao("123"), + S.of(context).qudanhao(dayFlowCode), style: TextStyle( fontSize: 16.sp, fontWeight: FontWeight.bold, diff --git a/lib/order/store_selector_page.dart b/lib/order/store_selector_page.dart index eb46d562..80fc01bf 100644 --- a/lib/order/store_selector_page.dart +++ b/lib/order/store_selector_page.dart @@ -105,7 +105,7 @@ class _StoreSelectorPage extends State { fontSize: 16.0); } if (await Permission.location.isPermanentlyDenied) { - //openAppSettings + openAppSettings(); getLatLng(); } else if (await Permission.location.isGranted) { showCupertinoDialog( @@ -120,6 +120,7 @@ class _StoreSelectorPage extends State { if (permissionStatus.isGranted) { startLocation(); } else { + openAppSettings(); getLatLng(); } } diff --git a/lib/setting/setting_page.dart b/lib/setting/setting_page.dart index d030e42d..118dd4b6 100644 --- a/lib/setting/setting_page.dart +++ b/lib/setting/setting_page.dart @@ -1,11 +1,18 @@ +import 'dart:io'; + import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:fluttertoast/fluttertoast.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/login/login_page.dart'; import 'package:huixiang/main.dart'; import 'package:huixiang/utils/event_type.dart'; +import 'package:huixiang/utils/flutter_utils.dart'; +import 'package:huixiang/utils/min.dart'; import 'package:huixiang/view_widget/round_button.dart'; +import 'package:path_provider/path_provider.dart'; import 'package:shared_preferences/shared_preferences.dart'; +import 'package:flutter_cache_manager/flutter_cache_manager.dart'; class SettingPage extends StatefulWidget { @override @@ -17,10 +24,18 @@ class SettingPage extends StatefulWidget { class _SettingPage extends State { String locale = "tw"; + String cacheTotal = "0B"; + @override void initState() { super.initState(); setLanguage(); + + AppUtils.total().then((value) { + cacheTotal = (value > 0) ? "${(value / 1024.0 ~/ 1024.0)}M" : "0B"; + setState(() {}); + }); + } setLanguage() async { @@ -92,37 +107,38 @@ class _SettingPage extends State { GestureDetector( onTap: () { showCupertinoModalPopup( - context: context, - builder: (contetx) { - return CupertinoActionSheet( - title: Text("更换语言"), - actions: [ - CupertinoActionSheetAction( - child: Text('简体中文'), - onPressed: () { - changeLanguage("zh"); - }, - isDefaultAction: true, - isDestructiveAction: false, - ), - CupertinoActionSheetAction( - child: Text('繁体中文'), - onPressed: () { - changeLanguage("tw"); - }, - isDefaultAction: true, - isDestructiveAction: false, - ), - ], - cancelButton: CupertinoActionSheetAction( + context: context, + builder: (contetx) { + return CupertinoActionSheet( + title: Text("更换语言"), + actions: [ + CupertinoActionSheetAction( + child: Text('简体中文'), + onPressed: () { + changeLanguage("zh"); + }, + isDefaultAction: true, + isDestructiveAction: false, + ), + CupertinoActionSheetAction( + child: Text('繁体中文'), onPressed: () { - Navigator.of(context).pop(); + changeLanguage("tw"); }, - child: Text("取消"), - isDestructiveAction: true, + isDefaultAction: true, + isDestructiveAction: false, ), - ); - }); + ], + cancelButton: CupertinoActionSheetAction( + onPressed: () { + Navigator.of(context).pop(); + }, + child: Text("取消"), + isDestructiveAction: true, + ), + ); + }, + ); }, child: settingItem( S.of(context).yuyan, @@ -143,6 +159,12 @@ class _SettingPage extends State { Navigator.of(context).pushNamed('/router/help_feedback_page'); }, ), + GestureDetector( + child: settingItem(S.of(context).qinglihuancun, cacheTotal), + onTap: () { + clearCache(); + }, + ), GestureDetector( child: settingSingleItem(S.of(context).guanyu), onTap: () { @@ -181,12 +203,35 @@ class _SettingPage extends State { ); } - // changeEnv(env){ - // SharedPreferences.getInstance().then((value) => { - // value.setString("env", env), - // }); - // Navigator.of(context).pop(); - // } + clearCache() async { + if (Platform.isAndroid) { + if(!(await Min.isInitialize())) { + await Min.initialize(); + } + } + + SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); + List miniAppids = sharedPreferences.getStringList("miniAppid"); + if (miniAppids != null && miniAppids.length > 0) { + miniAppids.forEach((element) async { + print("appid: $element"); + String path = await Min.getAppBasePath(element); + AppUtils.deleteDirectory(Directory(path)); + String filePath = ""; + if (Platform.isAndroid) { + filePath = (await getExternalStorageDirectory()).path; + } else { + filePath = (await getApplicationDocumentsDirectory()).path; + } + AppUtils.deleteDirectory(Directory(filePath)); + }); + sharedPreferences.setStringList("miniAppid", []); + } + + cacheTotal = "0B"; + setState(() {}); + + } changeLanguage(language) { if (language == "zh") { diff --git a/lib/union/union_details_page.dart b/lib/union/union_details_page.dart index e3b0abcb..2b5ebbd1 100644 --- a/lib/union/union_details_page.dart +++ b/lib/union/union_details_page.dart @@ -5,6 +5,7 @@ import 'package:dio/dio.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; +import 'package:flutter_swiper/flutter_swiper.dart'; import 'package:fluttertoast/fluttertoast.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/retrofit/data/base_data.dart'; @@ -16,9 +17,10 @@ import 'package:huixiang/utils/min.dart'; import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/item_title.dart'; +import 'package:huixiang/view_widget/my_appbar.dart'; +import 'package:huixiang/view_widget/receive_success.dart'; import 'package:huixiang/view_widget/round_button.dart'; import 'package:huixiang/view_widget/separator.dart'; -import 'package:flutter_swiper_null_safety/flutter_swiper_null_safety.dart'; import 'package:path_provider/path_provider.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -71,30 +73,12 @@ class _UnionDetailsPage extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar( - backgroundColor: Color(0xFFF7F7F7), - elevation: 0, - title: Text( - storeInfo == null ? "" : storeInfo.storeName, - style: TextStyle(color: Colors.black87), - ), - leading: GestureDetector( - onTap: () { - Navigator.of(context).pop(); - }, - child: Container( - alignment: Alignment.centerRight, - margin: EdgeInsets.only(left: 10.w), - padding: EdgeInsets.all(6.w), - child: Icon( - Icons.arrow_back_ios, - color: Colors.black, - size: 24.w, - ), - ), - ), - titleSpacing: 2, - leadingWidth: 56.w, + appBar: MyAppBar( + background: Color(0xFFF7F7F7), + title: storeInfo == null ? "" : storeInfo.storeName, + titleColor: Colors.black87, + titleSize: 18.sp, + leadingColor: Colors.black, ), body: Column( children: [ @@ -378,12 +362,12 @@ class _UnionDetailsPage extends State { Widget buildCoupon() { return Container( - height: 109, + height: 109.h, child: ListView.builder( itemCount: (storeInfo != null && storeInfo.couponVOList != null) ? storeInfo.couponVOList.length : 0, - physics: BouncingScrollPhysics(), + physics: BouncingScrollPhysics(parent: PageScrollPhysics()), scrollDirection: Axis.horizontal, itemBuilder: (context, position) { return Container( @@ -414,7 +398,10 @@ class _UnionDetailsPage extends State { margin: EdgeInsets.only(left: 5), child: Text.rich(TextSpan(children: [ TextSpan( - text: "¥", + text: (storeInfo != + null && + storeInfo.couponVOList != null && storeInfo.couponVOList[position] + .bizType == 1) ? "¥" : "", style: TextStyle( fontSize: 22.sp, color: Color(0xFFFF7A1A), @@ -422,7 +409,12 @@ class _UnionDetailsPage extends State { ), ), TextSpan( - text: "5", + text: (storeInfo != + null && + storeInfo.couponVOList != null && storeInfo.couponVOList[position] + .bizType == 1) + ? "${double.tryParse(storeInfo.couponVOList[position].discountAmount).toInt()}" + : "${storeInfo.couponVOList[position].discountPercent}折", style: TextStyle( fontSize: 36.sp, color: Color(0xFFFF7A1A), @@ -515,6 +507,8 @@ class _UnionDetailsPage extends State { ? "${storeInfo.couponVOList[position].useStartTime.replaceAll("-", ".").split(" ")[0]}-${storeInfo.couponVOList[position].useEndTime.replaceAll("-", ".").split(" ")[0]}" : "", ), + overflow: TextOverflow.ellipsis, + maxLines: 1, style: TextStyle( fontSize: 8.sp, color: Color(0xFFA29E9E), @@ -524,14 +518,20 @@ class _UnionDetailsPage extends State { ), ), ), - Container( - height: 25.h, - child: RoundButton( - text: S.of(context).lingqu, - textColor: Colors.white, - backgroup: Color(0xFF32A060), - padding: EdgeInsets.fromLTRB(8, 4, 8, 4), - fontSize: 12.sp, + InkWell( + onTap: () { + receiveCoupon(storeInfo.couponVOList[position].id); + }, + child: Container( + height: 25.h, + child: RoundButton( + text: S.of(context).lingqu, + textColor: Colors.white, + backgroup: (storeInfo != null && storeInfo + .couponVOList != null && storeInfo.couponVOList[position].status >= 2) ? Colors.grey : Color(0xFF32A060), + padding: EdgeInsets.fromLTRB(8, 4, 8, 4), + fontSize: 12.sp, + ), ), ), ], @@ -545,6 +545,29 @@ class _UnionDetailsPage extends State { ); } + ///领取优惠券 + receiveCoupon(couponId) async { + BaseData baseData = await apiService.receiveCoupon(couponId); + if (baseData.isSuccess) { + queryStoreInfo(); + showAlertDialog(); + } else { + Fluttertoast.showToast(msg: baseData.msg); + } + } + + /// 领取成功弹窗 + showAlertDialog() { + //显示对话框 + showDialog( + context: context, + builder: (BuildContext context) { + return ReceiveSuccess(); + }, + ); + } + + ///领取VIP receiveVip() async { BaseData baseData = await apiService.minLogin(storeInfo.id); if (baseData != null && baseData.isSuccess) { @@ -697,6 +720,7 @@ class _UnionDetailsPage extends State { position < storeInfo.bannerList.length) ? storeInfo.bannerList[position].imgUrl : "", + fit: BoxFit.cover, radius: BorderRadius.circular(4), errorSrc: "assets/image/default_2_1.png", @@ -713,7 +737,7 @@ class _UnionDetailsPage extends State { printMin() async { String miniAppId = storeInfo.mini.miniAppId; print("print isExistsApp: ${await Min.isExistsApp(miniAppId)}"); - print("print getAppBasePath: ${await Min.getAppBasePath()}"); + print("print getAppBasePath: ${await Min.getAppBasePath(miniAppId)}"); print("print currentPageUrl: ${await Min.currentPageUrl()}"); print("print runingAppid: ${await Min.runingAppid()}"); print("print getAppVersionInfo: ${await Min.getAppVersionInfo(miniAppId)}"); @@ -856,6 +880,9 @@ class _UnionDetailsPage extends State { }); if (response.statusCode == 200) { downText = "下载完成"; + SharedPreferences.getInstance().then((value) { + value.setStringList("miniAppid", (value.getStringList("miniAppid") != null ? value.getStringList("miniAppid") : [])..add(appid)); + }); state(() {}); Future.delayed(Duration(seconds: 1), () { if (Navigator.canPop(context)) { diff --git a/lib/union/union_page.dart b/lib/union/union_page.dart index b0347fc3..6e957bda 100644 --- a/lib/union/union_page.dart +++ b/lib/union/union_page.dart @@ -38,7 +38,8 @@ class UnionPage extends StatefulWidget { } } -class _UnionPage extends State with AutomaticKeepAliveClientMixin, WidgetsBindingObserver { +class _UnionPage extends State + with AutomaticKeepAliveClientMixin, WidgetsBindingObserver { //默认设置为不使用自定义地图,如果需要直接显示,在初始化是设置为true CustomStyleOptions _customStyleOptions = CustomStyleOptions(false); @@ -80,7 +81,7 @@ class _UnionPage extends State with AutomaticKeepAliveClientMixin, Wi WidgetsBinding.instance.addPostFrameCallback((_) { setState(() { print("object: ${MediaQuery.of(context).viewInsets.bottom}"); - if(MediaQuery.of(context).viewInsets.bottom == 0){ + if (MediaQuery.of(context).viewInsets.bottom == 0) { if (iskeyboardShow) { iskeyboardShow = false; //关闭键盘 软键盘关闭了, 清除输入控件的焦点, 否则重新进入页面会导致软键盘再弹出问题 @@ -290,191 +291,179 @@ class _UnionPage extends State with AutomaticKeepAliveClientMixin, Wi FocusScope.of(context).requestFocus(FocusNode()); }, child: Scaffold( - resizeToAvoidBottomInset: true, - body: NestedScrollView( - physics: PageScrollPhysics(), - headerSliverBuilder: (context, inner) { - return [ - SliverOverlapAbsorber( - sliver: buildSliverAppBar(AMapWidget( - initialCameraPosition: CameraPosition( - target: LatLng(30.553111, 114.342366), - zoom: 12.0, - ), - onMapCreated: onMapCreated, - apiKey: aMapApiKeys, - touchPoiEnabled: true, - markers: markers.toSet(), - scrollGesturesEnabled: true, - customStyleOptions: _customStyleOptions, - onPoiTouched: (poiTouch) { - FocusScope.of(context).requestFocus(FocusNode()); - }, - gestureRecognizers: >[ - Factory( - () => EagerGestureRecognizer()), - ].toSet(), - )), - handle: - NestedScrollView.sliverOverlapAbsorberHandleFor(context), - ) - ]; - }, - body: Builder( - builder: (context) { - return CustomScrollView( - physics: NeverScrollableScrollPhysics(), - slivers: [ - SliverOverlapInjector( - handle: NestedScrollView.sliverOverlapAbsorberHandleFor( - context), - ), - SliverToBoxAdapter( - child: Container( - height: MediaQuery.of(context).size.height - - 102.h - - MediaQuery.of(context).padding.top, - child: SmartRefresher( - controller: refreshController, - enablePullUp: false, - enablePullDown: true, - physics: BouncingScrollPhysics(), - header: MyHeader(), - onRefresh: () { - startLocation(); - }, - child: ListView.builder( - itemCount: - storeList == null ? 0 : storeList.length, - padding: EdgeInsets.only( - top: 8.h, - bottom: 84.h + (375.h - 88.h) + 4.h), - physics: NeverScrollableScrollPhysics(), - itemBuilder: (context, position) { - return GestureDetector( - onTap: () { - Navigator.of(context).pushNamed( - '/router/union_detail_page', - arguments: { - "id": storeList[position].id - }); - }, - child: buildStoreItem( - storeList[position], position), - ); - }), - ), - ), - ), - ], - ); - }, - )), + resizeToAvoidBottomInset: false, + appBar: PreferredSize( + preferredSize: Size(double.infinity, 75.h), + child: buildSearchItem(), + ), + body: Column( + children: [ + PreferredSize( + preferredSize: Size(double.infinity, 52.h), + child: Container( + padding: EdgeInsets.only(top: 6.h), + color: Color(0xFFFAFAFA), + child: ItemTitle( + text: S.of(context).jingbilianmenghuiyuandian, + imgPath: "assets/image/icon_union_store.png", + ), + ), + ), + buildItem(), + ], + ), + // body: NestedScrollView( + // physics: PageScrollPhysics(), + // headerSliverBuilder: (context, inner) { + // return [ + // SliverOverlapAbsorber( + // sliver: buildSliverAppBar(AMapWidget( + // initialCameraPosition: CameraPosition( + // target: LatLng(30.553111, 114.342366), + // zoom: 12.0, + // ), + // onMapCreated: onMapCreated, + // apiKey: aMapApiKeys, + // touchPoiEnabled: true, + // markers: markers.toSet(), + // scrollGesturesEnabled: true, + // customStyleOptions: _customStyleOptions, + // onPoiTouched: (poiTouch) { + // FocusScope.of(context).requestFocus(FocusNode()); + // }, + // gestureRecognizers: >[ + // Factory( + // () => EagerGestureRecognizer()), + // ].toSet(), + // )), + // handle: + // NestedScrollView.sliverOverlapAbsorberHandleFor(context), + // ) + // ]; + // }, + // body: Builder( + // builder: (context) { + // return CustomScrollView( + // physics: NeverScrollableScrollPhysics(), + // slivers: [ + // SliverOverlapInjector( + // handle: NestedScrollView.sliverOverlapAbsorberHandleFor( + // context), + // ), + // SliverToBoxAdapter( + // child: + // ), + // ], + // ); + // }, + // ),), + ), + ); + } + + Widget buildItem() { + return Container( + height: MediaQuery.of(context).size.height - + 102.h - + MediaQuery.of(context).padding.top, + child: SmartRefresher( + controller: refreshController, + enablePullUp: false, + enablePullDown: true, + physics: BouncingScrollPhysics(), + header: MyHeader(), + onRefresh: () { + startLocation(); + }, + child: ListView.builder( + itemCount: storeList == null ? 0 : storeList.length, + // padding: EdgeInsets.only(top: 8.h, bottom: 84.h + (375.h - 88.h) + 4.h), + padding: EdgeInsets.only( + top: 8.h, bottom: 84.h /* + (375.h - 88.h) + 4.h*/), + physics: NeverScrollableScrollPhysics(), + itemBuilder: (context, position) { + return GestureDetector( + onTap: () { + Navigator.of(context).pushNamed('/router/union_detail_page', + arguments: {"id": storeList[position].id}); + }, + child: buildStoreItem(storeList[position], position), + ); + }), ), ); } startLocation() async { - if (Platform.isAndroid) { - if (!(await Permission.locationWhenInUse.serviceStatus.isEnabled)) { - enableLocation(); - refreshController.refreshCompleted(); - return; - } + if (!(await Permission.locationWhenInUse.serviceStatus.isEnabled)) { + enableLocation(); + refreshController.refreshCompleted(); + return; } - print("object: isGranted: ${await Permission.location.isGranted}"); - print("object: isDenied: ${await Permission.location.isDenied}"); - print("object: isLimited: ${await Permission.location.isLimited}"); - print("object: isPermanentlyDenied: ${await Permission.location.isPermanentlyDenied}"); - print("object: isRestricted: ${await Permission.location.isRestricted}"); - print("object: isUndetermined: ${await Permission.location.isUndetermined}"); - print("object: shouldShowRequestRationale: ${await Permission.location.shouldShowRequestRationale}"); - print("object: status: ${await Permission.location.status}"); - print("object: value: -------------------------"); - if (await Permission.location.isPermanentlyDenied) { - print("object: requestDialog"); requestDialog(); refreshController.refreshCompleted(); } else if (await Permission.location.isGranted) { - print("object: showLoadingDialog"); showLoadingDialog(); aMapFlutterLocation.startLocation(); + } else if (await Permission.location.isUndetermined) { + await Permission.location.request(); + refreshController.refreshCompleted(); } else { - if (Platform.isAndroid) { - await Permission.location.request(); - } else if (Platform.isIOS) { + if (Platform.isIOS) { //去设置中心 - iosLocationSetting(); + requestDialog(); + } else { + await Permission.location.request(); } refreshController.refreshCompleted(); } } - iosLocationSetting() async { + enableLocation() { showCupertinoDialog( - context: context, - builder: (context) { - return RequestPermission( - "assets/image/icon_permission_location_bg.png", - S.of(context).nindingweigongnengweikaiqi, - S.of(context).weilexiangnintuijianfujindemendianxinxi, - S.of(context).queding, - (result) async { - if (result) { - - } - }, - heightRatioWithWidth: 0.84, - ); - }); + context: context, + builder: (context) { + return RequestPermission( + "assets/image/icon_permission_location_bg.png", + S.of(context).nindingweigongnengweikaiqi, + S.of(context).weilexiangnintuijianfujindemendianxinxi, + S.of(context).dakaidingwei, + (result) async { + if (result) { + final AndroidIntent intent = AndroidIntent( + action: 'action_location_source_settings', + package: "com.zsw.huixiang"); + await intent.launch(); + // startLocation(); + } + }, + heightRatioWithWidth: 0.84, + ); + }, + ); } - enableLocation() { + requestDialog() { showCupertinoDialog( context: context, builder: (context) { return RequestPermission( "assets/image/icon_permission_location_bg.png", - "您定位功能开关未开启,请点击去打開定位", - "为了向您推荐附近的门店信息,推荐您在使用期间让我们使用位置信息", - S.of(context).dakaidingwei, + S.of(context).nindingweiquanxianweiyunxu, + S.of(context).weilexiangnintuijianfujindemendianxinxi, + S.of(context).kaiqiquanxian, (result) async { if (result) { - final AndroidIntent intent = AndroidIntent( - action: 'action_location_source_settings', - package: "com.zsw.huixiang"); - await intent.launch(); - // startLocation(); - } - }, - heightRatioWithWidth: 0.84, - ); - }); - } - - requestDialog() { - showCupertinoDialog( - context: context, - builder: (context) { - return RequestPermission( - "assets/image/icon_permission_location_bg.png", - "您未开启位置权限,请点击开启", - "为了向您推荐附近的门店信息,推荐您在使用期间让我们使用位置信息", - S.of(context).kaiqiquanxian, (result) async { - if (result) { - if (Platform.isAndroid) { - final AndroidIntent intent = AndroidIntent( - action: 'action_application_details_settings', - data: 'package:com.zsw.huixiang'); - await intent.launch(); + await openAppSettings(); if (await Permission.location.isGranted) { startLocation(); } } - } - }); + }, + heightRatioWithWidth: 0.84, + ); }); } @@ -485,6 +474,52 @@ class _UnionPage extends State with AutomaticKeepAliveClientMixin, Wi _mapController = controller; } + Widget buildSearchItem() { + return Container( + height: 36.h, + margin: EdgeInsets.fromLTRB(16.w, 40, 16.w, 0), + padding: EdgeInsets.fromLTRB(0, 6.h, 0, 6.h), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all(Radius.circular(4)), + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(12), + offset: Offset(0, 3), + blurRadius: 14, + spreadRadius: 0, + ) + ]), + child: TextField( + textInputAction: TextInputAction.search, + onEditingComplete: () { + startLocation(); + }, + controller: editingController, + cursorHeight: 30.h, + decoration: InputDecoration( + contentPadding: EdgeInsets.symmetric(vertical: 12.h), + prefixIcon: Icon( + Icons.search, + size: 24, + color: Colors.black, + ), + suffixIcon: InkWell( + onTap: () { + editingController.clear(); + }, + child: Icon( + Icons.close, + size: 19, + color: Colors.grey, + ), + ), + border: InputBorder.none, + ), + ), + ); + } + Widget buildSliverAppBar(AMapWidget map) { return SliverAppBar( // 滑上去时搜索隐藏 @@ -626,17 +661,21 @@ class _UnionPage extends State with AutomaticKeepAliveClientMixin, Wi mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.center, children: [ - Text( - (store.distance ?? 0) > 1000 - ? S.of(context).gongli( - ((store.distance ?? 0) / 1000 * 100).toInt() / - 100.0) - : S.of(context).mi( - ((store.distance ?? 0) * 100).toInt() / 100.0), - style: TextStyle( - color: Color(0xFF4C4C4C), - fontSize: 12, + Visibility( + child: Text( + (store.distance ?? 0) > 1000 + ? S.of(context).gongli( + ((store.distance ?? 0) / 1000 * 100).toInt() / + 100.0) + : S.of(context).mi( + ((store.distance ?? 0) * 100).toInt() / + 100.0), + style: TextStyle( + color: Color(0xFF4C4C4C), + fontSize: 12, + ), ), + visible: store.distance != null, ), SizedBox( width: 16.w, @@ -656,7 +695,10 @@ class _UnionPage extends State with AutomaticKeepAliveClientMixin, Wi ) ], ), - Expanded(child: Container(), flex: 1,), + Expanded( + child: Container(), + flex: 1, + ), Container( child: Text( S.of(context).manlijiandaijinquan(50, 25), @@ -673,8 +715,8 @@ class _UnionPage extends State with AutomaticKeepAliveClientMixin, Wi Text( (store.openStartTime == null && store.openEndTime == null) - ? "全天" - : "${store.openStartTime}-${store.openEndTime}", + ? S.of(context).quantian + : "${store.openStartTime.substring(0, store.openStartTime.lastIndexOf(":"))}-${store.openEndTime.substring(0, store.openEndTime.lastIndexOf(":"))}", style: TextStyle( color: Color(0xFFA29E9E), fontSize: 12.sp, @@ -687,7 +729,7 @@ class _UnionPage extends State with AutomaticKeepAliveClientMixin, Wi color: Color(0xFF353535), fontSize: 12.sp, ), - ) + ), ], ), ], diff --git a/lib/utils/flutter_utils.dart b/lib/utils/flutter_utils.dart index 059c5caf..3f46dc46 100644 --- a/lib/utils/flutter_utils.dart +++ b/lib/utils/flutter_utils.dart @@ -1,5 +1,8 @@ +import 'dart:io'; + import 'package:intl/intl.dart'; +import 'package:path_provider/path_provider.dart'; class AppUtils { @@ -69,6 +72,60 @@ class AppUtils { return DateFormat("HH:mm").format(dateTime); //分钟 } + /// 获取缓存大小 + static Future total() async { + Directory tempDir = await getTemporaryDirectory(); + if (tempDir == null) return 0; + int total = await _reduce(tempDir); + return total; + } + + /// 清除缓存 + static Future clear() async { + Directory tempDir = await getTemporaryDirectory(); + if (tempDir == null) return 0; + await _delete(tempDir); + } + + /// 递归缓存目录,计算缓存大小 + static Future _reduce(FileSystemEntity file) async { + /// 如果是一个文件,则直接返回文件大小 + if (file is File) { + int length = await file.length(); + return length; + } + /// 如果是目录,则遍历目录并累计大小 + if (file is Directory) { + final List children = file.listSync(); + int total = 0; + if (children != null && children.isNotEmpty) + for (final FileSystemEntity child in children) + total += await _reduce(child); + return total; + } + return 0; + } + /// 递归删除缓存目录和文件 + static Future _delete(FileSystemEntity file) async { + if (file is Directory) { + final List children = file.listSync(); + for (final FileSystemEntity child in children) { + await child.delete(recursive: true); + } + } else { + await file.delete(); + } + } + + /// 递归删除缓存目录和文件 + static Future deleteDirectory(FileSystemEntity file) async { + if (file is Directory) { + final List children = file.listSync(); + for (final FileSystemEntity child in children) { + child.deleteSync(recursive: true); + } + } + } } diff --git a/lib/utils/min.dart b/lib/utils/min.dart index 20affefa..69b411b5 100644 --- a/lib/utils/min.dart +++ b/lib/utils/min.dart @@ -1,4 +1,5 @@ import 'dart:async'; +import 'dart:io'; import 'package:flutter/services.dart'; @@ -19,11 +20,18 @@ class Min { return version; } - static Future getAppBasePath() async { - final String getAppBasePath = await _channel.invokeMethod( - 'getAppBasePath', - ); - return getAppBasePath; + static Future getAppBasePath(appid) async { + if(Platform.isIOS) { + final String getAppBasePath = await _channel.invokeMethod( + 'getAppBasePath', {"appid": appid} + ); + return getAppBasePath; + } else { + final String getAppBasePath = await _channel.invokeMethod( + 'getAppBasePath', + ); + return getAppBasePath; + } } static Future runingAppid() async { diff --git a/lib/view_widget/custom_image.dart b/lib/view_widget/custom_image.dart index 13ac685a..0c4319c3 100644 --- a/lib/view_widget/custom_image.dart +++ b/lib/view_widget/custom_image.dart @@ -1,4 +1,5 @@ import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter_cache_manager/flutter_cache_manager.dart'; import 'package:flutter/material.dart'; class MImage extends StatelessWidget { @@ -28,6 +29,7 @@ class MImage extends StatelessWidget { borderRadius: radius, child: CachedNetworkImage( imageUrl: src, + cacheManager: DefaultCacheManager(), fadeInDuration: Duration(milliseconds: 300), fadeOutDuration: Duration(milliseconds: 300), imageBuilder: (context, provide) { diff --git a/pubspec.lock b/pubspec.lock index 6fdcf975..4df05554 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,294 +5,294 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "14.0.0" amap_flutter_base: dependency: transitive description: name: amap_flutter_base - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.2" amap_flutter_location: dependency: "direct main" description: name: amap_flutter_location - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" amap_flutter_map: dependency: "direct main" description: name: amap_flutter_map - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.2" analyzer: dependency: transitive description: name: analyzer - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.41.2" android_intent_plus: dependency: "direct main" description: name: android_intent_plus - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.2" args: dependency: transitive description: name: args - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.1" async: dependency: transitive description: name: async - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.5.0" + version: "2.6.1" barcode: dependency: transitive description: name: barcode - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" barcode_widget: dependency: "direct main" description: name: barcode_widget - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.1" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" bubble_tab_indicator: dependency: "direct main" description: name: bubble_tab_indicator - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.1.6" build: dependency: transitive description: name: build - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.6.2" build_config: dependency: transitive description: name: build_config - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.4.6" build_daemon: dependency: transitive description: name: build_daemon - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.10" build_resolvers: dependency: transitive description: name: build_resolvers - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.5.3" build_runner: dependency: "direct dev" description: name: build_runner - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.11.5" build_runner_core: dependency: transitive description: name: build_runner_core - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "6.1.10" built_collection: dependency: transitive description: name: built_collection - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.3.2" built_value: dependency: transitive description: name: built_value - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "7.1.0" cached_network_image: dependency: "direct main" description: name: cached_network_image - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" characters: dependency: transitive description: name: characters - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" charcode: dependency: transitive description: name: charcode - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" checked_yaml: dependency: transitive description: name: checked_yaml - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.4" chewie: dependency: "direct main" description: name: chewie - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.12.2" chewie_audio: dependency: transitive description: name: chewie_audio - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.2" cli_util: dependency: transitive description: name: cli_util - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.3.3" clock: dependency: transitive description: name: clock - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" code_builder: dependency: transitive description: name: code_builder - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.7.0" collection: dependency: transitive description: name: collection - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.15.0" convert: dependency: transitive description: name: convert - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.1" crypto: dependency: transitive description: name: crypto - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.5" css_colors: dependency: transitive description: name: css_colors - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.1" csslib: dependency: transitive description: name: csslib - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.16.2" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.3" dart_style: dependency: transitive description: name: dart_style - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.12" dio: dependency: "direct main" description: name: dio - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.10" event_bus: dependency: "direct main" description: name: event_bus - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" ffi: dependency: transitive description: name: ffi - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.2" file: dependency: transitive description: name: file - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "6.1.2" fixnum: dependency: transitive description: name: fixnum - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.10.11" flutter: @@ -304,21 +304,21 @@ packages: dependency: transitive description: name: flutter_cache_manager - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.3" flutter_html: dependency: "direct main" description: name: flutter_html - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0" flutter_layout_grid: dependency: transitive description: name: flutter_layout_grid - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.10.5" flutter_localizations: @@ -326,41 +326,48 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_page_indicator: + dependency: transitive + description: + name: flutter_page_indicator + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.3" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.11" flutter_screenutil: dependency: "direct main" description: name: flutter_screenutil - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "5.0.0+2" flutter_staggered_grid_view: dependency: "direct main" description: name: flutter_staggered_grid_view - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.4.0" flutter_svg: dependency: transitive description: name: flutter_svg - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.20.0-nullsafety.3" - flutter_swiper_null_safety: + flutter_swiper: dependency: "direct main" description: - name: flutter_swiper_null_safety - url: "https://pub.flutter-io.cn" + name: flutter_swiper + url: "https://pub.dartlang.org" source: hosted - version: "1.0.2" + version: "1.1.6" flutter_test: dependency: "direct dev" description: flutter @@ -375,392 +382,392 @@ packages: dependency: "direct main" description: name: fluttertoast - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "8.0.7" glob: dependency: transitive description: name: glob - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.1" graphs: dependency: transitive description: name: graphs - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.2.0" html: dependency: transitive description: name: html - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.14.0+4" http: dependency: transitive description: name: http - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.12.2" http_multi_server: dependency: transitive description: name: http_multi_server - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.2.0" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.1.4" image_cropper: dependency: "direct main" description: name: image_cropper - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.4.1" image_picker: dependency: transitive description: name: image_picker - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.6.7+22" image_picker_gallery_camera: dependency: "direct main" description: name: image_picker_gallery_camera - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.1.6" image_picker_platform_interface: dependency: transitive description: name: image_picker_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.6" import_js_library: dependency: transitive description: name: import_js_library - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.2" intl: dependency: "direct main" description: name: intl - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.17.0" io: dependency: transitive description: name: io - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.3.5" js: dependency: transitive description: name: js - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.6.3" json_annotation: dependency: "direct main" description: name: json_annotation - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.1.1" json_serializable: dependency: "direct dev" description: name: json_serializable - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.5.1" logger: dependency: "direct main" description: name: logger - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.0" logging: dependency: transitive description: name: logging - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.1" matcher: dependency: transitive description: name: matcher - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.12.10" meta: dependency: transitive description: name: meta - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0" mime: dependency: transitive description: name: mime - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.0" package_config: dependency: transitive description: name: package_config - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.9.3" package_info: dependency: "direct main" description: name: package_info - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.2" path: dependency: transitive description: name: path - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.8.0" path_drawing: dependency: transitive description: name: path_drawing - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.5.1" path_parsing: dependency: transitive description: name: path_parsing - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.2.1" path_provider: dependency: "direct main" description: name: path_provider - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" path_provider_linux: dependency: transitive description: name: path_provider_linux - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" path_provider_windows: dependency: transitive description: name: path_provider_windows - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.1" pedantic: dependency: transitive description: name: pedantic - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.11.1" permission_handler: dependency: "direct main" description: name: permission_handler - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "5.1.0+2" permission_handler_platform_interface: dependency: transitive description: name: permission_handler_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.2" petitparser: dependency: transitive description: name: petitparser - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.1.0" photo_view: dependency: "direct main" description: name: photo_view - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.11.1" platform: dependency: transitive description: name: platform - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.3" pool: dependency: transitive description: name: pool - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.5.0" process: dependency: transitive description: name: process - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.2.1" pub_semver: dependency: transitive description: name: pub_semver - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" pubspec_parse: dependency: transitive description: name: pubspec_parse - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.1.8" pull_to_refresh: dependency: "direct main" description: name: pull_to_refresh - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" qr: dependency: transitive description: name: qr - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" quiver: dependency: transitive description: name: quiver - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.5" retrofit: dependency: "direct main" description: name: retrofit - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.4+1" retrofit_generator: dependency: "direct dev" description: name: retrofit_generator - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.4.1+3" rxdart: dependency: "direct main" description: name: rxdart - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.26.0" shared_preferences: dependency: "direct main" description: name: shared_preferences - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.6" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" shared_preferences_macos: dependency: transitive description: name: shared_preferences_macos - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" shared_preferences_platform_interface: dependency: transitive description: name: shared_preferences_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" shared_preferences_web: dependency: transitive description: name: shared_preferences_web - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" shelf: dependency: transitive description: name: shelf - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.7.9" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.2.4+1" sky_engine: @@ -772,205 +779,212 @@ packages: dependency: transitive description: name: source_gen - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.9.10+3" source_span: dependency: transitive description: name: source_span - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.8.1" sqflite: dependency: transitive description: name: sqflite - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.2+4" sqflite_common: dependency: transitive description: name: sqflite_common - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.3+3" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" stream_transform: dependency: transitive description: name: stream_transform - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" synchronized: dependency: transitive description: name: synchronized - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.2.0+2" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" test_api: dependency: transitive description: name: test_api - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "0.2.19" + version: "0.3.0" timing: dependency: transitive description: name: timing - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.1.1+3" + transformer_page_view: + dependency: transitive + description: + name: transformer_page_view + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.6" tuple: dependency: transitive description: name: tuple - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.3" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0" uuid: dependency: transitive description: name: uuid - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.2.2" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" video_player: dependency: "direct main" description: name: video_player - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.1" video_player_platform_interface: dependency: transitive description: name: video_player_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.2.0" video_player_web: dependency: transitive description: name: video_player_web - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.1.4+1" wakelock: dependency: transitive description: name: wakelock - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.2.1+1" wakelock_platform_interface: dependency: transitive description: name: wakelock_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.1.0+1" wakelock_web: dependency: transitive description: name: wakelock_web - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.1.0+3" watcher: dependency: transitive description: name: watcher - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.0" web_socket_channel: dependency: transitive description: name: web_socket_channel - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" webview_flutter: dependency: transitive description: name: webview_flutter - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.7" win32: dependency: transitive description: name: win32 - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.2.5" xdg_directories: dependency: transitive description: name: xdg_directories - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.2.0" xml: dependency: transitive description: name: xml - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "5.1.2" yaml: dependency: transitive description: name: yaml - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.1.0" sdks: - dart: ">=2.12.0 <3.0.0" + dart: ">=2.13.0 <3.0.0" flutter: ">=2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 92b7aaa4..ee197dc0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -29,10 +29,12 @@ dependencies: barcode_widget: ^2.0.1 cupertino_icons: ^1.0.2 - flutter_swiper_null_safety: ^1.0.2 +# flutter_swiper_null_safety: ^1.0.2 + flutter_swiper: ^1.1.6 flutter_staggered_grid_view: ^0.4.0 # Null safety pull_to_refresh: ^2.0.0 # Null safety +# permission_handler: ^8.1.3 permission_handler: ^5.0.1+1 amap_flutter_map: ^1.0.0 amap_flutter_location: ^2.0.0 # Null safety