完善建议卡片

hmxc
小赖 4 years ago
parent 0225e33f5e
commit 777cdbe51b

@ -1,5 +1,6 @@
import 'package:akuCommunity/model/manager/suggestion_or_complain_model.dart'; import 'package:akuCommunity/model/manager/suggestion_or_complain_model.dart';
import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/horizontal_image_view.dart';
import 'package:common_utils/common_utils.dart'; import 'package:common_utils/common_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:velocity_x/velocity_x.dart'; import 'package:velocity_x/velocity_x.dart';
@ -23,7 +24,7 @@ class _AdviceCardState extends State<AdviceCard> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return MaterialButton( return MaterialButton(
elevation: 0, elevation: 0,
padding: EdgeInsets.all(24.w), padding: EdgeInsets.zero,
color: Colors.white, color: Colors.white,
onPressed: () {}, onPressed: () {},
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
@ -32,6 +33,7 @@ class _AdviceCardState extends State<AdviceCard> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
20.hb,
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
@ -41,13 +43,16 @@ class _AdviceCardState extends State<AdviceCard> {
).text.size(32.sp).black.bold.make(), ).text.size(32.sp).black.bold.make(),
statusValue.text.size(24.sp).color(Color(0xFFFF8200)).make(), statusValue.text.size(24.sp).color(Color(0xFFFF8200)).make(),
], ],
), ).pSymmetric(h: 28.w),
Divider( Divider(
indent: 28.w,
endIndent: 28.w,
height: 50.w, height: 50.w,
thickness: 1.w, thickness: 1.w,
color: Color(0xFFE8E8E8), color: Color(0xFFE8E8E8),
), ),
widget.model.content.text.size(28.w).black.make(), widget.model.content.text.size(28.w).black.make().pSymmetric(h: 28.w),
HorizontalImageView(widget.model.imgUrls.map((e) => e.url).toList()),
], ],
), ),
); );

@ -1,4 +1,5 @@
import 'package:akuCommunity/constants/api.dart'; import 'package:akuCommunity/constants/api.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart'; import 'package:flutter/rendering.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -18,6 +19,7 @@ class HorizontalImageView extends StatefulWidget {
class _HorizontalImageViewState extends State<HorizontalImageView> { class _HorizontalImageViewState extends State<HorizontalImageView> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
if (widget.urls.isEmpty) return 15.hb;
return Container( return Container(
height: 184.w + 24.w, height: 184.w + 24.w,
child: ListView.builder( child: ListView.builder(

Loading…
Cancel
Save