flutter 升级至空安全

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

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

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

@ -1,10 +1,10 @@
class AnnouncementListModel {
int id;
String title;
String releaseTime;
List<String> imgUrls;
int? id;
String? title;
String? releaseTime;
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) {
id = json['id'];

@ -1,13 +1,13 @@
class ImgModel {
String url;
String size;
int longs;
int paragraph;
int sort;
String? url;
String? size;
int? longs;
int? paragraph;
int? 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.isEmpty) return '';
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';
class ActivityDetailModel {
int id;
String title;
String content;
String activityStartTime;
String activityEndTime;
String location;
String registrationEndTime;
List<ImgModel> imgUrls;
ImgModel get firstImg {
if (imgUrls.isEmpty)
int? id;
String? title;
String? content;
String? activityStartTime;
String? activityEndTime;
String? location;
String? registrationEndTime;
List<ImgModel>? imgUrls;
ImgModel? get firstImg {
if (imgUrls!.isEmpty)
return null;
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(
{this.id,
{required this.id,
this.title,
this.content,
this.activityStartTime,
@ -45,9 +45,9 @@ class ActivityDetailModel {
location = json['location'];
registrationEndTime = json['registrationEndTime'];
if (json['imgUrls'] != null) {
imgUrls = new List<ImgModel>();
imgUrls = <ImgModel>[];
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['registrationEndTime'] = this.registrationEndTime;
if (this.imgUrls != null) {
data['imgUrls'] = this.imgUrls.map((v) => v.toJson()).toList();
data['imgUrls'] = this.imgUrls!.map((v) => v.toJson()).toList();
}
return data;
}

@ -5,30 +5,30 @@ import 'package:common_utils/common_utils.dart';
import 'package:aku_community_manager/models/common/img_model.dart';
class ActivityItemModel {
int id;
String title;
String sponsorName;
String location;
String registrationStartTime;
String registrationEndTime;
String createDate;
List<ImgModel> imgUrls;
int? id;
String? title;
String? sponsorName;
String? location;
String? registrationStartTime;
String? registrationEndTime;
String? createDate;
List<ImgModel>? imgUrls;
ImgModel get firstImg {
if (imgUrls.isEmpty)
ImgModel? get firstImg {
if (imgUrls!.isEmpty)
return null;
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(
{this.id,
{required this.id,
this.title,
this.sponsorName,
this.location,
@ -46,9 +46,9 @@ class ActivityItemModel {
registrationEndTime = json['registrationEndTime'];
createDate = json['createDate'];
if (json['imgUrls'] != null) {
imgUrls = new List<ImgModel>();
imgUrls =<ImgModel>[];
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['createDate'] = this.createDate;
if (this.imgUrls != null) {
data['imgUrls'] = this.imgUrls.map((v) => v.toJson()).toList();
data['imgUrls'] = this.imgUrls!.map((v) => v.toJson()).toList();
}
return data;
}

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

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

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

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

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

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

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

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

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

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

@ -3,20 +3,20 @@ import 'package:common_utils/common_utils.dart';
import 'package:flutter/material.dart';
class ClockApplyRecordListModel {
int id;
String reason;
int status;
int type;
String startDate;
String endDate;
String createName;
String createTel;
String createDate;
String reviewerName;
String reviewerDate;
int? id;
String? reason;
int? status;
int? type;
String? startDate;
String? endDate;
String? createName;
String? createTel;
String? createDate;
String? reviewerName;
String? reviewerDate;
ClockApplyRecordListModel(
{this.id,
{required this.id,
this.reason,
this.status,
this.type,
@ -96,9 +96,9 @@ class ClockApplyRecordListModel {
}
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 =>
DateUtil.formatDateStr(this.endDate, format: 'yyyy-MM-dd HH:mm');
DateUtil.formatDateStr(this.endDate!, format: 'yyyy-MM-dd HH:mm');
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';
class ClockRecordListModel {
int id;
String startClockDate;
String endClockDate;
String cardReplacementDate;
String operatorName;
String clockName;
String clockTel;
String createDate;
int? id;
String? startClockDate;
String? endClockDate;
String? cardReplacementDate;
String? operatorName;
String? clockName;
String? clockTel;
String? createDate;
ClockRecordListModel(
{this.id,
{required this.id,
this.startClockDate,
this.endClockDate,
this.cardReplacementDate,
@ -54,5 +54,5 @@ class ClockRecordListModel {
String get clockDateString =>
DateUtil.formatDateStr(this.createDate??'', format: 'yyyy.MM.dd');
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';
class TodayClockRecordModel {
int id;
String startClockDate;
String endClockDate;
String cardReplacementDate;
String operatorName;
String clockName;
String clockTel;
String createDate;
int? id;
String? startClockDate;
String? endClockDate;
String? cardReplacementDate;
String? operatorName;
String? clockName;
String? clockTel;
String? createDate;
TodayClockRecordModel(
{this.id,
{required this.id,
this.startClockDate,
this.endClockDate,
this.cardReplacementDate,
@ -44,6 +44,6 @@ class TodayClockRecordModel {
return data;
}
DateTime get clockInTime => DateUtil.getDateTime(this.startClockDate);
DateTime get clockOutTime => DateUtil.getDateTime(this.endClockDate);
DateTime? get clockInTime => DateUtil.getDateTime(this.startClockDate!);
DateTime? get clockOutTime => DateUtil.getDateTime(this.endClockDate!);
}

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

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

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

@ -1,17 +1,17 @@
class FixerItemModel {
int id;
String name;
List<RepairmanVos> repairmanVos;
int? id;
String? name;
List<RepairmanVos>? repairmanVos;
FixerItemModel({this.id, this.name, this.repairmanVos});
FixerItemModel({required this.id, this.name, this.repairmanVos});
FixerItemModel.fromJson(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
if (json['repairmanVos'] != null) {
repairmanVos = new List<RepairmanVos>();
repairmanVos = <RepairmanVos>[];
json['repairmanVos'].forEach((v) {
repairmanVos.add(new RepairmanVos.fromJson(v));
repairmanVos!.add(new RepairmanVos.fromJson(v));
});
} else
repairmanVos = [];
@ -22,16 +22,16 @@ class FixerItemModel {
data['id'] = this.id;
data['name'] = this.name;
if (this.repairmanVos != null) {
data['repairmanVos'] = this.repairmanVos.map((v) => v.toJson()).toList();
data['repairmanVos'] = this.repairmanVos!.map((v) => v.toJson()).toList();
}
return data;
}
}
class RepairmanVos {
int id;
String name;
String tel;
int? id;
String? name;
String? 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
// * remarks 使status=3
class GoodsOutDetailModel {
int id;
int? id;
///status (1.2.3.)
int status;
String roomName;
String applicantName;
int? status;
String? roomName;
String? applicantName;
///identity 123
int identity;
String applicantTel;
String expectedTime;
String articleOutName;
int weight;
int? identity;
String? applicantTel;
String? expectedTime;
String? articleOutName;
int? weight;
///approach 1.2.
int approach;
List<ImgModel> imgUrls;
String reviewDate;
int export;
String remarks;
int? approach;
List<ImgModel>? imgUrls;
String? reviewDate;
int? export;
String? remarks;
String get exportValue {
switch (export) {
@ -58,8 +58,8 @@ class GoodsOutDetailModel {
}
}
DateTime get review => DateUtil.getDateTime(reviewDate);
DateTime get expected => DateUtil.getDateTime(expectedTime);
DateTime? get review => DateUtil.getDateTime(reviewDate!);
DateTime? get expected => DateUtil.getDateTime(expectedTime!);
///approach 1.2.
String get approachValue {
@ -125,7 +125,7 @@ class GoodsOutDetailModel {
}
GoodsOutDetailModel(
{this.id,
{required this.id,
this.status,
this.roomName,
this.applicantName,
@ -152,9 +152,9 @@ class GoodsOutDetailModel {
weight = json['weight'];
approach = json['approach'];
if (json['imgUrls'] != null) {
imgUrls = new List<ImgModel>();
imgUrls = <ImgModel>[];
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v));
imgUrls!.add(new ImgModel.fromJson(v));
});
} else
imgUrls = [];
@ -176,7 +176,7 @@ class GoodsOutDetailModel {
data['weight'] = this.weight;
data['approach'] = this.approach;
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['export'] = this.export;

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

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

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

@ -1,17 +1,17 @@
import 'package:common_utils/common_utils.dart';
class HygienceListModel {
int id;
String hygieneAreaName;
String content;
String directorName;
int status;
String completeDate;
String endDate;
String createDate;
int? id;
String? hygieneAreaName;
String? content;
String? directorName;
int? status;
String? completeDate;
String? endDate;
String? createDate;
HygienceListModel(
{this.id,
{required this.id,
this.hygieneAreaName,
this.content,
this.directorName,
@ -44,11 +44,11 @@ class HygienceListModel {
return data;
}
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 =>
DateUtil.formatDateStr(this.endDate, format: 'yy-MM-dd HH:mm');
DateUtil.formatDateStr(this.endDate!, format: 'yy-MM-dd HH:mm');
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';
class InspectionCheckDetialModel {
int id;
int executeId;
String code;
String name;
int type;
String completeDate;
List<CheckFBIVoList> checkFBIVoList;
List<ImgModel> faceImg;
List<ImgModel> spaceImg;
int? id;
int? executeId;
String? code;
String? name;
int? type;
String? completeDate;
List<CheckFBIVoList>? checkFBIVoList;
List<ImgModel>? faceImg;
List<ImgModel>? spaceImg;
InspectionCheckDetialModel(
{this.id,
{required this.id,
this.executeId,
this.code,
this.name,
@ -31,21 +31,21 @@ class InspectionCheckDetialModel {
type = json['type'];
completeDate = json['completeDate'];
if (json['checkFBIVoList'] != null) {
checkFBIVoList = new List<CheckFBIVoList>();
checkFBIVoList = <CheckFBIVoList>[];
json['checkFBIVoList'].forEach((v) {
checkFBIVoList.add(new CheckFBIVoList.fromJson(v));
checkFBIVoList!.add(new CheckFBIVoList.fromJson(v));
});
}
if (json['faceImg'] != null) {
faceImg = new List<ImgModel>();
faceImg = <ImgModel>[];
json['faceImg'].forEach((v) {
faceImg.add(new ImgModel.fromJson(v));
faceImg!.add(new ImgModel.fromJson(v));
});
}
if (json['spaceImg'] != null) {
spaceImg = new List<ImgModel>();
spaceImg = <ImgModel>[];
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;
if (this.checkFBIVoList != null) {
data['checkFBIVoList'] =
this.checkFBIVoList.map((v) => v.toJson()).toList();
this.checkFBIVoList!.map((v) => v.toJson()).toList();
}
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) {
data['spaceImg'] = this.spaceImg.map((v) => v.toJson()).toList();
data['spaceImg'] = this.spaceImg!.map((v) => v.toJson()).toList();
}
return data;
}
@ -75,7 +75,7 @@ class InspectionCheckDetialModel {
switch (this.type) {
case 1:
return '巡检模式1';
break;
default:
return '未知';
}
@ -83,10 +83,10 @@ class InspectionCheckDetialModel {
}
class CheckFBIVoList {
int id;
String name;
int status;
String remakes;
int? id;
String? name;
int? status;
String? remakes;
CheckFBIVoList({this.id, this.name, this.status, this.remakes});
@ -108,11 +108,11 @@ class CheckFBIVoList {
}
class FaceImg {
String url;
int size;
int longs;
int paragraph;
int sort;
String? url;
int? size;
int? longs;
int? paragraph;
int? sort;
FaceImg({this.url, this.size, this.longs, this.paragraph, this.sort});
@ -133,6 +133,4 @@ class FaceImg {
data['sort'] = this.sort;
return data;
}
}

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

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

@ -1,10 +1,10 @@
class InspectionPointModel {
int id;
String name;
int checkNum;
String completeDate;
int? id;
String? name;
int? checkNum;
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) {
id = json['id'];

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

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

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

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

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

@ -1,17 +1,17 @@
import 'package:common_utils/common_utils.dart';
class KeyManageRecordListModel {
int id;
String code;
int status;
String facilityName;
String correspondingPosition;
String storageLocation;
String auditDate;
String reason;
int? id;
String? code;
int? status;
String? facilityName;
String? correspondingPosition;
String? storageLocation;
String? auditDate;
String? reason;
KeyManageRecordListModel(
{this.id,
{required this.id,
this.code,
this.status,
this.facilityName,
@ -44,5 +44,5 @@ class KeyManageRecordListModel {
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';
class NewRenovationListModel {
int id;
String roomName;
int status;
String constructionUnit;
String director;
String directorTel;
String expectedBegin;
String expectedEnd;
String actualBegin;
String actualEnd;
String rejectReason;
String reviewerName;
String auditDate;
String trackerName;
String applicationCheckDate;
int isQualified;
String createName;
String createDate;
List<CheckVoList> checkVoList;
int? id;
String? roomName;
int? status;
String? constructionUnit;
String? director;
String? directorTel;
String? expectedBegin;
String? expectedEnd;
String? actualBegin;
String? actualEnd;
String? rejectReason;
String? reviewerName;
String? auditDate;
String? trackerName;
String? applicationCheckDate;
int? isQualified;
String? createName;
String? createDate;
List<CheckVoList>? checkVoList;
NewRenovationListModel(
{this.id,
{required this.id,
this.roomName,
this.status,
this.constructionUnit,
@ -64,9 +64,9 @@ class NewRenovationListModel {
createName = json['createName'];
createDate = json['createDate'];
if (json['checkVoList'] != null) {
checkVoList = new List<CheckVoList>();
checkVoList = <CheckVoList>[];
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['createDate'] = this.createDate;
if (this.checkVoList != null) {
data['checkVoList'] = this.checkVoList.map((v) => v.toJson()).toList();
data['checkVoList'] = this.checkVoList!.map((v) => v.toJson()).toList();
}
return data;
}
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 =>
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 ?? '',
format: 'yyyy-MM-dd HH:mm');
@ -109,7 +109,7 @@ class NewRenovationListModel {
String get actualEndString =>
DateUtil.formatDateStr(this.actualEnd ?? '', format: 'yyyy-MM-dd HH:mm');
String get expectSlot =>
'${expectBginString}-${DateUtil.formatDateStr(this.expectedEnd, format: 'HH:mm')}';
'${expectBginString}-${DateUtil.formatDateStr(this.expectedEnd!, format: 'HH:mm')}';
String get actualSlot =>
'${actualBginString}-${DateUtil.formatDateStr(this.actualEnd ?? '', format: 'HH:mm')}';
@ -173,12 +173,12 @@ class NewRenovationListModel {
}
class CheckVoList {
int id;
int decorationNewId;
String detail;
int isQualified;
String createName;
String createDate;
int? id;
int? decorationNewId;
String? detail;
int? isQualified;
String? createName;
String? createDate;
CheckVoList(
{this.id,

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

@ -1,15 +1,15 @@
import 'package:common_utils/common_utils.dart';
class RulesManageListModel {
int id;
String title;
String content;
String fileDocUrl;
String fileDocName;
String releaseDate;
int? id;
String? title;
String? content;
String? fileDocUrl;
String? fileDocName;
String? releaseDate;
RulesManageListModel(
{this.id,
{required this.id,
this.title,
this.content,
this.fileDocUrl,
@ -36,5 +36,5 @@ class RulesManageListModel {
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';
class VisitorItemModel {
int id;
String roomName;
String name;
int isDrive;
String carNum;
String effectiveTime;
String visitDate;
int visitorStatus;
int? id;
String? roomName;
String? name;
int? isDrive;
String? carNum;
String? effectiveTime;
String? visitDate;
int? visitorStatus;
DateTime get effective => DateUtil.getDateTime(effectiveTime);
DateTime get visit =>
visitDate == null ? null : DateUtil.getDateTime(visitDate);
DateTime? get effective => DateUtil.getDateTime(effectiveTime!);
DateTime? get visit =>
visitDate == null ? null : DateUtil.getDateTime(visitDate!);
VisitorItemModel(
{this.id,
{required this.id,
this.roomName,
this.name,
this.isDrive,

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

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

@ -1,10 +1,10 @@
class SystemMessageDetailModel {
int id;
String name;
String tel;
int type;
int? id;
String? name;
String? tel;
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) {
id = json['id'];

@ -2,12 +2,12 @@
import 'package:common_utils/common_utils.dart';
class SystemMessageItemModel {
int id;
int type;
int relationId;
String sendDate;
int? id;
int? type;
int? relationId;
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) {
id = json['id'];
@ -26,5 +26,5 @@ class SystemMessageItemModel {
}
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 {
dynamic dynamicModel;
int type;
int? type;
ToDoModel({this.dynamicModel, this.type});

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

@ -1,31 +1,31 @@
class UserInfoModel {
int id;
String roleId;
String nickName;
List<int> jurisdiction;
int? id;
String? roleId;
String? nickName;
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;
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) {
id = json['id'];

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -8,9 +8,9 @@ import 'package:aku_community_manager/utils/network/net_util.dart';
class BussinessFunc {
static Future getBussinessModelList(int backlogStatus) async {
Response response =
await NetUtil().dio.get(API.manage.backlogList, queryParameters: {
await NetUtil().dio!.get(API.manage.backlogList, queryParameters: {
"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 {
final ToDoOutDoorModel model;
final VoidCallback callRefresh;
final VoidCallback? callRefresh;
final bool homeDisplay;
ToDoOutDoorCard(
{Key key, this.model, this.callRefresh, this.homeDisplay = false})
{Key? key, required this.model, this.callRefresh, this.homeDisplay = false})
: super(key: key);
@override
@ -31,9 +31,9 @@ class _ToDoOutDoorCardState extends State<ToDoOutDoorCard> {
TextStyle(color: AppStyle.minorTextColor, fontSize: 28.sp);
return GestureDetector(
onTap: () async {
await Get.to(ItemsOutdoorDetailsPage(id: widget.model.id));
await Get.to(ItemsOutdoorDetailsPage(id: widget.model.id!));
if (widget.callRefresh != null) {
widget.callRefresh();
widget.callRefresh!();
}
},
child: Container(
@ -65,7 +65,7 @@ class _ToDoOutDoorCardState extends State<ToDoOutDoorCard> {
),
),
16.w.widthBox,
//TODO
//
// Text(
// widget.model.create,
// style: TextStyle(
@ -120,7 +120,7 @@ class _ToDoOutDoorCardState extends State<ToDoOutDoorCard> {
Text('详细地址', style: _textStyle),
Spacer(),
Text(
widget.model.roomName,
widget.model.roomName!,
style: AppStyle().primaryStyle,
),
],
@ -140,7 +140,7 @@ class _ToDoOutDoorCardState extends State<ToDoOutDoorCard> {
),
Spacer(),
Text(
widget.model.applicantName,
widget.model.applicantName!,
style: AppStyle().primaryStyle,
),
],
@ -183,7 +183,7 @@ class _ToDoOutDoorCardState extends State<ToDoOutDoorCard> {
),
Spacer(),
Text(
widget.model.articleOutName,
widget.model.articleOutName!,
style: AppStyle().primaryStyle,
),
],
@ -203,7 +203,7 @@ class _ToDoOutDoorCardState extends State<ToDoOutDoorCard> {
),
Spacer(),
Text(
widget.model.expectedTime,
widget.model.expectedTime!,
style: AppStyle().primaryStyle,
),
],
@ -217,9 +217,9 @@ class _ToDoOutDoorCardState extends State<ToDoOutDoorCard> {
alignment: Alignment.centerRight,
child: AkuButton(
onPressed: () async {
await Get.to(ItemsOutdoorDetailsPage(id: widget.model.id));
await Get.to(ItemsOutdoorDetailsPage(id: widget.model.id!));
if (widget.callRefresh != null) {
widget.callRefresh();
widget.callRefresh!();
}
},
child: Container(

@ -1,4 +1,6 @@
// 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_material_button.dart';
import 'package:flutter/material.dart';
@ -47,7 +49,7 @@ import 'package:aku_community_manager/utils/network/net_util.dart';
class HomePage extends StatefulWidget {
HomePage({
Key key,
Key? key,
}) : super(key: key);
@override
@ -55,11 +57,11 @@ class HomePage extends StatefulWidget {
}
class _HomePageState extends State<HomePage> {
ItemNumModel _itemNumModel;
List _todoModelList;
List _anounceMentList;
late ItemNumModel _itemNumModel;
List? _todoModelList;
late List _anounceMentList;
bool _onload = true;
EasyRefreshController _refreshController;
EasyRefreshController? _refreshController;
///bar
Widget _menuButton(String assetPath, String text, Widget page) {
@ -103,7 +105,7 @@ class _HomePageState extends State<HomePage> {
///
Widget _card(
int number,
int? number,
String text,
Color color,
int index,
@ -157,7 +159,7 @@ class _HomePageState extends State<HomePage> {
int _currentIndicator = 0;
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);
}
@ -167,7 +169,7 @@ class _HomePageState extends State<HomePage> {
"pageNum": 1,
"size": 3,
}));
List<AnnouncementListModel> anounceModels = baseListModel.tableList
List<AnnouncementListModel> anounceModels = baseListModel.tableList!
.map((e) => AnnouncementListModel.fromJson(e))
.toList();
return anounceModels;
@ -352,7 +354,7 @@ class _HomePageState extends State<HomePage> {
height: 67.w,
child: Text(
userProvider.isLogin
? 'HI${userProvider.infoModel.nickName}'
? 'HI${userProvider.infoModel!.nickName}'
: '登录/注册',
style: TextStyle(
color: AppStyle.primaryTextColor,
@ -569,29 +571,29 @@ class _HomePageState extends State<HomePage> {
width: 526.w,
child: Builder(
builder: (context) {
if (_todoModelList[index]
if (_todoModelList![index]
.dynamicModel
.runtimeType ==
BussinessAndFixModel) {
return BusinessFixCard(
homeDisplay: true,
callRefresh: () {
_refreshController
_refreshController!
.callRefresh();
},
model: _todoModelList[index]
model: _todoModelList![index]
.dynamicModel);
} else if (_todoModelList[index]
} else if (_todoModelList![index]
.dynamicModel
.runtimeType ==
ToDoOutDoorModel) {
return ToDoOutDoorCard(
homeDisplay: true,
callRefresh: () {
_refreshController
_refreshController!
.callRefresh();
},
model: _todoModelList[index]
model: _todoModelList![index]
.dynamicModel,
);
} else
@ -600,7 +602,7 @@ class _HomePageState extends State<HomePage> {
),
);
},
itemCount: _todoModelList.length,
itemCount: _todoModelList!.length,
),
),
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';
class CommentMessage extends StatefulWidget {
CommentMessage({Key key}) : super(key: key);
CommentMessage({Key? key}) : super(key: key);
@override
_CommentMessageState createState() => _CommentMessageState();
@ -31,7 +31,7 @@ class _CommentMessageState extends State<CommentMessage> {
body: BeeListView(
controller: _refreshController,
path: API.message.commentList,
convert: (model) => model.tableList
convert: (model) => model.tableList!
.map((e) => CommentMessageItemModel.fromJson(e))
.toList(),
builder: (items) {

@ -17,14 +17,14 @@ import 'package:aku_community_manager/utils/network/net_util.dart';
class CommentMessageCard extends StatefulWidget {
final CommentMessageItemModel itemModel;
CommentMessageCard({Key key, @required this.itemModel}) : super(key: key);
CommentMessageCard({Key? key, /*required*/ required this.itemModel}) : super(key: key);
@override
_CommentMessageCardState createState() => _CommentMessageCardState();
}
class _CommentMessageCardState extends State<CommentMessageCard> {
CommentMessageDetailModel _model;
CommentMessageDetailModel? _model;
bool _onload = true;
@override
@ -50,7 +50,7 @@ class _CommentMessageCardState extends State<CommentMessageCard> {
switch (level) {
case 1:
return '半星';
break;
case 2:
return '一星';
case 3:
@ -200,7 +200,7 @@ class _CommentMessageCardState extends State<CommentMessageCard> {
);
}
Widget _messageList(CommentMessageDetailModel model) {
Widget _messageList(CommentMessageDetailModel? model) {
return _onload
? _loadingWidget()
: Column(
@ -265,7 +265,7 @@ class _CommentMessageCardState extends State<CommentMessageCard> {
),
Spacer(),
Text(
'${model.name}',
'${model!.name}',
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: 28.sp),
@ -288,7 +288,7 @@ class _CommentMessageCardState extends State<CommentMessageCard> {
color: AppStyle.minorTextColor,
fontSize: 28.sp)),
Spacer(),
Text(getComment(model.level),
Text(getComment(model.level!),
style: TextStyle(
color: AppStyle.primaryTextColor,
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';
class Message extends StatefulWidget {
Message({Key key}) : super(key: key);
Message({Key? key}) : super(key: key);
@override
_MessageState createState() => _MessageState();
@ -28,9 +28,9 @@ class Message extends StatefulWidget {
class _MessageState extends State<Message> {
EasyRefreshController _refreshController = EasyRefreshController();
Widget _messageTypeImage(String type) {
String path;
Color ca;
Color cb;
late String path;
Color? ca;
Color? cb;
switch (type) {
case '系统消息':
path = R.ASSETS_MESSAGE_IC_TONGZHI_PNG;
@ -52,7 +52,7 @@ class _MessageState extends State<Message> {
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [ca, cb],
colors: [ca!, cb!],
),
),
child: Image.asset(
@ -65,7 +65,7 @@ class _MessageState extends State<Message> {
Widget _messageListTile(
String date, Widget messageImage, String title, String text, int number,
{VoidCallback onpressed}) {
{required VoidCallback onpressed}) {
return AkuButton(
color: Color(0xFFFFFFFF),
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';
class SystemMessage extends StatefulWidget {
SystemMessage({Key key}) : super(key: key);
SystemMessage({Key? key}) : super(key: key);
@override
_SystemMessageState createState() => _SystemMessageState();
@ -44,7 +44,7 @@ class _SystemMessageState extends State<SystemMessage> {
itemCount: items.length);
},
path: API.message.systemList,
convert: (model) => model.tableList
convert: (model) => model.tableList!
.map((e) => SystemMessageItemModel.fromJson(e))
.toList(),
),

@ -1,4 +1,6 @@
// Flutter imports:
import 'dart:async';
import 'package:aku_community_manager/ui/widgets/common/aku_button.dart';
import 'package:flutter/material.dart';
@ -20,8 +22,8 @@ import 'package:aku_community_manager/utils/network/net_util.dart';
class SystemMessageCard extends StatefulWidget {
final SystemMessageItemModel model;
SystemMessageCard({
Key key,
this.model,
Key? key,
required this.model,
}) : super(key: key);
@override
@ -29,13 +31,13 @@ class SystemMessageCard extends StatefulWidget {
}
class _SystemMessageCardState extends State<SystemMessageCard> {
SystemMessageDetailModel _systemModel;
late SystemMessageDetailModel _systemModel;
bool _onLoad = true;
@override
void initState() {
super.initState();
Future.delayed(Duration(milliseconds: 300), () async {
_systemModel = await getSystemMessage(widget.model.relationId);
_systemModel = await getSystemMessage(widget.model.relationId!);
_onLoad = false;
setState(() {});
});
@ -190,7 +192,7 @@ class _SystemMessageCardState extends State<SystemMessageCard> {
alignment: Alignment.center,
width: double.infinity,
child: Text(
widget.model.sendDate,
widget.model.sendDate!,
style: TextStyle(
color: AppStyle.minorTextColor, fontSize: 24.sp),
),
@ -246,7 +248,7 @@ class _SystemMessageCardState extends State<SystemMessageCard> {
),
Spacer(),
Text(
model.name,
model.name!,
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: 28.sp),
@ -269,7 +271,7 @@ class _SystemMessageCardState extends State<SystemMessageCard> {
color: AppStyle.minorTextColor,
fontSize: 28.sp)),
Spacer(),
Text(model.tel,
Text(model.tel!,
style: TextStyle(
color: AppStyle.primaryTextColor,
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';
class PersonalDraw extends StatefulWidget {
PersonalDraw({Key key}) : super(key: key);
PersonalDraw({Key? key}) : super(key: key);
@override
_PersonalDrawState createState() => _PersonalDrawState();
}
class _PersonalDrawState extends State<PersonalDraw> {
Widget _myListTile(String path, String text, {VoidCallback onPressed}) {
Widget _myListTile(String path, String text, { VoidCallback? onPressed}) {
return AkuButton(
onPressed: onPressed,
child: Container(
@ -84,7 +84,7 @@ class _PersonalDrawState extends State<PersonalDraw> {
//
userProvider.isLogin
? Text(
userProvider.infoModel.nickName,
userProvider.infoModel!.nickName!,
style: TextStyle(
color: AppStyle.primaryTextColor,
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';
class SearchWorkOrderPage extends StatefulWidget {
SearchWorkOrderPage({Key key}) : super(key: key);
SearchWorkOrderPage({Key? key}) : super(key: key);
@override
_SearchWorkOrderpageState createState() => _SearchWorkOrderpageState();
}
class _SearchWorkOrderpageState extends State<SearchWorkOrderPage> {
TextEditingController _textController;
TextEditingController? _textController;
List<AppApplication> _wisdomApplications = [
AppApplication('一键报警', R.ASSETS_HOME_IC_POLICE_PNG, ()=>WarningPage()),
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';
class LoginPage extends StatefulWidget {
LoginPage({Key key}) : super(key: key);
LoginPage({Key? key}) : super(key: key);
@override
_LoginPageState createState() => _LoginPageState();
@ -41,7 +41,7 @@ class _LoginPageState extends State<LoginPage> {
@override
void dispose() {
_textController?.dispose();
_textController.dispose();
super.dispose();
}

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

@ -8,15 +8,15 @@ import 'package:common_utils/common_utils.dart';
class ClockFunc {
static Future initClockInfo() async {
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);
} else {
BotToast.showText(text: baseModel.message);
BotToast.showText(text: baseModel.message!);
}
}
static Future clockIn(int id, DateTime dateTime) async {
BaseModel baseModel = await NetUtil().post(
await NetUtil().post(
API.manage.clockInOut,
params: {
"id": id,
@ -28,7 +28,7 @@ class ClockFunc {
}
static Future clockOut(int id, DateTime dateTime) async {
BaseModel baseModel = await NetUtil().post(API.manage.clockInOut,
await NetUtil().post(API.manage.clockInOut,
params: {
"id": id,
"endClockDate":

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

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

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

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

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

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

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

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

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

@ -15,14 +15,14 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
class FacilitiesView extends StatefulWidget {
final int index;
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
_FacilitiesViewState createState() => _FacilitiesViewState();
}
class _FacilitiesViewState extends State<FacilitiesView> {
EasyRefreshController _refreshController;
EasyRefreshController? _refreshController;
@override
void initState() {
super.initState();
@ -31,7 +31,7 @@ class _FacilitiesViewState extends State<FacilitiesView> {
@override
void dispose() {
_refreshController.dispose();
_refreshController!.dispose();
super.dispose();
}
@ -45,7 +45,7 @@ class _FacilitiesViewState extends State<FacilitiesView> {
},
controller: _refreshController,
convert: (models) {
return models.tableList
return models.tableList!
.map((e) => FacilitiesCheckListModel.fromJson(e))
.toList();
},
@ -58,7 +58,7 @@ class _FacilitiesViewState extends State<FacilitiesView> {
facilitiesType: widget.facilitiesType,
model: items[index],
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 {
final int index;
final GreenManageListModel model;
final VoidCallback callRefresh;
GreenManageCard({Key key, this.index, this.model, this.callRefresh})
final VoidCallback? callRefresh;
GreenManageCard({Key? key, required this.index, required this.model, this.callRefresh})
: super(key: key);
@override
@ -51,17 +51,17 @@ class _GreenManageCardState extends State<GreenManageCard> {
child: Row(
children: [
Text(
widget.model.greenAreaName,
widget.model.greenAreaName!,
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: 32.w,
fontWeight: FontWeight.bold),
),
Spacer(),
GreenManageMap.statusString(widget.model.status)
GreenManageMap.statusString(widget.model.status!)
.text
.size(28.sp)
.color(GreenManageMap.statusColor(widget.model.status))
.color(GreenManageMap.statusColor(widget.model.status!))
.bold
.make(),
],
@ -86,7 +86,7 @@ class _GreenManageCardState extends State<GreenManageCard> {
)),
Spacer(),
Text(
widget.model.content,
widget.model.content!,
style: AppStyle().primaryStyle,
),
],
@ -106,7 +106,7 @@ class _GreenManageCardState extends State<GreenManageCard> {
)),
Spacer(),
Text(
widget.model.directorName,
widget.model.directorName!,
style: AppStyle().primaryStyle,
),
],
@ -163,10 +163,10 @@ class _GreenManageCardState extends State<GreenManageCard> {
.post(API.manage.greenManageComplete, params: {
"id": widget.model.id,
});
if (baseModel.status) {
widget.callRefresh();
if (baseModel.status!) {
widget.callRefresh!();
}
BotToast.showText(text: baseModel.message);
BotToast.showText(text: baseModel.message!);
},
)
],

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

@ -7,9 +7,9 @@ class GreenManageMap {
case 1:
return '待处理';
case 2:
return '未完成';
case 3:
return '已完成';
case 3:
return '未完成';
default:
return '未知';
}
@ -20,9 +20,9 @@ class GreenManageMap {
case 1:
return Color(0xFFFF8200);
case 2:
return Color(0xFFE60E0E);
case 3:
return Color(0xFF999999);
case 3:
return Color(0xFFE60E0E);
default:
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';
class GreenManagePage extends StatefulWidget {
GreenManagePage({Key key}) : super(key: key);
GreenManagePage({Key? key}) : super(key: key);
@override
_GreenManagePageState createState() => _GreenManagePageState();
@ -19,8 +19,8 @@ class GreenManagePage extends StatefulWidget {
class _GreenManagePageState extends State<GreenManagePage>
with TickerProviderStateMixin {
List<String> _tabs = ['待处理', '未完成', '完成'];
TabController _tabController;
List<String> _tabs = ['待处理', '已完成', '完成'];
TabController? _tabController;
@override
void initState() {
@ -30,7 +30,7 @@ class _GreenManagePageState extends State<GreenManagePage>
@override
void dispose() {
_tabController.dispose();
_tabController!.dispose();
super.dispose();
}
@ -40,7 +40,7 @@ class _GreenManagePageState extends State<GreenManagePage>
title: '绿化管理',
appBarBottom: PreferredSize(
preferredSize: Size.fromHeight(88.w),
child: AkuTabBar(controller: _tabController, tabs: _tabs)),
child: AkuTabBar(controller: _tabController!, tabs: _tabs)),
body: TabBarView(
controller: _tabController,
children: List.generate(

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

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

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

Loading…
Cancel
Save