# Conflicts:
#	lib/widget/picker/bee_pick_image_widget.dart
pull/1/head
戴余标 3 years ago
commit 19469b774a

@ -1,13 +1,14 @@
import 'package:aku_new_community/base/base_style.dart'; import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/model/common/img_model.dart'; import 'package:aku_new_community/model/common/img_model.dart';
import 'package:common_utils/common_utils.dart'; import 'package:common_utils/common_utils.dart';
import 'package:equatable/equatable.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:json_annotation/json_annotation.dart'; import 'package:json_annotation/json_annotation.dart';
part 'home_activity_model.g.dart'; part 'home_activity_model.g.dart';
@JsonSerializable() @JsonSerializable()
class HomeActivityModel { class HomeActivityModel extends Equatable {
final int id; final int id;
final String title; final String title;
final int status; final int status;
@ -17,12 +18,15 @@ class HomeActivityModel {
final String activityEndTime; final String activityEndTime;
final List<ImgModel>? imgList; final List<ImgModel>? imgList;
final int? registrationNum; final int? registrationNum;
final List<ImgModel>? avatarImgList;
factory HomeActivityModel.fromJson(Map<String, dynamic> json) => factory HomeActivityModel.fromJson(Map<String, dynamic> json) =>
_$HomeActivityModelFromJson(json); _$HomeActivityModelFromJson(json);
DateTime? get begin => DateUtil.getDateTime(registrationStartTime); DateTime? get begin => DateUtil.getDateTime(registrationStartTime);
DateTime? get end => DateUtil.getDateTime(registrationEndTime); DateTime? get end => DateUtil.getDateTime(registrationEndTime);
String get statusString { String get statusString {
switch (this.status) { switch (this.status) {
case 1: case 1:
@ -53,6 +57,20 @@ class HomeActivityModel {
} }
} }
@override
List<Object?> get props => [
id,
title,
status,
registrationStartTime,
registrationEndTime,
activityStartTime,
activityEndTime,
imgList,
registrationNum,
avatarImgList,
];
const HomeActivityModel({ const HomeActivityModel({
required this.id, required this.id,
required this.title, required this.title,
@ -62,6 +80,7 @@ class HomeActivityModel {
required this.activityStartTime, required this.activityStartTime,
required this.activityEndTime, required this.activityEndTime,
this.imgList, this.imgList,
this.registrationNum, required this.registrationNum,
this.avatarImgList,
}); });
} }

@ -19,4 +19,7 @@ HomeActivityModel _$HomeActivityModelFromJson(Map<String, dynamic> json) =>
?.map((e) => ImgModel.fromJson(e as Map<String, dynamic>)) ?.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(), .toList(),
registrationNum: json['registrationNum'] as int?, registrationNum: json['registrationNum'] as int?,
avatarImgList: (json['avatarImgList'] as List<dynamic>?)
?.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
); );

@ -1,6 +1,5 @@
import 'package:json_annotation/json_annotation.dart';
import 'package:aku_new_community/ui/market/shop_car/shop_car_func.dart'; import 'package:aku_new_community/ui/market/shop_car/shop_car_func.dart';
import 'package:json_annotation/json_annotation.dart';
part 'good_detail_model.g.dart'; part 'good_detail_model.g.dart';
@ -9,14 +8,14 @@ class GoodDetailModel {
final int id; final int id;
final List<JcookImageVoList>? jcookImageVoList; final List<JcookImageVoList>? jcookImageVoList;
final num sellPrice; final num sellPrice;
final num discountPrice; final num? discountPrice;
final String? skuName; final String skuName;
final int status; final int status;
final int shopStatus; final int shopStatus;
final int? sellNum; final int? sellNum;
final int? kind; final int kind;
final String defaultLocation; final String? defaultLocation;
final String defaultAddressDetail; final String? defaultAddressDetail;
final int stockStatus; final int stockStatus;
final List<JcookSpecificationVoList> jcookSpecificationVoList; final List<JcookSpecificationVoList> jcookSpecificationVoList;
final int isCollection; final int isCollection;

@ -13,14 +13,14 @@ GoodDetailModel _$GoodDetailModelFromJson(Map<String, dynamic> json) =>
?.map((e) => JcookImageVoList.fromJson(e as Map<String, dynamic>)) ?.map((e) => JcookImageVoList.fromJson(e as Map<String, dynamic>))
.toList(), .toList(),
sellPrice: json['sellPrice'] as num, sellPrice: json['sellPrice'] as num,
discountPrice: json['discountPrice'] as num, discountPrice: json['discountPrice'] as num?,
skuName: json['skuName'] as String?, skuName: json['skuName'] as String,
status: json['status'] as int, status: json['status'] as int,
shopStatus: json['shopStatus'] as int, shopStatus: json['shopStatus'] as int,
sellNum: json['sellNum'] as int?, sellNum: json['sellNum'] as int?,
kind: json['kind'] as int?, kind: json['kind'] as int,
defaultLocation: json['defaultLocation'] as String, defaultLocation: json['defaultLocation'] as String?,
defaultAddressDetail: json['defaultAddressDetail'] as String, defaultAddressDetail: json['defaultAddressDetail'] as String?,
stockStatus: json['stockStatus'] as int, stockStatus: json['stockStatus'] as int,
jcookSpecificationVoList: jcookSpecificationVoList:
(json['jcookSpecificationVoList'] as List<dynamic>) (json['jcookSpecificationVoList'] as List<dynamic>)

@ -14,6 +14,7 @@ class WorkOrderDetailModel extends Equatable {
final String reserveDate; final String reserveDate;
final String content; final String content;
final String createDate; final String createDate;
final List<ImgModel>? imgList;
final List<ImgModel>? servicePersonnelImgList; final List<ImgModel>? servicePersonnelImgList;
final int newReportNum; final int newReportNum;
final int? evaluateLevel; final int? evaluateLevel;
@ -23,22 +24,6 @@ class WorkOrderDetailModel extends Equatable {
factory WorkOrderDetailModel.fromJson(Map<String, dynamic> json) => factory WorkOrderDetailModel.fromJson(Map<String, dynamic> json) =>
_$WorkOrderDetailModelFromJson(json); _$WorkOrderDetailModelFromJson(json);
const WorkOrderDetailModel({
required this.id,
required this.code,
required this.status,
required this.workOrderTypeName,
required this.reserveAddress,
required this.reserveDate,
required this.content,
required this.createDate,
this.servicePersonnelImgList,
required this.newReportNum,
this.evaluateLevel,
this.evaluateContent,
this.evaluateDate,
});
@override @override
List<Object?> get props => [ List<Object?> get props => [
id, id,
@ -54,5 +39,23 @@ class WorkOrderDetailModel extends Equatable {
evaluateLevel, evaluateLevel,
evaluateContent, evaluateContent,
evaluateDate, evaluateDate,
imgList
]; ];
const WorkOrderDetailModel({
required this.id,
required this.code,
required this.status,
required this.workOrderTypeName,
required this.reserveAddress,
required this.reserveDate,
required this.content,
required this.createDate,
this.imgList,
this.servicePersonnelImgList,
required this.newReportNum,
this.evaluateLevel,
this.evaluateContent,
this.evaluateDate,
});
} }

@ -17,6 +17,9 @@ WorkOrderDetailModel _$WorkOrderDetailModelFromJson(
reserveDate: json['reserveDate'] as String, reserveDate: json['reserveDate'] as String,
content: json['content'] as String, content: json['content'] as String,
createDate: json['createDate'] as String, createDate: json['createDate'] as String,
imgList: (json['imgList'] as List<dynamic>?)
?.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
servicePersonnelImgList: servicePersonnelImgList:
(json['servicePersonnelImgList'] as List<dynamic>?) (json['servicePersonnelImgList'] as List<dynamic>?)
?.map((e) => ImgModel.fromJson(e as Map<String, dynamic>)) ?.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))

@ -1,3 +1,4 @@
import 'package:aku_new_community/model/common/img_model.dart';
import 'package:common_utils/common_utils.dart'; import 'package:common_utils/common_utils.dart';
import 'package:equatable/equatable.dart'; import 'package:equatable/equatable.dart';
import 'package:json_annotation/json_annotation.dart'; import 'package:json_annotation/json_annotation.dart';
@ -15,10 +16,13 @@ class WorkOrderListModel extends Equatable {
final String content; final String content;
final String updateDate; final String updateDate;
final String createDate; final String createDate;
final List<ImgModel>? imgList;
factory WorkOrderListModel.fromJson(Map<String, dynamic> json) => factory WorkOrderListModel.fromJson(Map<String, dynamic> json) =>
_$WorkOrderListModelFromJson(json); _$WorkOrderListModelFromJson(json);
DateTime? get updateDateDT => DateUtil.getDateTime(updateDate); DateTime? get updateDateDT => DateUtil.getDateTime(updateDate);
DateTime? get createDateDT => DateUtil.getDateTime(createDate); DateTime? get createDateDT => DateUtil.getDateTime(createDate);
@override @override
@ -32,6 +36,7 @@ class WorkOrderListModel extends Equatable {
content, content,
updateDate, updateDate,
createDate, createDate,
imgList
]; ];
const WorkOrderListModel({ const WorkOrderListModel({
@ -44,5 +49,6 @@ class WorkOrderListModel extends Equatable {
required this.content, required this.content,
required this.updateDate, required this.updateDate,
required this.createDate, required this.createDate,
this.imgList,
}); });
} }

@ -17,4 +17,7 @@ WorkOrderListModel _$WorkOrderListModelFromJson(Map<String, dynamic> json) =>
content: json['content'] as String, content: json['content'] as String,
updateDate: json['updateDate'] as String, updateDate: json['updateDate'] as String,
createDate: json['createDate'] as String, createDate: json['createDate'] as String,
imgList: (json['imgList'] as List<dynamic>?)
?.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
); );

@ -0,0 +1,22 @@
import 'package:equatable/equatable.dart';
import 'package:json_annotation/json_annotation.dart';
part 'work_order_type_model.g.dart';
@JsonSerializable()
class WorkOrderTypeModel extends Equatable {
final int id;
final String name;
factory WorkOrderTypeModel.fromJson(Map<String, dynamic> json) =>
_$WorkOrderTypeModelFromJson(json);
const WorkOrderTypeModel({
required this.id,
required this.name,
});
@override
List<Object?> get props => [
id,
name,
];
}

@ -0,0 +1,13 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'work_order_type_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
WorkOrderTypeModel _$WorkOrderTypeModelFromJson(Map<String, dynamic> json) =>
WorkOrderTypeModel(
id: json['id'] as int,
name: json['name'] as String,
);

@ -4,7 +4,6 @@ import 'package:aku_new_community/pages/personal/clock_in/clock_in_page.dart';
import 'package:aku_new_community/pages/personal/user_profile_page.dart'; import 'package:aku_new_community/pages/personal/user_profile_page.dart';
import 'package:aku_new_community/pages/setting_page/settings_page.dart'; import 'package:aku_new_community/pages/setting_page/settings_page.dart';
import 'package:aku_new_community/pages/sign/login/login_page.dart'; import 'package:aku_new_community/pages/sign/login/login_page.dart';
import 'package:aku_new_community/painters/user_bottom_bar_painter.dart';
import 'package:aku_new_community/provider/user_provider.dart'; import 'package:aku_new_community/provider/user_provider.dart';
import 'package:aku_new_community/ui/market/order/order_page.dart'; import 'package:aku_new_community/ui/market/order/order_page.dart';
import 'package:aku_new_community/ui/profile/car/car_manage_page.dart'; import 'package:aku_new_community/ui/profile/car/car_manage_page.dart';
@ -13,6 +12,7 @@ import 'package:aku_new_community/ui/profile/new_house/my_family_page.dart';
import 'package:aku_new_community/ui/profile/new_house/my_house_page.dart'; import 'package:aku_new_community/ui/profile/new_house/my_house_page.dart';
import 'package:aku_new_community/utils/headers.dart'; import 'package:aku_new_community/utils/headers.dart';
import 'package:aku_new_community/utils/network/net_util.dart'; import 'package:aku_new_community/utils/network/net_util.dart';
import 'package:aku_new_community/widget/beeImageNetwork.dart';
import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:bot_toast/bot_toast.dart'; import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -36,150 +36,6 @@ class PersonalIndex extends StatefulWidget {
class _PersonalIndexState extends State<PersonalIndex> class _PersonalIndexState extends State<PersonalIndex>
with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin { with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin {
SliverAppBar _sliverAppBar(double height) {
final userProvider = Provider.of<UserProvider>(context);
return SliverAppBar(
pinned: false,
toolbarHeight: 0,
elevation: 0,
floating: false,
expandedHeight: 450.w - height,
backgroundColor: Colors.white,
flexibleSpace: FlexibleSpaceBar(
background: Stack(
children: [
Positioned(
top: 0,
left: 0,
right: 0,
bottom: 0,
child: Container(
// decoration: BoxDecoration(
// image: DecorationImage(
// image: AssetImage(R.ASSETS_ICONS_ICON_MY_SETTING_PNG),
// fit: BoxFit.cover,
// ),
// ),
child: Column(
children: [
Spacer(),
MaterialButton(
padding: EdgeInsets.all(5.w),
onPressed: () {
if (!userProvider.isLogin)
Get.to(() => LoginPage());
else
Get.to(() => UserProfilePage());
},
child: Container(
margin: EdgeInsets.only(left: 32.w),
child: Row(
children: [
Hero(
tag: 'AVATAR1',
child: ClipOval(
// child: FadeInImage.assetNetwork(
// placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
// image: SARSAPI.image(userProvider
// .userInfoModel!.imgUrls.isNotEmpty
// ? userProvider
// .userInfoModel!.imgUrls.first.url
// : ''),
// height: 106.w,
// width: 106.w,
// fit: BoxFit.cover,
// imageErrorBuilder:
// (context, error, stackTrace) {
// return Image.asset(
// R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
// height: 106.w,
// width: 106.w,
// );
// },
// ),
),
),
Container(
margin: EdgeInsets.only(left: 16.w),
child: userProvider.isLogin
? Text(
userProvider.userInfoModel?.nickName ??
'',
style: TextStyle(
fontSize: 32.sp,
color: Color(0xffad8940),
),
)
: Text(
'登录/注册',
style: TextStyle(
fontSize: 32.sp,
color: Color(0xffad8940),
),
)),
],
),
),
),
Stack(
children: [
Positioned(
bottom: 0,
left: 0,
right: 0,
child: Container(
height: 41.w,
width: double.infinity,
child: CustomPaint(
painter: UserBottomBarPainter(),
),
),
),
Container(
margin: EdgeInsets.only(
top: 38.w,
left: 36.w,
right: 36.w,
bottom: 18.w,
),
child: Image.asset(
R.ASSETS_IMAGES_MEMBER_BG_PNG,
width: 678.w,
height: 129.w,
),
),
],
),
],
),
),
)
],
),
),
);
}
// Container _containerBar(String title) {
// return Container(
// color: title == '我的物业' ? Colors.white : BaseStyle.colorf9f9f9,
// padding: EdgeInsets.all(title == '我的物业' ? 0 : 32.w),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Text(
// title,
// style: TextStyle(
// fontWeight: FontWeight.w600,
// fontSize: BaseStyle.fontSize34,
// color: ktextPrimary,
// ),
// ),
// ],
// ),
// );
// }
Widget _orderButton({ Widget _orderButton({
required String name, required String name,
required String path, required String path,
@ -275,29 +131,13 @@ class _PersonalIndexState extends State<PersonalIndex>
Hero( Hero(
tag: 'AVATAR', tag: 'AVATAR',
child: ClipOval( child: ClipOval(
// child: FadeInImage.assetNetwork( child: BeeImageNetwork(
// placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, width: 106.w,
// image: SARSAPI.image((userProvider height: 106.w,
// .userInfoModel?.imgUrls ?? imgs: UserTool.userProvider.userInfoModel
// []) ?.imgList ??
// .isNotEmpty [],
// ? (userProvider.userInfoModel?.imgUrls ?? ),
// [])
// .first
// .url
// : ''),
// height: 106.w,
// width: 106.w,
// fit: BoxFit.cover,
// imageErrorBuilder:
// (context, error, stackTrace) {
// return Image.asset(
// R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
// height: 106.w,
// width: 106.w,
// );
// },
// ),
), ),
), ),
Container( Container(

@ -8,9 +8,10 @@ import 'package:aku_new_community/provider/user_provider.dart';
import 'package:aku_new_community/utils/headers.dart'; import 'package:aku_new_community/utils/headers.dart';
import 'package:aku_new_community/utils/network/base_model.dart'; import 'package:aku_new_community/utils/network/base_model.dart';
import 'package:aku_new_community/utils/network/net_util.dart'; import 'package:aku_new_community/utils/network/net_util.dart';
import 'package:aku_new_community/widget/beeImageNetwork.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:aku_new_community/widget/picker/bee_custom_picker.dart'; import 'package:aku_new_community/widget/picker/bee_custom_picker.dart';
import 'package:aku_new_community/widget/picker/bee_date_picker.dart';
import 'package:aku_new_community/widget/picker/bee_image_picker.dart'; import 'package:aku_new_community/widget/picker/bee_image_picker.dart';
import 'package:bot_toast/bot_toast.dart'; import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart'; import 'package:common_utils/common_utils.dart';
@ -90,30 +91,11 @@ class _UserProfilePageState extends State<UserProfilePage> {
Hero( Hero(
tag: 'AVATAR', tag: 'AVATAR',
child: ClipOval( child: ClipOval(
// child: child: BeeImageNetwork(
// CachedNetworkImage( width: 56.w,
// imageUrl: SARSAPI.image( height: 56.w,
// userProvider.userInfoModel!.imgUrls.isNotEmpty imgs: UserTool.userProvider.userInfoModel?.imgList ?? [],
// ? userProvider.userInfoModel?.imgUrls.first.url ),
// : ''),
// height: 56.w,
// width: 56.w,
// placeholder: (context, url) =>
// Image.asset(R.ASSETS_IMAGES_PLACEHOLDER_WEBP),
// errorWidget: (context, url, error) =>
// Image.asset(R.ASSETS_IMAGES_PLACEHOLDER_WEBP),
// fit: BoxFit.fill,
// ),
// FadeInImage.assetNetwork(
// placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
// image: SARSAPI.image(
// (userProvider.userInfoModel?.imgUrls ?? []).isNotEmpty
// ? userProvider.userInfoModel?.imgUrls.first.url
// : ''),
// height: 56.w,
// width: 56.w,
// fit: BoxFit.cover,
// ),
), ),
), ),
onPressed: _pickAvatar, onPressed: _pickAvatar,
@ -162,14 +144,14 @@ class _UserProfilePageState extends State<UserProfilePage> {
} }
}, },
), ),
_buildTile( // _buildTile(
'出生日期', // '出生日期',
'userProvider.userInfoModel!.birthdayValue'.text.make(), // 'userProvider.userInfoModel!.birthdayValue'.text.make(),
onPressed: () async { // onPressed: () async {
DateTime? date = await BeeDatePicker.pick(DateTime.now()); // DateTime? date = await BeeDatePicker.pick(DateTime.now());
if (date != null) userProvider.setBirthday(date); // if (date != null) userProvider.setBirthday(date);
}, // },
), // ),
].sepWidget( ].sepWidget(
separate: Divider( separate: Divider(
indent: 104.w, indent: 104.w,

@ -163,7 +163,7 @@ class UserProvider extends ChangeNotifier {
BaseModel model = await NetUtil().post( BaseModel model = await NetUtil().post(
SAASAPI.user.updateAvatar, SAASAPI.user.updateAvatar,
params: { params: {
'fileUrls': [path] 'imgUrls': [path]
}, },
showMessage: true, showMessage: true,
); );

@ -18,7 +18,7 @@ class ActivityCard extends StatelessWidget {
this.home = false, this.home = false,
}) : super(key: key); }) : super(key: key);
bool get outdate => model!.end!.compareTo(DateTime.now()) == -1; bool get outdate => ActivityFunc.dateCheck(model!.end) == '';
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ConstrainedBox( return ConstrainedBox(
@ -109,7 +109,8 @@ class ActivityCard extends StatelessWidget {
[ [
Flexible( Flexible(
child: AvatarsParticipate( child: AvatarsParticipate(
avatars: (model?.imgList?.map((e) => e.url).toList() ?? []), avatars:
(model?.avatarImgList?.map((e) => e.url).toList() ?? []),
pNum: model?.registrationNum ?? 0, pNum: model?.registrationNum ?? 0,
hasIcon: false, hasIcon: false,
), ),

@ -5,7 +5,7 @@ class ActivityFunc {
} }
var nowDate = DateTime.now(); var nowDate = DateTime.now();
if (date.isBefore(nowDate)) { if (date.isBefore(nowDate)) {
return '已结束'; return '';
} else { } else {
var days = date.difference(nowDate).inDays; var days = date.difference(nowDate).inDays;
if (days > 0) { if (days > 0) {

@ -49,8 +49,10 @@ class _PublishTaskPageState extends State<PublishTaskPage> {
// //
int _rewardType = 0; int _rewardType = 0;
// //
DateTime? _appointDate; DateTime? _appointDate;
// //
DateTime? _appointEndDate; DateTime? _appointEndDate;
TextEditingController _rewardController = TextEditingController(); TextEditingController _rewardController = TextEditingController();
@ -59,9 +61,11 @@ class _PublishTaskPageState extends State<PublishTaskPage> {
String? _content; String? _content;
List<File> _photos = []; List<File> _photos = [];
String? _voiceUri; String? _voiceUri;
// //
String? _accessAddress; String? _accessAddress;
String? _accessAddressDetail; String? _accessAddressDetail;
// //
String? _serviceAddress; String? _serviceAddress;
String? _serviceAddressDetail; String? _serviceAddressDetail;
@ -110,15 +114,15 @@ class _PublishTaskPageState extends State<PublishTaskPage> {
bottomNavi: Padding( bottomNavi: Padding(
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 32.w), padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 32.w),
child: BeeLongButton( child: BeeLongButton(
onPressed: !canTap onPressed: () async {
? null if (!canTap) {
: () async { return;
}
var cancel = BotToast.showLoading(); var cancel = BotToast.showLoading();
var _voiceUrl; var _voiceUrl;
if (_voiceUri != null) { if (_voiceUri != null) {
try { try {
var base = await NetUtil().upload( var base = await NetUtil().upload(SAASAPI.uploadFile.uploadImg,
SAASAPI.uploadFile.uploadImg,
File.fromUri(Uri(path: _voiceUri))); File.fromUri(Uri(path: _voiceUri)));
if (base.success) { if (base.success) {
_voiceUrl = base.data; _voiceUrl = base.data;
@ -176,7 +180,6 @@ class _PublishTaskPageState extends State<PublishTaskPage> {
return BeePickerBox( return BeePickerBox(
onPressed: () { onPressed: () {
Get.back(); Get.back();
print(_type);
setState(() {}); setState(() {});
}, },
child: CupertinoPicker.builder( child: CupertinoPicker.builder(
@ -770,7 +773,10 @@ class _PublishTaskPageState extends State<PublishTaskPage> {
children: [ children: [
GestureDetector( GestureDetector(
onTap: () async { onTap: () async {
_content = await Get.to(() => TaskRemarkPage()); _content = await Get.to(() => TaskRemarkPage(
text: _content,
)) ??
'';
setState(() {}); setState(() {});
}, },
child: Material( child: Material(
@ -1007,36 +1013,59 @@ class _PublishTaskPageState extends State<PublishTaskPage> {
bool get canTap { bool get canTap {
if (_type == 0) { if (_type == 0) {
BotToast.showText(text: '请选择类型');
return false; return false;
} }
if (_service == 0) { if (_service == 0) {
BotToast.showText(text: '请选择服务人员');
return false; return false;
} }
if (_rewardType == 0) { if (_rewardType == 0) {
BotToast.showText(text: '请选择赏金类型');
return false; return false;
} }
if (_sex == 0) { if (_sex == 0) {
BotToast.showText(text: '请选择性别');
return false; return false;
} }
if (_appointDate == null) { if (_appointDate == null) {
BotToast.showText(text: '请选择预约开始时间');
return false; return false;
} }
if (_appointEndDate == null) { if (_appointEndDate == null) {
BotToast.showText(text: '请选择预约结束时间');
return false; return false;
} }
if (_accessAddress == null) { if (_accessAddress == null) {
BotToast.showText(text: '请填写收取地址');
return false; return false;
} }
if (_accessAddressDetail == null) { if (_accessAddressDetail == null) {
BotToast.showText(text: '请填写收取详细地址');
return false;
}
if (_type == 1 && _serviceAddress == null) {
BotToast.showText(text: '请填写服务地址');
return false;
}
if (_type == 1 && _accessAddressDetail == null) {
BotToast.showText(text: '请填写服务详细地址');
return false; return false;
} }
if (_rewardController.text.isEmpty) { if (_rewardController.text.isEmpty) {
BotToast.showText(text: '请填写赏金');
return false;
}
if (int.parse(_rewardController.text) == 0) {
BotToast.showText(text: '赏金不能为0');
return false; return false;
} }
if (_nameController.text.isEmpty) { if (_nameController.text.isEmpty) {
BotToast.showText(text: '请填写联系人姓名');
return false; return false;
} }
if (_telController.text.isEmpty) { if (_telController.text.isEmpty) {
BotToast.showText(text: '请填写联系人电话');
return false; return false;
} }
return true; return true;

@ -8,7 +8,8 @@ import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart'; import 'package:velocity_x/velocity_x.dart';
class TaskRemarkPage extends StatefulWidget { class TaskRemarkPage extends StatefulWidget {
const TaskRemarkPage({Key? key}) : super(key: key); final String? text;
const TaskRemarkPage({Key? key, this.text}) : super(key: key);
@override @override
_TaskRemarkPageState createState() => _TaskRemarkPageState(); _TaskRemarkPageState createState() => _TaskRemarkPageState();
@ -22,6 +23,9 @@ class _TaskRemarkPageState extends State<TaskRemarkPage> {
@override @override
void initState() { void initState() {
_shortcutLabel = HiveStore.shortcutBox!.values.cast<String>().toList(); _shortcutLabel = HiveStore.shortcutBox!.values.cast<String>().toList();
if (widget.text != null) {
_contentController.text = widget.text!;
}
super.initState(); super.initState();
} }

@ -1,4 +1,5 @@
import 'package:aku_new_community/extensions/num_ext.dart'; import 'package:aku_new_community/extensions/num_ext.dart';
import 'package:aku_new_community/extensions/widget_list_ext.dart';
import 'package:aku_new_community/models/work_order/work_order_bill_model.dart'; import 'package:aku_new_community/models/work_order/work_order_bill_model.dart';
import 'package:aku_new_community/widget/bee_divider.dart'; import 'package:aku_new_community/widget/bee_divider.dart';
import 'package:aku_new_community/widget/buttons/bee_long_button.dart'; import 'package:aku_new_community/widget/buttons/bee_long_button.dart';
@ -52,7 +53,10 @@ class WorkOrderBillDialog extends StatelessWidget {
.make(), .make(),
], ],
)) ))
.toList(), .toList()
.sepWidget(
separate: 16.hb,
),
BeeDivider.horizontal(), BeeDivider.horizontal(),
Row( Row(
children: [ children: [

@ -1,7 +1,9 @@
import 'dart:math'; import 'package:aku_new_community/constants/saas_api.dart';
import 'package:aku_new_community/extensions/num_ext.dart'; import 'package:aku_new_community/extensions/num_ext.dart';
import 'package:aku_new_community/extensions/widget_list_ext.dart';
import 'package:aku_new_community/models/work_order/work_order_report_model.dart'; import 'package:aku_new_community/models/work_order/work_order_report_model.dart';
import 'package:aku_new_community/utils/network/net_util.dart';
import 'package:aku_new_community/widget/bee_divider.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/dotted_line.dart'; import 'package:aku_new_community/widget/dotted_line.dart';
import 'package:aku_new_community/widget/views/bee_grid_image_view.dart'; import 'package:aku_new_community/widget/views/bee_grid_image_view.dart';
@ -38,27 +40,16 @@ class _HistoryReportPageState extends State<HistoryReportPage> {
firstRefresh: true, firstRefresh: true,
header: MaterialHeader(), header: MaterialHeader(),
onRefresh: () async { onRefresh: () async {
// var base = var base =
// await NetUtil().get(SAASAPI.workOrder.findRRById, params: { await NetUtil().get(SAASAPI.workOrder.findRRById, params: {
// 'workOrderId': widget.id, 'workOrderId': widget.id,
// }); });
// if (base.success) { if (base.success) {
// _models = (base.data as List) _models = (base.data as List)
// .map((e) => WorkOrderReportModel.fromJson(e)) .map((e) => WorkOrderReportModel.fromJson(e))
// .toList(); .toList();
// setState(() {}); setState(() {});
// } }
_models.add(WorkOrderReportModel(
id: Random().nextInt(100),
type: Random().nextInt(100),
content: '${List.filled(Random().nextInt(50), 'aabb')}',
userType: Random().nextInt(2),
createId: Random().nextInt(100),
createName: 'xxx',
createDate: DateTime.now().toString(),
totalCost: '300',
imgList: [],
reportRecordVoList: []));
setState(() {}); setState(() {});
}, },
child: _models.isEmpty child: _models.isEmpty
@ -104,6 +95,14 @@ class LineCard extends StatefulWidget {
class _LineCardState extends State<LineCard> { class _LineCardState extends State<LineCard> {
double _height = 0; double _height = 0;
double get total {
double sum = 0;
for (var item in widget.model.reportRecordVoList) {
sum = sum + item.price;
}
return sum;
}
@override @override
void didChangeDependencies() { void didChangeDependencies() {
WidgetsBinding.instance?.addPostFrameCallback((timeStamp) { WidgetsBinding.instance?.addPostFrameCallback((timeStamp) {
@ -232,6 +231,7 @@ class _LineCardState extends State<LineCard> {
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
24.hb,
...widget.model.reportRecordVoList ...widget.model.reportRecordVoList
.map((e) => Row( .map((e) => Row(
children: [ children: [
@ -250,7 +250,28 @@ class _LineCardState extends State<LineCard> {
.make(), .make(),
], ],
)) ))
.toList(), .toList()
.sepWidget(
separate: 16.hb,
),
24.hb,
BeeDivider.horizontal(),
24.hb,
Row(
children: [
'工单总费用'
.text
.size(28.sp)
.color(Colors.black.withOpacity(0.65))
.make(),
Spacer(),
'¥${total}'
.text
.size(28.sp)
.color(Color(0xFFF5222D))
.make(),
],
)
], ],
), ),
) )

@ -1,14 +1,20 @@
import 'dart:io'; import 'dart:io';
import 'package:aku_new_community/constants/saas_api.dart';
import 'package:aku_new_community/extensions/num_ext.dart'; import 'package:aku_new_community/extensions/num_ext.dart';
import 'package:aku_new_community/ui/function_and_service/task/task_remark_page.dart'; import 'package:aku_new_community/models/work_order/work_order_type_model.dart';
import 'package:aku_new_community/ui/function_and_service/work_order/work_order_map.dart'; import 'package:aku_new_community/ui/function_and_service/work_order/work_order_func.dart';
import 'package:aku_new_community/ui/function_and_service/work_order/work_order_remark_page.dart';
import 'package:aku_new_community/utils/network/net_util.dart';
import 'package:aku_new_community/widget/beeImageNetwork.dart';
import 'package:aku_new_community/widget/bee_divider.dart'; import 'package:aku_new_community/widget/bee_divider.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/buttons/bee_long_button.dart'; import 'package:aku_new_community/widget/buttons/bee_long_button.dart';
import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:aku_new_community/widget/picker/bee_date_picker.dart'; import 'package:aku_new_community/widget/picker/bee_date_picker.dart';
import 'package:aku_new_community/widget/picker/bee_pick_image_widget.dart'; import 'package:aku_new_community/widget/picker/bee_pick_image_widget.dart';
import 'package:aku_new_community/widget/picker/bee_picker_box.dart'; import 'package:aku_new_community/widget/picker/bee_picker_box.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart'; import 'package:common_utils/common_utils.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -24,7 +30,7 @@ class PublishWorkOrderPage extends StatefulWidget {
} }
class _PublishWorkOrderPageState extends State<PublishWorkOrderPage> { class _PublishWorkOrderPageState extends State<PublishWorkOrderPage> {
int _type = 0; int _typeIndex = -1;
DateTime? _appointDate; DateTime? _appointDate;
@ -33,6 +39,7 @@ class _PublishWorkOrderPageState extends State<PublishWorkOrderPage> {
TextEditingController _addressController = TextEditingController(); TextEditingController _addressController = TextEditingController();
String _remark = ''; String _remark = '';
List<File> _photos = []; List<File> _photos = [];
List<WorkOrderTypeModel> _types = [];
@override @override
void initState() { void initState() {
@ -61,14 +68,18 @@ class _PublishWorkOrderPageState extends State<PublishWorkOrderPage> {
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
CircleAvatar( ClipOval(
maxRadius: 50.w, child: BeeImageNetwork(
width: 100.w,
height: 100.w,
imgs: UserTool.userProvider.userInfoModel?.imgList ?? [],
),
), ),
16.wb, 16.wb,
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
'李一宣' '${UserTool.userProvider.userInfoModel!.nickName}'
.text .text
.size(28.sp) .size(28.sp)
.color(Colors.black.withOpacity(0.85)) .color(Colors.black.withOpacity(0.85))
@ -86,7 +97,8 @@ class _PublishWorkOrderPageState extends State<PublishWorkOrderPage> {
onTap: () {}, onTap: () {},
child: Icon( child: Icon(
CupertinoIcons.chevron_right, CupertinoIcons.chevron_right,
size: 40.w, color: Colors.black.withOpacity(0.25),
size: 32.w,
)), )),
], ],
), ),
@ -96,43 +108,102 @@ class _PublishWorkOrderPageState extends State<PublishWorkOrderPage> {
], ],
), ),
), ),
bottomNavi: BeeLongButton(onPressed: () {}, text: '确认发布'), bottomNavi: Padding(
padding: EdgeInsets.only(
left: 32.w,
right: 32.w,
bottom: MediaQuery.of(context).padding.bottom + 32.w),
child: BeeLongButton(
onPressed: () async {
if (!canTap) {
return;
}
var cancel = BotToast.showLoading();
var imgUrls = <String>[];
try {
imgUrls = await NetUtil()
.uploadFiles(_photos, SAASAPI.uploadFile.uploadImg);
} catch (e) {
print(e.toString());
}
try {
var re = await WorkOrderFuc.publish(
estateId: 1,
workOrderTypeId: _types[_typeIndex].id,
reserveDate: _appointDate.toString(),
reserveAddress: _appointEndDate.toString(),
content: _remark,
imgUrls: imgUrls);
if (re) {
Get.back();
}
} catch (e) {
print(e.toString());
}
cancel();
},
text: '确认发布'),
),
); );
} }
bool get canTap {
if (_appointDate == null) {
BotToast.showText(text: '请选择预约开始时间');
return false;
}
if (_appointEndDate == null) {
BotToast.showText(text: '请选择预约结束时间');
return false;
}
if (_typeIndex == -1) {
BotToast.showText(text: '请选择类型');
return false;
}
if (_addressController.text.isEmpty) {
BotToast.showText(text: '请输入地址');
return false;
}
if (_remark.isEmpty) {
BotToast.showText(text: '请输入具体需求');
return false;
}
return true;
}
Container _baseInfo(BuildContext context) { Container _baseInfo(BuildContext context) {
var type = GestureDetector( var type = GestureDetector(
onTap: () async { onTap: () async {
_type = 1; _typeIndex = 0;
showModalBottomSheet( var base = await NetUtil().get(SAASAPI.workOrder.typeList);
if (base.success) {
_types = (base.data as List)
.map((e) => WorkOrderTypeModel.fromJson(e))
.toList();
await showModalBottomSheet(
context: context, context: context,
builder: (context) { builder: (context) {
return BeePickerBox( return BeePickerBox(
onPressed: () { onPressed: () {
Get.back(); Get.back();
print(_type);
setState(() {}); setState(() {});
}, },
child: CupertinoPicker.builder( child: CupertinoPicker.builder(
itemExtent: 60.w, itemExtent: 60.w,
childCount: WorkOrderMap.orderType.values.length, childCount: _types.length,
onSelectedItemChanged: (index) { onSelectedItemChanged: (index) {
var typeStr = _typeIndex = index;
WorkOrderMap.orderType.values.toList()[index];
WorkOrderMap.orderType.forEach((key, value) {
if (value == typeStr) {
_type = key;
}
});
}, },
itemBuilder: (context, index) { itemBuilder: (context, index) {
var str = WorkOrderMap.orderType.values.toList()[index]; var str = _types[index].name;
return Center( return Center(
child: str.text.size(32.sp).isIntrinsic.make(), child: str.text.size(32.sp).isIntrinsic.make(),
); );
})); }));
}, },
); );
}
}, },
child: Material( child: Material(
color: Colors.transparent, color: Colors.transparent,
@ -146,14 +217,15 @@ class _PublishWorkOrderPageState extends State<PublishWorkOrderPage> {
.color(Colors.black.withOpacity(0.45)) .color(Colors.black.withOpacity(0.45))
.make(), .make(),
), ),
'${_type == 0 ? '请选择分类' : WorkOrderMap.orderType[_type]}' '${_typeIndex == -1 ? '请选择分类' : _types[_typeIndex].name}'
.text .text
.size(28.sp) .size(28.sp)
.color(Colors.black.withOpacity(_type == 0 ? 0.25 : 0.85)) .color(Colors.black.withOpacity(_typeIndex == -1 ? 0.25 : 0.85))
.make(), .make(),
Spacer(), Spacer(),
Icon( Icon(
CupertinoIcons.chevron_right, CupertinoIcons.chevron_right,
color: Colors.black.withOpacity(0.25),
size: 24.w, size: 24.w,
), ),
], ],
@ -179,10 +251,12 @@ class _PublishWorkOrderPageState extends State<PublishWorkOrderPage> {
child: Material( child: Material(
color: Colors.transparent, color: Colors.transparent,
child: child:
'${DateUtil.formatDate(_appointDate, format: DateFormats.zh_mo_d_h_m)}' '${_appointDate == null ? '请选择开始时间' : DateUtil.formatDate(_appointDate, format: DateFormats.zh_mo_d_h_m)}'
.text .text
.size(24.sp) .size(24.sp)
.color(Colors.black.withOpacity(0.85)) .align(TextAlign.start)
.color(Colors.black
.withOpacity(_appointDate == null ? 0.25 : 0.85))
.make(), .make(),
), ),
), ),
@ -197,16 +271,20 @@ class _PublishWorkOrderPageState extends State<PublishWorkOrderPage> {
child: Material( child: Material(
color: Colors.transparent, color: Colors.transparent,
child: child:
'${DateUtil.formatDate(_appointEndDate, format: DateFormats.zh_mo_d_h_m)}' '${_appointDate == null ? '请选择结束时间' : DateUtil.formatDate(_appointEndDate, format: DateFormats.zh_mo_d_h_m)}'
.text .text
.size(24.sp) .size(24.sp)
.color(Colors.black.withOpacity(_type == 0 ? 0.25 : 0.85)) .align(TextAlign.end)
.color(Colors.black
.withOpacity(_appointEndDate == null ? 0.25 : 0.85))
.make(), .make(),
), ),
), ),
), ),
24.wb,
Icon( Icon(
CupertinoIcons.chevron_right, CupertinoIcons.chevron_right,
color: Colors.black.withOpacity(0.25),
size: 24.w, size: 24.w,
), ),
], ],
@ -242,7 +320,10 @@ class _PublishWorkOrderPageState extends State<PublishWorkOrderPage> {
); );
var remark = GestureDetector( var remark = GestureDetector(
onTap: () async { onTap: () async {
_remark = await Get.to(() => TaskRemarkPage()); _remark = await Get.to(() => WorkOrderRemarkPage(
text: _remark,
)) ??
'';
setState(() {}); setState(() {});
}, },
child: Material( child: Material(
@ -251,14 +332,14 @@ class _PublishWorkOrderPageState extends State<PublishWorkOrderPage> {
children: [ children: [
SizedBox( SizedBox(
width: 170.w, width: 170.w,
child: '任务备注' child: '具体需求'
.text .text
.size(28.sp) .size(28.sp)
.color(Colors.black.withOpacity(0.45)) .color(Colors.black.withOpacity(0.45))
.make(), .make(),
), ),
Expanded( Expanded(
child: '${_remark.isEmpty ? '请输入任务备注' : _remark}' child: '${_remark.isEmpty ? '请输入具体需求' : _remark}'
.text .text
.size(28.sp) .size(28.sp)
.color( .color(
@ -268,6 +349,7 @@ class _PublishWorkOrderPageState extends State<PublishWorkOrderPage> {
20.wb, 20.wb,
Icon( Icon(
CupertinoIcons.chevron_right, CupertinoIcons.chevron_right,
color: Colors.black.withOpacity(0.25),
size: 24.w, size: 24.w,
), ),
], ],
@ -282,6 +364,7 @@ class _PublishWorkOrderPageState extends State<PublishWorkOrderPage> {
borderRadius: BorderRadius.circular(16.w), borderRadius: BorderRadius.circular(16.w),
), ),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
32.hb, 32.hb,
type, type,
@ -316,7 +399,9 @@ class _PublishWorkOrderPageState extends State<PublishWorkOrderPage> {
], ],
), ),
24.hb, 24.hb,
BeePickImageWidget(onChanged: (value) { BeePickImageWidget(
maxCount: 6,
onChanged: (value) {
_photos = value; _photos = value;
}), }),
], ],

@ -56,7 +56,7 @@ class WorkOrderCard extends StatelessWidget {
GestureDetector( GestureDetector(
onTap: () { onTap: () {
Get.to(() => WorkOrderDetailPage( Get.to(() => WorkOrderDetailPage(
model: model, id: model.id,
)); ));
}, },
child: ClipPath( child: ClipPath(
@ -124,7 +124,10 @@ class WorkOrderCard extends StatelessWidget {
.make(), .make(),
24.hb, 24.hb,
BeeHorImageView( BeeHorImageView(
maxCount: 4, imgs: [], imgWidth: 146.w, imgHeight: 146.w), maxCount: 4,
imgs: model.imgList ?? [],
imgWidth: 146.w,
imgHeight: 146.w),
24.hb, 24.hb,
Row( Row(
children: [ children: [
@ -135,14 +138,6 @@ class WorkOrderCard extends StatelessWidget {
.color(Colors.black.withOpacity(0.45)) .color(Colors.black.withOpacity(0.45))
.make(), .make(),
Spacer(), Spacer(),
24.wb,
GestureDetector(
onTap: () {},
child: Icon(
CupertinoIcons.ellipsis_vertical,
size: 40.w,
),
)
], ],
), ),
], ],

@ -2,11 +2,12 @@ import 'package:aku_new_community/constants/saas_api.dart';
import 'package:aku_new_community/extensions/num_ext.dart'; import 'package:aku_new_community/extensions/num_ext.dart';
import 'package:aku_new_community/gen/assets.gen.dart'; import 'package:aku_new_community/gen/assets.gen.dart';
import 'package:aku_new_community/models/work_order/work_order_detail_model.dart'; import 'package:aku_new_community/models/work_order/work_order_detail_model.dart';
import 'package:aku_new_community/models/work_order/work_order_list_model.dart'; import 'package:aku_new_community/models/work_order/work_order_progress_model.dart';
import 'package:aku_new_community/ui/function_and_service/task/dialogs/task_evaluation_dialog.dart'; import 'package:aku_new_community/ui/function_and_service/task/dialogs/task_evaluation_dialog.dart';
import 'package:aku_new_community/ui/function_and_service/work_order/dialogs/urge_dialog.dart'; import 'package:aku_new_community/ui/function_and_service/work_order/dialogs/urge_dialog.dart';
import 'package:aku_new_community/ui/function_and_service/work_order/dialogs/work_order_bill_dialog.dart'; import 'package:aku_new_community/ui/function_and_service/work_order/dialogs/work_order_bill_dialog.dart';
import 'package:aku_new_community/ui/function_and_service/work_order/dialogs/work_order_finish_dialog.dart'; import 'package:aku_new_community/ui/function_and_service/work_order/dialogs/work_order_finish_dialog.dart';
import 'package:aku_new_community/ui/function_and_service/work_order/dialogs/work_order_progress_dialog.dart';
import 'package:aku_new_community/ui/function_and_service/work_order/team_list_page.dart'; import 'package:aku_new_community/ui/function_and_service/work_order/team_list_page.dart';
import 'package:aku_new_community/ui/function_and_service/work_order/work_order_func.dart'; import 'package:aku_new_community/ui/function_and_service/work_order/work_order_func.dart';
import 'package:aku_new_community/ui/function_and_service/work_order/work_order_map.dart'; import 'package:aku_new_community/ui/function_and_service/work_order/work_order_map.dart';
@ -29,9 +30,12 @@ import 'package:velocity_x/src/extensions/num_ext.dart';
import 'package:velocity_x/src/extensions/string_ext.dart'; import 'package:velocity_x/src/extensions/string_ext.dart';
class WorkOrderDetailPage extends StatefulWidget { class WorkOrderDetailPage extends StatefulWidget {
final WorkOrderListModel model; final int id;
const WorkOrderDetailPage({Key? key, required this.model}) : super(key: key); const WorkOrderDetailPage({
Key? key,
required this.id,
}) : super(key: key);
@override @override
_WorkOrderDetailPageState createState() => _WorkOrderDetailPageState(); _WorkOrderDetailPageState createState() => _WorkOrderDetailPageState();
@ -51,9 +55,12 @@ class _WorkOrderDetailPageState extends State<WorkOrderDetailPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BeeScaffold( return BeeScaffold(
title: '', title: '',
extendBody: true,
body: Stack( body: Stack(
children: [ children: [
Container( _model == null
? Container()
: Container(
width: double.infinity, width: double.infinity,
height: 380.w, height: 380.w,
decoration: BoxDecoration( decoration: BoxDecoration(
@ -70,7 +77,23 @@ class _WorkOrderDetailPageState extends State<WorkOrderDetailPage> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
GestureDetector( GestureDetector(
onTap: () async {}, onTap: () async {
var base = await NetUtil().get(
SAASAPI.workOrder.findScheduleById,
params: {'workOrderId': widget.id});
if (base.success) {
var models = (base.data as List)
.map((e) =>
WorkOrderProgressModel.fromJson(
e))
.toList();
await Get.bottomSheet(
WorkOrderProgressDialog(
models: models));
} else {
BotToast.showText(text: base.msg);
}
},
child: Material( child: Material(
color: Colors.transparent, color: Colors.transparent,
child: Row( child: Row(
@ -82,6 +105,12 @@ class _WorkOrderDetailPageState extends State<WorkOrderDetailPage> {
.color(Colors.black) .color(Colors.black)
.bold .bold
.make(), .make(),
16.wb,
Icon(
CupertinoIcons.chevron_right,
size: 32.w,
color: Colors.black.withOpacity(0.65),
)
], ],
), ),
), ),
@ -105,7 +134,8 @@ class _WorkOrderDetailPageState extends State<WorkOrderDetailPage> {
firstRefresh: true, firstRefresh: true,
header: MaterialHeader(), header: MaterialHeader(),
onRefresh: () async { onRefresh: () async {
var base = await NetUtil().get(SAASAPI.workOrder.findById); var base = await NetUtil().get(SAASAPI.workOrder.findById,
params: {'workOrderId': widget.id});
if (base.success) { if (base.success) {
_model = WorkOrderDetailModel.fromJson(base.data); _model = WorkOrderDetailModel.fromJson(base.data);
setState(() {}); setState(() {});
@ -118,7 +148,8 @@ class _WorkOrderDetailPageState extends State<WorkOrderDetailPage> {
EdgeInsets.only(top: 120.w, left: 32.w, right: 32.w), EdgeInsets.only(top: 120.w, left: 32.w, right: 32.w),
children: [ children: [
Offstage( Offstage(
offstage: _model!.servicePersonnelImgList == null, offstage: _model!.servicePersonnelImgList == null ||
_model!.servicePersonnelImgList!.isEmpty,
child: Column( child: Column(
children: [ children: [
_servicePeople(), _servicePeople(),
@ -135,7 +166,12 @@ class _WorkOrderDetailPageState extends State<WorkOrderDetailPage> {
)), )),
], ],
), ),
bottomNavi: _getBottomButton(), bottomNavi: Padding(
padding: EdgeInsets.only(
left: 32.w,
right: 32.w,
bottom: MediaQuery.of(context).padding.bottom + 32.w),
child: _getBottomButton()),
); );
} }
@ -183,7 +219,7 @@ class _WorkOrderDetailPageState extends State<WorkOrderDetailPage> {
return BeeLongButton( return BeeLongButton(
onPressed: () async { onPressed: () async {
await Get.bottomSheet(UrgeDialog(onConfirm: () async { await Get.bottomSheet(UrgeDialog(onConfirm: () async {
var re = await WorkOrderFuc.promotionRate(_model!.id); var re = await WorkOrderFuc.promotionRate(widget.id);
if (re) { if (re) {
_refreshController.callRefresh(); _refreshController.callRefresh();
} }
@ -195,7 +231,7 @@ class _WorkOrderDetailPageState extends State<WorkOrderDetailPage> {
return BeeLongButton( return BeeLongButton(
onPressed: () async { onPressed: () async {
await Get.bottomSheet(WorkOrderFinishDialog(onConfirm: () async { await Get.bottomSheet(WorkOrderFinishDialog(onConfirm: () async {
var re = await WorkOrderFuc.confirmComplete(_model!.id); var re = await WorkOrderFuc.confirmComplete(widget.id);
if (re) { if (re) {
Get.back(); Get.back();
_refreshController.callRefresh(); _refreshController.callRefresh();
@ -206,7 +242,7 @@ class _WorkOrderDetailPageState extends State<WorkOrderDetailPage> {
case 6: case 6:
return BeeLongButton( return BeeLongButton(
onPressed: () async { onPressed: () async {
var bills = await WorkOrderFuc.getBill(workOrderId: _model!.id); var bills = await WorkOrderFuc.getBill(workOrderId: widget.id);
await Get.bottomSheet(WorkOrderBillDialog(models: bills)); await Get.bottomSheet(WorkOrderBillDialog(models: bills));
}, },
text: '确认支付'); text: '确认支付');
@ -216,9 +252,7 @@ class _WorkOrderDetailPageState extends State<WorkOrderDetailPage> {
await Get.bottomSheet(TaskEvaluationDialog( await Get.bottomSheet(TaskEvaluationDialog(
evaluate: (star, content) async { evaluate: (star, content) async {
return await WorkOrderFuc.evaluate( return await WorkOrderFuc.evaluate(
workOrderId: widget.model.id, workOrderId: widget.id, star: star, evaluation: content);
star: star,
evaluation: content);
}, },
)); ));
}, },
@ -277,6 +311,7 @@ class _WorkOrderDetailPageState extends State<WorkOrderDetailPage> {
borderRadius: BorderRadius.circular(12.w), borderRadius: BorderRadius.circular(12.w),
), ),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
'服务人员名单' '服务人员名单'
.text .text
@ -394,7 +429,7 @@ class _WorkOrderDetailPageState extends State<WorkOrderDetailPage> {
.make(), .make(),
24.hb, 24.hb,
BeeGridImageView( BeeGridImageView(
urls: [], urls: (_model!.imgList ?? []).map((e) => e.url).toList(),
), ),
24.hb, 24.hb,
], ],

@ -63,4 +63,27 @@ class WorkOrderFuc {
} }
return models; return models;
} }
///
static Future<bool> publish({
required int estateId,
required int workOrderTypeId,
required String reserveDate,
required String reserveAddress,
required String content,
required List<String> imgUrls,
}) async {
var base = await NetUtil().post(SAASAPI.workOrder.insert,
params: {
'estateId': estateId,
'workOrderTypeId': workOrderTypeId,
'reserveDate': reserveDate,
'reserveAddress': reserveAddress,
'content': content,
'imgUrls': imgUrls,
},
showMessage: true);
return base.success;
}
} }

@ -1,7 +1,4 @@
class WorkOrderMap { class WorkOrderMap {
static Map<int, String> orderType = {
1: '报事报修',
};
static Map<int, String> orderStatus = { static Map<int, String> orderStatus = {
1: '待分配', 1: '待分配',
2: '工单池', 2: '工单池',

@ -1,6 +1,6 @@
import 'package:aku_new_community/constants/saas_api.dart'; import 'package:aku_new_community/constants/saas_api.dart';
import 'package:aku_new_community/models/work_order/work_order_list_model.dart'; import 'package:aku_new_community/models/work_order/work_order_list_model.dart';
import 'package:aku_new_community/ui/function_and_service/work_order/history_report_page.dart'; import 'package:aku_new_community/ui/function_and_service/work_order/publish_work_order_page.dart';
import 'package:aku_new_community/ui/function_and_service/work_order/work_order_card.dart'; import 'package:aku_new_community/ui/function_and_service/work_order/work_order_card.dart';
import 'package:aku_new_community/utils/network/net_util.dart'; import 'package:aku_new_community/utils/network/net_util.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart';
@ -48,10 +48,7 @@ class _WorkOrderPageState extends State<WorkOrderPage>
actions: [ actions: [
IconButton( IconButton(
onPressed: () { onPressed: () {
// Get.to(() => PublishWorkOrderPage()); Get.to(() => PublishWorkOrderPage());
Get.to(() => HistoryReportPage(
id: 1,
));
}, },
icon: Icon( icon: Icon(
CupertinoIcons.plus_circle, CupertinoIcons.plus_circle,
@ -71,12 +68,14 @@ class _WorkOrderPageState extends State<WorkOrderPage>
Widget _getOrderView(int index) { Widget _getOrderView(int index) {
return EasyRefresh( return EasyRefresh(
firstRefresh: true,
header: MaterialHeader(),
onRefresh: () async { onRefresh: () async {
_page = 1; _page = 1;
var base = await NetUtil().getList(SAASAPI.workOrder.list, params: { var base = await NetUtil().getList(SAASAPI.workOrder.list, params: {
'pageNum': _page, 'pageNum': _page,
'size': _size, 'size': _size,
'status': index, 'status': index == 0 ? null : index,
}); });
_models = _models =
base.rows.map((e) => WorkOrderListModel.fromJson(e)).toList(); base.rows.map((e) => WorkOrderListModel.fromJson(e)).toList();
@ -87,7 +86,7 @@ class _WorkOrderPageState extends State<WorkOrderPage>
var base = await NetUtil().getList(SAASAPI.workOrder.list, params: { var base = await NetUtil().getList(SAASAPI.workOrder.list, params: {
'pageNum': _page, 'pageNum': _page,
'size': _size, 'size': _size,
'status': index + 1, 'status': index == 0 ? null : index,
}); });
if (_models.length < base.total) { if (_models.length < base.total) {
_models.addAll( _models.addAll(

@ -0,0 +1,196 @@
import 'package:aku_new_community/utils/hive_store.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/buttons/bee_long_button.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
class WorkOrderRemarkPage extends StatefulWidget {
final String? text;
const WorkOrderRemarkPage({Key? key, this.text}) : super(key: key);
@override
_WorkOrderRemarkPageState createState() => _WorkOrderRemarkPageState();
}
class _WorkOrderRemarkPageState extends State<WorkOrderRemarkPage> {
TextEditingController _contentController = TextEditingController();
List<String> _shortcutLabel = [];
bool _edit = false;
@override
void initState() {
_shortcutLabel =
HiveStore.workOrderShortBox!.values.cast<String>().toList();
if (widget.text != null) {
_contentController.text = widget.text!;
}
super.initState();
}
@override
void dispose() {
_contentController.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '添加需求',
body: ListView(
padding: EdgeInsets.all(32.w),
children: [
Container(
padding: EdgeInsets.all(32.w),
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(16.w)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
'具体需求'
.text
.size(28.sp)
.color(Colors.black.withOpacity(0.45))
.make(),
],
),
32.w.heightBox,
Container(
width: double.infinity,
padding: EdgeInsets.symmetric(horizontal: 24.w),
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.06),
borderRadius: BorderRadius.circular(16.w)),
child: TextField(
controller: _contentController,
autofocus: false,
onChanged: (text) => setState(() {}),
minLines: 5,
maxLength: 200,
maxLines: 20,
decoration: InputDecoration(
border: InputBorder.none,
),
),
),
32.w.heightBox,
Row(
children: [
'快捷标签'
.text
.size(24.sp)
.color(Colors.black.withOpacity(0.45))
.make(),
Spacer(),
GestureDetector(
onTap: () {
_edit = !_edit;
setState(() {});
},
child: Material(
color: Colors.transparent,
child: Row(
children: [
'${_edit ? '保存' : '编辑'}'
.text
.size(24.sp)
.color(Colors.black.withOpacity(0.45))
.make(),
],
),
),
),
],
),
32.w.heightBox,
Wrap(
spacing: 12.w,
runSpacing: 12.w,
children: _shortcutLabel
.mapIndexed((currentValue, index) =>
label(currentValue, _edit, index))
.toList(),
),
],
),
),
],
),
bottomNavi: Padding(
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 32.w),
child: BeeLongButton(
onPressed: () async {
var inBox = _shortcutLabel.contains(_contentController.text);
if (!inBox && _contentController.text.isNotEmpty) {
await HiveStore.workOrderShortBox!.add(_contentController.text);
}
Get.back(result: _contentController.text);
},
text: '完成',
),
),
);
}
Widget label(String text, bool edit, int index) {
var textHandled = '';
if (text.length > 10) {
textHandled = text.replaceRange(10, null, '');
} else {
textHandled = text;
}
return Stack(
clipBehavior: Clip.none,
children: [
GestureDetector(
onTap: () {
_contentController.text = text;
setState(() {});
},
child: Material(
color: Colors.transparent,
child: FittedBox(
child: Container(
height: 60.w,
padding: EdgeInsets.symmetric(horizontal: 24.w, vertical: 8.w),
alignment: Alignment.center,
decoration: BoxDecoration(
border: Border.all(color: Colors.black.withOpacity(0.25)),
borderRadius: BorderRadius.circular(8.w)),
child: textHandled.text
.size(22.sp)
.color(Colors.black.withOpacity(0.45))
.make(),
),
),
),
),
if (edit)
Positioned(
top: -10.w,
right: -10.w,
child: GestureDetector(
onTap: () {
_shortcutLabel.removeAt(index);
HiveStore.workOrderShortBox!.deleteAt(index);
setState(() {});
},
child: Material(
child: Icon(
CupertinoIcons.xmark_circle_fill,
size: 40.w,
color: Colors.black.withOpacity(0.45),
),
),
))
],
);
}
}

@ -1,13 +1,5 @@
import 'dart:async'; import 'dart:async';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:aku_new_community/base/base_style.dart'; import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/gen/assets.gen.dart'; import 'package:aku_new_community/gen/assets.gen.dart';
import 'package:aku_new_community/model/user/adress_model.dart'; import 'package:aku_new_community/model/user/adress_model.dart';
@ -21,6 +13,13 @@ import 'package:aku_new_community/ui/market/shop_car/shop_car_page.dart';
import 'package:aku_new_community/utils/headers.dart'; import 'package:aku_new_community/utils/headers.dart';
import 'package:aku_new_community/widget/bee_divider.dart'; import 'package:aku_new_community/widget/bee_divider.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'good_detail_bottomSheet.dart'; import 'good_detail_bottomSheet.dart';
class GoodDetailPage extends StatefulWidget { class GoodDetailPage extends StatefulWidget {
@ -258,7 +257,7 @@ class _GoodDetailPageState extends State<GoodDetailPage> {
height: 100.w, height: 100.w,
width: double.infinity, width: double.infinity,
child: Text( child: Text(
(_goodDetail!.skuName ?? ''), (_goodDetail!.skuName),
style: TextStyle( style: TextStyle(
fontSize: 36.sp, fontSize: 36.sp,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -267,7 +266,7 @@ class _GoodDetailPageState extends State<GoodDetailPage> {
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),
), ),
_getIcon(_goodDetail!.kind ?? 0), _getIcon(_goodDetail!.kind),
24.hb, 24.hb,
Row( Row(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
@ -326,13 +325,13 @@ class _GoodDetailPageState extends State<GoodDetailPage> {
height: 80.w, height: 80.w,
width: double.infinity, width: double.infinity,
child: Text( child: Text(
(_goodDetail!.skuName ?? ''), (_goodDetail!.skuName),
style: TextStyle(fontSize: 28.sp, color: ktextPrimary), style: TextStyle(fontSize: 28.sp, color: ktextPrimary),
maxLines: 2, maxLines: 2,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),
), ),
_getIcon(_goodDetail!.kind ?? 0), _getIcon(_goodDetail!.kind),
Spacer(), Spacer(),
Row( Row(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
@ -340,15 +339,15 @@ class _GoodDetailPageState extends State<GoodDetailPage> {
16.wb, 16.wb,
'原价:'.text.color(Color(0xFFBBBBBB)).size(24.sp).make(), '原价:'.text.color(Color(0xFFBBBBBB)).size(24.sp).make(),
Text( Text(
(_goodDetail!.discountPrice).toStringAsFixed(2), (_goodDetail!.discountPrice)?.toStringAsFixed(2) ?? '0.0',
style: TextStyle(fontSize: 24.sp, color: Color(0xFFBBBBBB)), style: TextStyle(fontSize: 24.sp, color: Color(0xFFBBBBBB)),
), ),
50.wb, 50.wb,
'折扣:'.text.color(Color(0xFFBBBBBB)).size(24.sp).make(), '折扣:'.text.color(Color(0xFFBBBBBB)).size(24.sp).make(),
Text( Text(
(_goodDetail!.discountPrice) > (_goodDetail!.sellPrice) ((_goodDetail!.discountPrice) ?? 0.0) > (_goodDetail!.sellPrice)
? _getDiscount(_goodDetail!.sellPrice.toDouble(), ? _getDiscount(_goodDetail!.sellPrice.toDouble(),
_goodDetail!.discountPrice.toDouble()) _goodDetail!.discountPrice?.toDouble() ?? 0.0)
: '暂无折扣', : '暂无折扣',
style: TextStyle(fontSize: 24.sp, color: Color(0xFFBBBBBB)), style: TextStyle(fontSize: 24.sp, color: Color(0xFFBBBBBB)),
), ),

@ -439,7 +439,7 @@ class _SubmitOrderNormalPageState extends State<SubmitOrderNormalPage> {
var top = RichText( var top = RichText(
text: TextSpan(children: [ text: TextSpan(children: [
WidgetSpan( WidgetSpan(
child: _getKindWd(model.kind ?? 0), child: _getKindWd(model.kind),
), ),
TextSpan( TextSpan(
text: model.skuName, text: model.skuName,

@ -1,6 +1,7 @@
import 'package:aku_new_community/model/user/province_model.dart'; import 'package:aku_new_community/model/user/province_model.dart';
import 'package:aku_new_community/models/login/china_region_model.dart'; import 'package:aku_new_community/models/login/china_region_model.dart';
import 'package:aku_new_community/models/login/history_login_model.dart'; import 'package:aku_new_community/models/login/history_login_model.dart';
import 'package:aku_new_community/models/login/picked_city_model.dart';
import 'package:aku_new_community/models/user/user_config_model.dart'; import 'package:aku_new_community/models/user/user_config_model.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:hive/hive.dart'; import 'package:hive/hive.dart';
@ -20,6 +21,10 @@ class HiveStore {
static Box? get shortcutBox => _shortcutBox; static Box? get shortcutBox => _shortcutBox;
static Box? _workOrderShortBox;
static Box? get workOrderShortBox => _workOrderShortBox;
static Future init() async { static Future init() async {
if (!kIsWeb) { if (!kIsWeb) {
var dir = await getApplicationDocumentsDirectory(); var dir = await getApplicationDocumentsDirectory();
@ -30,10 +35,12 @@ class HiveStore {
Hive.registerAdapter(ChinaRegionModelAdapter()); //HiveTypeId:3 Hive.registerAdapter(ChinaRegionModelAdapter()); //HiveTypeId:3
Hive.registerAdapter(HistoryLoginModelAdapter()); //HiveTypeId:4 Hive.registerAdapter(HistoryLoginModelAdapter()); //HiveTypeId:4
Hive.registerAdapter(UserConfigModelAdapter()); //HiveTypeId:5 Hive.registerAdapter(UserConfigModelAdapter()); //HiveTypeId:5
Hive.registerAdapter(PickedCityModelAdapter()); //HiveTypeId:6
_appBox = await Hive.openBox('app'); _appBox = await Hive.openBox('app');
_userBox = await Hive.openBox('userBox'); _userBox = await Hive.openBox('userBox');
_dataBox = await Hive.openBox('dataBox'); _dataBox = await Hive.openBox('dataBox');
_shortcutBox = await Hive.openBox('shortcut'); _shortcutBox = await Hive.openBox('shortcut');
_workOrderShortBox = await Hive.openBox('workOrderShort');
} }
} }
} }

@ -26,7 +26,7 @@ class StackAvatar extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(22.w + 2.w), borderRadius: BorderRadius.circular(22.w + 2.w),
border: Border.all(color: Color(0xFF999999)), // border: Border.all(color: Color(0xFF999999)),
), ),
clipBehavior: Clip.antiAlias, clipBehavior: Clip.antiAlias,
child: BeeImageNetwork( child: BeeImageNetwork(

@ -1,13 +1,11 @@
import 'dart:io'; import 'dart:io';
import 'package:aku_new_community/utils/headers.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:image_picker/image_picker.dart'; import 'package:image_picker/image_picker.dart';
import 'package:velocity_x/velocity_x.dart'; import 'package:velocity_x/velocity_x.dart';
import 'package:aku_new_community/utils/headers.dart';
class BeeImagePicker { class BeeImagePicker {
static Future<File?> pick( static Future<File?> pick(
{required String title, {required String title,

@ -3,6 +3,7 @@ import 'dart:io';
import 'package:aku_new_community/gen/assets.gen.dart'; import 'package:aku_new_community/gen/assets.gen.dart';
import 'package:aku_new_community/widget/picker/bee_image_picker.dart'; import 'package:aku_new_community/widget/picker/bee_image_picker.dart';
import 'package:aku_new_community/widget/picker/bee_image_preview.dart';
// Package imports: // Package imports:
import 'package:dotted_border/dotted_border.dart'; import 'package:dotted_border/dotted_border.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -14,9 +15,13 @@ class BeePickImageWidget extends StatefulWidget {
final double? size; final double? size;
final Function(List<File> files) onChanged; final Function(List<File> files) onChanged;
final String description; final String description;
final int? maxCount;
BeePickImageWidget( BeePickImageWidget(
{Key? key, this.size, required this.onChanged, this.description = '上传照片'}) {Key? key,
this.size,
required this.onChanged,
this.description = '上传照片',
this.maxCount})
: super(key: key); : super(key: key);
@override @override
@ -35,7 +40,10 @@ class _BeePickImageWidgetState extends State<BeePickImageWidget> {
runSpacing: 10.w, runSpacing: 10.w,
children: [ children: [
..._files.map((e) => showImage(e)).toList(), ..._files.map((e) => showImage(e)).toList(),
GestureDetector( Offstage(
offstage:
widget.maxCount != null && _files.length >= widget.maxCount!,
child: GestureDetector(
onTap: () async { onTap: () async {
await BeeImagePicker.pick(title: '选择图片').then( await BeeImagePicker.pick(title: '选择图片').then(
(value) { (value) {
@ -77,6 +85,7 @@ class _BeePickImageWidgetState extends State<BeePickImageWidget> {
), ),
), ),
).material(color: Colors.transparent), ).material(color: Colors.transparent),
),
) )
], ],
); );
@ -84,17 +93,25 @@ class _BeePickImageWidgetState extends State<BeePickImageWidget> {
Widget showImage(File file) { Widget showImage(File file) {
return Stack(children: [ return Stack(children: [
Container( GestureDetector(
onTap: () async {
await BeeImagePreview.toFile(file: file);
},
child: Container(
width: widget.size ?? 160.w, width: widget.size ?? 160.w,
height: widget.size ?? 160.w, height: widget.size ?? 160.w,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8.w), borderRadius: BorderRadius.circular(8.w),
color: Colors.black.withOpacity(0.03)), color: Colors.black.withOpacity(0.03)),
child: Image.file(file,fit: BoxFit.cover,), child: Image.file(
file,
fit: BoxFit.cover,
),
),
), ),
Positioned( Positioned(
top: 8.w, top: 0.w,
right: 8.w, right: 0.w,
child: Container( child: Container(
width: 40.w, width: 40.w,
height: 40.w, height: 40.w,

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save