From adc0960307665a878baf1d20db7544b6a7397393 Mon Sep 17 00:00:00 2001 From: laiiihz Date: Fri, 26 Mar 2021 16:43:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=88=91=E7=9A=84=E8=BD=A6?= =?UTF-8?q?=E4=BD=8D=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/static/parking_grey.webp | Bin 0 -> 1016 bytes assets/static/parking_yellow.webp | Bin 0 -> 2352 bytes lib/const/resource.dart | 16 +++++++++ .../profile/car_parking/car_parking_card.dart | 28 +++++++++++++++ .../profile/car_parking/car_parking_page.dart | 34 +++++++++++++++++- 5 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 assets/static/parking_grey.webp create mode 100644 assets/static/parking_yellow.webp create mode 100644 lib/ui/profile/car_parking/car_parking_card.dart diff --git a/assets/static/parking_grey.webp b/assets/static/parking_grey.webp new file mode 100644 index 0000000000000000000000000000000000000000..bed273e0ab32e2a133c1664b680b384b3b5606c4 GIT binary patch literal 1016 zcmVu5J)jw za~%=kKqd_F>tBMf-bM6(0=lEafBeUP{KtR%$AA3CfBeUP3Q;6_(JgS{6FIn0XD?H>fQjKj#j#mq>#u`NMtD_ zG8B>-3P}TLfm-T9k+W@LwbX?qhC)OAXd6Q#O<{3L0=1&KsS)iJ2-dVS+A0xP5F}SM zA^fXaE1HoW(NK+RLp`FQ6@dapb5bA5wW7JHHY+))59M0XT-1pU0Y#0U?I7V-Bq0@X zEYK>}isqz0lohnuD*EnoAzPng3u=G=8u0G+cr^(l>N|#o*v3@6DXWQQfmXCvFy4Pb z6Yx2j1@zgt|<4nb}ve5;#r_ne;G98x*t_(dhw{vJK49- zeR)oBUt*=;Rjn1xNRMZ*s$bWx(97mX6)GY2I3%TYjtM6gS;aKo>|SIaeBrk$bf&H) zngv?WI~H6Uv+=G72f%b*36hPfXgI7SKoXF|!+j=W*reJYHbj*OtOd8bdM(UGL*I^U zZJhr>fXG)96l7ymVB$haN|%7P#DV$)Q$){-&T39uu8Q+}SbH?FG&LQ9aK5BR2ZXa7 zwfJ{Q%1l>17KNU6C>b785(m@P3{u)GX8 z?w~B)J0q#E7PR448S*aRsj*yh;yD$7w)boxl{ACKC>8(t?!M7|%EpX=o96?&lc3ev zGO-IKn83PAqiN;0EbSEt)^5DBHKK^C@0>sfN|8Tc%h$rYe9HP(7ErKB@iBg2FJLpv zhLxAIn!_mW#p~m?=1lx$nkq(Tv0KKfPCTf_^oRS(xZBO`L~J=Prmj9`VM>qtx1^-P2gEN=MAYHBt0tERMevg86tl5>^`u!^ldJHGDE+{j z>)OlUs$?L)2_xi4Z=PL!A{D*A*hm}HzuD$7-i=$w-H#TA6%%y=^@Gvu+cLaQi}%a! z4ta8ggH$g1!56>JHXI3D6_^cQYuI%+ZtV2yp{q0*P_{4)BxQ(B$O_3@*n#f*VCXM| mcaM(|Zh;~EZ^>zMrjezdWHALco^ljBWxOg=A$TUQAOHYRq21&F literal 0 HcmV?d00001 diff --git a/assets/static/parking_yellow.webp b/assets/static/parking_yellow.webp new file mode 100644 index 0000000000000000000000000000000000000000..d0d81de69c4c1bb9143a7755f3231be1f3f27adf GIT binary patch literal 2352 zcmV-03D5RYNk&E}2><|BMM6+kP&il$0000G000240stKW06|PpNG$*W009>u5J)jw za~%=kKqd_F>tBMf-bM6(0=lEafBeUP{KtR%$AA3CfBeUP3xTrt|32AQN!ZRzqnIl2Pqi9>y4;fy|{+V|R`I7TzeSgnr z0akkl{Qu|d;Qyce{hS~3|DUsi{#pWyt~Uk&i~}F@|8?|#%Roqf$h~saZdT}b#v`EY zM)Sw>hR+a<^Nm(C&hFl~@cs%L#0weJ_lmCJS&TaH4Rz$b%|^=>&-Kk?5N;3E>R@|t z)0l<6S)l}t^R?(UIr{BaKzgan1DPytD=Zkc_8tNJQ*fQjJ`p8D!=0@^>sWtTwWt_> zPBwj96}iBEaMPkHnbF`cC2nnf-{$9vnybm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00?h^*zeaK-s7Vto{uV4zT{P2tMxR8T$OVd+VB)&r^&YYs>fu^M_d;v$AgA__EId=$DE3O`PVA_fcAx3jb$STGKJUI``@ z5&YeDQ`cQI4c=wSEHhOu;$}_Gntcfjel3K3K?T>-^K7l1rr&NTa1t6pg!8oRr@jOM zE={fr^(u_Kmr9y%H&FBQ#qr=~oKzRwX$hJt|DvNdJ%FpN2Fj7rE9Ek)l&&3{zeaPm zkXf=@3;d(A^*3V++rX%bLo2OS^Kqg=0&DlQ5b`IUZLebZbN=276LNU? z50y4uWdH=ZcbJrbngVrwt2wzK53o^5^=%O%=R?gbByMHXr%n52s`f7Bu!_7f5bmOK zb{S!1KT7ZC^s9+dyQW{tAuI|6F4b*tq(*LOSpNi-L(GPseTj%tr!mn6<10B0hR1MP zc&6$+(A7mXbT}9xOFcgHv*7P3MjS)PE^!AO_zMP%SW-mif6&UWsvQI0>4>KuYytbT zII=atc3!tajIsEozSQQNIhjFp+{qcV&?3{gmu)h$1+WQ8WQOP+YbJ3c?F+#OdKv&iE+QOeft4@%mV@nWnk76#c$kR z7fFbnEAkSg5;4J{qzN<9X~3o$cK~s>)}kPdP>4QaQMdbDkXA2(){KygSO@pu1lSGR zL?!qvGe?$$l3by915R7k@D>{$WdGYA)@s`JPcr3ZUuLB>{Bli)S_V7DkUN)3%|i); WV~24L`^H{>tRi?l(ike-M}PnY)_76? literal 0 HcmV?d00001 diff --git a/lib/const/resource.dart b/lib/const/resource.dart index 5484bd54..470e8a49 100644 --- a/lib/const/resource.dart +++ b/lib/const/resource.dart @@ -474,6 +474,10 @@ class R { /// ![preview](file:///Users/akufe/Documents/akuCommunity/assets/json/zbbj.json) static const String ASSETS_JSON_ZBBJ_JSON = 'assets/json/zbbj.json'; + /// ![preview](file:///Users/akufe/Documents/akuCommunity/assets/static/car_park_empty.webp) + static const String ASSETS_STATIC_CAR_PARK_EMPTY_WEBP = + 'assets/static/car_park_empty.webp'; + /// ![preview](file:///Users/akufe/Documents/akuCommunity/assets/static/house_auth_fail.webp) static const String ASSETS_STATIC_HOUSE_AUTH_FAIL_WEBP = 'assets/static/house_auth_fail.webp'; @@ -482,6 +486,18 @@ class R { static const String ASSETS_STATIC_HOUSE_AUTH_SUCCESS_WEBP = 'assets/static/house_auth_success.webp'; + /// ![preview](file:///Users/akufe/Documents/akuCommunity/assets/static/parking_grey.webp) + static const String ASSETS_STATIC_PARKING_GREY_WEBP = + 'assets/static/parking_grey.webp'; + + /// ![preview](file:///Users/akufe/Documents/akuCommunity/assets/static/parking_yellow.webp) + static const String ASSETS_STATIC_PARKING_YELLOW_WEBP = + 'assets/static/parking_yellow.webp'; + + /// ![preview](file:///Users/akufe/Documents/akuCommunity/assets/static/review_fail.webp) + static const String ASSETS_STATIC_REVIEW_FAIL_WEBP = + 'assets/static/review_fail.webp'; + /// ![preview](file:///Users/akufe/Documents/akuCommunity/assets/static/reviewing.webp) static const String ASSETS_STATIC_REVIEWING_WEBP = 'assets/static/reviewing.webp'; diff --git a/lib/ui/profile/car_parking/car_parking_card.dart b/lib/ui/profile/car_parking/car_parking_card.dart new file mode 100644 index 00000000..3e62b740 --- /dev/null +++ b/lib/ui/profile/car_parking/car_parking_card.dart @@ -0,0 +1,28 @@ +import 'package:akuCommunity/utils/headers.dart'; +import 'package:flutter/material.dart'; + +class CarparkingCard extends StatelessWidget { + final bool outdated; + const CarparkingCard({Key key, @required this.outdated}) : super(key: key); + + String get _assetImage { + return outdated + ? R.ASSETS_STATIC_PARKING_GREY_WEBP + : R.ASSETS_STATIC_PARKING_YELLOW_WEBP; + } + + @override + Widget build(BuildContext context) { + return AspectRatio( + aspectRatio: 688 / 286, + child: Container( + child: Column( + children: [], + ), + decoration: BoxDecoration( + image: DecorationImage(image: AssetImage(_assetImage)), + ), + ), + ); + } +} diff --git a/lib/ui/profile/car_parking/car_parking_page.dart b/lib/ui/profile/car_parking/car_parking_page.dart index 1bf2b1f7..3e52bbd5 100644 --- a/lib/ui/profile/car_parking/car_parking_page.dart +++ b/lib/ui/profile/car_parking/car_parking_page.dart @@ -1,3 +1,5 @@ +import 'package:akuCommunity/ui/profile/car_parking/car_parking_card.dart'; +import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; @@ -10,6 +12,27 @@ class CarParkingPage extends StatefulWidget { } class _CarParkingPageState extends State { + Widget get _renderEmptyWidget { + return Center( + child: Stack( + children: [ + Image.asset(R.ASSETS_STATIC_REVIEWING_WEBP).pSymmetric(h: 75.w), + Positioned( + bottom: 100.w, + left: 0, + right: 0, + child: Text( + '还没有车位', + style: TextStyle( + color: Color(0xFF999999), + ), + ).centered(), + ), + ], + ), + ); + } + @override Widget build(BuildContext context) { return BeeScaffold( @@ -22,7 +45,16 @@ class _CarParkingPageState extends State { ], body: EasyRefresh( onRefresh: () async {}, - child: ListView(), + header: MaterialHeader(), + // emptyWidget: _renderEmptyWidget, + child: ListView.separated( + separatorBuilder: (context, index) => 32.hb, + itemBuilder: (context, index) { + return CarparkingCard(outdated: false); + }, + padding: EdgeInsets.all(32.w), + itemCount: 2, + ), ), ); }