You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
aku_new_community/lib/ui/profile/car/car_manage_card.dart

91 lines
2.8 KiB

3 years ago
import 'package:flutter/material.dart';
3 years ago
import 'package:aku_new_community/model/user/car_parking_model.dart';
import 'package:aku_new_community/utils/headers.dart';
class CarManageCard extends StatelessWidget {
final CarParkingModel model;
3 years ago
4 years ago
const CarManageCard({Key? key, required this.model}) : super(key: key);
String get _assetImage {
return model.outdated
? R.ASSETS_STATIC_CAR_CARD_GREY_WEBP
: R.ASSETS_STATIC_CAR_CARD_YELLOW_WEBP;
}
@override
Widget build(BuildContext context) {
return AspectRatio(
aspectRatio: 688 / 286,
child: Container(
padding: EdgeInsets.all(40.w),
decoration: BoxDecoration(
image: DecorationImage(image: AssetImage(_assetImage)),
borderRadius: BorderRadius.circular(8.w),
boxShadow: model.shadow,
),
clipBehavior: Clip.antiAlias,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
4 years ago
model.code!,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 36.sp,
),
),
Text(
4 years ago
S.of(context)!.tempPlotName,
style: Theme.of(context)
.textTheme
4 years ago
.subtitle2!
.copyWith(color: Color(0xFF999999)),
),
Spacer(),
Row(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'类型',
4 years ago
style: Theme.of(context).textTheme.bodyText1!.copyWith(
color: Color(0xFF666666),
),
),
Text(
model.carTypeName,
4 years ago
style: Theme.of(context).textTheme.subtitle2!.copyWith(
fontWeight: FontWeight.bold,
),
),
],
).expand(),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'到期时间',
4 years ago
style: Theme.of(context).textTheme.bodyText1!.copyWith(
color: Color(0xFF666666),
),
),
Text(
model.dateName,
4 years ago
style: Theme.of(context).textTheme.subtitle2!.copyWith(
fontWeight: FontWeight.bold,
),
),
],
).expand(),
],
),
],
),
),
);
}
}