update business and fix detail page

hmxc
小赖 4 years ago
parent bb70e7d442
commit accc292932

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

@ -108,6 +108,7 @@ class _BusinessAndFixDetailPageState extends State<BusinessAndFixDetailPage> {
_buildType(widget.model.type == FIX_ENUM.HAND_OUT), _buildType(widget.model.type == FIX_ENUM.HAND_OUT),
_buildProcess(), _buildProcess(),
detailModel.result == null ? SizedBox() : _buildResult(), detailModel.result == null ? SizedBox() : _buildResult(),
detailModel.review == null ? SizedBox() : _buildRating(),
], ],
), ),
bottom: Builder( 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) { Widget _buildTile(String asset, String title, String subTitle) {
return Row( return Row(
children: [ 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({ _buildRawBox({
String title, String title,
List<Widget> children, List<Widget> children,

@ -141,6 +141,13 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.0.11" 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: flutter_screenutil:
dependency: "direct main" dependency: "direct main"
description: description:

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

Loading…
Cancel
Save