update business and fix detail page

hmxc
小赖 4 years ago
parent bb70e7d442
commit accc292932

@ -90,10 +90,6 @@ class FixModel {
material: '',
imgs: [R.ASSETS_STATIC_FIX_FOOD_PNG],
),
review: UserReviewInfo(
rate: 5,
content: '师傅太用心了',
),
),
),
FixModel(

@ -108,6 +108,7 @@ class _BusinessAndFixDetailPageState extends State<BusinessAndFixDetailPage> {
_buildType(widget.model.type == FIX_ENUM.HAND_OUT),
_buildProcess(),
detailModel.result == null ? SizedBox() : _buildResult(),
detailModel.review == null ? SizedBox() : _buildRating(),
],
),
bottom: Builder(
@ -405,6 +406,45 @@ class _BusinessAndFixDetailPageState extends State<BusinessAndFixDetailPage> {
);
}
_buildRating() {
return _buildRawBox(
title: '评价信息',
spacing: 24,
children: [
Row(
children: [
Text(
'综合评分',
style: TextStyle(
color: AppStyle.minorTextColor,
fontSize: 28.w,
),
),
Spacer(),
_buildStar(detailModel.review.rate),
],
),
AkuBox.h(24),
Text(
'评价内容',
style: TextStyle(
color: AppStyle.minorTextColor,
fontSize: 28.w,
),
),
AkuBox.h(8),
Text(
detailModel.review.content,
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: 28.w,
fontWeight: FontWeight.bold,
),
),
],
);
}
Widget _buildTile(String asset, String title, String subTitle) {
return Row(
children: [
@ -498,6 +538,21 @@ class _BusinessAndFixDetailPageState extends State<BusinessAndFixDetailPage> {
);
}
_buildStar(double count) {
List<Widget> children = [];
for (int i = 0; i < count; i++) {
children.add(Icon(
Icons.star,
color: AppStyle.primaryColor,
size: 32.w,
));
children.add(AkuBox.w(16));
}
return Row(
children: children..removeLast(),
);
}
_buildRawBox({
String title,
List<Widget> children,

@ -141,6 +141,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.11"
flutter_rating_bar:
dependency: "direct main"
description:
name: flutter_rating_bar
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.1+1"
flutter_screenutil:
dependency: "direct main"
description:

@ -50,6 +50,8 @@ dependencies:
image_picker: ^0.6.7+12
flutter_rating_bar: ^3.0.1+1
aku_ui:
git:
url: http://test.akuhotel.com:8099/aku_fe/aku_ui.git

Loading…
Cancel
Save