flutter 升级至空安全

解决 访谈回复 输入相反的问题
解决 报事报修 按钮显示问题
解决 报事报修 改派无法派单的问题
解决 绿化管理 状态显示错误的问题
hmxc
张萌 4 years ago
parent 5fa0586230
commit 697bddf3dd

@ -26,19 +26,19 @@ void main() async {
DevUtil.setDev(!isProduct); DevUtil.setDev(!isProduct);
jpush.addEventHandler( jpush.addEventHandler(
// //
onReceiveNotification: (Map<String, dynamic> message) async { onReceiveNotification: (Map<String, dynamic>? message) async {
print("flutter onReceiveNotification: $message"); print("flutter onReceiveNotification: $message");
LoggerData.addData(message); LoggerData.addData(message);
await JpushMessageParse(message).shot(); await JpushMessageParse(message!).shot();
final appProvider = Provider.of<AppProvider>(Get.context, listen: false); final appProvider = Provider.of<AppProvider>(Get.context!, listen: false);
appProvider.updateMessage(); appProvider.updateMessage();
}, },
// //
onOpenNotification: (Map<String, dynamic> message) async { onOpenNotification: (Map<String, dynamic>? message) async {
print("flutter onOpenNotification: $message"); print("flutter onOpenNotification: $message");
}, },
// //
onReceiveMessage: (Map<String, dynamic> message) async { onReceiveMessage: (Map<String, dynamic>? message) async {
print("flutter onReceiveMessage: $message"); print("flutter onReceiveMessage: $message");
}, },
); );
@ -48,7 +48,7 @@ void main() async {
production: false, production: false,
debug: true, // debug debug: true, // debug
); );
String id = await JPush().getRegistrationID(); String? id = await JPush().getRegistrationID();
print(id); print(id);
LoggerData.addData(id); LoggerData.addData(id);
runApp(MyApp()); runApp(MyApp());
@ -77,7 +77,7 @@ class MyApp extends StatelessWidget {
FocusScopeNode currentFocus = FocusScope.of(context); FocusScopeNode currentFocus = FocusScope.of(context);
if (!currentFocus.hasPrimaryFocus && if (!currentFocus.hasPrimaryFocus &&
currentFocus.focusedChild != null) { currentFocus.focusedChild != null) {
FocusManager.instance.primaryFocus.unfocus(); FocusManager.instance.primaryFocus!.unfocus();
} }
}, },
child: ScreenUtilInit( child: ScreenUtilInit(

@ -1,14 +1,14 @@
class AnnouncementDetailModel { class AnnouncementDetailModel {
int id; int? id;
String title; String? title;
String content; String? content;
String fileDocUrl; String? fileDocUrl;
String fileDocName; String? fileDocName;
String releaseTime; String? releaseTime;
List<String> imgUrls; List<String>? imgUrls;
AnnouncementDetailModel( AnnouncementDetailModel(
{this.id, {required this.id,
this.title, this.title,
this.content, this.content,
this.fileDocUrl, this.fileDocUrl,

@ -1,10 +1,10 @@
class AnnouncementListModel { class AnnouncementListModel {
int id; int? id;
String title; String? title;
String releaseTime; String? releaseTime;
List<String> imgUrls; List<String>? imgUrls;
AnnouncementListModel({this.id, this.title, this.releaseTime, this.imgUrls}); AnnouncementListModel({required this.id, this.title, this.releaseTime, this.imgUrls});
AnnouncementListModel.fromJson(Map<String, dynamic> json) { AnnouncementListModel.fromJson(Map<String, dynamic> json) {
id = json['id']; id = json['id'];

@ -1,13 +1,13 @@
class ImgModel { class ImgModel {
String url; String? url;
String size; String? size;
int longs; int? longs;
int paragraph; int? paragraph;
int sort; int? sort;
ImgModel({this.url, this.size, this.longs, this.paragraph, this.sort}); ImgModel({this.url, this.size, this.longs, this.paragraph, this.sort});
static String first(List<ImgModel> models) { static String? first(List<ImgModel>? models) {
if (models == null) return ''; if (models == null) return '';
if (models.isEmpty) return ''; if (models.isEmpty) return '';
return models.first.url; return models.first.url;

@ -5,29 +5,29 @@ import 'package:common_utils/common_utils.dart';
import 'package:aku_community_manager/models/common/img_model.dart'; import 'package:aku_community_manager/models/common/img_model.dart';
class ActivityDetailModel { class ActivityDetailModel {
int id; int? id;
String title; String? title;
String content; String? content;
String activityStartTime; String? activityStartTime;
String activityEndTime; String? activityEndTime;
String location; String? location;
String registrationEndTime; String? registrationEndTime;
List<ImgModel> imgUrls; List<ImgModel>? imgUrls;
ImgModel get firstImg { ImgModel? get firstImg {
if (imgUrls.isEmpty) if (imgUrls!.isEmpty)
return null; return null;
else else
return imgUrls.first; return imgUrls!.first;
} }
DateTime get registrationEnd => DateUtil.getDateTime(registrationEndTime); DateTime? get registrationEnd => DateUtil.getDateTime(registrationEndTime!);
DateTime get activityStart => DateUtil.getDateTime(activityStartTime); DateTime? get activityStart => DateUtil.getDateTime(activityStartTime!);
DateTime get activityEnd => DateUtil.getDateTime(activityEndTime); DateTime? get activityEnd => DateUtil.getDateTime(activityEndTime!);
ActivityDetailModel( ActivityDetailModel(
{this.id, {required this.id,
this.title, this.title,
this.content, this.content,
this.activityStartTime, this.activityStartTime,
@ -45,9 +45,9 @@ class ActivityDetailModel {
location = json['location']; location = json['location'];
registrationEndTime = json['registrationEndTime']; registrationEndTime = json['registrationEndTime'];
if (json['imgUrls'] != null) { if (json['imgUrls'] != null) {
imgUrls = new List<ImgModel>(); imgUrls = <ImgModel>[];
json['imgUrls'].forEach((v) { json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v)); imgUrls!.add(new ImgModel.fromJson(v));
}); });
} }
} }
@ -62,7 +62,7 @@ class ActivityDetailModel {
data['location'] = this.location; data['location'] = this.location;
data['registrationEndTime'] = this.registrationEndTime; data['registrationEndTime'] = this.registrationEndTime;
if (this.imgUrls != null) { if (this.imgUrls != null) {
data['imgUrls'] = this.imgUrls.map((v) => v.toJson()).toList(); data['imgUrls'] = this.imgUrls!.map((v) => v.toJson()).toList();
} }
return data; return data;
} }

@ -5,30 +5,30 @@ import 'package:common_utils/common_utils.dart';
import 'package:aku_community_manager/models/common/img_model.dart'; import 'package:aku_community_manager/models/common/img_model.dart';
class ActivityItemModel { class ActivityItemModel {
int id; int? id;
String title; String? title;
String sponsorName; String? sponsorName;
String location; String? location;
String registrationStartTime; String? registrationStartTime;
String registrationEndTime; String? registrationEndTime;
String createDate; String? createDate;
List<ImgModel> imgUrls; List<ImgModel>? imgUrls;
ImgModel get firstImg { ImgModel? get firstImg {
if (imgUrls.isEmpty) if (imgUrls!.isEmpty)
return null; return null;
else else
return imgUrls.first; return imgUrls!.first;
} }
DateTime get create => DateUtil.getDateTime(createDate); DateTime? get create => DateUtil.getDateTime(createDate!);
DateTime get registrationStart => DateUtil.getDateTime(registrationStartTime); DateTime? get registrationStart => DateUtil.getDateTime(registrationStartTime!);
DateTime get registrationEnd => DateUtil.getDateTime(registrationEndTime); DateTime? get registrationEnd => DateUtil.getDateTime(registrationEndTime!);
ActivityItemModel( ActivityItemModel(
{this.id, {required this.id,
this.title, this.title,
this.sponsorName, this.sponsorName,
this.location, this.location,
@ -46,9 +46,9 @@ class ActivityItemModel {
registrationEndTime = json['registrationEndTime']; registrationEndTime = json['registrationEndTime'];
createDate = json['createDate']; createDate = json['createDate'];
if (json['imgUrls'] != null) { if (json['imgUrls'] != null) {
imgUrls = new List<ImgModel>(); imgUrls =<ImgModel>[];
json['imgUrls'].forEach((v) { json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v)); imgUrls!.add(new ImgModel.fromJson(v));
}); });
} }
} }
@ -63,7 +63,7 @@ class ActivityItemModel {
data['registrationEndTime'] = this.registrationEndTime; data['registrationEndTime'] = this.registrationEndTime;
data['createDate'] = this.createDate; data['createDate'] = this.createDate;
if (this.imgUrls != null) { if (this.imgUrls != null) {
data['imgUrls'] = this.imgUrls.map((v) => v.toJson()).toList(); data['imgUrls'] = this.imgUrls!.map((v) => v.toJson()).toList();
} }
return data; return data;
} }

@ -2,16 +2,16 @@
import 'package:aku_community_manager/models/common/img_model.dart'; import 'package:aku_community_manager/models/common/img_model.dart';
class BorrowCheckItemModel { class BorrowCheckItemModel {
int id; int? id;
int articleDetailId; int? articleDetailId;
String articleName; String? articleName;
String code; String? code;
int status; int? status;
List<ImgModel> imgUrls; List<ImgModel>? imgUrls;
ImgModel get firstImg => imgUrls.isEmpty ? null : imgUrls.first; ImgModel? get firstImg => imgUrls!.isEmpty ? null : imgUrls!.first;
BorrowCheckItemModel( BorrowCheckItemModel(
{this.id, {required this.id,
this.articleDetailId, this.articleDetailId,
this.articleName, this.articleName,
this.code, this.code,
@ -25,9 +25,9 @@ class BorrowCheckItemModel {
code = json['code']; code = json['code'];
status = json['status']; status = json['status'];
if (json['imgUrls'] != null) { if (json['imgUrls'] != null) {
imgUrls = new List<ImgModel>(); imgUrls = <ImgModel>[];
json['imgUrls'].forEach((v) { json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v)); imgUrls!.add(new ImgModel.fromJson(v));
}); });
} else } else
imgUrls = []; imgUrls = [];
@ -41,7 +41,7 @@ class BorrowCheckItemModel {
data['code'] = this.code; data['code'] = this.code;
data['status'] = this.status; data['status'] = this.status;
if (this.imgUrls != null) { if (this.imgUrls != null) {
data['imgUrls'] = this.imgUrls.map((v) => v.toJson()).toList(); data['imgUrls'] = this.imgUrls!.map((v) => v.toJson()).toList();
} }
return data; return data;
} }

@ -2,15 +2,15 @@
import 'package:aku_community_manager/models/common/img_model.dart'; import 'package:aku_community_manager/models/common/img_model.dart';
class BorrowDetailItemModel { class BorrowDetailItemModel {
int id; int? id;
String name; String? name;
String code; String? code;
int borrowStatus; int? borrowStatus;
List<ImgModel> imgUrls; List<ImgModel>? imgUrls;
ImgModel get firstImg => imgUrls.isEmpty ? null : imgUrls.first; ImgModel? get firstImg => imgUrls!.isEmpty ? null : imgUrls!.first;
bool get borrowed => borrowStatus == 2; bool get borrowed => borrowStatus == 2;
BorrowDetailItemModel( BorrowDetailItemModel(
{this.id, this.name, this.code, this.borrowStatus, this.imgUrls}); {required this.id, this.name, this.code, this.borrowStatus, this.imgUrls});
BorrowDetailItemModel.fromJson(Map<String, dynamic> json) { BorrowDetailItemModel.fromJson(Map<String, dynamic> json) {
id = json['id']; id = json['id'];
@ -18,9 +18,9 @@ class BorrowDetailItemModel {
code = json['code']; code = json['code'];
borrowStatus = json['borrowStatus']; borrowStatus = json['borrowStatus'];
if (json['imgUrls'] != null) { if (json['imgUrls'] != null) {
imgUrls = new List<ImgModel>(); imgUrls = <ImgModel>[];
json['imgUrls'].forEach((v) { json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v)); imgUrls!.add(new ImgModel.fromJson(v));
}); });
} else } else
imgUrls = []; imgUrls = [];
@ -33,7 +33,7 @@ class BorrowDetailItemModel {
data['code'] = this.code; data['code'] = this.code;
data['borrowStatus'] = this.borrowStatus; data['borrowStatus'] = this.borrowStatus;
if (this.imgUrls != null) { if (this.imgUrls != null) {
data['imgUrls'] = this.imgUrls.map((v) => v.toJson()).toList(); data['imgUrls'] = this.imgUrls!.map((v) => v.toJson()).toList();
} }
return data; return data;
} }

@ -2,13 +2,13 @@
import 'package:aku_community_manager/models/common/img_model.dart'; import 'package:aku_community_manager/models/common/img_model.dart';
class BorrowItemDetailModel { class BorrowItemDetailModel {
int id; int? id;
String name; String? name;
String code; String? code;
int borrowStatus; int? borrowStatus;
int status; int? status;
List<ImgModel> imgUrls; List<ImgModel>? imgUrls;
ImgModel get firstImg => imgUrls.isEmpty ? null : imgUrls.first; ImgModel? get firstImg => imgUrls!.isEmpty ? null : imgUrls!.first;
bool get borrowed => borrowStatus == 2; bool get borrowed => borrowStatus == 2;
String get statusValue { String get statusValue {
switch (status) { switch (status) {
@ -24,7 +24,7 @@ class BorrowItemDetailModel {
} }
BorrowItemDetailModel( BorrowItemDetailModel(
{this.id, {required this.id,
this.name, this.name,
this.code, this.code,
this.borrowStatus, this.borrowStatus,
@ -38,9 +38,9 @@ class BorrowItemDetailModel {
borrowStatus = json['borrowStatus']; borrowStatus = json['borrowStatus'];
status = json['status']; status = json['status'];
if (json['imgUrls'] != null) { if (json['imgUrls'] != null) {
imgUrls = new List<ImgModel>(); imgUrls = [];
json['imgUrls'].forEach((v) { json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v)); imgUrls!.add(new ImgModel.fromJson(v));
}); });
} else } else
imgUrls = []; imgUrls = [];
@ -54,7 +54,7 @@ class BorrowItemDetailModel {
data['borrowStatus'] = this.borrowStatus; data['borrowStatus'] = this.borrowStatus;
data['status'] = this.status; data['status'] = this.status;
if (this.imgUrls != null) { if (this.imgUrls != null) {
data['imgUrls'] = this.imgUrls.map((v) => v.toJson()).toList(); data['imgUrls'] = this.imgUrls!.map((v) => v.toJson()).toList();
} }
return data; return data;
} }

@ -2,17 +2,17 @@
import 'package:aku_community_manager/models/common/img_model.dart'; import 'package:aku_community_manager/models/common/img_model.dart';
class BorrowItemModel { class BorrowItemModel {
int id; int? id;
String name; String? name;
int borrowNum; int? borrowNum;
int remainingNum; int? remainingNum;
int quantity; int? quantity;
List<ImgModel> imgUrls; List<ImgModel>? imgUrls;
ImgModel get firstImg => imgUrls.isEmpty ? null : imgUrls.first; ImgModel? get firstImg => imgUrls!.isEmpty ? null : imgUrls!.first;
BorrowItemModel( BorrowItemModel(
{this.id, {required this.id,
this.name, this.name,
this.borrowNum, this.borrowNum,
this.remainingNum, this.remainingNum,
@ -26,9 +26,9 @@ class BorrowItemModel {
remainingNum = json['remainingNum']; remainingNum = json['remainingNum'];
quantity = json['quantity']; quantity = json['quantity'];
if (json['imgUrls'] != null) { if (json['imgUrls'] != null) {
imgUrls = new List<ImgModel>(); imgUrls = [];
json['imgUrls'].forEach((v) { json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v)); imgUrls!.add(new ImgModel.fromJson(v));
}); });
} else } else
imgUrls = []; imgUrls = [];
@ -42,7 +42,7 @@ class BorrowItemModel {
data['remainingNum'] = this.remainingNum; data['remainingNum'] = this.remainingNum;
data['quantity'] = this.quantity; data['quantity'] = this.quantity;
if (this.imgUrls != null) { if (this.imgUrls != null) {
data['imgUrls'] = this.imgUrls.map((v) => v.toJson()).toList(); data['imgUrls'] = this.imgUrls!.map((v) => v.toJson()).toList();
} }
return data; return data;
} }

@ -9,26 +9,26 @@ import 'package:aku_community_manager/models/common/img_model.dart';
import 'package:aku_community_manager/style/app_style.dart'; import 'package:aku_community_manager/style/app_style.dart';
class BorrowStatusItemModel { class BorrowStatusItemModel {
int id; int? id;
int articleDetailId; int? articleDetailId;
String articleName; String? articleName;
///1.2.3. ///1.2.3.
int borrowStatus; int? borrowStatus;
///1.2.3. ///1.2.3.
int status; int? status;
int borrowTime; int? borrowTime;
String beginDate; String? beginDate;
String endDate; String? endDate;
String borrowName; String? borrowName;
String borrowTel; String? borrowTel;
String createDate; String? createDate;
List<ImgModel> imgUrls; List<ImgModel>? imgUrls;
ImgModel get firstImg => imgUrls.isEmpty ? null : imgUrls.first; ImgModel? get firstImg => imgUrls!.isEmpty ? null : imgUrls!.first;
DateTime get create => DateUtil.getDateTime(createDate); DateTime? get create => DateUtil.getDateTime(createDate!);
DateTime get begin => DateUtil.getDateTime(beginDate); DateTime? get begin => DateUtil.getDateTime(beginDate!);
DateTime get end => DateUtil.getDateTime(endDate); DateTime? get end => DateUtil.getDateTime(endDate!);
///1.2.3. ///1.2.3.
String get borrowStatusValue { String get borrowStatusValue {
@ -69,7 +69,7 @@ class BorrowStatusItemModel {
} }
BorrowStatusItemModel( BorrowStatusItemModel(
{this.id, {required this.id,
this.articleDetailId, this.articleDetailId,
this.articleName, this.articleName,
this.borrowStatus, this.borrowStatus,
@ -95,9 +95,9 @@ class BorrowStatusItemModel {
borrowTel = json['borrowTel']; borrowTel = json['borrowTel'];
createDate = json['createDate']; createDate = json['createDate'];
if (json['imgUrls'] != null) { if (json['imgUrls'] != null) {
imgUrls = new List<ImgModel>(); imgUrls = [];
json['imgUrls'].forEach((v) { json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v)); imgUrls!.add(new ImgModel.fromJson(v));
}); });
} else } else
imgUrls = []; imgUrls = [];
@ -117,7 +117,7 @@ class BorrowStatusItemModel {
data['borrowTel'] = this.borrowTel; data['borrowTel'] = this.borrowTel;
data['createDate'] = this.createDate; data['createDate'] = this.createDate;
if (this.imgUrls != null) { if (this.imgUrls != null) {
data['imgUrls'] = this.imgUrls.map((v) => v.toJson()).toList(); data['imgUrls'] = this.imgUrls!.map((v) => v.toJson()).toList();
} }
return data; return data;
} }

@ -1,14 +1,14 @@
class BussinessAndFixModel { class BussinessAndFixModel {
int id; int? id;
int dispatchId; int? dispatchId;
String reportDetail; String? reportDetail;
String repairDate; String? repairDate;
int status; int? status;
List<ImgUrls> imgUrls; List<ImgUrls>? imgUrls;
int type; int? type;
BussinessAndFixModel( BussinessAndFixModel(
{this.id, {required this.id,
this.dispatchId, this.dispatchId,
this.reportDetail, this.reportDetail,
this.repairDate, this.repairDate,
@ -23,9 +23,9 @@ class BussinessAndFixModel {
repairDate = json['repairDate']; repairDate = json['repairDate'];
status = json['status']; status = json['status'];
if (json['imgUrls'] != null) { if (json['imgUrls'] != null) {
imgUrls = new List<ImgUrls>(); imgUrls = [];
json['imgUrls'].forEach((v) { json['imgUrls'].forEach((v) {
imgUrls.add(new ImgUrls.fromJson(v)); imgUrls!.add(new ImgUrls.fromJson(v));
}); });
} }
type = json['type']; type = json['type'];
@ -39,7 +39,7 @@ class BussinessAndFixModel {
data['repairDate'] = this.repairDate; data['repairDate'] = this.repairDate;
data['status'] = this.status; data['status'] = this.status;
if (this.imgUrls != null) { if (this.imgUrls != null) {
data['imgUrls'] = this.imgUrls.map((v) => v.toJson()).toList(); data['imgUrls'] = this.imgUrls!.map((v) => v.toJson()).toList();
} }
data['type'] = this.type; data['type'] = this.type;
return data; return data;
@ -47,11 +47,11 @@ class BussinessAndFixModel {
} }
class ImgUrls { class ImgUrls {
String url; String? url;
String size; String? size;
int longs; int? longs;
int paragraph; int? paragraph;
int sort; int? sort;
ImgUrls({this.url, this.size, this.longs, this.paragraph, this.sort}); ImgUrls({this.url, this.size, this.longs, this.paragraph, this.sort});

@ -1,7 +1,7 @@
class DispatchDetialModel { class DispatchDetialModel {
String showName; String? showName;
int showValue; int? showValue;
String remarks; String? remarks;
DispatchDetialModel({this.showName, this.showValue, this.remarks}); DispatchDetialModel({this.showName, this.showValue, this.remarks});

@ -1,11 +1,11 @@
class DispatchReportModel { class DispatchReportModel {
int dispatchListId; int? dispatchListId;
int workOrderTyoe; int? workOrderTyoe;
int workOrderTypeDetail; int? workOrderTypeDetail;
int workOrderTimeLimit; int? workOrderTimeLimit;
int type; int? type;
int operato; int? operato;
String remark; String? remark;
DispatchReportModel.zero() { DispatchReportModel.zero() {
dispatchListId = -1; dispatchListId = -1;
@ -17,7 +17,7 @@ class DispatchReportModel {
remark = ''; remark = '';
} }
DispatchReportModel( DispatchReportModel(
{this.dispatchListId, {required this.dispatchListId,
this.operato, this.operato,
this.remark, this.remark,
this.type, this.type,

@ -1,11 +1,12 @@
class FixedDetailModel { class FixedDetailModel {
HandlingSituation handlingSituation; HandlingSituation? handlingSituation;
DispatchType dispatchType; DispatchType? dispatchType;
CostDetail costDetail; CostDetail? costDetail;
RepairDetail repairDetail; RepairDetail? repairDetail;
String evaluateInfo; String? evaluateInfo;
int type; int? type;
List<ProcessRecord> processRecord; List<ProcessRecord>? processRecord;
FixedDetailModel( FixedDetailModel(
{this.handlingSituation, {this.handlingSituation,
@ -32,9 +33,9 @@ class FixedDetailModel {
evaluateInfo = json['evaluateInfo']; evaluateInfo = json['evaluateInfo'];
type = json['type']; type = json['type'];
if (json['processRecord'] != null) { if (json['processRecord'] != null) {
processRecord = new List<ProcessRecord>(); processRecord = <ProcessRecord>[];
json['processRecord'].forEach((v) { json['processRecord'].forEach((v) {
processRecord.add(new ProcessRecord.fromJson(v)); processRecord!.add(new ProcessRecord.fromJson(v));
}); });
} }
} }
@ -42,32 +43,32 @@ class FixedDetailModel {
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.handlingSituation != null) { if (this.handlingSituation != null) {
data['handlingSituation'] = this.handlingSituation.toJson(); data['handlingSituation'] = this.handlingSituation!.toJson();
} }
if (this.dispatchType != null) { if (this.dispatchType != null) {
data['dispatchType'] = this.dispatchType.toJson(); data['dispatchType'] = this.dispatchType!.toJson();
} }
if (this.costDetail != null) { if (this.costDetail != null) {
data['costDetail'] = this.costDetail.toJson(); data['costDetail'] = this.costDetail!.toJson();
} }
if (this.repairDetail != null) { if (this.repairDetail != null) {
data['repairDetail'] = this.repairDetail.toJson(); data['repairDetail'] = this.repairDetail!.toJson();
} }
data['evaluateInfo'] = this.evaluateInfo; data['evaluateInfo'] = this.evaluateInfo;
data['type'] = this.type; data['type'] = this.type;
if (this.processRecord != null) { if (this.processRecord != null) {
data['processRecord'] = data['processRecord'] =
this.processRecord.map((v) => v.toJson()).toList(); this.processRecord!.map((v) => v.toJson()).toList();
} }
return data; return data;
} }
} }
class HandlingSituation { class HandlingSituation {
int id; int? id;
String detail; String? detail;
String materialList; String? materialList;
List<ImgUrls> imgUrls; List<ImgUrls>? imgUrls;
HandlingSituation({this.id, this.detail, this.materialList, this.imgUrls}); HandlingSituation({this.id, this.detail, this.materialList, this.imgUrls});
@ -76,9 +77,9 @@ class HandlingSituation {
detail = json['detail']; detail = json['detail'];
materialList = json['materialList']; materialList = json['materialList'];
if (json['imgUrls'] != null) { if (json['imgUrls'] != null) {
imgUrls = new List<ImgUrls>(); imgUrls = <ImgUrls>[];
json['imgUrls'].forEach((v) { json['imgUrls'].forEach((v) {
imgUrls.add(new ImgUrls.fromJson(v)); imgUrls!.add(new ImgUrls.fromJson(v));
}); });
} }
} }
@ -89,18 +90,18 @@ class HandlingSituation {
data['detail'] = this.detail; data['detail'] = this.detail;
data['materialList'] = this.materialList; data['materialList'] = this.materialList;
if (this.imgUrls != null) { if (this.imgUrls != null) {
data['imgUrls'] = this.imgUrls.map((v) => v.toJson()).toList(); data['imgUrls'] = this.imgUrls!.map((v) => v.toJson()).toList();
} }
return data; return data;
} }
} }
class ImgUrls { class ImgUrls {
String url; String? url;
String size; String? size;
int longs; int? longs;
int paragraph; int? paragraph;
int sort; int? sort;
ImgUrls({this.url, this.size, this.longs, this.paragraph, this.sort}); ImgUrls({this.url, this.size, this.longs, this.paragraph, this.sort});
@ -124,9 +125,9 @@ class ImgUrls {
} }
class DispatchType { class DispatchType {
int dispatchType; int? dispatchType;
String workOrderLimitName; String? workOrderLimitName;
String workOrderSubclassName; String? workOrderSubclassName;
DispatchType( DispatchType(
{this.dispatchType, this.workOrderLimitName, this.workOrderSubclassName}); {this.dispatchType, this.workOrderLimitName, this.workOrderSubclassName});
@ -147,9 +148,9 @@ class DispatchType {
} }
class CostDetail { class CostDetail {
int laborCost; int? laborCost;
int materialCost; int? materialCost;
int totalCost; int? totalCost;
CostDetail({this.laborCost, this.materialCost, this.totalCost}); CostDetail({this.laborCost, this.materialCost, this.totalCost});
@ -169,13 +170,13 @@ class CostDetail {
} }
class RepairDetail { class RepairDetail {
int id; int? id;
int dispatchId; int? dispatchId;
String name; String? name;
String tel; String? tel;
int type; int? type;
int status; int? status;
List<ImgUrls> imgUrls; List<ImgUrls>? imgUrls;
RepairDetail( RepairDetail(
{this.id, {this.id,
@ -194,9 +195,9 @@ class RepairDetail {
type = json['type']; type = json['type'];
status = json['status']; status = json['status'];
if (json['imgUrls'] != null) { if (json['imgUrls'] != null) {
imgUrls = new List<ImgUrls>(); imgUrls = <ImgUrls>[];
json['imgUrls'].forEach((v) { json['imgUrls'].forEach((v) {
imgUrls.add(new ImgUrls.fromJson(v)); imgUrls!.add(new ImgUrls.fromJson(v));
}); });
} }
} }
@ -210,16 +211,16 @@ class RepairDetail {
data['type'] = this.type; data['type'] = this.type;
data['status'] = this.status; data['status'] = this.status;
if (this.imgUrls != null) { if (this.imgUrls != null) {
data['imgUrls'] = this.imgUrls.map((v) => v.toJson()).toList(); data['imgUrls'] = this.imgUrls!.map((v) => v.toJson()).toList();
} }
return data; return data;
} }
} }
class ProcessRecord { class ProcessRecord {
int id; int? id;
int operationType; int? operationType;
String operationDate; String? operationDate;
ProcessRecord({this.id, this.operationType, this.operationDate}); ProcessRecord({this.id, this.operationType, this.operationDate});

@ -1,8 +1,8 @@
class WorkOrderTypeModel { class WorkOrderTypeModel {
int id; int? id;
String name; String? name;
WorkOrderTypeModel({this.id, this.name}); WorkOrderTypeModel({required this.id, this.name});
WorkOrderTypeModel.fromJson(Map<String, dynamic> json) { WorkOrderTypeModel.fromJson(Map<String, dynamic> json) {
id = json['id']; id = json['id'];

@ -1,8 +1,8 @@
class WorkTimeLimitModel { class WorkTimeLimitModel {
int id; int? id;
String name; String? name;
WorkTimeLimitModel({this.id, this.name}); WorkTimeLimitModel({required this.id, this.name});
WorkTimeLimitModel.fromJson(Map<String, dynamic> json) { WorkTimeLimitModel.fromJson(Map<String, dynamic> json) {
id = json['id']; id = json['id'];

@ -3,20 +3,20 @@ import 'package:common_utils/common_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class ClockApplyRecordListModel { class ClockApplyRecordListModel {
int id; int? id;
String reason; String? reason;
int status; int? status;
int type; int? type;
String startDate; String? startDate;
String endDate; String? endDate;
String createName; String? createName;
String createTel; String? createTel;
String createDate; String? createDate;
String reviewerName; String? reviewerName;
String reviewerDate; String? reviewerDate;
ClockApplyRecordListModel( ClockApplyRecordListModel(
{this.id, {required this.id,
this.reason, this.reason,
this.status, this.status,
this.type, this.type,
@ -96,9 +96,9 @@ class ClockApplyRecordListModel {
} }
String get startTimeString => String get startTimeString =>
DateUtil.formatDateStr(this.startDate, format: 'yyyy-MM-dd HH:mm'); DateUtil.formatDateStr(this.startDate!, format: 'yyyy-MM-dd HH:mm');
String get endTimeString => String get endTimeString =>
DateUtil.formatDateStr(this.endDate, format: 'yyyy-MM-dd HH:mm'); DateUtil.formatDateStr(this.endDate!, format: 'yyyy-MM-dd HH:mm');
String get applyTimeString => String get applyTimeString =>
DateUtil.formatDateStr(this.createDate, format: 'yyyy-MM-dd HH:mm:ss'); DateUtil.formatDateStr(this.createDate!, format: 'yyyy-MM-dd HH:mm:ss');
} }

@ -2,17 +2,17 @@ import 'package:aku_community_manager/utils/weekdays_to_chinese.dart';
import 'package:common_utils/common_utils.dart'; import 'package:common_utils/common_utils.dart';
class ClockRecordListModel { class ClockRecordListModel {
int id; int? id;
String startClockDate; String? startClockDate;
String endClockDate; String? endClockDate;
String cardReplacementDate; String? cardReplacementDate;
String operatorName; String? operatorName;
String clockName; String? clockName;
String clockTel; String? clockTel;
String createDate; String? createDate;
ClockRecordListModel( ClockRecordListModel(
{this.id, {required this.id,
this.startClockDate, this.startClockDate,
this.endClockDate, this.endClockDate,
this.cardReplacementDate, this.cardReplacementDate,
@ -54,5 +54,5 @@ class ClockRecordListModel {
String get clockDateString => String get clockDateString =>
DateUtil.formatDateStr(this.createDate??'', format: 'yyyy.MM.dd'); DateUtil.formatDateStr(this.createDate??'', format: 'yyyy.MM.dd');
String get weekDay => WeekDaysToChinese.fromInt( String get weekDay => WeekDaysToChinese.fromInt(
DateUtil.getDateTime(this.createDate??'')?.weekday); DateUtil.getDateTime(this.createDate??'')?.weekday??0);
} }

@ -1,17 +1,17 @@
import 'package:common_utils/common_utils.dart'; import 'package:common_utils/common_utils.dart';
class TodayClockRecordModel { class TodayClockRecordModel {
int id; int? id;
String startClockDate; String? startClockDate;
String endClockDate; String? endClockDate;
String cardReplacementDate; String? cardReplacementDate;
String operatorName; String? operatorName;
String clockName; String? clockName;
String clockTel; String? clockTel;
String createDate; String? createDate;
TodayClockRecordModel( TodayClockRecordModel(
{this.id, {required this.id,
this.startClockDate, this.startClockDate,
this.endClockDate, this.endClockDate,
this.cardReplacementDate, this.cardReplacementDate,
@ -44,6 +44,6 @@ class TodayClockRecordModel {
return data; return data;
} }
DateTime get clockInTime => DateUtil.getDateTime(this.startClockDate); DateTime? get clockInTime => DateUtil.getDateTime(this.startClockDate!);
DateTime get clockOutTime => DateUtil.getDateTime(this.endClockDate); DateTime? get clockOutTime => DateUtil.getDateTime(this.endClockDate!);
} }

@ -1,8 +1,8 @@
class DecorationDetailModel { class DecorationDetailModel {
TrackInspectionFBIVo trackInspectionFBIVo; TrackInspectionFBIVo? trackInspectionFBIVo;
DecorationFBIVo decorationFBIVo; DecorationFBIVo? decorationFBIVo;
List<ChecksContentVos> checksContentVos; List<ChecksContentVos>? checksContentVos;
List<TrackRecordVos> trackRecordVos; List<TrackRecordVos>? trackRecordVos;
DecorationDetailModel( DecorationDetailModel(
{this.trackInspectionFBIVo, {this.trackInspectionFBIVo,
@ -18,15 +18,15 @@ class DecorationDetailModel {
? new DecorationFBIVo.fromJson(json['decorationFBIVo']) ? new DecorationFBIVo.fromJson(json['decorationFBIVo'])
: null; : null;
if (json['checksContentVos'] != null) { if (json['checksContentVos'] != null) {
checksContentVos = new List<ChecksContentVos>(); checksContentVos = <ChecksContentVos>[];
json['checksContentVos'].forEach((v) { json['checksContentVos'].forEach((v) {
checksContentVos.add(new ChecksContentVos.fromJson(v)); checksContentVos!.add(new ChecksContentVos.fromJson(v));
}); });
} }
if (json['trackRecordVos'] != null) { if (json['trackRecordVos'] != null) {
trackRecordVos = new List<TrackRecordVos>(); trackRecordVos = <TrackRecordVos>[];
json['trackRecordVos'].forEach((v) { json['trackRecordVos'].forEach((v) {
trackRecordVos.add(new TrackRecordVos.fromJson(v)); trackRecordVos!.add(new TrackRecordVos.fromJson(v));
}); });
} }
} }
@ -34,29 +34,29 @@ class DecorationDetailModel {
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.trackInspectionFBIVo != null) { if (this.trackInspectionFBIVo != null) {
data['trackInspectionFBIVo'] = this.trackInspectionFBIVo.toJson(); data['trackInspectionFBIVo'] = this.trackInspectionFBIVo!.toJson();
} }
if (this.decorationFBIVo != null) { if (this.decorationFBIVo != null) {
data['decorationFBIVo'] = this.decorationFBIVo.toJson(); data['decorationFBIVo'] = this.decorationFBIVo!.toJson();
} }
if (this.checksContentVos != null) { if (this.checksContentVos != null) {
data['checksContentVos'] = data['checksContentVos'] =
this.checksContentVos.map((v) => v.toJson()).toList(); this.checksContentVos!.map((v) => v.toJson()).toList();
} }
if (this.trackRecordVos != null) { if (this.trackRecordVos != null) {
data['trackRecordVos'] = data['trackRecordVos'] =
this.trackRecordVos.map((v) => v.toJson()).toList(); this.trackRecordVos!.map((v) => v.toJson()).toList();
} }
return data; return data;
} }
} }
class TrackInspectionFBIVo { class TrackInspectionFBIVo {
int id; int? id;
int trackId; int? trackId;
String trackName; String? trackName;
String startDate; String? startDate;
int inspectionCycle; int? inspectionCycle;
TrackInspectionFBIVo( TrackInspectionFBIVo(
{this.id, {this.id,
@ -85,16 +85,16 @@ class TrackInspectionFBIVo {
} }
class DecorationFBIVo { class DecorationFBIVo {
int id; int? id;
String roomName; String? roomName;
String residentName; String? residentName;
String residentTel; String? residentTel;
String constructionUnit; String? constructionUnit;
String director; String? director;
String directorTel; String? directorTel;
String actualBegin; String? actualBegin;
String expectedEnd; String? expectedEnd;
int tracker; int? tracker;
DecorationFBIVo( DecorationFBIVo(
{this.id, {this.id,
@ -138,8 +138,8 @@ class DecorationFBIVo {
} }
class ChecksContentVos { class ChecksContentVos {
int id; int? id;
String name; String? name;
ChecksContentVos({this.id, this.name}); ChecksContentVos({this.id, this.name});
@ -157,12 +157,12 @@ class ChecksContentVos {
} }
class TrackRecordVos { class TrackRecordVos {
int id; int? id;
String trackDate; String? trackDate;
int type; int? type;
String description; String? description;
int result; int? result;
List<RecordDetailVoList> recordDetailVoList; List<RecordDetailVoList>? recordDetailVoList;
TrackRecordVos( TrackRecordVos(
{this.id, {this.id,
@ -202,9 +202,9 @@ class TrackRecordVos {
description = json['description']; description = json['description'];
result = json['result']; result = json['result'];
if (json['recordDetailVoList'] != null) { if (json['recordDetailVoList'] != null) {
recordDetailVoList = new List<RecordDetailVoList>(); recordDetailVoList = <RecordDetailVoList>[];
json['recordDetailVoList'].forEach((v) { json['recordDetailVoList'].forEach((v) {
recordDetailVoList.add(new RecordDetailVoList.fromJson(v)); recordDetailVoList!.add(new RecordDetailVoList.fromJson(v));
}); });
} }
} }
@ -218,16 +218,16 @@ class TrackRecordVos {
data['result'] = this.result; data['result'] = this.result;
if (this.recordDetailVoList != null) { if (this.recordDetailVoList != null) {
data['recordDetailVoList'] = data['recordDetailVoList'] =
this.recordDetailVoList.map((v) => v.toJson()).toList(); this.recordDetailVoList!.map((v) => v.toJson()).toList();
} }
return data; return data;
} }
} }
class RecordDetailVoList { class RecordDetailVoList {
int id; int? id;
String checksContent; String? checksContent;
int isQualified; int? isQualified;
RecordDetailVoList({this.id, this.checksContent, this.isQualified}); RecordDetailVoList({this.id, this.checksContent, this.isQualified});
@ -255,5 +255,4 @@ class RecordDetailVoList {
return '未知'; return '未知';
} }
} }
} }

@ -1,14 +1,14 @@
class DecorationListModel { class DecorationListModel {
int id; int? id;
String roomName; String? roomName;
String constructionUnit; String? constructionUnit;
int operationStatus; int? operationStatus;
int status; int? status;
int tracker; int? tracker;
String applicationDate; String? applicationDate;
DecorationListModel( DecorationListModel(
{this.id, {required this.id,
this.roomName, this.roomName,
this.constructionUnit, this.constructionUnit,
this.operationStatus, this.operationStatus,

@ -1,20 +1,20 @@
import 'package:aku_community_manager/models/common/img_model.dart'; import 'package:aku_community_manager/models/common/img_model.dart';
class FacilitiesCheckListModel { class FacilitiesCheckListModel {
int id; int? id;
String code; String? code;
String facilitiesName; String? facilitiesName;
String facilitiesAddress; String? facilitiesAddress;
int status; int? status;
String beginDate; String? beginDate;
String endDate; String? endDate;
int situation; int? situation;
String detail; String? detail;
String checkDate; String? checkDate;
List<ImgModel> imgList; List<ImgModel>? imgList;
FacilitiesCheckListModel( FacilitiesCheckListModel(
{this.id, {required this.id,
this.code, this.code,
this.facilitiesName, this.facilitiesName,
this.facilitiesAddress, this.facilitiesAddress,
@ -49,9 +49,9 @@ class FacilitiesCheckListModel {
detail = json['detail']; detail = json['detail'];
checkDate = json['checkDate']; checkDate = json['checkDate'];
if (json['imgList'] != null) { if (json['imgList'] != null) {
imgList = new List<ImgModel>(); imgList = <ImgModel>[];
json['imgList'].forEach((v) { json['imgList'].forEach((v) {
imgList.add(new ImgModel.fromJson(v)); imgList!.add(new ImgModel.fromJson(v));
}); });
} else } else
imgList = []; imgList = [];

@ -1,17 +1,17 @@
class FixerItemModel { class FixerItemModel {
int id; int? id;
String name; String? name;
List<RepairmanVos> repairmanVos; List<RepairmanVos>? repairmanVos;
FixerItemModel({this.id, this.name, this.repairmanVos}); FixerItemModel({required this.id, this.name, this.repairmanVos});
FixerItemModel.fromJson(Map<String, dynamic> json) { FixerItemModel.fromJson(Map<String, dynamic> json) {
id = json['id']; id = json['id'];
name = json['name']; name = json['name'];
if (json['repairmanVos'] != null) { if (json['repairmanVos'] != null) {
repairmanVos = new List<RepairmanVos>(); repairmanVos = <RepairmanVos>[];
json['repairmanVos'].forEach((v) { json['repairmanVos'].forEach((v) {
repairmanVos.add(new RepairmanVos.fromJson(v)); repairmanVos!.add(new RepairmanVos.fromJson(v));
}); });
} else } else
repairmanVos = []; repairmanVos = [];
@ -22,16 +22,16 @@ class FixerItemModel {
data['id'] = this.id; data['id'] = this.id;
data['name'] = this.name; data['name'] = this.name;
if (this.repairmanVos != null) { if (this.repairmanVos != null) {
data['repairmanVos'] = this.repairmanVos.map((v) => v.toJson()).toList(); data['repairmanVos'] = this.repairmanVos!.map((v) => v.toJson()).toList();
} }
return data; return data;
} }
} }
class RepairmanVos { class RepairmanVos {
int id; int? id;
String name; String? name;
String tel; String? tel;
RepairmanVos({this.id, this.name, this.tel}); RepairmanVos({this.id, this.name, this.tel});

@ -22,26 +22,26 @@ import 'package:aku_community_manager/models/common/img_model.dart';
// * export (1.2.3.西4.)status=2 // * export (1.2.3.西4.)status=2
// * remarks 使status=3 // * remarks 使status=3
class GoodsOutDetailModel { class GoodsOutDetailModel {
int id; int? id;
///status (1.2.3.) ///status (1.2.3.)
int status; int? status;
String roomName; String? roomName;
String applicantName; String? applicantName;
///identity 123 ///identity 123
int identity; int? identity;
String applicantTel; String? applicantTel;
String expectedTime; String? expectedTime;
String articleOutName; String? articleOutName;
int weight; int? weight;
///approach 1.2. ///approach 1.2.
int approach; int? approach;
List<ImgModel> imgUrls; List<ImgModel>? imgUrls;
String reviewDate; String? reviewDate;
int export; int? export;
String remarks; String? remarks;
String get exportValue { String get exportValue {
switch (export) { switch (export) {
@ -58,8 +58,8 @@ class GoodsOutDetailModel {
} }
} }
DateTime get review => DateUtil.getDateTime(reviewDate); DateTime? get review => DateUtil.getDateTime(reviewDate!);
DateTime get expected => DateUtil.getDateTime(expectedTime); DateTime? get expected => DateUtil.getDateTime(expectedTime!);
///approach 1.2. ///approach 1.2.
String get approachValue { String get approachValue {
@ -125,7 +125,7 @@ class GoodsOutDetailModel {
} }
GoodsOutDetailModel( GoodsOutDetailModel(
{this.id, {required this.id,
this.status, this.status,
this.roomName, this.roomName,
this.applicantName, this.applicantName,
@ -152,9 +152,9 @@ class GoodsOutDetailModel {
weight = json['weight']; weight = json['weight'];
approach = json['approach']; approach = json['approach'];
if (json['imgUrls'] != null) { if (json['imgUrls'] != null) {
imgUrls = new List<ImgModel>(); imgUrls = <ImgModel>[];
json['imgUrls'].forEach((v) { json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v)); imgUrls!.add(new ImgModel.fromJson(v));
}); });
} else } else
imgUrls = []; imgUrls = [];
@ -176,7 +176,7 @@ class GoodsOutDetailModel {
data['weight'] = this.weight; data['weight'] = this.weight;
data['approach'] = this.approach; data['approach'] = this.approach;
if (this.imgUrls != null) { if (this.imgUrls != null) {
data['imgUrls'] = this.imgUrls.map((v) => v.toJson()).toList(); data['imgUrls'] = this.imgUrls!.map((v) => v.toJson()).toList();
} }
data['reviewDate'] = this.reviewDate; data['reviewDate'] = this.reviewDate;
data['export'] = this.export; data['export'] = this.export;

@ -12,19 +12,19 @@ import 'package:common_utils/common_utils.dart';
/// * articleOutName /// * articleOutName
/// * expectedTime /// * expectedTime
class GoodsOutItemModel { class GoodsOutItemModel {
int id; int? id;
///(1.2.3.) ///(1.2.3.)
int status; int? status;
String roomName; String? roomName;
String applicantName; String? applicantName;
/// 123 /// 123
int identity; int? identity;
String articleOutName; String? articleOutName;
String expectedTime; String? expectedTime;
DateTime get expected => DateUtil.getDateTime(expectedTime); DateTime? get expected => DateUtil.getDateTime(expectedTime!);
///(1.2.3.) ///(1.2.3.)
String get statusValue { String get statusValue {
@ -64,7 +64,7 @@ class GoodsOutItemModel {
} }
GoodsOutItemModel( GoodsOutItemModel(
{this.id, {required this.id,
this.status, this.status,
this.roomName, this.roomName,
this.applicantName, this.applicantName,

@ -2,17 +2,17 @@ import 'package:common_utils/common_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class GreenManageListModel { class GreenManageListModel {
int id; int? id;
String greenAreaName; String? greenAreaName;
String content; String? content;
String directorName; String? directorName;
int status; int? status;
String completeDate; String? completeDate;
String endDate; String? endDate;
String createDate; String? createDate;
GreenManageListModel( GreenManageListModel(
{this.id, {required this.id,
this.greenAreaName, this.greenAreaName,
this.content, this.content,
this.directorName, this.directorName,
@ -58,7 +58,7 @@ class GreenManageListModel {
} }
} }
Color get statusColor { Color? get statusColor {
switch (this.status) { switch (this.status) {
case 1: case 1:
return Color(0xFFFF8200); return Color(0xFFFF8200);
@ -72,11 +72,11 @@ class GreenManageListModel {
} }
String get createDateString => String get createDateString =>
DateUtil.formatDateStr(this.createDate, format: 'yy-MM-dd HH:mm'); DateUtil.formatDateStr(this.createDate!, format: 'yy-MM-dd HH:mm');
String get endDateString => String get endDateString =>
DateUtil.formatDateStr(this.endDate, format: 'yy-MM-dd HH:mm'); DateUtil.formatDateStr(this.endDate!, format: 'yy-MM-dd HH:mm');
String get completeDateString => String get completeDateString =>
DateUtil.formatDateStr(this.completeDate, format: 'yy-MM-dd HH:mm'); DateUtil.formatDateStr(this.completeDate!, format: 'yy-MM-dd HH:mm');
} }

@ -1,6 +1,6 @@
class HouseKeepingBuildingModel { class HouseKeepingBuildingModel {
int value; int? value;
String label; String? label;
HouseKeepingBuildingModel({this.value, this.label}); HouseKeepingBuildingModel({this.value, this.label});

@ -1,15 +1,15 @@
class HouseKeepingListModel { class HouseKeepingListModel {
int id; int? id;
String roomName; String? roomName;
int num; int? num;
String leaderName; String? leaderName;
String leaderTel; String? leaderTel;
String content; String? content;
String createName; String? createName;
String createDate; String? createDate;
HouseKeepingListModel( HouseKeepingListModel(
{this.id, {required this.id,
this.roomName, this.roomName,
this.num, this.num,
this.leaderName, this.leaderName,

@ -1,17 +1,17 @@
import 'package:common_utils/common_utils.dart'; import 'package:common_utils/common_utils.dart';
class HygienceListModel { class HygienceListModel {
int id; int? id;
String hygieneAreaName; String? hygieneAreaName;
String content; String? content;
String directorName; String? directorName;
int status; int? status;
String completeDate; String? completeDate;
String endDate; String? endDate;
String createDate; String? createDate;
HygienceListModel( HygienceListModel(
{this.id, {required this.id,
this.hygieneAreaName, this.hygieneAreaName,
this.content, this.content,
this.directorName, this.directorName,
@ -44,11 +44,11 @@ class HygienceListModel {
return data; return data;
} }
String get createDateString => String get createDateString =>
DateUtil.formatDateStr(this.createDate, format: 'yy-MM-dd HH:mm'); DateUtil.formatDateStr(this.createDate!, format: 'yy-MM-dd HH:mm');
String get endDateString => String get endDateString =>
DateUtil.formatDateStr(this.endDate, format: 'yy-MM-dd HH:mm'); DateUtil.formatDateStr(this.endDate!, format: 'yy-MM-dd HH:mm');
String get completeDateString => String get completeDateString =>
DateUtil.formatDateStr(this.completeDate, format: 'yy-MM-dd HH:mm'); DateUtil.formatDateStr(this.completeDate!, format: 'yy-MM-dd HH:mm');
} }

@ -2,18 +2,18 @@
import 'package:aku_community_manager/models/common/img_model.dart'; import 'package:aku_community_manager/models/common/img_model.dart';
class InspectionCheckDetialModel { class InspectionCheckDetialModel {
int id; int? id;
int executeId; int? executeId;
String code; String? code;
String name; String? name;
int type; int? type;
String completeDate; String? completeDate;
List<CheckFBIVoList> checkFBIVoList; List<CheckFBIVoList>? checkFBIVoList;
List<ImgModel> faceImg; List<ImgModel>? faceImg;
List<ImgModel> spaceImg; List<ImgModel>? spaceImg;
InspectionCheckDetialModel( InspectionCheckDetialModel(
{this.id, {required this.id,
this.executeId, this.executeId,
this.code, this.code,
this.name, this.name,
@ -31,21 +31,21 @@ class InspectionCheckDetialModel {
type = json['type']; type = json['type'];
completeDate = json['completeDate']; completeDate = json['completeDate'];
if (json['checkFBIVoList'] != null) { if (json['checkFBIVoList'] != null) {
checkFBIVoList = new List<CheckFBIVoList>(); checkFBIVoList = <CheckFBIVoList>[];
json['checkFBIVoList'].forEach((v) { json['checkFBIVoList'].forEach((v) {
checkFBIVoList.add(new CheckFBIVoList.fromJson(v)); checkFBIVoList!.add(new CheckFBIVoList.fromJson(v));
}); });
} }
if (json['faceImg'] != null) { if (json['faceImg'] != null) {
faceImg = new List<ImgModel>(); faceImg = <ImgModel>[];
json['faceImg'].forEach((v) { json['faceImg'].forEach((v) {
faceImg.add(new ImgModel.fromJson(v)); faceImg!.add(new ImgModel.fromJson(v));
}); });
} }
if (json['spaceImg'] != null) { if (json['spaceImg'] != null) {
spaceImg = new List<ImgModel>(); spaceImg = <ImgModel>[];
json['spaceImg'].forEach((v) { json['spaceImg'].forEach((v) {
spaceImg.add(new ImgModel.fromJson(v)); spaceImg!.add(new ImgModel.fromJson(v));
}); });
} }
} }
@ -60,13 +60,13 @@ class InspectionCheckDetialModel {
data['completeDate'] = this.completeDate; data['completeDate'] = this.completeDate;
if (this.checkFBIVoList != null) { if (this.checkFBIVoList != null) {
data['checkFBIVoList'] = data['checkFBIVoList'] =
this.checkFBIVoList.map((v) => v.toJson()).toList(); this.checkFBIVoList!.map((v) => v.toJson()).toList();
} }
if (this.faceImg != null) { if (this.faceImg != null) {
data['faceImg'] = this.faceImg.map((v) => v.toJson()).toList(); data['faceImg'] = this.faceImg!.map((v) => v.toJson()).toList();
} }
if (this.spaceImg != null) { if (this.spaceImg != null) {
data['spaceImg'] = this.spaceImg.map((v) => v.toJson()).toList(); data['spaceImg'] = this.spaceImg!.map((v) => v.toJson()).toList();
} }
return data; return data;
} }
@ -75,7 +75,7 @@ class InspectionCheckDetialModel {
switch (this.type) { switch (this.type) {
case 1: case 1:
return '巡检模式1'; return '巡检模式1';
break;
default: default:
return '未知'; return '未知';
} }
@ -83,10 +83,10 @@ class InspectionCheckDetialModel {
} }
class CheckFBIVoList { class CheckFBIVoList {
int id; int? id;
String name; String? name;
int status; int? status;
String remakes; String? remakes;
CheckFBIVoList({this.id, this.name, this.status, this.remakes}); CheckFBIVoList({this.id, this.name, this.status, this.remakes});
@ -108,11 +108,11 @@ class CheckFBIVoList {
} }
class FaceImg { class FaceImg {
String url; String? url;
int size; int? size;
int longs; int? longs;
int paragraph; int? paragraph;
int sort; int? sort;
FaceImg({this.url, this.size, this.longs, this.paragraph, this.sort}); FaceImg({this.url, this.size, this.longs, this.paragraph, this.sort});
@ -133,6 +133,4 @@ class FaceImg {
data['sort'] = this.sort; data['sort'] = this.sort;
return data; return data;
} }
} }

@ -1,17 +1,17 @@
class InspectionDetailModel { class InspectionDetailModel {
int id; int? id;
int inspectionPlanId; int? inspectionPlanId;
String code; String? code;
String name; String? name;
String beginDate; String? beginDate;
String endDate; String? endDate;
String actualBeginDate; String? actualBeginDate;
String actualEndDate; String? actualEndDate;
int sort; int? sort;
int status; int? status;
InspectionDetailModel( InspectionDetailModel(
{this.id, {required this.id,
this.inspectionPlanId, this.inspectionPlanId,
this.code, this.code,
this.name, this.name,

@ -1,16 +1,16 @@
class InspectionListModel { class InspectionListModel {
int id; int? id;
String code; String? code;
String name; String? name;
String beginDate; String? beginDate;
String endDate; String? endDate;
String actualBeginDate; String? actualBeginDate;
String actualEndDate; String? actualEndDate;
int status; int? status;
String inspectorName; String? inspectorName;
InspectionListModel( InspectionListModel(
{this.id, {required this.id,
this.code, this.code,
this.name, this.name,
this.beginDate, this.beginDate,

@ -1,10 +1,10 @@
class InspectionPointModel { class InspectionPointModel {
int id; int? id;
String name; String? name;
int checkNum; int? checkNum;
String completeDate; String? completeDate;
InspectionPointModel({this.id, this.name, this.checkNum, this.completeDate}); InspectionPointModel({required this.id, this.name, this.checkNum, this.completeDate});
InspectionPointModel.fromJson(Map<String, dynamic> json) { InspectionPointModel.fromJson(Map<String, dynamic> json) {
id = json['id']; id = json['id'];

@ -2,17 +2,17 @@
class InspectionPointSubmitModel { class InspectionPointSubmitModel {
int executePointId; int executePointId;
List<ExecuteCheckList> executeCheckList; List<ExecuteCheckList>? executeCheckList;
List<String> inspectionFaceImgPath; List<String?>? inspectionFaceImgPath;
List<String> inspectionSpaceImgPath; List<String?>? inspectionSpaceImgPath;
InspectionPointSubmitModel(this.executePointId, this.executeCheckList, InspectionPointSubmitModel(this.executePointId, this.executeCheckList,
{this.inspectionFaceImgPath, this.inspectionSpaceImgPath}); {this.inspectionFaceImgPath, this.inspectionSpaceImgPath});
Map<String, dynamic> executeCheckListToJson() { Map<String, dynamic>? executeCheckListToJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.executeCheckList != null) { if (this.executeCheckList != null) {
data["executeCheckList"] = data["executeCheckList"] =
this.executeCheckList.map((e) => e.toJson()).toList(); this.executeCheckList!.map((e) => e.toJson()).toList();
return data; return data;
} }
return null; return null;
@ -20,7 +20,7 @@ class InspectionPointSubmitModel {
} }
class ExecuteCheckList { class ExecuteCheckList {
int id; int? id;
int status; int status;
String remarkes; String remarkes;
ExecuteCheckList(this.id, this.status, this.remarkes); ExecuteCheckList(this.id, this.status, this.remarkes);

@ -1,12 +1,12 @@
class InspectionQRCodeModel { class InspectionQRCodeModel {
int id; int? id;
String code; String? code;
String name; String? name;
int type; int? type;
List<CheckVoList> checkVoList; List<CheckVoList>? checkVoList;
InspectionQRCodeModel( InspectionQRCodeModel(
{this.id, this.code, this.name, this.type, this.checkVoList}); {required this.id, this.code, this.name, this.type, this.checkVoList});
InspectionQRCodeModel.fromJson(Map<String, dynamic> json) { InspectionQRCodeModel.fromJson(Map<String, dynamic> json) {
id = json['id']; id = json['id'];
@ -14,9 +14,9 @@ class InspectionQRCodeModel {
name = json['name']; name = json['name'];
type = json['type']; type = json['type'];
if (json['checkVoList'] != null) { if (json['checkVoList'] != null) {
checkVoList = new List<CheckVoList>(); checkVoList = <CheckVoList>[];
json['checkVoList'].forEach((v) { json['checkVoList'].forEach((v) {
checkVoList.add(new CheckVoList.fromJson(v)); checkVoList!.add(new CheckVoList.fromJson(v));
}); });
} }
} }
@ -28,15 +28,16 @@ class InspectionQRCodeModel {
data['name'] = this.name; data['name'] = this.name;
data['type'] = this.type; data['type'] = this.type;
if (this.checkVoList != null) { if (this.checkVoList != null) {
data['checkVoList'] = this.checkVoList.map((v) => v.toJson()).toList(); data['checkVoList'] = this.checkVoList!.map((v) => v.toJson()).toList();
} }
return data; return data;
} }
String get inspectionPattern { String get inspectionPattern {
switch (this.type) { switch (this.type) {
case 1: case 1:
return '巡检模式1'; return '巡检模式1';
break;
default: default:
return '未知'; return '未知';
} }
@ -44,8 +45,8 @@ class InspectionQRCodeModel {
} }
class CheckVoList { class CheckVoList {
int id; int? id;
String name; String? name;
CheckVoList({this.id, this.name}); CheckVoList({this.id, this.name});

@ -2,19 +2,19 @@ import 'package:aku_community_manager/style/app_style.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class InterviewListModel { class InterviewListModel {
int id; int? id;
String name; String? name;
String tel; String? tel;
String content; String? content;
int status; int? status;
String interviewDate; String? interviewDate;
String feedbackContent; String? feedbackContent;
String feedbackDate; String? feedbackDate;
String createName; String? createName;
String createDate; String? createDate;
InterviewListModel( InterviewListModel(
{this.id, {required this.id,
this.name, this.name,
this.tel, this.tel,
this.content, this.content,

@ -1,8 +1,8 @@
class ItemNumModel { class ItemNumModel {
int unProcessedNum; int? unProcessedNum;
int processedNum; int? processedNum;
int processingNum; int? processingNum;
int allNum; int? allNum;
ItemNumModel( ItemNumModel(
{this.unProcessedNum, {this.unProcessedNum,

@ -1,16 +1,16 @@
class KeyMangeAllKeyModel { class KeyMangeAllKeyModel {
int id; int? id;
String code; String? code;
String facilityName; String? facilityName;
int totalNum; int? totalNum;
int loanableNum; int? loanableNum;
String correspondingPosition; String? correspondingPosition;
String storageLocation; String? storageLocation;
int status; int? status;
String createDate; String? createDate;
KeyMangeAllKeyModel( KeyMangeAllKeyModel(
{this.id, {required this.id,
this.code, this.code,
this.facilityName, this.facilityName,
this.totalNum, this.totalNum,

@ -1,17 +1,17 @@
import 'package:common_utils/common_utils.dart'; import 'package:common_utils/common_utils.dart';
class KeyManageRecordListModel { class KeyManageRecordListModel {
int id; int? id;
String code; String? code;
int status; int? status;
String facilityName; String? facilityName;
String correspondingPosition; String? correspondingPosition;
String storageLocation; String? storageLocation;
String auditDate; String? auditDate;
String reason; String? reason;
KeyManageRecordListModel( KeyManageRecordListModel(
{this.id, {required this.id,
this.code, this.code,
this.status, this.status,
this.facilityName, this.facilityName,
@ -44,5 +44,5 @@ class KeyManageRecordListModel {
return data; return data;
} }
String get auditDateString => DateUtil.formatDateStr(this.auditDate,format: 'yyyy-MM-dd HH:mm'); String get auditDateString => DateUtil.formatDateStr(this.auditDate!,format: 'yyyy-MM-dd HH:mm');
} }

@ -3,28 +3,28 @@ import 'package:common_utils/common_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class NewRenovationListModel { class NewRenovationListModel {
int id; int? id;
String roomName; String? roomName;
int status; int? status;
String constructionUnit; String? constructionUnit;
String director; String? director;
String directorTel; String? directorTel;
String expectedBegin; String? expectedBegin;
String expectedEnd; String? expectedEnd;
String actualBegin; String? actualBegin;
String actualEnd; String? actualEnd;
String rejectReason; String? rejectReason;
String reviewerName; String? reviewerName;
String auditDate; String? auditDate;
String trackerName; String? trackerName;
String applicationCheckDate; String? applicationCheckDate;
int isQualified; int? isQualified;
String createName; String? createName;
String createDate; String? createDate;
List<CheckVoList> checkVoList; List<CheckVoList>? checkVoList;
NewRenovationListModel( NewRenovationListModel(
{this.id, {required this.id,
this.roomName, this.roomName,
this.status, this.status,
this.constructionUnit, this.constructionUnit,
@ -64,9 +64,9 @@ class NewRenovationListModel {
createName = json['createName']; createName = json['createName'];
createDate = json['createDate']; createDate = json['createDate'];
if (json['checkVoList'] != null) { if (json['checkVoList'] != null) {
checkVoList = new List<CheckVoList>(); checkVoList = <CheckVoList>[];
json['checkVoList'].forEach((v) { json['checkVoList'].forEach((v) {
checkVoList.add(new CheckVoList.fromJson(v)); checkVoList!.add(new CheckVoList.fromJson(v));
}); });
} }
} }
@ -92,16 +92,16 @@ class NewRenovationListModel {
data['createName'] = this.createName; data['createName'] = this.createName;
data['createDate'] = this.createDate; data['createDate'] = this.createDate;
if (this.checkVoList != null) { if (this.checkVoList != null) {
data['checkVoList'] = this.checkVoList.map((v) => v.toJson()).toList(); data['checkVoList'] = this.checkVoList!.map((v) => v.toJson()).toList();
} }
return data; return data;
} }
String get expectBginString => String get expectBginString =>
DateUtil.formatDateStr(this.expectedBegin, format: 'yyyy-MM-dd HH:mm'); DateUtil.formatDateStr(this.expectedBegin!, format: 'yyyy-MM-dd HH:mm');
String get expectEndString => String get expectEndString =>
DateUtil.formatDateStr(this.expectedEnd, format: 'yyyy-MM-dd HH:mm'); DateUtil.formatDateStr(this.expectedEnd!, format: 'yyyy-MM-dd HH:mm');
String get actualBginString => DateUtil.formatDateStr(this.actualBegin ?? '', String get actualBginString => DateUtil.formatDateStr(this.actualBegin ?? '',
format: 'yyyy-MM-dd HH:mm'); format: 'yyyy-MM-dd HH:mm');
@ -109,7 +109,7 @@ class NewRenovationListModel {
String get actualEndString => String get actualEndString =>
DateUtil.formatDateStr(this.actualEnd ?? '', format: 'yyyy-MM-dd HH:mm'); DateUtil.formatDateStr(this.actualEnd ?? '', format: 'yyyy-MM-dd HH:mm');
String get expectSlot => String get expectSlot =>
'${expectBginString}-${DateUtil.formatDateStr(this.expectedEnd, format: 'HH:mm')}'; '${expectBginString}-${DateUtil.formatDateStr(this.expectedEnd!, format: 'HH:mm')}';
String get actualSlot => String get actualSlot =>
'${actualBginString}-${DateUtil.formatDateStr(this.actualEnd ?? '', format: 'HH:mm')}'; '${actualBginString}-${DateUtil.formatDateStr(this.actualEnd ?? '', format: 'HH:mm')}';
@ -173,12 +173,12 @@ class NewRenovationListModel {
} }
class CheckVoList { class CheckVoList {
int id; int? id;
int decorationNewId; int? decorationNewId;
String detail; String? detail;
int isQualified; int? isQualified;
String createName; String? createName;
String createDate; String? createDate;
CheckVoList( CheckVoList(
{this.id, {this.id,

@ -1,16 +1,16 @@
class PackageManageListModel { class PackageManageListModel {
int id; int? id;
String code; String? code;
String addresseeName; String? addresseeName;
String addresseeTel; String? addresseeTel;
String address; String? address;
String placePosition; String? placePosition;
int status; int? status;
String receiveDate; String? receiveDate;
String createDate; String? createDate;
PackageManageListModel( PackageManageListModel(
{this.id, {required this.id,
this.code, this.code,
this.addresseeName, this.addresseeName,
this.addresseeTel, this.addresseeTel,

@ -1,15 +1,15 @@
import 'package:common_utils/common_utils.dart'; import 'package:common_utils/common_utils.dart';
class RulesManageListModel { class RulesManageListModel {
int id; int? id;
String title; String? title;
String content; String? content;
String fileDocUrl; String? fileDocUrl;
String fileDocName; String? fileDocName;
String releaseDate; String? releaseDate;
RulesManageListModel( RulesManageListModel(
{this.id, {required this.id,
this.title, this.title,
this.content, this.content,
this.fileDocUrl, this.fileDocUrl,
@ -36,5 +36,5 @@ class RulesManageListModel {
return data; return data;
} }
String get releaseDateString => DateUtil.formatDateStr(this.releaseDate); String get releaseDateString => DateUtil.formatDateStr(this.releaseDate!);
} }

@ -2,21 +2,21 @@
import 'package:common_utils/common_utils.dart'; import 'package:common_utils/common_utils.dart';
class VisitorItemModel { class VisitorItemModel {
int id; int? id;
String roomName; String? roomName;
String name; String? name;
int isDrive; int? isDrive;
String carNum; String? carNum;
String effectiveTime; String? effectiveTime;
String visitDate; String? visitDate;
int visitorStatus; int? visitorStatus;
DateTime get effective => DateUtil.getDateTime(effectiveTime); DateTime? get effective => DateUtil.getDateTime(effectiveTime!);
DateTime get visit => DateTime? get visit =>
visitDate == null ? null : DateUtil.getDateTime(visitDate); visitDate == null ? null : DateUtil.getDateTime(visitDate!);
VisitorItemModel( VisitorItemModel(
{this.id, {required this.id,
this.roomName, this.roomName,
this.name, this.name,
this.isDrive, this.isDrive,

@ -1,9 +1,9 @@
class CommentMessageDetailModel { class CommentMessageDetailModel {
int id; int? id;
String name; String? name;
int level; int? level;
CommentMessageDetailModel({this.id, this.name, this.level}); CommentMessageDetailModel({required this.id, this.name, this.level});
CommentMessageDetailModel.fromJson(Map<String, dynamic> json) { CommentMessageDetailModel.fromJson(Map<String, dynamic> json) {
id = json['id']; id = json['id'];

@ -1,9 +1,9 @@
class CommentMessageItemModel { class CommentMessageItemModel {
int id; int? id;
int type; int? type;
int relationId; int? relationId;
CommentMessageItemModel({this.id, this.type, this.relationId}); CommentMessageItemModel({required this.id, this.type, this.relationId});
CommentMessageItemModel.fromJson(Map<String, dynamic> json) { CommentMessageItemModel.fromJson(Map<String, dynamic> json) {
id = json['id']; id = json['id'];

@ -1,10 +1,10 @@
class SystemMessageDetailModel { class SystemMessageDetailModel {
int id; int? id;
String name; String? name;
String tel; String? tel;
int type; int? type;
SystemMessageDetailModel({this.id, this.name, this.tel, this.type}); SystemMessageDetailModel({required this.id, this.name, this.tel, this.type});
SystemMessageDetailModel.fromJson(Map<String, dynamic> json) { SystemMessageDetailModel.fromJson(Map<String, dynamic> json) {
id = json['id']; id = json['id'];

@ -2,12 +2,12 @@
import 'package:common_utils/common_utils.dart'; import 'package:common_utils/common_utils.dart';
class SystemMessageItemModel { class SystemMessageItemModel {
int id; int? id;
int type; int? type;
int relationId; int? relationId;
String sendDate; String? sendDate;
SystemMessageItemModel({this.id, this.type, this.relationId, this.sendDate}); SystemMessageItemModel({required this.id, this.type, this.relationId, this.sendDate});
SystemMessageItemModel.fromJson(Map<String, dynamic> json) { SystemMessageItemModel.fromJson(Map<String, dynamic> json) {
id = json['id']; id = json['id'];
@ -26,5 +26,5 @@ class SystemMessageItemModel {
} }
String get sendDateString => String get sendDateString =>
DateUtil.formatDateStr(this.sendDate, format: 'yyyy-MM-dd HH:mm'); DateUtil.formatDateStr(this.sendDate!, format: 'yyyy-MM-dd HH:mm');
} }

@ -4,7 +4,7 @@ import 'package:aku_community_manager/models/todo_bussiness/todo_outdoor_model.d
class ToDoModel { class ToDoModel {
dynamic dynamicModel; dynamic dynamicModel;
int type; int? type;
ToDoModel({this.dynamicModel, this.type}); ToDoModel({this.dynamicModel, this.type});

@ -2,17 +2,17 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class ToDoOutDoorModel { class ToDoOutDoorModel {
int id; int? id;
int status; int? status;
String roomName; String? roomName;
String applicantName; String? applicantName;
int identity; int? identity;
String articleOutName; String? articleOutName;
String expectedTime; String? expectedTime;
String applicantDate; String? applicantDate;
ToDoOutDoorModel( ToDoOutDoorModel(
{this.id, {required this.id,
this.status, this.status,
this.roomName, this.roomName,
this.applicantName, this.applicantName,

@ -1,31 +1,31 @@
class UserInfoModel { class UserInfoModel {
int id; int? id;
String roleId; String? roleId;
String nickName; String? nickName;
List<int> jurisdiction; List<int>? jurisdiction;
///() ///()
bool get canSendTicket => jurisdiction.contains(52); bool get canSendTicket => jurisdiction!.contains(52);
/// ///
bool get canPickUpTicket => jurisdiction.contains(53); bool get canPickUpTicket => jurisdiction!.contains(53);
/// ///
bool get canPass => jurisdiction.contains(55); bool get canPass => jurisdiction!.contains(55);
/// ///
bool get canOperation => jurisdiction.contains(57); bool get canOperation => jurisdiction!.contains(57);
/// ///
bool get canDecorationDispatch => jurisdiction.contains(59); bool get canDecorationDispatch => jurisdiction!.contains(59);
/// ///
bool get canDecorationTrack => jurisdiction.contains(60); bool get canDecorationTrack => jurisdiction!.contains(60);
/// ///
bool get manager => canSendTicket && canPickUpTicket; bool get manager => canSendTicket && canPickUpTicket;
UserInfoModel({this.id, this.roleId, this.nickName, this.jurisdiction}); UserInfoModel({required this.id, this.roleId, this.nickName, this.jurisdiction});
UserInfoModel.fromJson(Map<String, dynamic> json) { UserInfoModel.fromJson(Map<String, dynamic> json) {
id = json['id']; id = json['id'];

@ -2,26 +2,26 @@
import 'package:aku_community_manager/models/common/img_model.dart'; import 'package:aku_community_manager/models/common/img_model.dart';
class UserProfileModel { class UserProfileModel {
int id; int? id;
List<ImgModel> imgUrls; List<ImgModel>? imgUrls;
String nickName; String? nickName;
String tel; String? tel;
UserProfileModel({this.id, this.imgUrls, this.nickName, this.tel}); UserProfileModel({required this.id, this.imgUrls, this.nickName, this.tel});
ImgModel get firstImg { ImgModel? get firstImg {
if (imgUrls.isEmpty) if (imgUrls!.isEmpty)
return null; return null;
else else
return imgUrls.first; return imgUrls!.first;
} }
UserProfileModel.fromJson(Map<String, dynamic> json) { UserProfileModel.fromJson(Map<String, dynamic> json) {
id = json['id']; id = json['id'];
if (json['imgUrls'] != null) { if (json['imgUrls'] != null) {
imgUrls = new List<ImgModel>(); imgUrls = <ImgModel>[];
json['imgUrls'].forEach((v) { json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v)); imgUrls!.add(new ImgModel.fromJson(v));
}); });
} }
nickName = json['nickName']; nickName = json['nickName'];
@ -32,7 +32,7 @@ class UserProfileModel {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id; data['id'] = this.id;
if (this.imgUrls != null) { if (this.imgUrls != null) {
data['imgUrls'] = this.imgUrls.map((v) => v.toJson()).toList(); data['imgUrls'] = this.imgUrls!.map((v) => v.toJson()).toList();
} else } else
imgUrls = []; imgUrls = [];
data['nickName'] = this.nickName; data['nickName'] = this.nickName;

@ -46,9 +46,9 @@ class AppProvider extends ChangeNotifier {
notifyListeners(); notifyListeners();
} }
Map<String, Object> _location; Map<String, Object>? _location;
Map<String, Object> get location => _location; Map<String, Object>? get location => _location;
AMapFlutterLocation _flutterLocation; late AMapFlutterLocation _flutterLocation;
startLocation() { startLocation() {
_flutterLocation = AMapFlutterLocation(); _flutterLocation = AMapFlutterLocation();
@ -75,24 +75,24 @@ class AppProvider extends ChangeNotifier {
int get commentMessage => _commentMessage; int get commentMessage => _commentMessage;
updateMessage() async { updateMessage() async {
Response response = await NetUtil().dio.get(API.message.messageCenter); Response response = await NetUtil().dio!.get(API.message.messageCenter);
if (response == null || response.data == null) return; if (response.data == null) return;
_sysMessage = response.data['sysCount'] ?? 0; _sysMessage = response.data['sysCount'] ?? 0;
_commentMessage = response.data['commentCount'] ?? 0; _commentMessage = response.data['commentCount'] ?? 0;
notifyListeners(); notifyListeners();
} }
WORKCLOCK _clockStatus = WORKCLOCK.NOTIN; WORKCLOCK _clockStatus = WORKCLOCK.NOTIN;
DateTime _clockInTime; DateTime? _clockInTime;
DateTime _clockOutTime; DateTime? _clockOutTime;
DateTime _dateRecord; DateTime? _dateRecord;
WORKCLOCK get clockStatus => _clockStatus; WORKCLOCK get clockStatus => _clockStatus;
DateTime get clockInTime => _clockInTime; DateTime? get clockInTime => _clockInTime;
DateTime get clockOutTime => _clockOutTime; DateTime? get clockOutTime => _clockOutTime;
initClock() { initClock() {
if (_dateRecord == null || if (_dateRecord == null ||
(DateUtil.isToday(_dateRecord.millisecondsSinceEpoch.abs()))) { (DateUtil.isToday(_dateRecord!.millisecondsSinceEpoch.abs()))) {
resetClock(); resetClock();
} }

@ -31,8 +31,8 @@ class UserProvider extends ChangeNotifier {
Future setLogin(int token) async { Future setLogin(int token) async {
_isLogin = true; _isLogin = true;
NetUtil().auth(token); NetUtil().auth(token);
await HiveStore.appBox.put('token', token); await HiveStore.appBox!.put('token', token);
await HiveStore.appBox.put('login', true); await HiveStore.appBox!.put('login', true);
_profileModel = await updateProfile(); _profileModel = await updateProfile();
_infoModel = await updateUserInfo(); _infoModel = await updateUserInfo();
// await setCurrentHouse((_userDetailModel?.estateNames?.isEmpty ?? true) // await setCurrentHouse((_userDetailModel?.estateNames?.isEmpty ?? true)
@ -41,26 +41,26 @@ class UserProvider extends ChangeNotifier {
notifyListeners(); notifyListeners();
} }
UserProfileModel _profileModel; UserProfileModel? _profileModel;
UserProfileModel get profileModel => _profileModel; UserProfileModel? get profileModel => _profileModel;
UserInfoModel _infoModel; UserInfoModel? _infoModel;
UserInfoModel get infoModel => _infoModel; UserInfoModel? get infoModel => _infoModel;
///profile ///profile
Future<UserProfileModel> updateProfile() async { Future<UserProfileModel?> updateProfile() async {
final appProvider = Provider.of<AppProvider>(Get.context, listen: false); final appProvider = Provider.of<AppProvider>(Get.context!, listen: false);
appProvider.updateMessage(); appProvider.updateMessage();
BaseModel model = await NetUtil().get(API.user.profile); BaseModel? model = await NetUtil().get(API.user.profile);
if (model == null) if (model.data == null)
return null; return null;
else else
return UserProfileModel.fromJson(model.data); return UserProfileModel.fromJson(model.data);
} }
Future<UserInfoModel> updateUserInfo() async { Future<UserInfoModel?> updateUserInfo() async {
BaseModel model = await NetUtil().get(API.user.info); BaseModel? model = await NetUtil().get(API.user.info);
if (model == null) if (model.data == null)
return null; return null;
else { else {
var userModel = UserInfoModel.fromJson(model.data); var userModel = UserInfoModel.fromJson(model.data);
@ -74,8 +74,8 @@ class UserProvider extends ChangeNotifier {
await NetUtil().get(API.auth.logout, showMessage: true); await NetUtil().get(API.auth.logout, showMessage: true);
NetUtil().logout(); NetUtil().logout();
_isLogin = false; _isLogin = false;
await HiveStore.appBox.delete('token'); await HiveStore.appBox!.delete('token');
await HiveStore.appBox.put('login', false); await HiveStore.appBox!.put('login', false);
notifyListeners(); notifyListeners();
} }
@ -96,7 +96,7 @@ class UserProvider extends ChangeNotifier {
/// ///
setNickName(String name) { setNickName(String name) {
_infoModel.nickName = name; _infoModel!.nickName = name;
notifyListeners(); notifyListeners();
} }
@ -120,7 +120,7 @@ class UserProvider extends ChangeNotifier {
/// ///
setTel(String tel) { setTel(String tel) {
_profileModel.tel = tel; _profileModel!.tel = tel;
notifyListeners(); notifyListeners();
} }
} }

@ -63,7 +63,7 @@ class AppTheme {
unselectedLabelStyle: TextStyle(), unselectedLabelStyle: TextStyle(),
), ),
radioTheme: RadioThemeData( radioTheme: RadioThemeData(
fillColor: MaterialStateProperty.resolveWith<Color>((states) { fillColor: MaterialStateProperty.resolveWith<Color?>((states) {
if (states.contains(MaterialState.selected)) return Color(0xFFFFD000); if (states.contains(MaterialState.selected)) return Color(0xFFFFD000);
return null; return null;
}), }),

@ -5,13 +5,13 @@ import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
class AkuDivider extends StatelessWidget { class AkuDivider extends StatelessWidget {
final double thickness; final double? thickness;
final bool isHorizontal; final bool? isHorizontal;
final double indent; final double? indent;
final double endIndent; final double? endIndent;
final Color color; final Color? color;
const AkuDivider( const AkuDivider(
{Key key, {Key? key,
this.isHorizontal, this.isHorizontal,
this.indent, this.indent,
this.endIndent, this.endIndent,
@ -19,19 +19,19 @@ class AkuDivider extends StatelessWidget {
this.color}) this.color})
: super(key: key); : super(key: key);
AkuDivider.horizontal({Key key, this.indent, this.endIndent}) AkuDivider.horizontal({Key? key, this.indent, this.endIndent})
: isHorizontal = true, : isHorizontal = true,
thickness = 1.w, thickness = 1.w,
color = Color(0xFFE8E8E8), color = Color(0xFFE8E8E8),
super(key: key); super(key: key);
AkuDivider.vertical({Key key, this.indent, this.endIndent}) AkuDivider.vertical({Key? key, this.indent, this.endIndent})
: isHorizontal = false, : isHorizontal = false,
thickness = 1.w, thickness = 1.w,
color = Color(0xFFE8E8E8), color = Color(0xFFE8E8E8),
super(key: key); super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return isHorizontal return isHorizontal!
? Divider( ? Divider(
height: 0, height: 0,
thickness: this.thickness ?? 1.w, thickness: this.thickness ?? 1.w,

@ -5,7 +5,7 @@ class AkuMap {
switch (status) { switch (status) {
case 1: case 1:
return '待派单'; return '待派单';
break;
case 2: case 2:
return '已派单'; return '已派单';
case 3: case 3:
@ -63,7 +63,7 @@ class AkuMap {
static Map<int, String> fixAreaType = {1: '公区维修', 2: '家庭维修'}; static Map<int, String> fixAreaType = {1: '公区维修', 2: '家庭维修'};
///- ///-
static String operationType(int operationType) { static String operationType(int? operationType) {
switch (operationType) { switch (operationType) {
case 1: case 1:
return '提交保修'; return '提交保修';
@ -83,7 +83,7 @@ class AkuMap {
return '作废'; return '作废';
case 9: case 9:
return '取消'; return '取消';
break;
case 10: case 10:
return '改派'; return '改派';
case 11: case 11:

@ -6,7 +6,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart'; import 'package:velocity_x/velocity_x.dart';
extension WidgetListExt on List<Widget> { extension WidgetListExt on List<Widget> {
List<Widget> sepWidget({Widget separate}) { List<Widget> sepWidget({Widget? separate}) {
if (this.isEmpty) return []; if (this.isEmpty) return [];
return List.generate(this.length * 2 - 1, (index) { return List.generate(this.length * 2 - 1, (index) {
if (index.isEven) if (index.isEven)

@ -10,11 +10,11 @@ import 'package:aku_community_manager/provider/user_provider.dart';
class UserTool { class UserTool {
/// ///
static AppProvider get appProvider => static AppProvider get appProvider =>
Provider.of<AppProvider>(Get.context, listen: false); Provider.of<AppProvider>(Get.context!, listen: false);
/// ///
static UserProvider get userProvider => static UserProvider get userProvider =>
Provider.of<UserProvider>(Get.context, listen: false); Provider.of<UserProvider>(Get.context!, listen: false);
UserTool(); UserTool();
} }

@ -7,7 +7,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
///线 ///线
class GridientDiveder { class GridientDiveder {
final bool isReverse; // final bool isReverse; //
const GridientDiveder({Key key, this.isReverse = false}); const GridientDiveder({Key? key, this.isReverse = false});
Widget verticalDivider(double height) { Widget verticalDivider(double height) {
return Container( return Container(
width: 1.w, width: 1.w,

@ -4,7 +4,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
class AboutPage extends StatelessWidget { class AboutPage extends StatelessWidget {
const AboutPage({Key key}) : super(key: key); const AboutPage({Key? key}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

@ -8,7 +8,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart'; import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
class AgreementPage extends StatelessWidget { class AgreementPage extends StatelessWidget {
const AgreementPage({Key key}) : super(key: key); const AgreementPage({Key? key}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

@ -8,7 +8,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart'; import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
class PrivacyPage extends StatelessWidget { class PrivacyPage extends StatelessWidget {
const PrivacyPage({Key key}) : super(key: key); const PrivacyPage({Key? key}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

@ -24,7 +24,7 @@ import 'package:aku_community_manager/utils/network/base_model.dart';
import 'package:aku_community_manager/utils/network/net_util.dart'; import 'package:aku_community_manager/utils/network/net_util.dart';
class AllAnouncement extends StatefulWidget { class AllAnouncement extends StatefulWidget {
AllAnouncement({Key key}) : super(key: key); AllAnouncement({Key? key}) : super(key: key);
@override @override
AllAnouncementState createState() => AllAnouncementState(); AllAnouncementState createState() => AllAnouncementState();
@ -33,7 +33,7 @@ class AllAnouncement extends StatefulWidget {
class AllAnouncementState extends State<AllAnouncement> { class AllAnouncementState extends State<AllAnouncement> {
EasyRefreshController _refreshController = EasyRefreshController(); EasyRefreshController _refreshController = EasyRefreshController();
static Widget anounceCard(AnnouncementListModel model, {String body}) { static Widget anounceCard(AnnouncementListModel model, {String? body}) {
return Column( return Column(
children: [ children: [
AkuButton( AkuButton(
@ -84,7 +84,7 @@ class AllAnouncementState extends State<AllAnouncement> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
model.title, model.title!,
style: AppStyle().primaryStyle, style: AppStyle().primaryStyle,
), ),
SizedBox(height: 12.w), SizedBox(height: 12.w),
@ -95,7 +95,7 @@ class AllAnouncementState extends State<AllAnouncement> {
width: 24.w, width: 24.w,
), ),
Text( Text(
model.releaseTime, model.releaseTime!,
style: AppStyle().minorStyle, style: AppStyle().minorStyle,
), ),
Spacer(), Spacer(),
@ -115,28 +115,28 @@ class AllAnouncementState extends State<AllAnouncement> {
); );
} }
Widget _anouncementList( // Widget _anouncementList(
String date, // String date,
List<AnnouncementListModel> cards, // List<AnnouncementListModel> cards,
) { // ) {
return Column( // return Column(
children: [ // children: [
Container( // Container(
alignment: Alignment.center, // alignment: Alignment.center,
width: double.infinity, // width: double.infinity,
height: 48.w + 33.w, // height: 48.w + 33.w,
child: Text( // child: Text(
date, // date,
style: AppStyle().minorStyle, // style: AppStyle().minorStyle,
)), // )),
...(cards // ...(cards
.map( // .map(
(e) => Container(), // (e) => Container(),
) // )
.toList()), // .toList()),
], // ],
); // );
} // }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -146,7 +146,7 @@ class AllAnouncementState extends State<AllAnouncement> {
path: API.message.announcementList, path: API.message.announcementList,
controller: _refreshController, controller: _refreshController,
convert: (models) { convert: (models) {
return models.tableList return models.tableList!
.map((e) => AnnouncementListModel.fromJson(e)) .map((e) => AnnouncementListModel.fromJson(e))
.toList(); .toList();
}, },

@ -12,8 +12,8 @@ import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
class AnouncementDetails extends StatelessWidget { class AnouncementDetails extends StatelessWidget {
final AnnouncementDetailModel model; final AnnouncementDetailModel model;
const AnouncementDetails({ const AnouncementDetails({
Key key, Key? key,
@required this.model, /*required*/ required this.model,
}) : super(key: key); }) : super(key: key);
@override @override
@ -30,13 +30,13 @@ class AnouncementDetails extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Text( Text(
model.title, model.title!,
style: AppStyle().barTitleStyle, style: AppStyle().barTitleStyle,
), ),
SizedBox( SizedBox(
height: 16.w, height: 16.w,
), ),
Text(model.content, Text(model.content!,
style: TextStyle( style: TextStyle(
color: AppStyle.primaryTextColor, fontSize: 28.sp)), color: AppStyle.primaryTextColor, fontSize: 28.sp)),
SizedBox( SizedBox(
@ -52,7 +52,7 @@ class AnouncementDetails extends StatelessWidget {
SizedBox( SizedBox(
height: 4.w, height: 4.w,
), ),
Text(model.releaseTime, style: AppStyle().primaryStyle), Text(model.releaseTime!, style: AppStyle().primaryStyle),
], ],
), ),
SizedBox( SizedBox(

@ -44,7 +44,7 @@ class AppApplication {
} }
class ApplicationPage extends StatefulWidget { class ApplicationPage extends StatefulWidget {
ApplicationPage({Key key}) : super(key: key); ApplicationPage({Key? key}) : super(key: key);
@override @override
_ApplicationPageState createState() => _ApplicationPageState(); _ApplicationPageState createState() => _ApplicationPageState();

@ -5,7 +5,7 @@ import 'package:flutter/material.dart';
import 'package:aku_community_manager/tools/screen_tool.dart'; import 'package:aku_community_manager/tools/screen_tool.dart';
class BusinessCard extends StatefulWidget { class BusinessCard extends StatefulWidget {
BusinessCard({Key key}) : super(key: key); BusinessCard({Key? key}) : super(key: key);
@override @override
_BusinessCardState createState() => _BusinessCardState(); _BusinessCardState createState() => _BusinessCardState();

@ -11,7 +11,7 @@ import 'package:aku_community_manager/ui/widgets/inner/aku_tab_bar.dart';
class BusinessPage extends StatefulWidget { class BusinessPage extends StatefulWidget {
///DEFAULT IS 0 ///DEFAULT IS 0
final int initIndex; final int initIndex;
BusinessPage({Key key, this.initIndex = 0}) : super(key: key); BusinessPage({Key? key, this.initIndex = 0}) : super(key: key);
@override @override
_BusinessPageState createState() => _BusinessPageState(); _BusinessPageState createState() => _BusinessPageState();
@ -20,7 +20,7 @@ class BusinessPage extends StatefulWidget {
class _BusinessPageState extends State<BusinessPage> class _BusinessPageState extends State<BusinessPage>
with TickerProviderStateMixin { with TickerProviderStateMixin {
List<String> _tabs = ['待处理', '处理中', '已处理', '全部']; List<String> _tabs = ['待处理', '处理中', '已处理', '全部'];
TabController _tabController; late TabController _tabController;
@override @override
void initState() { void initState() {
@ -34,7 +34,7 @@ class _BusinessPageState extends State<BusinessPage>
@override @override
void dispose() { void dispose() {
_tabController?.dispose(); _tabController.dispose();
super.dispose(); super.dispose();
} }
@ -61,7 +61,7 @@ class _BusinessPageState extends State<BusinessPage>
); );
} }
Widget _buildTabPage(int status) { // Widget _buildTabPage(int status) {
// return ListView.builder( // return ListView.builder(
// padding: EdgeInsets.symmetric(horizontal: 32.w), // padding: EdgeInsets.symmetric(horizontal: 32.w),
// itemBuilder: (context, index) { // itemBuilder: (context, index) {
@ -75,8 +75,8 @@ class _BusinessPageState extends State<BusinessPage>
// }, // },
// itemCount: list.length, // itemCount: list.length,
// ); // );
return BussinessView( // return BussinessView(
backlogStatus: status, // backlogStatus: status,
); // );
} // }
} }

@ -15,7 +15,7 @@ import 'package:aku_community_manager/ui/sub_pages/business_and_fix/business_fix
class BussinessView extends StatefulWidget { class BussinessView extends StatefulWidget {
final int backlogStatus; final int backlogStatus;
BussinessView({Key key, this.backlogStatus}) : super(key: key); BussinessView({Key? key, required this.backlogStatus}) : super(key: key);
@override @override
_BussinessViewState createState() => _BussinessViewState(); _BussinessViewState createState() => _BussinessViewState();
@ -23,9 +23,9 @@ class BussinessView extends StatefulWidget {
class _BussinessViewState extends State<BussinessView> class _BussinessViewState extends State<BussinessView>
with AutomaticKeepAliveClientMixin { with AutomaticKeepAliveClientMixin {
List _modelList; List _modelList = [];
EasyRefreshController _refreshController; late EasyRefreshController _refreshController;
ScrollController _scrollController; late ScrollController _scrollController;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@ -35,8 +35,8 @@ class _BussinessViewState extends State<BussinessView>
@override @override
void dispose() { void dispose() {
_refreshController?.dispose(); _refreshController.dispose();
_scrollController?.dispose(); _scrollController.dispose();
super.dispose(); super.dispose();
} }
@ -54,12 +54,16 @@ class _BussinessViewState extends State<BussinessView>
_modelList = dataList.map((e) => ToDoModel.fromJson(e)).toList(); _modelList = dataList.map((e) => ToDoModel.fromJson(e)).toList();
setState(() {}); setState(() {});
}, },
child: _modelList == null child: _modelList.isEmpty
? _emptyWidget() ? _emptyWidget()
: ListView( : ListView(
padding: EdgeInsets.symmetric(horizontal: 10.w, vertical: 10.w), padding: EdgeInsets.symmetric(horizontal: 10.w, vertical: 10.w),
children: [ children: _modelList.map((e) => _buildCard(e)).toList(),
..._modelList.map((e) { ),
);
}
Widget _buildCard(dynamic e) {
if (e.dynamicModel.runtimeType == BussinessAndFixModel) { if (e.dynamicModel.runtimeType == BussinessAndFixModel) {
return BusinessFixCard( return BusinessFixCard(
model: e.dynamicModel, model: e.dynamicModel,
@ -74,11 +78,9 @@ class _BussinessViewState extends State<BussinessView>
_refreshController.callRefresh(); _refreshController.callRefresh();
}, },
); );
} else {
return Container();
} }
}).toList()
],
),
);
} }
Widget _emptyWidget() { Widget _emptyWidget() {

@ -8,9 +8,9 @@ import 'package:aku_community_manager/utils/network/net_util.dart';
class BussinessFunc { class BussinessFunc {
static Future getBussinessModelList(int backlogStatus) async { static Future getBussinessModelList(int backlogStatus) async {
Response response = Response response =
await NetUtil().dio.get(API.manage.backlogList, queryParameters: { await NetUtil().dio!.get(API.manage.backlogList, queryParameters: {
"backlogStatus": backlogStatus, "backlogStatus": backlogStatus,
}); });
return response.data['data'] as List; return response.data['data'] as List?;
} }
} }

@ -14,10 +14,10 @@ import 'package:aku_community_manager/ui/sub_pages/items_outdoor/items_outdoor_d
class ToDoOutDoorCard extends StatefulWidget { class ToDoOutDoorCard extends StatefulWidget {
final ToDoOutDoorModel model; final ToDoOutDoorModel model;
final VoidCallback callRefresh; final VoidCallback? callRefresh;
final bool homeDisplay; final bool homeDisplay;
ToDoOutDoorCard( ToDoOutDoorCard(
{Key key, this.model, this.callRefresh, this.homeDisplay = false}) {Key? key, required this.model, this.callRefresh, this.homeDisplay = false})
: super(key: key); : super(key: key);
@override @override
@ -31,9 +31,9 @@ class _ToDoOutDoorCardState extends State<ToDoOutDoorCard> {
TextStyle(color: AppStyle.minorTextColor, fontSize: 28.sp); TextStyle(color: AppStyle.minorTextColor, fontSize: 28.sp);
return GestureDetector( return GestureDetector(
onTap: () async { onTap: () async {
await Get.to(ItemsOutdoorDetailsPage(id: widget.model.id)); await Get.to(ItemsOutdoorDetailsPage(id: widget.model.id!));
if (widget.callRefresh != null) { if (widget.callRefresh != null) {
widget.callRefresh(); widget.callRefresh!();
} }
}, },
child: Container( child: Container(
@ -65,7 +65,7 @@ class _ToDoOutDoorCardState extends State<ToDoOutDoorCard> {
), ),
), ),
16.w.widthBox, 16.w.widthBox,
//TODO //
// Text( // Text(
// widget.model.create, // widget.model.create,
// style: TextStyle( // style: TextStyle(
@ -120,7 +120,7 @@ class _ToDoOutDoorCardState extends State<ToDoOutDoorCard> {
Text('详细地址', style: _textStyle), Text('详细地址', style: _textStyle),
Spacer(), Spacer(),
Text( Text(
widget.model.roomName, widget.model.roomName!,
style: AppStyle().primaryStyle, style: AppStyle().primaryStyle,
), ),
], ],
@ -140,7 +140,7 @@ class _ToDoOutDoorCardState extends State<ToDoOutDoorCard> {
), ),
Spacer(), Spacer(),
Text( Text(
widget.model.applicantName, widget.model.applicantName!,
style: AppStyle().primaryStyle, style: AppStyle().primaryStyle,
), ),
], ],
@ -183,7 +183,7 @@ class _ToDoOutDoorCardState extends State<ToDoOutDoorCard> {
), ),
Spacer(), Spacer(),
Text( Text(
widget.model.articleOutName, widget.model.articleOutName!,
style: AppStyle().primaryStyle, style: AppStyle().primaryStyle,
), ),
], ],
@ -203,7 +203,7 @@ class _ToDoOutDoorCardState extends State<ToDoOutDoorCard> {
), ),
Spacer(), Spacer(),
Text( Text(
widget.model.expectedTime, widget.model.expectedTime!,
style: AppStyle().primaryStyle, style: AppStyle().primaryStyle,
), ),
], ],
@ -217,9 +217,9 @@ class _ToDoOutDoorCardState extends State<ToDoOutDoorCard> {
alignment: Alignment.centerRight, alignment: Alignment.centerRight,
child: AkuButton( child: AkuButton(
onPressed: () async { onPressed: () async {
await Get.to(ItemsOutdoorDetailsPage(id: widget.model.id)); await Get.to(ItemsOutdoorDetailsPage(id: widget.model.id!));
if (widget.callRefresh != null) { if (widget.callRefresh != null) {
widget.callRefresh(); widget.callRefresh!();
} }
}, },
child: Container( child: Container(

@ -1,4 +1,6 @@
// Flutter imports: // Flutter imports:
import 'dart:async';
import 'package:aku_community_manager/ui/widgets/common/aku_button.dart'; import 'package:aku_community_manager/ui/widgets/common/aku_button.dart';
import 'package:aku_community_manager/ui/widgets/common/aku_material_button.dart'; import 'package:aku_community_manager/ui/widgets/common/aku_material_button.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -47,7 +49,7 @@ import 'package:aku_community_manager/utils/network/net_util.dart';
class HomePage extends StatefulWidget { class HomePage extends StatefulWidget {
HomePage({ HomePage({
Key key, Key? key,
}) : super(key: key); }) : super(key: key);
@override @override
@ -55,11 +57,11 @@ class HomePage extends StatefulWidget {
} }
class _HomePageState extends State<HomePage> { class _HomePageState extends State<HomePage> {
ItemNumModel _itemNumModel; late ItemNumModel _itemNumModel;
List _todoModelList; List? _todoModelList;
List _anounceMentList; late List _anounceMentList;
bool _onload = true; bool _onload = true;
EasyRefreshController _refreshController; EasyRefreshController? _refreshController;
///bar ///bar
Widget _menuButton(String assetPath, String text, Widget page) { Widget _menuButton(String assetPath, String text, Widget page) {
@ -103,7 +105,7 @@ class _HomePageState extends State<HomePage> {
/// ///
Widget _card( Widget _card(
int number, int? number,
String text, String text,
Color color, Color color,
int index, int index,
@ -157,7 +159,7 @@ class _HomePageState extends State<HomePage> {
int _currentIndicator = 0; int _currentIndicator = 0;
Future _getItemNum() async { Future _getItemNum() async {
Response response = await NetUtil().dio.get(API.manage.findItemNum); Response response = await NetUtil().dio!.get(API.manage.findItemNum);
return ItemNumModel.fromJson(response.data); return ItemNumModel.fromJson(response.data);
} }
@ -167,7 +169,7 @@ class _HomePageState extends State<HomePage> {
"pageNum": 1, "pageNum": 1,
"size": 3, "size": 3,
})); }));
List<AnnouncementListModel> anounceModels = baseListModel.tableList List<AnnouncementListModel> anounceModels = baseListModel.tableList!
.map((e) => AnnouncementListModel.fromJson(e)) .map((e) => AnnouncementListModel.fromJson(e))
.toList(); .toList();
return anounceModels; return anounceModels;
@ -352,7 +354,7 @@ class _HomePageState extends State<HomePage> {
height: 67.w, height: 67.w,
child: Text( child: Text(
userProvider.isLogin userProvider.isLogin
? 'HI${userProvider.infoModel.nickName}' ? 'HI${userProvider.infoModel!.nickName}'
: '登录/注册', : '登录/注册',
style: TextStyle( style: TextStyle(
color: AppStyle.primaryTextColor, color: AppStyle.primaryTextColor,
@ -569,29 +571,29 @@ class _HomePageState extends State<HomePage> {
width: 526.w, width: 526.w,
child: Builder( child: Builder(
builder: (context) { builder: (context) {
if (_todoModelList[index] if (_todoModelList![index]
.dynamicModel .dynamicModel
.runtimeType == .runtimeType ==
BussinessAndFixModel) { BussinessAndFixModel) {
return BusinessFixCard( return BusinessFixCard(
homeDisplay: true, homeDisplay: true,
callRefresh: () { callRefresh: () {
_refreshController _refreshController!
.callRefresh(); .callRefresh();
}, },
model: _todoModelList[index] model: _todoModelList![index]
.dynamicModel); .dynamicModel);
} else if (_todoModelList[index] } else if (_todoModelList![index]
.dynamicModel .dynamicModel
.runtimeType == .runtimeType ==
ToDoOutDoorModel) { ToDoOutDoorModel) {
return ToDoOutDoorCard( return ToDoOutDoorCard(
homeDisplay: true, homeDisplay: true,
callRefresh: () { callRefresh: () {
_refreshController _refreshController!
.callRefresh(); .callRefresh();
}, },
model: _todoModelList[index] model: _todoModelList![index]
.dynamicModel, .dynamicModel,
); );
} else } else
@ -600,7 +602,7 @@ class _HomePageState extends State<HomePage> {
), ),
); );
}, },
itemCount: _todoModelList.length, itemCount: _todoModelList!.length,
), ),
), ),
SizedBox(height: 24.w), SizedBox(height: 24.w),

@ -15,7 +15,7 @@ import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_community_manager/ui/widgets/common/bee_list_view.dart'; import 'package:aku_community_manager/ui/widgets/common/bee_list_view.dart';
class CommentMessage extends StatefulWidget { class CommentMessage extends StatefulWidget {
CommentMessage({Key key}) : super(key: key); CommentMessage({Key? key}) : super(key: key);
@override @override
_CommentMessageState createState() => _CommentMessageState(); _CommentMessageState createState() => _CommentMessageState();
@ -31,7 +31,7 @@ class _CommentMessageState extends State<CommentMessage> {
body: BeeListView( body: BeeListView(
controller: _refreshController, controller: _refreshController,
path: API.message.commentList, path: API.message.commentList,
convert: (model) => model.tableList convert: (model) => model.tableList!
.map((e) => CommentMessageItemModel.fromJson(e)) .map((e) => CommentMessageItemModel.fromJson(e))
.toList(), .toList(),
builder: (items) { builder: (items) {

@ -17,14 +17,14 @@ import 'package:aku_community_manager/utils/network/net_util.dart';
class CommentMessageCard extends StatefulWidget { class CommentMessageCard extends StatefulWidget {
final CommentMessageItemModel itemModel; final CommentMessageItemModel itemModel;
CommentMessageCard({Key key, @required this.itemModel}) : super(key: key); CommentMessageCard({Key? key, /*required*/ required this.itemModel}) : super(key: key);
@override @override
_CommentMessageCardState createState() => _CommentMessageCardState(); _CommentMessageCardState createState() => _CommentMessageCardState();
} }
class _CommentMessageCardState extends State<CommentMessageCard> { class _CommentMessageCardState extends State<CommentMessageCard> {
CommentMessageDetailModel _model; CommentMessageDetailModel? _model;
bool _onload = true; bool _onload = true;
@override @override
@ -50,7 +50,7 @@ class _CommentMessageCardState extends State<CommentMessageCard> {
switch (level) { switch (level) {
case 1: case 1:
return '半星'; return '半星';
break;
case 2: case 2:
return '一星'; return '一星';
case 3: case 3:
@ -200,7 +200,7 @@ class _CommentMessageCardState extends State<CommentMessageCard> {
); );
} }
Widget _messageList(CommentMessageDetailModel model) { Widget _messageList(CommentMessageDetailModel? model) {
return _onload return _onload
? _loadingWidget() ? _loadingWidget()
: Column( : Column(
@ -265,7 +265,7 @@ class _CommentMessageCardState extends State<CommentMessageCard> {
), ),
Spacer(), Spacer(),
Text( Text(
'${model.name}', '${model!.name}',
style: TextStyle( style: TextStyle(
color: AppStyle.primaryTextColor, color: AppStyle.primaryTextColor,
fontSize: 28.sp), fontSize: 28.sp),
@ -288,7 +288,7 @@ class _CommentMessageCardState extends State<CommentMessageCard> {
color: AppStyle.minorTextColor, color: AppStyle.minorTextColor,
fontSize: 28.sp)), fontSize: 28.sp)),
Spacer(), Spacer(),
Text(getComment(model.level), Text(getComment(model.level!),
style: TextStyle( style: TextStyle(
color: AppStyle.primaryTextColor, color: AppStyle.primaryTextColor,
fontSize: 28.sp)), fontSize: 28.sp)),

@ -19,7 +19,7 @@ import 'package:aku_community_manager/ui/home/messages/system_message.dart';
import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart'; import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
class Message extends StatefulWidget { class Message extends StatefulWidget {
Message({Key key}) : super(key: key); Message({Key? key}) : super(key: key);
@override @override
_MessageState createState() => _MessageState(); _MessageState createState() => _MessageState();
@ -28,9 +28,9 @@ class Message extends StatefulWidget {
class _MessageState extends State<Message> { class _MessageState extends State<Message> {
EasyRefreshController _refreshController = EasyRefreshController(); EasyRefreshController _refreshController = EasyRefreshController();
Widget _messageTypeImage(String type) { Widget _messageTypeImage(String type) {
String path; late String path;
Color ca; Color? ca;
Color cb; Color? cb;
switch (type) { switch (type) {
case '系统消息': case '系统消息':
path = R.ASSETS_MESSAGE_IC_TONGZHI_PNG; path = R.ASSETS_MESSAGE_IC_TONGZHI_PNG;
@ -52,7 +52,7 @@ class _MessageState extends State<Message> {
gradient: LinearGradient( gradient: LinearGradient(
begin: Alignment.topCenter, begin: Alignment.topCenter,
end: Alignment.bottomCenter, end: Alignment.bottomCenter,
colors: [ca, cb], colors: [ca!, cb!],
), ),
), ),
child: Image.asset( child: Image.asset(
@ -65,7 +65,7 @@ class _MessageState extends State<Message> {
Widget _messageListTile( Widget _messageListTile(
String date, Widget messageImage, String title, String text, int number, String date, Widget messageImage, String title, String text, int number,
{VoidCallback onpressed}) { {required VoidCallback onpressed}) {
return AkuButton( return AkuButton(
color: Color(0xFFFFFFFF), color: Color(0xFFFFFFFF),
onPressed: onpressed, onPressed: onpressed,

@ -15,7 +15,7 @@ import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_community_manager/ui/widgets/common/bee_list_view.dart'; import 'package:aku_community_manager/ui/widgets/common/bee_list_view.dart';
class SystemMessage extends StatefulWidget { class SystemMessage extends StatefulWidget {
SystemMessage({Key key}) : super(key: key); SystemMessage({Key? key}) : super(key: key);
@override @override
_SystemMessageState createState() => _SystemMessageState(); _SystemMessageState createState() => _SystemMessageState();
@ -44,7 +44,7 @@ class _SystemMessageState extends State<SystemMessage> {
itemCount: items.length); itemCount: items.length);
}, },
path: API.message.systemList, path: API.message.systemList,
convert: (model) => model.tableList convert: (model) => model.tableList!
.map((e) => SystemMessageItemModel.fromJson(e)) .map((e) => SystemMessageItemModel.fromJson(e))
.toList(), .toList(),
), ),

@ -1,4 +1,6 @@
// Flutter imports: // Flutter imports:
import 'dart:async';
import 'package:aku_community_manager/ui/widgets/common/aku_button.dart'; import 'package:aku_community_manager/ui/widgets/common/aku_button.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -20,8 +22,8 @@ import 'package:aku_community_manager/utils/network/net_util.dart';
class SystemMessageCard extends StatefulWidget { class SystemMessageCard extends StatefulWidget {
final SystemMessageItemModel model; final SystemMessageItemModel model;
SystemMessageCard({ SystemMessageCard({
Key key, Key? key,
this.model, required this.model,
}) : super(key: key); }) : super(key: key);
@override @override
@ -29,13 +31,13 @@ class SystemMessageCard extends StatefulWidget {
} }
class _SystemMessageCardState extends State<SystemMessageCard> { class _SystemMessageCardState extends State<SystemMessageCard> {
SystemMessageDetailModel _systemModel; late SystemMessageDetailModel _systemModel;
bool _onLoad = true; bool _onLoad = true;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
Future.delayed(Duration(milliseconds: 300), () async { Future.delayed(Duration(milliseconds: 300), () async {
_systemModel = await getSystemMessage(widget.model.relationId); _systemModel = await getSystemMessage(widget.model.relationId!);
_onLoad = false; _onLoad = false;
setState(() {}); setState(() {});
}); });
@ -190,7 +192,7 @@ class _SystemMessageCardState extends State<SystemMessageCard> {
alignment: Alignment.center, alignment: Alignment.center,
width: double.infinity, width: double.infinity,
child: Text( child: Text(
widget.model.sendDate, widget.model.sendDate!,
style: TextStyle( style: TextStyle(
color: AppStyle.minorTextColor, fontSize: 24.sp), color: AppStyle.minorTextColor, fontSize: 24.sp),
), ),
@ -246,7 +248,7 @@ class _SystemMessageCardState extends State<SystemMessageCard> {
), ),
Spacer(), Spacer(),
Text( Text(
model.name, model.name!,
style: TextStyle( style: TextStyle(
color: AppStyle.primaryTextColor, color: AppStyle.primaryTextColor,
fontSize: 28.sp), fontSize: 28.sp),
@ -269,7 +271,7 @@ class _SystemMessageCardState extends State<SystemMessageCard> {
color: AppStyle.minorTextColor, color: AppStyle.minorTextColor,
fontSize: 28.sp)), fontSize: 28.sp)),
Spacer(), Spacer(),
Text(model.tel, Text(model.tel!,
style: TextStyle( style: TextStyle(
color: AppStyle.primaryTextColor, color: AppStyle.primaryTextColor,
fontSize: 28.sp)), fontSize: 28.sp)),

@ -16,14 +16,14 @@ import 'package:aku_community_manager/ui/settings/user_info_page.dart';
import 'package:aku_community_manager/ui/widgets/app_widgets/aku_avatar.dart'; import 'package:aku_community_manager/ui/widgets/app_widgets/aku_avatar.dart';
class PersonalDraw extends StatefulWidget { class PersonalDraw extends StatefulWidget {
PersonalDraw({Key key}) : super(key: key); PersonalDraw({Key? key}) : super(key: key);
@override @override
_PersonalDrawState createState() => _PersonalDrawState(); _PersonalDrawState createState() => _PersonalDrawState();
} }
class _PersonalDrawState extends State<PersonalDraw> { class _PersonalDrawState extends State<PersonalDraw> {
Widget _myListTile(String path, String text, {VoidCallback onPressed}) { Widget _myListTile(String path, String text, { VoidCallback? onPressed}) {
return AkuButton( return AkuButton(
onPressed: onPressed, onPressed: onPressed,
child: Container( child: Container(
@ -84,7 +84,7 @@ class _PersonalDrawState extends State<PersonalDraw> {
// //
userProvider.isLogin userProvider.isLogin
? Text( ? Text(
userProvider.infoModel.nickName, userProvider.infoModel!.nickName!,
style: TextStyle( style: TextStyle(
color: AppStyle.primaryTextColor, color: AppStyle.primaryTextColor,
fontSize: 28.sp, fontSize: 28.sp,

@ -34,14 +34,14 @@ import 'package:aku_community_manager/ui/widgets/common/aku_back_button.dart';
import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart'; import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
class SearchWorkOrderPage extends StatefulWidget { class SearchWorkOrderPage extends StatefulWidget {
SearchWorkOrderPage({Key key}) : super(key: key); SearchWorkOrderPage({Key? key}) : super(key: key);
@override @override
_SearchWorkOrderpageState createState() => _SearchWorkOrderpageState(); _SearchWorkOrderpageState createState() => _SearchWorkOrderpageState();
} }
class _SearchWorkOrderpageState extends State<SearchWorkOrderPage> { class _SearchWorkOrderpageState extends State<SearchWorkOrderPage> {
TextEditingController _textController; TextEditingController? _textController;
List<AppApplication> _wisdomApplications = [ List<AppApplication> _wisdomApplications = [
AppApplication('一键报警', R.ASSETS_HOME_IC_POLICE_PNG, ()=>WarningPage()), AppApplication('一键报警', R.ASSETS_HOME_IC_POLICE_PNG, ()=>WarningPage()),
AppApplication('访客管理', R.ASSETS_HOME_IC_VISITORS_PNG, ()=>VisitorManagerPage()), AppApplication('访客管理', R.ASSETS_HOME_IC_VISITORS_PNG, ()=>VisitorManagerPage()),

@ -22,7 +22,7 @@ import 'package:aku_community_manager/ui/widgets/common/aku_back_button.dart';
import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart'; import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
class LoginPage extends StatefulWidget { class LoginPage extends StatefulWidget {
LoginPage({Key key}) : super(key: key); LoginPage({Key? key}) : super(key: key);
@override @override
_LoginPageState createState() => _LoginPageState(); _LoginPageState createState() => _LoginPageState();
@ -41,7 +41,7 @@ class _LoginPageState extends State<LoginPage> {
@override @override
void dispose() { void dispose() {
_textController?.dispose(); _textController.dispose();
super.dispose(); super.dispose();
} }

@ -24,7 +24,7 @@ import 'package:aku_community_manager/utils/network/net_util.dart';
class LoginSMSPage extends StatefulWidget { class LoginSMSPage extends StatefulWidget {
final String phone; final String phone;
LoginSMSPage({Key key, this.phone}) : super(key: key); LoginSMSPage({Key? key, required this.phone}) : super(key: key);
@override @override
_LoginSMSPageState createState() => _LoginSMSPageState(); _LoginSMSPageState createState() => _LoginSMSPageState();
@ -33,7 +33,7 @@ class LoginSMSPage extends StatefulWidget {
class _LoginSMSPageState extends State<LoginSMSPage> { class _LoginSMSPageState extends State<LoginSMSPage> {
TextEditingController _textEditingController = TextEditingController(); TextEditingController _textEditingController = TextEditingController();
int _count = 60; int _count = 60;
Timer _countTimer; Timer? _countTimer;
bool get canResend => _count <= 0; bool get canResend => _count <= 0;
String get countString { String get countString {
if (_count <= 0) if (_count <= 0)
@ -71,7 +71,7 @@ class _LoginSMSPageState extends State<LoginSMSPage> {
@override @override
void dispose() { void dispose() {
_textEditingController?.dispose(); _textEditingController.dispose();
_countTimer?.cancel(); _countTimer?.cancel();
super.dispose(); super.dispose();
} }
@ -119,7 +119,7 @@ class _LoginSMSPageState extends State<LoginSMSPage> {
onChanged: (text) async { onChanged: (text) async {
if (text.length == 6) { if (text.length == 6) {
Function cancel = BotToast.showLoading(); Function cancel = BotToast.showLoading();
Response response = await NetUtil().dio.post( Response response = await NetUtil().dio!.post(
API.auth.login, API.auth.login,
data: {'tel': widget.phone, 'code': text}, data: {'tel': widget.phone, 'code': text},
); );

@ -8,15 +8,15 @@ import 'package:common_utils/common_utils.dart';
class ClockFunc { class ClockFunc {
static Future initClockInfo() async { static Future initClockInfo() async {
BaseModel baseModel = await NetUtil().get(API.manage.todayClockRecord); BaseModel baseModel = await NetUtil().get(API.manage.todayClockRecord);
if (baseModel.status && baseModel.data != null) { if (baseModel.status! && baseModel.data != null) {
return TodayClockRecordModel.fromJson(baseModel.data); return TodayClockRecordModel.fromJson(baseModel.data);
} else { } else {
BotToast.showText(text: baseModel.message); BotToast.showText(text: baseModel.message!);
} }
} }
static Future clockIn(int id, DateTime dateTime) async { static Future clockIn(int id, DateTime dateTime) async {
BaseModel baseModel = await NetUtil().post( await NetUtil().post(
API.manage.clockInOut, API.manage.clockInOut,
params: { params: {
"id": id, "id": id,
@ -28,7 +28,7 @@ class ClockFunc {
} }
static Future clockOut(int id, DateTime dateTime) async { static Future clockOut(int id, DateTime dateTime) async {
BaseModel baseModel = await NetUtil().post(API.manage.clockInOut, await NetUtil().post(API.manage.clockInOut,
params: { params: {
"id": id, "id": id,
"endClockDate": "endClockDate":

@ -8,7 +8,7 @@ import 'package:aku_community_manager/tools/extensions/list_extension_tool.dart'
class ClockInOutApplyCard extends StatefulWidget { class ClockInOutApplyCard extends StatefulWidget {
final ClockApplyRecordListModel model; final ClockApplyRecordListModel model;
ClockInOutApplyCard({Key key, this.model}) : super(key: key); ClockInOutApplyCard({Key? key, required this.model}) : super(key: key);
@override @override
_ClockInOutApplyCardState createState() => _ClockInOutApplyCardState(); _ClockInOutApplyCardState createState() => _ClockInOutApplyCardState();
@ -75,7 +75,7 @@ class _ClockInOutApplyCardState extends State<ClockInOutApplyCard> {
160.w.widthBox, 160.w.widthBox,
Row( Row(
children: [ children: [
widget.model.reason.text widget.model.reason!.text
.size(24.sp) .size(24.sp)
.maxLines(2) .maxLines(2)
.overflow(TextOverflow.ellipsis) .overflow(TextOverflow.ellipsis)

@ -15,7 +15,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart'; import 'package:velocity_x/velocity_x.dart';
class ClockInOutMainPage extends StatefulWidget { class ClockInOutMainPage extends StatefulWidget {
ClockInOutMainPage({Key key}) : super(key: key); ClockInOutMainPage({Key? key}) : super(key: key);
@override @override
_ClockInOutMainPageState createState() => _ClockInOutMainPageState(); _ClockInOutMainPageState createState() => _ClockInOutMainPageState();
@ -23,13 +23,13 @@ class ClockInOutMainPage extends StatefulWidget {
class _ClockInOutMainPageState extends State<ClockInOutMainPage> class _ClockInOutMainPageState extends State<ClockInOutMainPage>
with AutomaticKeepAliveClientMixin { with AutomaticKeepAliveClientMixin {
EasyRefreshController _refreshController; EasyRefreshController? _refreshController;
Timer _clockSetState; Timer? _clockSetState;
DateTime _lastPressed; DateTime? _lastPressed;
TodayClockRecordModel _model; TodayClockRecordModel? _model;
bool get canTap { bool get canTap {
if (_lastPressed == null || if (_lastPressed == null ||
DateTime.now().difference(_lastPressed) > Duration(seconds: 15)) { DateTime.now().difference(_lastPressed!) > Duration(seconds: 15)) {
//15 //15
_lastPressed = DateTime.now(); _lastPressed = DateTime.now();
return true; return true;
@ -65,17 +65,17 @@ class _ClockInOutMainPageState extends State<ClockInOutMainPage>
controller: _refreshController, controller: _refreshController,
onRefresh: () async { onRefresh: () async {
UserTool.appProvider.initClock(); UserTool.appProvider.initClock();
_model = await ClockFunc.initClockInfo(); _model = await (ClockFunc.initClockInfo() );
if (_model != null) { if (_model != null) {
UserTool.appProvider.resetClock(); // UserTool.appProvider.resetClock(); //
if (_model.startClockDate != null) { if (_model!.startClockDate != null) {
// //
UserTool.appProvider.setClockInTime(_model.clockInTime); UserTool.appProvider.setClockInTime(_model!.clockInTime!);
} }
if (_model.endClockDate != null) { if (_model!.endClockDate != null) {
// //
UserTool.appProvider.setClockOutTime(_model.clockOutTime); UserTool.appProvider.setClockOutTime(_model!.clockOutTime!);
} }
} }
@ -122,12 +122,12 @@ class _ClockInOutMainPageState extends State<ClockInOutMainPage>
DateTime _currentTime = DateTime.now(); DateTime _currentTime = DateTime.now();
switch (UserTool.appProvider.clockStatus) { switch (UserTool.appProvider.clockStatus) {
case WORKCLOCK.NOTIN: case WORKCLOCK.NOTIN:
ClockFunc.clockIn(_model.id, _currentTime); ClockFunc.clockIn(_model!.id!, _currentTime);
UserTool.appProvider.setClockInTime(_currentTime); UserTool.appProvider.setClockInTime(_currentTime);
BotToast.showText(text: '上班打卡成功'); BotToast.showText(text: '上班打卡成功');
break; break;
case WORKCLOCK.IN: case WORKCLOCK.IN:
ClockFunc.clockOut(_model.id, _currentTime); ClockFunc.clockOut(_model!.id!, _currentTime);
UserTool.appProvider.setClockOutTime(_currentTime); UserTool.appProvider.setClockOutTime(_currentTime);
BotToast.showText(text: '下班打卡成功'); BotToast.showText(text: '下班打卡成功');
break; break;
@ -172,7 +172,7 @@ class _ClockInOutMainPageState extends State<ClockInOutMainPage>
); );
} }
Widget _buildCard(int type, {DateTime time}) { Widget _buildCard(int type, {DateTime? time}) {
return Container( return Container(
width: 296.w, width: 296.w,
height: 131.w, height: 131.w,
@ -243,8 +243,8 @@ class _ClockInOutMainPageState extends State<ClockInOutMainPage>
if (UserTool.appProvider.clockInTime != null) { if (UserTool.appProvider.clockInTime != null) {
int _time = (UserTool.appProvider.clockOutTime == null int _time = (UserTool.appProvider.clockOutTime == null
? DateTime.now() ? DateTime.now()
: UserTool.appProvider.clockOutTime) : UserTool.appProvider.clockOutTime)!
.difference(UserTool.appProvider.clockInTime) .difference(UserTool.appProvider.clockInTime!)
.inMinutes; .inMinutes;
print(_time); print(_time);
_hour = _time ~/ 60; _hour = _time ~/ 60;

@ -10,7 +10,7 @@ import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart'; import 'package:velocity_x/velocity_x.dart';
class ClockInOutPage extends StatefulWidget { class ClockInOutPage extends StatefulWidget {
ClockInOutPage({Key key}) : super(key: key); ClockInOutPage({Key? key}) : super(key: key);
@override @override
_ClockInOutPageState createState() => _ClockInOutPageState(); _ClockInOutPageState createState() => _ClockInOutPageState();
@ -18,7 +18,7 @@ class ClockInOutPage extends StatefulWidget {
class _ClockInOutPageState extends State<ClockInOutPage> class _ClockInOutPageState extends State<ClockInOutPage>
with TickerProviderStateMixin { with TickerProviderStateMixin {
TabController _tabController; TabController? _tabController;
List<String> _tabs = ['考勤打卡', '打卡记录', '申请情况']; List<String> _tabs = ['考勤打卡', '打卡记录', '申请情况'];
@override @override
void initState() { void initState() {
@ -28,7 +28,7 @@ class _ClockInOutPageState extends State<ClockInOutPage>
@override @override
void dispose() { void dispose() {
_tabController.dispose(); _tabController!.dispose();
super.dispose(); super.dispose();
} }
@ -48,7 +48,7 @@ class _ClockInOutPageState extends State<ClockInOutPage>
], ],
appBarBottom: PreferredSize( appBarBottom: PreferredSize(
child: AkuTabBar(controller: _tabController, tabs: _tabs), child: AkuTabBar(controller: _tabController!, tabs: _tabs),
preferredSize: Size.fromHeight(88.w), preferredSize: Size.fromHeight(88.w),
), ),
body: TabBarView( body: TabBarView(

@ -7,7 +7,7 @@ import 'package:velocity_x/velocity_x.dart';
class ClockInOutRecordCard extends StatefulWidget { class ClockInOutRecordCard extends StatefulWidget {
final ClockRecordListModel model; final ClockRecordListModel model;
ClockInOutRecordCard({Key key, this.model}) : super(key: key); ClockInOutRecordCard({Key? key, required this.model}) : super(key: key);
@override @override
_ClockInOutRecordCardState createState() => _ClockInOutRecordCardState(); _ClockInOutRecordCardState createState() => _ClockInOutRecordCardState();

@ -11,14 +11,14 @@ import 'package:velocity_x/velocity_x.dart';
class ClockInOutView extends StatefulWidget { class ClockInOutView extends StatefulWidget {
final int index; final int index;
ClockInOutView({Key key, this.index}) : super(key: key); ClockInOutView({Key? key, required this.index}) : super(key: key);
@override @override
_ClockInOutViewState createState() => _ClockInOutViewState(); _ClockInOutViewState createState() => _ClockInOutViewState();
} }
class _ClockInOutViewState extends State<ClockInOutView> { class _ClockInOutViewState extends State<ClockInOutView> {
EasyRefreshController _refreshController; EasyRefreshController? _refreshController;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@ -43,7 +43,7 @@ class _ClockInOutViewState extends State<ClockInOutView> {
path: API.manage.clockRecord, path: API.manage.clockRecord,
controller: _refreshController, controller: _refreshController,
convert: (models) { convert: (models) {
return models.tableList return models.tableList!
.map((e) => ClockRecordListModel.fromJson(e)) .map((e) => ClockRecordListModel.fromJson(e))
.toList(); .toList();
}, },
@ -65,7 +65,7 @@ class _ClockInOutViewState extends State<ClockInOutView> {
path: API.manage.clockApplyRecord, path: API.manage.clockApplyRecord,
controller: _refreshController, controller: _refreshController,
convert: (models) { convert: (models) {
return models.tableList return models.tableList!
.map((e) => ClockApplyRecordListModel.fromJson(e)) .map((e) => ClockApplyRecordListModel.fromJson(e))
.toList(); .toList();
}, },

@ -1,3 +1,4 @@
import 'package:aku_community_manager/style/app_style.dart'; import 'package:aku_community_manager/style/app_style.dart';
import 'package:aku_community_manager/tools/aku_divider.dart'; import 'package:aku_community_manager/tools/aku_divider.dart';
import 'package:aku_community_manager/ui/manage_pages/clock_in_out/clock_func.dart'; import 'package:aku_community_manager/ui/manage_pages/clock_in_out/clock_func.dart';
@ -14,7 +15,7 @@ import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart'; import 'package:velocity_x/velocity_x.dart';
class WorkApplyPage extends StatefulWidget { class WorkApplyPage extends StatefulWidget {
WorkApplyPage({Key key}) : super(key: key); WorkApplyPage({Key? key}) : super(key: key);
@override @override
_WorkApplyPageState createState() => _WorkApplyPageState(); _WorkApplyPageState createState() => _WorkApplyPageState();
@ -25,9 +26,9 @@ class _WorkApplyPageState extends State<WorkApplyPage> {
// TextEditingController _nameController; // TextEditingController _nameController;
// TextEditingController _positionController; // TextEditingController _positionController;
TextEditingController _reasonController; TextEditingController? _reasonController;
DateTime _beginTime; DateTime? _beginTime;
DateTime _endTime; DateTime? _endTime;
@override @override
void initState() { void initState() {
@ -61,8 +62,8 @@ class _WorkApplyPageState extends State<WorkApplyPage> {
bottom: AkuBottomButton( bottom: AkuBottomButton(
title: '确认提交', title: '确认提交',
onTap: () async { onTap: () async {
bool _result = await ClockFunc.clockApply( bool _result = await (ClockFunc.clockApply(
_reasonController.text, _type, _beginTime, _endTime); _reasonController!.text, _type, _beginTime!, _endTime!) );
if (_result) { if (_result) {
Get.back(); Get.back();
} }
@ -122,7 +123,7 @@ class _WorkApplyPageState extends State<WorkApplyPage> {
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
height: 120.w, height: 120.w,
onPressed: () async { onPressed: () async {
DateTime date = await BeeDatePicker.pick( DateTime? date = await BeeDatePicker.pick(
DateTime.now(), DateTime.now(),
mode: CupertinoDatePickerMode.dateAndTime, mode: CupertinoDatePickerMode.dateAndTime,
min: DateTime.now().subtract(Duration(seconds: 1)), min: DateTime.now().subtract(Duration(seconds: 1)),
@ -150,14 +151,14 @@ class _WorkApplyPageState extends State<WorkApplyPage> {
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
height: 120.w, height: 120.w,
onPressed: () async { onPressed: () async {
DateTime date = await BeeDatePicker.pick( DateTime? date = await BeeDatePicker.pick(
_beginTime == null ? DateTime.now() : _beginTime, _beginTime == null ? DateTime.now() : _beginTime!,
min: _beginTime == null min: _beginTime == null
? DateTime.now().subtract(Duration(seconds: 1)) ? DateTime.now().subtract(Duration(seconds: 1))
: _beginTime, : _beginTime!,
max: _beginTime == null max: _beginTime == null
? DateTime.now().add(Duration(days: 1)) ? DateTime.now().add(Duration(days: 1))
: (_beginTime).add(Duration(days: 7)), : _beginTime!.add(Duration(days: 7)),
mode: CupertinoDatePickerMode.dateAndTime, mode: CupertinoDatePickerMode.dateAndTime,
); );
if (date != null) { if (date != null) {
@ -186,8 +187,8 @@ class _WorkApplyPageState extends State<WorkApplyPage> {
); );
} }
Widget _inputRowTile(String title, TextEditingController controller, Widget _inputRowTile(String title, TextEditingController? controller,
{String hintText, List<TextInputFormatter> formatters}) { {String? hintText, List<TextInputFormatter>? formatters}) {
return Container( return Container(
width: double.infinity, width: double.infinity,
child: Column( child: Column(
@ -200,7 +201,7 @@ class _WorkApplyPageState extends State<WorkApplyPage> {
inputFormatters: formatters, inputFormatters: formatters,
textAlign: TextAlign.start, textAlign: TextAlign.start,
onChanged: (value) { onChanged: (value) {
controller.text = value; controller!.text = value;
setState(() {}); setState(() {});
}, },
decoration: InputDecoration( decoration: InputDecoration(

@ -19,9 +19,9 @@ class FacilitiesCard extends StatefulWidget {
final int index; final int index;
final int facilitiesType; final int facilitiesType;
final FacilitiesCheckListModel model; final FacilitiesCheckListModel model;
final VoidCallback callRefresh; final VoidCallback? callRefresh;
FacilitiesCard( FacilitiesCard(
{Key key, this.index, this.model, this.facilitiesType, this.callRefresh}) {Key? key, required this.index, required this.model, required this.facilitiesType, this.callRefresh})
: super(key: key); : super(key: key);
@override @override
@ -36,14 +36,14 @@ class _FacilitiesCardState extends State<FacilitiesCard> {
children: [ children: [
Row( Row(
children: [ children: [
widget.model.facilitiesName.text widget.model.facilitiesName!.text
.color(kTextPrimaryColor) .color(kTextPrimaryColor)
.size(32.sp) .size(32.sp)
.bold .bold
.make(), .make(),
Spacer(), Spacer(),
FacilitiesMap.inspectStatus[widget.model.status].text FacilitiesMap.inspectStatus[widget.model.status!]!.text
.color(FacilitiesMap.insepectColor[widget.model.status]) .color(FacilitiesMap.insepectColor[widget.model.status!]!)
.size(28.sp) .size(28.sp)
.bold .bold
.make(), .make(),
@ -53,7 +53,7 @@ class _FacilitiesCardState extends State<FacilitiesCard> {
AkuDivider.horizontal(), AkuDivider.horizontal(),
24.w.heightBox, 24.w.heightBox,
_buildTile(R.ASSETS_MANAGE_ADDRESS_PNG, '场地地址', _buildTile(R.ASSETS_MANAGE_ADDRESS_PNG, '场地地址',
widget.model.facilitiesAddress), widget.model.facilitiesAddress!),
..._midTile(), ..._midTile(),
...widget.index != 0 ...widget.index != 0
? [] ? []
@ -71,9 +71,9 @@ class _FacilitiesCardState extends State<FacilitiesCard> {
onPressed: () async { onPressed: () async {
await Get.to(() => FacilitiesInspectReportPage( await Get.to(() => FacilitiesInspectReportPage(
facilitiesType: widget.facilitiesType, facilitiesType: widget.facilitiesType,
id: widget.model.id, id: widget.model.id!,
)); ));
widget.callRefresh(); widget.callRefresh!();
}, },
child: '填写报告' child: '填写报告'
.text .text
@ -95,9 +95,9 @@ class _FacilitiesCardState extends State<FacilitiesCard> {
.onInkTap(() async { .onInkTap(() async {
await Get.to(() => FacilitiesInspectReportPage( await Get.to(() => FacilitiesInspectReportPage(
facilitiesType: widget.facilitiesType, facilitiesType: widget.facilitiesType,
id: widget.model.id, id: widget.model.id!,
)); ));
widget.callRefresh(); widget.callRefresh!();
}); });
} }
@ -107,7 +107,7 @@ class _FacilitiesCardState extends State<FacilitiesCard> {
return [ return [
15.w.heightBox, 15.w.heightBox,
_buildTile(R.ASSETS_MANAGE_CLOCK_PNG, '任务时间', _buildTile(R.ASSETS_MANAGE_CLOCK_PNG, '任务时间',
'${DateUtil.formatDateStr(widget.model.beginDate, format: 'yyyy-MM-dd HH:mm')}-${DateUtil.formatDateStr(widget.model.endDate, format: 'HH;mm')}'), '${DateUtil.formatDateStr(widget.model.beginDate!, format: 'yyyy-MM-dd HH:mm')}-${DateUtil.formatDateStr(widget.model.endDate!, format: 'HH;mm')}'),
]; ];
case 1: case 1:
@ -118,22 +118,22 @@ class _FacilitiesCardState extends State<FacilitiesCard> {
color: Color(0xFF3F8FFE)), color: Color(0xFF3F8FFE)),
15.w.heightBox, 15.w.heightBox,
_buildTile(R.ASSETS_MANAGE_CLOCK_PNG, '规定任务时间', _buildTile(R.ASSETS_MANAGE_CLOCK_PNG, '规定任务时间',
'${DateUtil.formatDateStr(widget.model.beginDate, format: 'yyyy-MM-dd HH:mm')}-${DateUtil.formatDateStr(widget.model.endDate, format: 'HH;mm')}'), '${DateUtil.formatDateStr(widget.model.beginDate!, format: 'yyyy-MM-dd HH:mm')}-${DateUtil.formatDateStr(widget.model.endDate!, format: 'HH;mm')}'),
15.w.heightBox, 15.w.heightBox,
_buildTile( _buildTile(
R.ASSETS_MANAGE_CLOCK_PNG, R.ASSETS_MANAGE_CLOCK_PNG,
'检查提交时间', '检查提交时间',
DateUtil.formatDateStr(widget.model.checkDate, DateUtil.formatDateStr(widget.model.checkDate!,
format: 'yyyy-MM-dd HH:mm')), format: 'yyyy-MM-dd HH:mm')),
]; ];
case 2: case 2:
return [ return [
15.w.heightBox, 15.w.heightBox,
_buildTile(R.ASSETS_MANAGE_CLOCK_PNG, '未完成原因', widget.model.detail, _buildTile(R.ASSETS_MANAGE_CLOCK_PNG, '未完成原因', widget.model.detail!,
color: Colors.red), color: Colors.red),
15.w.heightBox, 15.w.heightBox,
_buildTile(R.ASSETS_MANAGE_CLOCK_PNG, '规定任务时间', _buildTile(R.ASSETS_MANAGE_CLOCK_PNG, '规定任务时间',
'${DateUtil.formatDateStr(widget.model.beginDate, format: 'yyyy-MM-dd HH:mm')}-${DateUtil.formatDateStr(widget.model.endDate, format: 'HH;mm')}'), '${DateUtil.formatDateStr(widget.model.beginDate!, format: 'yyyy-MM-dd HH:mm')}-${DateUtil.formatDateStr(widget.model.endDate!, format: 'HH;mm')}'),
]; ];
default: default:
return []; return [];

@ -3,7 +3,6 @@ import 'dart:io';
// Flutter imports: // Flutter imports:
import 'package:aku_community_manager/const/api.dart'; import 'package:aku_community_manager/const/api.dart';
import 'package:aku_community_manager/ui/manage_pages/facilities/facilities_map.dart';
import 'package:aku_community_manager/ui/widgets/common/aku_button.dart'; import 'package:aku_community_manager/ui/widgets/common/aku_button.dart';
import 'package:aku_community_manager/utils/network/base_model.dart'; import 'package:aku_community_manager/utils/network/base_model.dart';
import 'package:aku_community_manager/utils/network/net_util.dart'; import 'package:aku_community_manager/utils/network/net_util.dart';
@ -25,9 +24,9 @@ class FacilitiesInspectReportPage extends StatefulWidget {
final int facilitiesType; final int facilitiesType;
final int id; final int id;
FacilitiesInspectReportPage({ FacilitiesInspectReportPage({
Key key, Key? key,
@required this.facilitiesType, /*required*/ required this.facilitiesType,
@required this.id, /*required*/ required this.id,
}) : super(key: key); }) : super(key: key);
@override @override
@ -37,9 +36,9 @@ class FacilitiesInspectReportPage extends StatefulWidget {
class _FacilitiesInspectReportPageState class _FacilitiesInspectReportPageState
extends State<FacilitiesInspectReportPage> { extends State<FacilitiesInspectReportPage> {
List<File> _selfPhotos; // List<File>? _selfPhotos;
List<File> _scenePhotos; late List<File> _scenePhotos;
String _describtion; String? _describtion;
int _scene = 1;// 1 2 int _scene = 1;// 1 2
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -62,7 +61,7 @@ class _FacilitiesInspectReportPageState
Widget _bottomSubmitButton() { Widget _bottomSubmitButton() {
return AkuButton( return AkuButton(
onPressed: () async { onPressed: () async {
List<String> _scenePhotoUrl = await NetUtil().uploadFiles( List<String?> _scenePhotoUrl = await NetUtil().uploadFiles(
_scenePhotos, _scenePhotos,
API.upload.uploadFacilitiCheckPhoto, API.upload.uploadFacilitiCheckPhoto,
); );
@ -74,10 +73,10 @@ class _FacilitiesInspectReportPageState
"detail": _describtion, "detail": _describtion,
"imgUrls": _scenePhotoUrl, "imgUrls": _scenePhotoUrl,
}); });
if (baseModel.status) { if (baseModel.status!) {
Get.back(); Get.back();
} }
BotToast.showText(text: baseModel.message); BotToast.showText(text: baseModel.message!);
}, },
width: double.infinity, width: double.infinity,
height: 100.w, height: 100.w,
@ -87,54 +86,54 @@ class _FacilitiesInspectReportPageState
).pOnly(bottom: MediaQuery.of(context).padding.bottom); ).pOnly(bottom: MediaQuery.of(context).padding.bottom);
} }
Widget _basicMessageCard() { // Widget _basicMessageCard() {
return Column( // return Column(
children: [ // children: [
Row( // Row(
children: [ // children: [
'基础信息'.text.size(32.sp).color(kTextPrimaryColor).bold.make(), // '基础信息'.text.size(32.sp).color(kTextPrimaryColor).bold.make(),
Spacer(), // Spacer(),
'检查中' // '检查中'
.text // .text
.size(30.sp) // .size(30.sp)
.color(FacilitiesMap.insepectColor[2]) // .color(FacilitiesMap.insepectColor[2]!)
.bold // .bold
.make() // .make()
], // ],
), // ),
16.w.heightBox, // 16.w.heightBox,
_buildTile(R.ASSETS_MESSAGE_IC_PEOPLE_PNG, '检查人', '杨建'), // _buildTile(R.ASSETS_MESSAGE_IC_PEOPLE_PNG, '检查人', '杨建'),
12.w.heightBox, // 12.w.heightBox,
_buildTile(R.ASSETS_MESSAGE_IC_PHONE_PNG, '联系电话', '15013103152'), // _buildTile(R.ASSETS_MESSAGE_IC_PHONE_PNG, '联系电话', '15013103152'),
12.w.heightBox, // 12.w.heightBox,
_buildTile(R.ASSETS_MANAGE_ADDRESS_PNG, '检查场地', '户外3号篮球场'), // _buildTile(R.ASSETS_MANAGE_ADDRESS_PNG, '检查场地', '户外3号篮球场'),
12.w.heightBox, // 12.w.heightBox,
_buildTile(R.ASSETS_MANAGE_CLOCK_PNG, '规定任务时间', '20200202020202020'), // _buildTile(R.ASSETS_MANAGE_CLOCK_PNG, '规定任务时间', '20200202020202020'),
], // ],
) // )
.box // .box
.width(double.infinity) // .width(double.infinity)
.padding(EdgeInsets.symmetric(vertical: 34.w, horizontal: 32.w)) // .padding(EdgeInsets.symmetric(vertical: 34.w, horizontal: 32.w))
.color(Colors.white) // .color(Colors.white)
.make(); // .make();
} // }
Widget _buildTile(String icon, String title, String text, // Widget _buildTile(String icon, String title, String text,
{Color color = kTextSubColor}) { // {Color color = kTextSubColor}) {
return Row( // return Row(
children: [ // children: [
Image.asset( // Image.asset(
icon, // icon,
width: 40.w, // width: 40.w,
height: 40.w, // height: 40.w,
), // ),
20.w.widthBox, // 20.w.widthBox,
title.text.size(24.sp).color(kTextSubColor).make(), // title.text.size(24.sp).color(kTextSubColor).make(),
Spacer(), // Spacer(),
text.text.size(24.sp).color(color).make(), // text.text.size(24.sp).color(color).make(),
], // ],
); // );
} // }
Widget _descriptionCard( Widget _descriptionCard(
String title, String title,
@ -210,30 +209,30 @@ class _FacilitiesInspectReportPageState
.make(); .make();
} }
Widget _selfPhotoCard() { // Widget _selfPhotoCard() {
return Column( // return Column(
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
children: [ // children: [
Row( // Row(
children: [ // children: [
'3.巡更人员自拍人脸'.text.color(kTextPrimaryColor).size(32.sp).bold.make() // '3.巡更人员自拍人脸'.text.color(kTextPrimaryColor).size(32.sp).bold.make()
], // ],
), // ),
32.w.heightBox, // 32.w.heightBox,
AkuPickImageWidget( // AkuPickImageWidget(
description: '上传自拍', // description: '上传自拍',
onChanged: (files) { // onChanged: (files) {
_selfPhotos = files; // _selfPhotos = files;
setState(() {}); // setState(() {});
}, // },
), // ),
], // ],
) // )
.box // .box
.color(Colors.white) // .color(Colors.white)
.padding(EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w)) // .padding(EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w))
.make(); // .make();
} // }
Widget _scenePhotoCard() { Widget _scenePhotoCard() {
return Column( return Column(

@ -11,7 +11,7 @@ import 'package:aku_community_manager/ui/widgets/inner/aku_tab_bar.dart';
class FacilitiesPage extends StatefulWidget { class FacilitiesPage extends StatefulWidget {
final int facilitiesType; final int facilitiesType;
FacilitiesPage({Key key, this.facilitiesType}) : super(key: key); FacilitiesPage({Key? key, required this.facilitiesType}) : super(key: key);
@override @override
_FacilitiesPageState createState() => _FacilitiesPageState(); _FacilitiesPageState createState() => _FacilitiesPageState();
@ -23,7 +23,7 @@ class _FacilitiesPageState extends State<FacilitiesPage>
return ['待检查', '已完成', '未完成']; return ['待检查', '已完成', '未完成'];
} }
TabController _tabController; TabController? _tabController;
@override @override
void initState() { void initState() {
@ -42,7 +42,7 @@ class _FacilitiesPageState extends State<FacilitiesPage>
return AkuScaffold( return AkuScaffold(
title: '设施检查', title: '设施检查',
appBarBottom: PreferredSize( appBarBottom: PreferredSize(
child: AkuTabBar(controller: _tabController, tabs: _tabs), child: AkuTabBar(controller: _tabController!, tabs: _tabs),
preferredSize: Size.fromHeight(88.w), preferredSize: Size.fromHeight(88.w),
), ),
body: TabBarView( body: TabBarView(

@ -9,7 +9,7 @@ import 'package:velocity_x/velocity_x.dart';
import 'package:aku_community_manager/const/resource.dart'; import 'package:aku_community_manager/const/resource.dart';
import 'package:aku_community_manager/tools/extensions/list_extension_tool.dart'; import 'package:aku_community_manager/tools/extensions/list_extension_tool.dart';
class FacilitiesSelectPage extends StatefulWidget { class FacilitiesSelectPage extends StatefulWidget {
FacilitiesSelectPage({Key key}) : super(key: key); FacilitiesSelectPage({Key? key}) : super(key: key);
@override @override
_FacilitiesSelectPageState createState() => _FacilitiesSelectPageState(); _FacilitiesSelectPageState createState() => _FacilitiesSelectPageState();

@ -15,14 +15,14 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
class FacilitiesView extends StatefulWidget { class FacilitiesView extends StatefulWidget {
final int index; final int index;
final int facilitiesType; final int facilitiesType;
FacilitiesView({Key key, this.index, this.facilitiesType}) : super(key: key); FacilitiesView({Key? key, required this.index, required this.facilitiesType}) : super(key: key);
@override @override
_FacilitiesViewState createState() => _FacilitiesViewState(); _FacilitiesViewState createState() => _FacilitiesViewState();
} }
class _FacilitiesViewState extends State<FacilitiesView> { class _FacilitiesViewState extends State<FacilitiesView> {
EasyRefreshController _refreshController; EasyRefreshController? _refreshController;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@ -31,7 +31,7 @@ class _FacilitiesViewState extends State<FacilitiesView> {
@override @override
void dispose() { void dispose() {
_refreshController.dispose(); _refreshController!.dispose();
super.dispose(); super.dispose();
} }
@ -45,7 +45,7 @@ class _FacilitiesViewState extends State<FacilitiesView> {
}, },
controller: _refreshController, controller: _refreshController,
convert: (models) { convert: (models) {
return models.tableList return models.tableList!
.map((e) => FacilitiesCheckListModel.fromJson(e)) .map((e) => FacilitiesCheckListModel.fromJson(e))
.toList(); .toList();
}, },
@ -58,7 +58,7 @@ class _FacilitiesViewState extends State<FacilitiesView> {
facilitiesType: widget.facilitiesType, facilitiesType: widget.facilitiesType,
model: items[index], model: items[index],
callRefresh: () { callRefresh: () {
_refreshController.callRefresh(); _refreshController!.callRefresh();
}, },
); );
}, },

@ -23,8 +23,8 @@ import 'package:aku_community_manager/ui/manage_pages/green_manage/green_manage_
class GreenManageCard extends StatefulWidget { class GreenManageCard extends StatefulWidget {
final int index; final int index;
final GreenManageListModel model; final GreenManageListModel model;
final VoidCallback callRefresh; final VoidCallback? callRefresh;
GreenManageCard({Key key, this.index, this.model, this.callRefresh}) GreenManageCard({Key? key, required this.index, required this.model, this.callRefresh})
: super(key: key); : super(key: key);
@override @override
@ -51,17 +51,17 @@ class _GreenManageCardState extends State<GreenManageCard> {
child: Row( child: Row(
children: [ children: [
Text( Text(
widget.model.greenAreaName, widget.model.greenAreaName!,
style: TextStyle( style: TextStyle(
color: AppStyle.primaryTextColor, color: AppStyle.primaryTextColor,
fontSize: 32.w, fontSize: 32.w,
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
), ),
Spacer(), Spacer(),
GreenManageMap.statusString(widget.model.status) GreenManageMap.statusString(widget.model.status!)
.text .text
.size(28.sp) .size(28.sp)
.color(GreenManageMap.statusColor(widget.model.status)) .color(GreenManageMap.statusColor(widget.model.status!))
.bold .bold
.make(), .make(),
], ],
@ -86,7 +86,7 @@ class _GreenManageCardState extends State<GreenManageCard> {
)), )),
Spacer(), Spacer(),
Text( Text(
widget.model.content, widget.model.content!,
style: AppStyle().primaryStyle, style: AppStyle().primaryStyle,
), ),
], ],
@ -106,7 +106,7 @@ class _GreenManageCardState extends State<GreenManageCard> {
)), )),
Spacer(), Spacer(),
Text( Text(
widget.model.directorName, widget.model.directorName!,
style: AppStyle().primaryStyle, style: AppStyle().primaryStyle,
), ),
], ],
@ -163,10 +163,10 @@ class _GreenManageCardState extends State<GreenManageCard> {
.post(API.manage.greenManageComplete, params: { .post(API.manage.greenManageComplete, params: {
"id": widget.model.id, "id": widget.model.id,
}); });
if (baseModel.status) { if (baseModel.status!) {
widget.callRefresh(); widget.callRefresh!();
} }
BotToast.showText(text: baseModel.message); BotToast.showText(text: baseModel.message!);
}, },
) )
], ],

@ -44,7 +44,7 @@ class GreenManageDetailsPage extends StatelessWidget {
height: 93.w, height: 93.w,
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: Text( child: Text(
cardModel.greenAreaName, cardModel.greenAreaName!,
style: TextStyle( style: TextStyle(
color: AppStyle.primaryTextColor, color: AppStyle.primaryTextColor,
fontSize: 32.w, fontSize: 32.w,
@ -70,7 +70,7 @@ class GreenManageDetailsPage extends StatelessWidget {
)), )),
Spacer(), Spacer(),
Text( Text(
cardModel.content, cardModel.content!,
style: AppStyle().primaryStyle, style: AppStyle().primaryStyle,
), ),
], ],
@ -111,7 +111,7 @@ class GreenManageDetailsPage extends StatelessWidget {
)), )),
Spacer(), Spacer(),
Text( Text(
cardModel.directorName, cardModel.directorName!,
style: AppStyle().primaryStyle, style: AppStyle().primaryStyle,
), ),
], ],
@ -136,7 +136,7 @@ class GreenManageDetailsPage extends StatelessWidget {
fontWeight: FontWeight.bold)), fontWeight: FontWeight.bold)),
AkuBox.h(16), AkuBox.h(16),
Text( Text(
cardModel.content, cardModel.content!,
style: TextStyle( style: TextStyle(
color: AppStyle.primaryTextColor, fontSize: 28.w), color: AppStyle.primaryTextColor, fontSize: 28.w),
), ),

@ -7,9 +7,9 @@ class GreenManageMap {
case 1: case 1:
return '待处理'; return '待处理';
case 2: case 2:
return '未完成';
case 3:
return '已完成'; return '已完成';
case 3:
return '未完成';
default: default:
return '未知'; return '未知';
} }
@ -20,9 +20,9 @@ class GreenManageMap {
case 1: case 1:
return Color(0xFFFF8200); return Color(0xFFFF8200);
case 2: case 2:
return Color(0xFFE60E0E);
case 3:
return Color(0xFF999999); return Color(0xFF999999);
case 3:
return Color(0xFFE60E0E);
default: default:
return Colors.black; return Colors.black;
} }

@ -11,7 +11,7 @@ import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_community_manager/ui/widgets/inner/aku_tab_bar.dart'; import 'package:aku_community_manager/ui/widgets/inner/aku_tab_bar.dart';
class GreenManagePage extends StatefulWidget { class GreenManagePage extends StatefulWidget {
GreenManagePage({Key key}) : super(key: key); GreenManagePage({Key? key}) : super(key: key);
@override @override
_GreenManagePageState createState() => _GreenManagePageState(); _GreenManagePageState createState() => _GreenManagePageState();
@ -19,8 +19,8 @@ class GreenManagePage extends StatefulWidget {
class _GreenManagePageState extends State<GreenManagePage> class _GreenManagePageState extends State<GreenManagePage>
with TickerProviderStateMixin { with TickerProviderStateMixin {
List<String> _tabs = ['待处理', '未完成', '完成']; List<String> _tabs = ['待处理', '已完成', '完成'];
TabController _tabController; TabController? _tabController;
@override @override
void initState() { void initState() {
@ -30,7 +30,7 @@ class _GreenManagePageState extends State<GreenManagePage>
@override @override
void dispose() { void dispose() {
_tabController.dispose(); _tabController!.dispose();
super.dispose(); super.dispose();
} }
@ -40,7 +40,7 @@ class _GreenManagePageState extends State<GreenManagePage>
title: '绿化管理', title: '绿化管理',
appBarBottom: PreferredSize( appBarBottom: PreferredSize(
preferredSize: Size.fromHeight(88.w), preferredSize: Size.fromHeight(88.w),
child: AkuTabBar(controller: _tabController, tabs: _tabs)), child: AkuTabBar(controller: _tabController!, tabs: _tabs)),
body: TabBarView( body: TabBarView(
controller: _tabController, controller: _tabController,
children: List.generate( children: List.generate(

@ -12,14 +12,14 @@ import 'package:velocity_x/velocity_x.dart';
class GreenManageView extends StatefulWidget { class GreenManageView extends StatefulWidget {
final int index; final int index;
GreenManageView({Key key, this.index}) : super(key: key); GreenManageView({Key? key, required this.index}) : super(key: key);
@override @override
_GreenManageViewState createState() => _GreenManageViewState(); _GreenManageViewState createState() => _GreenManageViewState();
} }
class _GreenManageViewState extends State<GreenManageView> { class _GreenManageViewState extends State<GreenManageView> {
EasyRefreshController _refreshController; EasyRefreshController? _refreshController;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@ -28,7 +28,7 @@ class _GreenManageViewState extends State<GreenManageView> {
@override @override
void dispose() { void dispose() {
_refreshController.dispose(); _refreshController!.dispose();
super.dispose(); super.dispose();
} }
@ -41,7 +41,7 @@ class _GreenManageViewState extends State<GreenManageView> {
}, },
controller: _refreshController, controller: _refreshController,
convert: (models) { convert: (models) {
return models.tableList return models.tableList!
.map((e) => GreenManageListModel.fromJson(e)) .map((e) => GreenManageListModel.fromJson(e))
.toList(); .toList();
}, },
@ -53,7 +53,7 @@ class _GreenManageViewState extends State<GreenManageView> {
index: widget.index, index: widget.index,
model: items[index], model: items[index],
callRefresh: () { callRefresh: () {
_refreshController.callRefresh(); _refreshController!.callRefresh();
}, },
); );
}, },

@ -17,7 +17,7 @@ import 'package:velocity_x/velocity_x.dart';
import 'package:aku_community_manager/tools/extensions/list_extension_tool.dart'; import 'package:aku_community_manager/tools/extensions/list_extension_tool.dart';
class HouseKeepingAddPage extends StatefulWidget { class HouseKeepingAddPage extends StatefulWidget {
HouseKeepingAddPage({Key key}) : super(key: key); HouseKeepingAddPage({Key? key}) : super(key: key);
@override @override
_HouseKeepingAddPageState createState() => _HouseKeepingAddPageState(); _HouseKeepingAddPageState createState() => _HouseKeepingAddPageState();
@ -27,10 +27,10 @@ class _HouseKeepingAddPageState extends State<HouseKeepingAddPage> {
HouseKeepingBuildingModel _buidling = HouseKeepingBuildingModel.init(); HouseKeepingBuildingModel _buidling = HouseKeepingBuildingModel.init();
HouseKeepingBuildingModel _united = HouseKeepingBuildingModel.init(); HouseKeepingBuildingModel _united = HouseKeepingBuildingModel.init();
HouseKeepingBuildingModel _houseProperty = HouseKeepingBuildingModel.init(); HouseKeepingBuildingModel _houseProperty = HouseKeepingBuildingModel.init();
TextEditingController _nameController; TextEditingController? _nameController;
TextEditingController _telController; TextEditingController? _telController;
TextEditingController _numController; TextEditingController? _numController;
TextEditingController _contentController; TextEditingController? _contentController;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@ -42,10 +42,10 @@ class _HouseKeepingAddPageState extends State<HouseKeepingAddPage> {
@override @override
void dispose() { void dispose() {
_nameController.dispose(); _nameController!.dispose();
_telController.dispose(); _telController!.dispose();
_numController.dispose(); _numController!.dispose();
_contentController.dispose(); _contentController!.dispose();
super.dispose(); super.dispose();
} }
@ -87,14 +87,14 @@ class _HouseKeepingAddPageState extends State<HouseKeepingAddPage> {
API.manage.addHouseKeeping, API.manage.addHouseKeeping,
params: { params: {
"estateId": _houseProperty.value, "estateId": _houseProperty.value,
"num": int.parse(_numController.text), "num": int.parse(_numController!.text),
"leaderName": _nameController.text, "leaderName": _nameController!.text,
"leaderTel": _telController.text, "leaderTel": _telController!.text,
"content": _contentController.text, "content": _contentController!.text,
}, },
showMessage: true, showMessage: true,
); );
if (baseModel.status) { if (baseModel.status!) {
Get.back(); Get.back();
} }
} }
@ -126,7 +126,7 @@ class _HouseKeepingAddPageState extends State<HouseKeepingAddPage> {
onTap: () async { onTap: () async {
List<HouseKeepingBuildingModel> _models = []; List<HouseKeepingBuildingModel> _models = [];
Response response = await NetUtil().dio.get( Response response = await NetUtil().dio!.get(
API.manage.allBuilding, API.manage.allBuilding,
); );
if (response.statusCode == 200) { if (response.statusCode == 200) {
@ -155,7 +155,7 @@ class _HouseKeepingAddPageState extends State<HouseKeepingAddPage> {
.color(kTextSubColor) .color(kTextSubColor)
.bold .bold
.make() .make()
: _buidling.label.text : _buidling.label!.text
.size(28.sp) .size(28.sp)
.color(kTextPrimaryColor) .color(kTextPrimaryColor)
.make(), .make(),
@ -184,7 +184,7 @@ class _HouseKeepingAddPageState extends State<HouseKeepingAddPage> {
return; return;
} }
Response response = await NetUtil().dio.get(API.manage.allUnit, Response response = await NetUtil().dio!.get(API.manage.allUnit,
queryParameters: {"buildingId": _buidling.value}); queryParameters: {"buildingId": _buidling.value});
if (response.statusCode == 200) { if (response.statusCode == 200) {
_models = (response.data as List) _models = (response.data as List)
@ -208,7 +208,7 @@ class _HouseKeepingAddPageState extends State<HouseKeepingAddPage> {
.color(kTextSubColor) .color(kTextSubColor)
.bold .bold
.make() .make()
: _united.label.text : _united.label!.text
.size(28.sp) .size(28.sp)
.color(kTextPrimaryColor) .color(kTextPrimaryColor)
.make(), .make(),
@ -237,7 +237,7 @@ class _HouseKeepingAddPageState extends State<HouseKeepingAddPage> {
return; return;
} }
Response response = await NetUtil().dio.get(API.manage.allHous, Response response = await NetUtil().dio!.get(API.manage.allHous,
queryParameters: {"unitId": _united.value}); queryParameters: {"unitId": _united.value});
if (response.statusCode == 200) { if (response.statusCode == 200) {
_models = (response.data as List) _models = (response.data as List)
@ -261,7 +261,7 @@ class _HouseKeepingAddPageState extends State<HouseKeepingAddPage> {
.color(kTextSubColor) .color(kTextSubColor)
.bold .bold
.make() .make()
: _houseProperty.label.text : _houseProperty.label!.text
.size(28.sp) .size(28.sp)
.color(kTextPrimaryColor) .color(kTextPrimaryColor)
.make(), .make(),
@ -277,7 +277,7 @@ class _HouseKeepingAddPageState extends State<HouseKeepingAddPage> {
} }
Future _showBottomSheet(String title, List<HouseKeepingBuildingModel> models, Future _showBottomSheet(String title, List<HouseKeepingBuildingModel> models,
{Function(HouseKeepingBuildingModel model) onTap}) async { {Function(HouseKeepingBuildingModel model)? onTap}) async {
await Get.bottomSheet( await Get.bottomSheet(
CupertinoActionSheet( CupertinoActionSheet(
title: title.text title: title.text
@ -290,11 +290,11 @@ class _HouseKeepingAddPageState extends State<HouseKeepingAddPage> {
.map( .map(
(e) => CupertinoActionSheetAction( (e) => CupertinoActionSheetAction(
onPressed: () { onPressed: () {
onTap(e); onTap!(e);
Get.back(); Get.back();
setState(() {}); setState(() {});
}, },
child: e.label.text child: e.label!.text
.size(28.sp) .size(28.sp)
.color(kTextPrimaryColor) .color(kTextPrimaryColor)
.isIntrinsic .isIntrinsic
@ -306,8 +306,8 @@ class _HouseKeepingAddPageState extends State<HouseKeepingAddPage> {
); );
} }
Widget _inputRowTile(String title, TextEditingController controller, Widget _inputRowTile(String title, TextEditingController? controller,
{String hintText, List<TextInputFormatter> formatters}) { {String? hintText, List<TextInputFormatter>? formatters}) {
return Container( return Container(
width: double.infinity, width: double.infinity,
child: Column( child: Column(

@ -10,7 +10,7 @@ import 'package:aku_community_manager/tools/extensions/list_extension_tool.dart'
class HouseKeepingCard extends StatefulWidget { class HouseKeepingCard extends StatefulWidget {
final HouseKeepingListModel model; final HouseKeepingListModel model;
HouseKeepingCard({Key key, this.model}) : super(key: key); HouseKeepingCard({Key? key, required this.model}) : super(key: key);
@override @override
_HouseKeepingCardState createState() => _HouseKeepingCardState(); _HouseKeepingCardState createState() => _HouseKeepingCardState();
@ -44,7 +44,7 @@ class _HouseKeepingCardState extends State<HouseKeepingCard> {
_rowTile( _rowTile(
R.ASSETS_MANAGE_IC_RENWU_PNG, R.ASSETS_MANAGE_IC_RENWU_PNG,
'房产名称', '房产名称',
widget.model.roomName.text widget.model.roomName!.text
.size(24.sp) .size(24.sp)
.color(kTextSubColor) .color(kTextSubColor)
.make()), .make()),
@ -60,14 +60,14 @@ class _HouseKeepingCardState extends State<HouseKeepingCard> {
_rowTile( _rowTile(
R.ASSETS_MANAGE_IC_RENWU_PNG, R.ASSETS_MANAGE_IC_RENWU_PNG,
'负责人姓名', '负责人姓名',
widget.model.leaderName.text widget.model.leaderName!.text
.size(24.sp) .size(24.sp)
.color(kTextSubColor) .color(kTextSubColor)
.make()), .make()),
_rowTile( _rowTile(
R.ASSETS_MESSAGE_IC_PHONE_PNG, R.ASSETS_MESSAGE_IC_PHONE_PNG,
'负责人手机', '负责人手机',
widget.model.leaderTel.text widget.model.leaderTel!.text
.size(24.sp) .size(24.sp)
.color(kTextSubColor) .color(kTextSubColor)
.make()), .make()),

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save