添加我的车位页面

hmxc
小赖 4 years ago
parent bf96f4e539
commit adc0960307

Binary file not shown.

After

Width:  |  Height:  |  Size: 1016 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

@ -474,6 +474,10 @@ class R {
/// ![preview](file:///Users/akufe/Documents/akuCommunity/assets/json/zbbj.json) /// ![preview](file:///Users/akufe/Documents/akuCommunity/assets/json/zbbj.json)
static const String ASSETS_JSON_ZBBJ_JSON = '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) /// ![preview](file:///Users/akufe/Documents/akuCommunity/assets/static/house_auth_fail.webp)
static const String ASSETS_STATIC_HOUSE_AUTH_FAIL_WEBP = static const String ASSETS_STATIC_HOUSE_AUTH_FAIL_WEBP =
'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 = static const String ASSETS_STATIC_HOUSE_AUTH_SUCCESS_WEBP =
'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) /// ![preview](file:///Users/akufe/Documents/akuCommunity/assets/static/reviewing.webp)
static const String ASSETS_STATIC_REVIEWING_WEBP = static const String ASSETS_STATIC_REVIEWING_WEBP =
'assets/static/reviewing.webp'; 'assets/static/reviewing.webp';

@ -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)),
),
),
);
}
}

@ -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:akuCommunity/widget/bee_scaffold.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart';
@ -10,6 +12,27 @@ class CarParkingPage extends StatefulWidget {
} }
class _CarParkingPageState extends State<CarParkingPage> { class _CarParkingPageState extends State<CarParkingPage> {
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 @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BeeScaffold( return BeeScaffold(
@ -22,7 +45,16 @@ class _CarParkingPageState extends State<CarParkingPage> {
], ],
body: EasyRefresh( body: EasyRefresh(
onRefresh: () async {}, 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,
),
), ),
); );
} }

Loading…
Cancel
Save