小赖 4 years ago
parent b9a0443201
commit 6f27a6c626

@ -8,8 +8,8 @@ class API {
///
static String get resource => '$host/static';
static String image(String path) => '$resource$path';
static String file(String path) => '$resource$path';
static String image(String? path) => '$resource$path';
static String file(String? path) => '$resource$path';
static const int networkTimeOut = 10000;
static _Login login = _Login();

@ -62,7 +62,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;
}),
@ -121,7 +121,7 @@ class SystemStyle {
systemNavigationBarColor: Color(0xFFFFD000),
);
static genStyle({@required Color bottom}) {
static genStyle({required Color bottom}) {
return SystemUiOverlayStyle(
statusBarIconBrightness: Brightness.light,
systemNavigationBarColor: bottom,

@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
import 'num_ext.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)

@ -30,7 +30,7 @@ void main() async {
}
class MyApp extends StatefulWidget {
MyApp({Key key}) : super(key: key);
MyApp({Key? key}) : super(key: key);
@override
_MyAppState createState() => _MyAppState();
@ -52,13 +52,13 @@ class _MyAppState extends State<MyApp> {
FocusScopeNode currentFocus = FocusScope.of(context);
if (!currentFocus.hasPrimaryFocus &&
currentFocus.focusedChild != null) {
FocusManager.instance.primaryFocus.unfocus();
FocusManager.instance.primaryFocus!.unfocus();
}
},
child: ScreenUtilInit(
designSize: Size(750, 1334),
builder: () => GetMaterialApp(
onGenerateTitle: (context) => S.of(context).appName,
onGenerateTitle: (context) => S.of(context)!.appName,
debugShowCheckedModeBanner: false,
theme: AppTheme.theme,
home: SplashPage(),

@ -48,9 +48,9 @@ class MainInitialize {
}
jpush.addEventHandler(
onReceiveNotification: jPushLogger('onReceiveNotification'),
onOpenNotification: jPushLogger('onOpenNotification'),
onReceiveMessage: jPushLogger('onReceiveMessage'),
onReceiveNotification: jPushLogger('onReceiveNotification') as Future<dynamic> Function(Map<String, dynamic>?)?,
onOpenNotification: jPushLogger('onOpenNotification') as Future<dynamic> Function(Map<String, dynamic>?)?,
onReceiveMessage: jPushLogger('onReceiveMessage') as Future<dynamic> Function(Map<String, dynamic>?)?,
);
jpush.setup(
appKey: "6a2c6507e3e8b3187ac1c9f9",
@ -58,7 +58,7 @@ class MainInitialize {
production: false,
debug: true,
);
String rID = await jpush.getRegistrationID();
String? rID = await jpush.getRegistrationID();
LoggerData.addData(rID, tag: 'RegistrationID');
}

@ -1,10 +1,10 @@
class ImgModel {
String url;
String size;
double longs;
double paragraph;
int sort;
double get aspect => paragraph / longs;
String? url;
String? size;
double? longs;
double? paragraph;
int? sort;
double get aspect => paragraph! / longs!;
ImgModel({this.url, this.size, this.longs, this.paragraph, this.sort});
@ -16,14 +16,13 @@ class ImgModel {
sort = json['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 ?? '';
}
static ImgModel firstModel(List<ImgModel> models) {
if (models == null) return null;
static ImgModel? firstModel(List<ImgModel> models) {
if (models.isEmpty) return null;
return models.first;
}

@ -1,14 +1,14 @@
class RealTimeWeatherModel {
String status;
String apiVersion;
String apiStatus;
String lang;
String unit;
num tzshift;
String timezone;
num serverTime;
List<num> location;
Result result;
String? status;
String? apiVersion;
String? apiStatus;
String? lang;
String? unit;
num? tzshift;
String? timezone;
num? serverTime;
List<num>? location;
Result? result;
RealTimeWeatherModel(
{this.status,
@ -48,15 +48,15 @@ class RealTimeWeatherModel {
data['server_time'] = this.serverTime;
data['location'] = this.location;
if (this.result != null) {
data['result'] = this.result.toJson();
data['result'] = this.result!.toJson();
}
return data;
}
}
class Result {
Realtime realtime;
num primary;
Realtime? realtime;
num? primary;
Result({this.realtime, this.primary});
@ -70,7 +70,7 @@ class Result {
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.realtime != null) {
data['realtime'] = this.realtime.toJson();
data['realtime'] = this.realtime!.toJson();
}
data['primary'] = this.primary;
return data;
@ -78,19 +78,19 @@ class Result {
}
class Realtime {
String status;
num temperature;
num humidity;
num cloudrate;
String skycon;
num visibility;
num dswrf;
Wind wind;
num pressure;
num apparentTemperature;
Precipitation precipitation;
AirQuality airQuality;
LifeIndex lifeIndex;
String? status;
num? temperature;
num? humidity;
num? cloudrate;
String? skycon;
num? visibility;
num? dswrf;
Wind? wind;
num? pressure;
num? apparentTemperature;
Precipitation? precipitation;
AirQuality? airQuality;
LifeIndex? lifeIndex;
Realtime(
{this.status,
@ -139,26 +139,26 @@ class Realtime {
data['visibility'] = this.visibility;
data['dswrf'] = this.dswrf;
if (this.wind != null) {
data['wind'] = this.wind.toJson();
data['wind'] = this.wind!.toJson();
}
data['pressure'] = this.pressure;
data['apparent_temperature'] = this.apparentTemperature;
if (this.precipitation != null) {
data['precipitation'] = this.precipitation.toJson();
data['precipitation'] = this.precipitation!.toJson();
}
if (this.airQuality != null) {
data['air_quality'] = this.airQuality.toJson();
data['air_quality'] = this.airQuality!.toJson();
}
if (this.lifeIndex != null) {
data['life_index'] = this.lifeIndex.toJson();
data['life_index'] = this.lifeIndex!.toJson();
}
return data;
}
}
class Wind {
num speed;
num direction;
num? speed;
num? direction;
Wind({this.speed, this.direction});
@ -176,8 +176,8 @@ class Wind {
}
class Precipitation {
Local local;
Nearest nearest;
Local? local;
Nearest? nearest;
Precipitation({this.local, this.nearest});
@ -190,19 +190,19 @@ class Precipitation {
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.local != null) {
data['local'] = this.local.toJson();
data['local'] = this.local!.toJson();
}
if (this.nearest != null) {
data['nearest'] = this.nearest.toJson();
data['nearest'] = this.nearest!.toJson();
}
return data;
}
}
class Local {
String status;
String datasource;
num numensity;
String? status;
String? datasource;
num? numensity;
Local({this.status, this.datasource, this.numensity});
@ -222,9 +222,9 @@ class Local {
}
class Nearest {
String status;
num distance;
num numensity;
String? status;
num? distance;
num? numensity;
Nearest({this.status, this.distance, this.numensity});
@ -244,14 +244,14 @@ class Nearest {
}
class AirQuality {
num pm25;
num pm10;
num o3;
num so2;
num no2;
num co;
Aqi aqi;
Description description;
num? pm25;
num? pm10;
num? o3;
num? so2;
num? no2;
num? co;
Aqi? aqi;
Description? description;
AirQuality(
{this.pm25,
@ -285,18 +285,18 @@ class AirQuality {
data['no2'] = this.no2;
data['co'] = this.co;
if (this.aqi != null) {
data['aqi'] = this.aqi.toJson();
data['aqi'] = this.aqi!.toJson();
}
if (this.description != null) {
data['description'] = this.description.toJson();
data['description'] = this.description!.toJson();
}
return data;
}
}
class Aqi {
num chn;
num usa;
num? chn;
num? usa;
Aqi({this.chn, this.usa});
@ -314,8 +314,8 @@ class Aqi {
}
class Description {
String usa;
String chn;
String? usa;
String? chn;
Description({this.usa, this.chn});
@ -333,8 +333,8 @@ class Description {
}
class LifeIndex {
Ultraviolet ultraviolet;
Ultraviolet comfort;
Ultraviolet? ultraviolet;
Ultraviolet? comfort;
LifeIndex({this.ultraviolet, this.comfort});
@ -350,18 +350,18 @@ class LifeIndex {
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.ultraviolet != null) {
data['ultraviolet'] = this.ultraviolet.toJson();
data['ultraviolet'] = this.ultraviolet!.toJson();
}
if (this.comfort != null) {
data['comfort'] = this.comfort.toJson();
data['comfort'] = this.comfort!.toJson();
}
return data;
}
}
class Ultraviolet {
num index;
String desc;
num? index;
String? desc;
Ultraviolet({this.index, this.desc});

@ -3,20 +3,20 @@ import 'package:flustars/flustars.dart';
import 'package:aku_community/model/common/img_model.dart';
class ActivityDetailModel {
int id;
String title;
String content;
String location;
String activityStartTime;
String activityEndTime;
String registrationEndTime;
int countRegistration;
List<ImgModel> imgUrls;
List<ImgModel> headImgURls;
int? id;
String? title;
String? content;
String? location;
String? activityStartTime;
String? activityEndTime;
String? registrationEndTime;
int? countRegistration;
List<ImgModel>? imgUrls;
List<ImgModel>? headImgURls;
DateTime get startDate => DateUtil.getDateTime(activityStartTime);
DateTime get endDate => DateUtil.getDateTime(activityEndTime);
DateTime get registEndDate => DateUtil.getDateTime(registrationEndTime);
DateTime? get startDate => DateUtil.getDateTime(activityStartTime!);
DateTime? get endDate => DateUtil.getDateTime(activityEndTime!);
DateTime? get registEndDate => DateUtil.getDateTime(registrationEndTime!);
ActivityDetailModel(
{this.id,
@ -42,14 +42,14 @@ class ActivityDetailModel {
if (json['imgUrls'] != null) {
imgUrls = [];
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v));
imgUrls!.add(new ImgModel.fromJson(v));
});
} else
imgUrls = [];
if (json['headImgURls'] != null) {
headImgURls = [];
json['headImgURls'].forEach((v) {
headImgURls.add(new ImgModel.fromJson(v));
headImgURls!.add(new ImgModel.fromJson(v));
});
} else
headImgURls = [];
@ -66,10 +66,10 @@ class ActivityDetailModel {
data['registrationEndTime'] = this.registrationEndTime;
data['countRegistration'] = this.countRegistration;
if (this.imgUrls != null) {
data['imgUrls'] = this.imgUrls.map((v) => v.toJson()).toList();
data['imgUrls'] = this.imgUrls!.map((v) => v.toJson()).toList();
}
if (this.headImgURls != null) {
data['headImgURls'] = this.headImgURls.map((v) => v.toJson()).toList();
data['headImgURls'] = this.headImgURls!.map((v) => v.toJson()).toList();
}
return data;
}

@ -3,17 +3,17 @@ import 'package:flustars/flustars.dart';
import 'package:aku_community/model/common/img_model.dart';
class ActivityItemModel {
int id;
String title;
String location;
int status;
String registrationStartTime;
String registrationEndTime;
List<ImgModel> imgUrls;
List<ImgModel> headImgURls;
int? id;
String? title;
String? location;
int? status;
String? registrationStartTime;
String? registrationEndTime;
List<ImgModel>? imgUrls;
List<ImgModel>? headImgURls;
DateTime get begin => DateUtil.getDateTime(registrationStartTime);
DateTime get end => DateUtil.getDateTime(registrationEndTime);
DateTime? get begin => DateUtil.getDateTime(registrationStartTime!);
DateTime? get end => DateUtil.getDateTime(registrationEndTime!);
ActivityItemModel(
{this.id,
@ -35,7 +35,7 @@ class ActivityItemModel {
if (json['imgUrls'] != null) {
imgUrls = [];
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v));
imgUrls!.add(new ImgModel.fromJson(v));
});
} else {
imgUrls = [];
@ -43,7 +43,7 @@ class ActivityItemModel {
if (json['headImgURls'] != null) {
headImgURls = [];
json['headImgURls'].forEach((v) {
headImgURls.add(new ImgModel.fromJson(v));
headImgURls!.add(new ImgModel.fromJson(v));
});
} else {
headImgURls = [];
@ -59,10 +59,10 @@ class ActivityItemModel {
data['registrationStartTime'] = this.registrationStartTime;
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();
}
if (this.headImgURls != null) {
data['headImgURls'] = this.headImgURls.map((v) => v.toJson()).toList();
data['headImgURls'] = this.headImgURls!.map((v) => v.toJson()).toList();
}
return data;
}

@ -1,10 +1,10 @@
import 'package:aku_community/model/common/img_model.dart';
class ActivityPeopleModel {
int id;
String name;
String tel;
List<ImgModel> imgUrl;
int? id;
String? name;
String? tel;
List<ImgModel>? imgUrl;
ActivityPeopleModel({this.id, this.name, this.tel, this.imgUrl});
@ -15,7 +15,7 @@ class ActivityPeopleModel {
if (json['imgUrl'] != null) {
imgUrl = [];
json['imgUrl'].forEach((v) {
imgUrl.add(new ImgModel.fromJson(v));
imgUrl!.add(new ImgModel.fromJson(v));
});
}
}
@ -26,7 +26,7 @@ class ActivityPeopleModel {
data['name'] = this.name;
data['tel'] = this.tel;
if (this.imgUrl != null) {
data['imgUrl'] = this.imgUrl.map((v) => v.toJson()).toList();
data['imgUrl'] = this.imgUrl!.map((v) => v.toJson()).toList();
}
return data;
}

@ -1,13 +1,13 @@
import 'package:aku_community/model/common/img_model.dart';
class BoardDetailModel {
int id;
String title;
String content;
String fileDocUrl;
String fileDocName;
String releaseTime;
List<ImgModel> imgUrls;
int? id;
String? title;
String? content;
String? fileDocUrl;
String? fileDocName;
String? releaseTime;
List<ImgModel>? imgUrls;
BoardDetailModel(
{this.id,
@ -28,7 +28,7 @@ class BoardDetailModel {
if (json['imgUrls'] != null) {
imgUrls = [];
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v));
imgUrls!.add(new ImgModel.fromJson(v));
});
}
}
@ -42,7 +42,7 @@ class BoardDetailModel {
data['fileDocName'] = this.fileDocName;
data['releaseTime'] = this.releaseTime;
if (this.imgUrls != null) {
data['imgUrls'] = this.imgUrls.map((v) => v.toJson()).toList();
data['imgUrls'] = this.imgUrls!.map((v) => v.toJson()).toList();
}
return data;
}

@ -3,12 +3,12 @@ import 'package:flustars/flustars.dart';
import 'package:aku_community/model/common/img_model.dart';
class BoardItemModel {
int id;
String title;
String releaseTime;
List<ImgModel> imgUrls;
int? id;
String? title;
String? releaseTime;
List<ImgModel>? imgUrls;
DateTime get releaseDate => DateUtil.getDateTime(releaseTime);
DateTime? get releaseDate => DateUtil.getDateTime(releaseTime!);
BoardItemModel({this.id, this.title, this.releaseTime, this.imgUrls});
@ -19,7 +19,7 @@ class BoardItemModel {
if (json['imgUrls'] != null) {
imgUrls = [];
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v));
imgUrls!.add(new ImgModel.fromJson(v));
});
}
}
@ -30,7 +30,7 @@ class BoardItemModel {
data['title'] = this.title;
data['releaseTime'] = this.releaseTime;
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,12 +1,12 @@
import 'package:aku_community/model/common/img_model.dart';
class CommunityTopicModel {
int id;
String title;
String summary;
String content;
List<ImgModel> imgUrl;
int activityNum;
int? id;
String? title;
String? summary;
String? content;
List<ImgModel>? imgUrl;
int? activityNum;
CommunityTopicModel(
{this.id,
@ -24,7 +24,7 @@ class CommunityTopicModel {
if (json['imgUrl'] != null) {
imgUrl = [];
json['imgUrl'].forEach((v) {
imgUrl.add(new ImgModel.fromJson(v));
imgUrl!.add(new ImgModel.fromJson(v));
});
} else
imgUrl = [];
@ -38,7 +38,7 @@ class CommunityTopicModel {
data['summary'] = this.summary;
data['content'] = this.content;
if (this.imgUrl != null) {
data['imgUrl'] = this.imgUrl.map((v) => v.toJson()).toList();
data['imgUrl'] = this.imgUrl!.map((v) => v.toJson()).toList();
}
data['activityNum'] = this.activityNum;
return data;

@ -3,19 +3,19 @@ import 'package:flustars/flustars.dart';
import 'package:aku_community/model/common/img_model.dart';
class EventItemModel {
int id;
int createId;
int isComment;
int isLike;
String createName;
String content;
String gambitTitle;
String createDate;
List<LikeNames> likeNames;
List<ImgModel> imgUrls;
List<ImgModel> headSculptureImgUrl;
List<GambitThemeCommentVoList> gambitThemeCommentVoList;
DateTime get date => DateUtil.getDateTime(createDate);
int? id;
int? createId;
int? isComment;
int? isLike;
String? createName;
String? content;
String? gambitTitle;
String? createDate;
List<LikeNames>? likeNames;
List<ImgModel>? imgUrls;
List<ImgModel>? headSculptureImgUrl;
List<GambitThemeCommentVoList>? gambitThemeCommentVoList;
DateTime? get date => DateUtil.getDateTime(createDate!);
EventItemModel(
{this.id,
this.createId,
@ -42,28 +42,28 @@ class EventItemModel {
if (json['likeNames'] != null) {
likeNames = [];
json['likeNames'].forEach((v) {
likeNames.add(new LikeNames.fromJson(v));
likeNames!.add(new LikeNames.fromJson(v));
});
} else
likeNames = [];
if (json['imgUrls'] != null) {
imgUrls = [];
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v));
imgUrls!.add(new ImgModel.fromJson(v));
});
} else
imgUrls = [];
if (json['headSculptureImgUrl'] != null) {
headSculptureImgUrl = [];
json['headSculptureImgUrl'].forEach((v) {
headSculptureImgUrl.add(new ImgModel.fromJson(v));
headSculptureImgUrl!.add(new ImgModel.fromJson(v));
});
} else
headSculptureImgUrl = [];
if (json['gambitThemeCommentVoList'] != null) {
gambitThemeCommentVoList = [];
json['gambitThemeCommentVoList'].forEach((v) {
gambitThemeCommentVoList.add(new GambitThemeCommentVoList.fromJson(v));
gambitThemeCommentVoList!.add(new GambitThemeCommentVoList.fromJson(v));
});
} else
gambitThemeCommentVoList = [];
@ -80,26 +80,26 @@ class EventItemModel {
data['gambitTitle'] = this.gambitTitle;
data['createDate'] = this.createDate;
if (this.likeNames != null) {
data['likeNames'] = this.likeNames.map((v) => v.toJson()).toList();
data['likeNames'] = this.likeNames!.map((v) => v.toJson()).toList();
}
if (this.imgUrls != null) {
data['imgUrls'] = this.imgUrls.map((v) => v.toJson()).toList();
data['imgUrls'] = this.imgUrls!.map((v) => v.toJson()).toList();
}
if (this.headSculptureImgUrl != null) {
data['headSculptureImgUrl'] =
this.headSculptureImgUrl.map((v) => v.toJson()).toList();
this.headSculptureImgUrl!.map((v) => v.toJson()).toList();
}
if (this.gambitThemeCommentVoList != null) {
data['gambitThemeCommentVoList'] =
this.gambitThemeCommentVoList.map((v) => v.toJson()).toList();
this.gambitThemeCommentVoList!.map((v) => v.toJson()).toList();
}
return data;
}
}
class LikeNames {
int id;
String name;
int? id;
String? name;
LikeNames({this.id, this.name});
@ -117,11 +117,11 @@ class LikeNames {
}
class GambitThemeCommentVoList {
int id;
String parentName;
String content;
String createName;
String createDate;
int? id;
String? parentName;
String? content;
String? createName;
String? createDate;
GambitThemeCommentVoList(
{this.id,

@ -1,6 +1,6 @@
class HotTopicModel {
int id;
String name;
int? id;
String? name;
HotTopicModel({this.id, this.name});

@ -3,12 +3,12 @@ import 'package:flustars/flustars.dart';
import 'package:aku_community/model/common/img_model.dart';
class MyEventItemModel {
int id;
String content;
List<ImgModel> imgUrl;
String createDate;
int? id;
String? content;
List<ImgModel>? imgUrl;
String? createDate;
DateTime get date => DateUtil.getDateTime(createDate);
DateTime? get date => DateUtil.getDateTime(createDate!);
MyEventItemModel({this.id, this.content, this.imgUrl, this.createDate});
@ -18,7 +18,7 @@ class MyEventItemModel {
if (json['imgUrl'] != null) {
imgUrl = [];
json['imgUrl'].forEach((v) {
imgUrl.add(new ImgModel.fromJson(v));
imgUrl!.add(new ImgModel.fromJson(v));
});
} else
imgUrl = [];
@ -30,7 +30,7 @@ class MyEventItemModel {
data['id'] = this.id;
data['content'] = this.content;
if (this.imgUrl != null) {
data['imgUrl'] = this.imgUrl.map((v) => v.toJson()).toList();
data['imgUrl'] = this.imgUrl!.map((v) => v.toJson()).toList();
}
data['createDate'] = this.createDate;
return data;

@ -3,7 +3,7 @@ import 'package:flustars/flustars.dart';
import 'package:aku_community/model/common/img_model.dart';
class AdviceDetailModel {
AppAdviceDetailVo appAdviceDetailVo;
AppAdviceDetailVo? appAdviceDetailVo;
AdviceDetailModel({this.appAdviceDetailVo});
@ -16,15 +16,15 @@ class AdviceDetailModel {
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.appAdviceDetailVo != null) {
data['appAdviceDetailVo'] = this.appAdviceDetailVo.toJson();
data['appAdviceDetailVo'] = this.appAdviceDetailVo!.toJson();
}
return data;
}
}
class AppAdviceDetailVo {
AppAdviceVo appAdviceVo;
List<AppAdviceContentVos> appAdviceContentVos;
AppAdviceVo? appAdviceVo;
List<AppAdviceContentVos>? appAdviceContentVos;
AppAdviceDetailVo({this.appAdviceVo, this.appAdviceContentVos});
@ -35,7 +35,7 @@ class AppAdviceDetailVo {
if (json['appAdviceContentVos'] != null) {
appAdviceContentVos = [];
json['appAdviceContentVos'].forEach((v) {
appAdviceContentVos.add(new AppAdviceContentVos.fromJson(v));
appAdviceContentVos!.add(new AppAdviceContentVos.fromJson(v));
});
}
}
@ -43,25 +43,25 @@ class AppAdviceDetailVo {
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.appAdviceVo != null) {
data['appAdviceVo'] = this.appAdviceVo.toJson();
data['appAdviceVo'] = this.appAdviceVo!.toJson();
}
if (this.appAdviceContentVos != null) {
data['appAdviceContentVos'] =
this.appAdviceContentVos.map((v) => v.toJson()).toList();
this.appAdviceContentVos!.map((v) => v.toJson()).toList();
}
return data;
}
}
class AppAdviceVo {
int id;
int type;
int status;
String content;
String createDate;
List<ImgModel> imgUrls;
int? id;
int? type;
int? status;
String? content;
String? createDate;
List<ImgModel>? imgUrls;
DateTime get date => DateUtil.getDateTime(createDate);
DateTime? get date => DateUtil.getDateTime(createDate!);
AppAdviceVo(
{this.id,
@ -80,7 +80,7 @@ class AppAdviceVo {
if (json['imgUrls'] != null) {
imgUrls = [];
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v));
imgUrls!.add(new ImgModel.fromJson(v));
});
}
}
@ -93,18 +93,18 @@ class AppAdviceVo {
data['content'] = this.content;
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;
}
}
class AppAdviceContentVos {
int id;
int createUserType;
String content;
String createDate;
int parentId;
int? id;
int? createUserType;
String? content;
String? createDate;
int? parentId;
AppAdviceContentVos(
{this.id,
@ -113,7 +113,7 @@ class AppAdviceContentVos {
this.createDate,
this.parentId});
DateTime get date => DateUtil.getDateTime(createDate);
DateTime? get date => DateUtil.getDateTime(createDate!);
AppAdviceContentVos.fromJson(Map<String, dynamic> json) {
id = json['id'];

@ -1,7 +1,7 @@
class ArticleQRModel {
AppArticleOutQRCodeVo appArticleOutQRCodeVo;
String message;
bool status;
AppArticleOutQRCodeVo? appArticleOutQRCodeVo;
String? message;
bool? status;
ArticleQRModel({this.appArticleOutQRCodeVo, this.message, this.status});
@ -16,7 +16,7 @@ class ArticleQRModel {
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.appArticleOutQRCodeVo != null) {
data['appArticleOutQRCodeVo'] = this.appArticleOutQRCodeVo.toJson();
data['appArticleOutQRCodeVo'] = this.appArticleOutQRCodeVo!.toJson();
}
data['message'] = this.message;
data['status'] = this.status;
@ -25,11 +25,11 @@ class ArticleQRModel {
}
class AppArticleOutQRCodeVo {
int id;
String roomName;
int applicantId;
String applicantName;
String effectiveTime;
int? id;
String? roomName;
int? applicantId;
String? applicantName;
String? effectiveTime;
AppArticleOutQRCodeVo(
{this.id,

@ -1,16 +1,15 @@
import 'package:aku_community/model/common/img_model.dart';
class ArticleBorrowDetailModel {
int id;
String name;
String code;
int status;
List<ImgModel> imgList;
int? id;
String? name;
String? code;
int? status;
List<ImgModel>? imgList;
String get borrowStatus {
switch (this.status) {
case 1:
return '正常';
break;
case 2:
return '破损';
case 3:
@ -31,7 +30,7 @@ class ArticleBorrowDetailModel {
if (json['imgList'] != null) {
imgList = [];
json['imgList'].forEach((v) {
imgList.add(new ImgModel.fromJson(v));
imgList!.add(new ImgModel.fromJson(v));
});
}
}
@ -43,7 +42,7 @@ class ArticleBorrowDetailModel {
data['code'] = this.code;
data['status'] = this.status;
if (this.imgList != null) {
data['imgList'] = this.imgList.map((v) => v.toJson()).toList();
data['imgList'] = this.imgList!.map((v) => v.toJson()).toList();
}
return data;
}

@ -1,10 +1,10 @@
import 'package:aku_community/model/common/img_model.dart';
class ArticleBorrowModel {
int id;
String name;
int quantity;
List<ImgModel> imgUrls;
int? id;
String? name;
int? quantity;
List<ImgModel>? imgUrls;
ArticleBorrowModel({this.id, this.name, this.quantity, this.imgUrls});
@ -15,7 +15,7 @@ class ArticleBorrowModel {
if (json['imgUrls'] != null) {
imgUrls = [];
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v));
imgUrls!.add(new ImgModel.fromJson(v));
});
}
}
@ -26,7 +26,7 @@ class ArticleBorrowModel {
data['name'] = this.name;
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;
}

@ -1,15 +1,15 @@
import 'package:aku_community/model/common/img_model.dart';
class ArticleReturnListModel {
int id;
String name;
String code;
String beginDate;
int borrowTime;
List<ImgModel> imgList;
int? id;
String? name;
String? code;
String? beginDate;
int? borrowTime;
List<ImgModel>? imgList;
String get paraseBorrowTime {
if (this.borrowTime > 24) {
return '${this.borrowTime ~/ 24}${this.borrowTime % 24}小时';
if (this.borrowTime! > 24) {
return '${this.borrowTime! ~/ 24}${this.borrowTime! % 24}小时';
} else {
return '${this.borrowTime}小时';
}
@ -32,7 +32,7 @@ class ArticleReturnListModel {
if (json['imgList'] != null) {
imgList = [];
json['imgList'].forEach((v) {
imgList.add(new ImgModel.fromJson(v));
imgList!.add(new ImgModel.fromJson(v));
});
}
}
@ -45,18 +45,18 @@ class ArticleReturnListModel {
data['beginDate'] = this.beginDate;
data['borrowTime'] = this.borrowTime;
if (this.imgList != null) {
data['imgList'] = this.imgList.map((v) => v.toJson()).toList();
data['imgList'] = this.imgList!.map((v) => v.toJson()).toList();
}
return data;
}
}
class ImgList {
String url;
String size;
int longs;
int paragraph;
int sort;
String? url;
String? size;
int? longs;
int? paragraph;
int? sort;
ImgList({this.url, this.size, this.longs, this.paragraph, this.sort});

@ -1,12 +1,12 @@
import 'package:aku_community/model/common/img_model.dart';
class ArticleReturnModel {
int id;
String name;
String code;
String beginDate;
int borrowTime;
List<ImgModel> imgList;
int? id;
String? name;
String? code;
String? beginDate;
int? borrowTime;
List<ImgModel>? imgList;
ArticleReturnModel(
{this.id,
@ -25,7 +25,7 @@ class ArticleReturnModel {
if (json['imgList'] != null) {
imgList = [];
json['imgList'].forEach((v) {
imgList.add(new ImgModel.fromJson(v));
imgList!.add(new ImgModel.fromJson(v));
});
}
}
@ -38,18 +38,18 @@ class ArticleReturnModel {
data['beginDate'] = this.beginDate;
data['borrowTime'] = this.borrowTime;
if (this.imgList != null) {
data['imgList'] = this.imgList.map((v) => v.toJson()).toList();
data['imgList'] = this.imgList!.map((v) => v.toJson()).toList();
}
return data;
}
}
class ImgList {
String url;
String size;
int longs;
int paragraph;
int sort;
String? url;
String? size;
int? longs;
int? paragraph;
int? sort;
ImgList({this.url, this.size, this.longs, this.paragraph, this.sort});

@ -1,7 +1,7 @@
class EstatePaymentModel {
int id;
String roomName;
int status;
int? id;
String? roomName;
int? status;
EstatePaymentModel({this.id, this.roomName, this.status});

@ -1,14 +1,14 @@
import 'package:aku_community/model/common/img_model.dart';
class EventVotingModel {
int id;
String title;
String content;
String beginDate;
String endDate;
int status;
List<ImgModel> imgUrls;
List<ImgModel> headImgURls;
int? id;
String? title;
String? content;
String? beginDate;
String? endDate;
int? status;
List<ImgModel>? imgUrls;
List<ImgModel>? headImgURls;
EventVotingModel(
{this.id,
@ -30,14 +30,14 @@ class EventVotingModel {
if (json['imgUrls'] != null) {
imgUrls = [];
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v));
imgUrls!.add(new ImgModel.fromJson(v));
});
} else
imgUrls = [];
if (json['headImgURls'] != null) {
headImgURls = [];
json['headImgURls'].forEach((v) {
headImgURls.add(new ImgModel.fromJson(v));
headImgURls!.add(new ImgModel.fromJson(v));
});
} else
headImgURls = [];
@ -52,21 +52,21 @@ class EventVotingModel {
data['endDate'] = this.endDate;
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();
}
if (this.headImgURls != null) {
data['headImgURls'] = this.headImgURls.map((v) => v.toJson()).toList();
data['headImgURls'] = this.headImgURls!.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});

@ -1,10 +1,10 @@
import 'package:aku_community/model/common/img_model.dart';
class FixedDetailModel {
AppReportRepairVo appReportRepairVo;
List<AppProcessRecordVo> appProcessRecordVo;
AppReportRepairVo? appReportRepairVo;
List<AppProcessRecordVo>? appProcessRecordVo;
Null appMaintenanceResultVo;
AppDispatchListVo appDispatchListVo;
AppDispatchListVo? appDispatchListVo;
FixedDetailModel(
{this.appReportRepairVo,
@ -19,7 +19,7 @@ class FixedDetailModel {
if (json['appProcessRecordVo'] != null) {
appProcessRecordVo = [];
json['appProcessRecordVo'].forEach((v) {
appProcessRecordVo.add(new AppProcessRecordVo.fromJson(v));
appProcessRecordVo!.add(new AppProcessRecordVo.fromJson(v));
});
}
appMaintenanceResultVo = json['appMaintenanceResultVo'];
@ -31,26 +31,26 @@ class FixedDetailModel {
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.appReportRepairVo != null) {
data['appReportRepairVo'] = this.appReportRepairVo.toJson();
data['appReportRepairVo'] = this.appReportRepairVo!.toJson();
}
if (this.appProcessRecordVo != null) {
data['appProcessRecordVo'] =
this.appProcessRecordVo.map((v) => v.toJson()).toList();
this.appProcessRecordVo!.map((v) => v.toJson()).toList();
}
data['appMaintenanceResultVo'] = this.appMaintenanceResultVo;
if (this.appDispatchListVo != null) {
data['appDispatchListVo'] = this.appDispatchListVo.toJson();
data['appDispatchListVo'] = this.appDispatchListVo!.toJson();
}
return data;
}
}
class AppReportRepairVo {
int id;
int type;
int status;
String reportDetail;
List<ImgModel> imgUrls;
int? id;
int? type;
int? status;
String? reportDetail;
List<ImgModel>? imgUrls;
AppReportRepairVo(
{this.id, this.type, this.status, this.reportDetail, this.imgUrls});
@ -63,7 +63,7 @@ class AppReportRepairVo {
if (json['imgUrls'] != null) {
imgUrls = [];
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v));
imgUrls!.add(new ImgModel.fromJson(v));
});
}
}
@ -75,15 +75,15 @@ class AppReportRepairVo {
data['status'] = this.status;
data['reportDetail'] = this.reportDetail;
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 AppProcessRecordVo {
String operationDate;
int operationType;
String? operationDate;
int? operationType;
AppProcessRecordVo({this.operationDate, this.operationType});
@ -101,11 +101,11 @@ class AppProcessRecordVo {
}
class AppDispatchListVo {
String code;
String orderDate;
int type;
String operatorName;
String distributorName;
String? code;
String? orderDate;
int? type;
String? operatorName;
String? distributorName;
AppDispatchListVo(
{this.code,

@ -1,12 +1,12 @@
class GoodsOutModel {
int id;
String name;
int weight;
String expectedTime;
int approach;
int status;
String movingCompanyTel;
List<ImgUrl> imgUrl;
int? id;
String? name;
int? weight;
String? expectedTime;
int? approach;
int? status;
String? movingCompanyTel;
List<ImgUrl>? imgUrl;
GoodsOutModel(
{this.id,
@ -29,7 +29,7 @@ class GoodsOutModel {
if (json['imgUrl'] != null) {
imgUrl = [];
json['imgUrl'].forEach((v) {
imgUrl.add(new ImgUrl.fromJson(v));
imgUrl!.add(new ImgUrl.fromJson(v));
});
}
}
@ -44,18 +44,18 @@ class GoodsOutModel {
data['status'] = this.status;
data['movingCompanyTel'] = this.movingCompanyTel;
if (this.imgUrl != null) {
data['imgUrl'] = this.imgUrl.map((v) => v.toJson()).toList();
data['imgUrl'] = this.imgUrl!.map((v) => v.toJson()).toList();
}
return data;
}
}
class ImgUrl {
String url;
String size;
int longs;
int paragraph;
int sort;
String? url;
String? size;
int? longs;
int? paragraph;
int? sort;
ImgUrl({this.url, this.size, this.longs, this.paragraph, this.sort});

@ -1,7 +1,7 @@
class LifePayModel {
int years;
int paymentNum;
List<DailyPaymentTypeVos> dailyPaymentTypeVos;
int? years;
int? paymentNum;
List<DailyPaymentTypeVos>? dailyPaymentTypeVos;
LifePayModel({this.years, this.paymentNum, this.dailyPaymentTypeVos});
@ -11,7 +11,7 @@ class LifePayModel {
if (json['dailyPaymentTypeVos'] != null) {
dailyPaymentTypeVos = [];
json['dailyPaymentTypeVos'].forEach((v) {
dailyPaymentTypeVos.add(new DailyPaymentTypeVos.fromJson(v));
dailyPaymentTypeVos!.add(new DailyPaymentTypeVos.fromJson(v));
});
}
}
@ -22,16 +22,16 @@ class LifePayModel {
data['paymentNum'] = this.paymentNum;
if (this.dailyPaymentTypeVos != null) {
data['dailyPaymentTypeVos'] =
this.dailyPaymentTypeVos.map((v) => v.toJson()).toList();
this.dailyPaymentTypeVos!.map((v) => v.toJson()).toList();
}
return data;
}
}
class DailyPaymentTypeVos {
int id;
String name;
List<DetailedVoList> detailedVoList;
int? id;
String? name;
List<DetailedVoList>? detailedVoList;
DailyPaymentTypeVos({this.id, this.name, this.detailedVoList});
@ -41,7 +41,7 @@ class DailyPaymentTypeVos {
if (json['detailedVoList'] != null) {
detailedVoList = [];
json['detailedVoList'].forEach((v) {
detailedVoList.add(new DetailedVoList.fromJson(v));
detailedVoList!.add(new DetailedVoList.fromJson(v));
});
}
}
@ -52,16 +52,16 @@ class DailyPaymentTypeVos {
data['name'] = this.name;
if (this.detailedVoList != null) {
data['detailedVoList'] =
this.detailedVoList.map((v) => v.toJson()).toList();
this.detailedVoList!.map((v) => v.toJson()).toList();
}
return data;
}
}
class DetailedVoList {
int groupId;
double paymentPrice;
List<DetailsVoList> detailsVoList;
int? groupId;
double? paymentPrice;
List<DetailsVoList>? detailsVoList;
DetailedVoList({this.groupId, this.paymentPrice, this.detailsVoList});
@ -71,7 +71,7 @@ class DetailedVoList {
if (json['detailsVoList'] != null) {
detailsVoList = [];
json['detailsVoList'].forEach((v) {
detailsVoList.add(new DetailsVoList.fromJson(v));
detailsVoList!.add(new DetailsVoList.fromJson(v));
});
}
}
@ -82,22 +82,22 @@ class DetailedVoList {
data['paymentPrice'] = this.paymentPrice;
if (this.detailsVoList != null) {
data['detailsVoList'] =
this.detailsVoList.map((v) => v.toJson()).toList();
this.detailsVoList!.map((v) => v.toJson()).toList();
}
return data;
}
}
class DetailsVoList {
int id;
String month;
double costPrice;
double paidPrice;
double totalPrice;
String beginDate;
String endDate;
String unitPriceType;
int num;
int? id;
String? month;
double? costPrice;
double? paidPrice;
double? totalPrice;
String? beginDate;
String? endDate;
String? unitPriceType;
int? num;
DetailsVoList(
{this.id,

@ -1,12 +1,12 @@
class LifePayRecordModel {
int id;
String chargesTemplateDetailName;
String roomName;
String years;
int paidPrice;
String createDate;
int payType;
String code;
int? id;
String? chargesTemplateDetailName;
String? roomName;
String? years;
int? paidPrice;
String? createDate;
int? payType;
String? code;
LifePayRecordModel(
{this.id,

@ -1,11 +1,11 @@
class MineGoodsModel {
int id;
String name;
int code;
String beginDate;
String endDate;
int borrowDate;
int borrowStatus;
int? id;
String? name;
int? code;
String? beginDate;
String? endDate;
int? borrowDate;
int? borrowStatus;
MineGoodsModel(
{this.id,

@ -1,5 +1,5 @@
class MovingCompanyModel {
List<AppMovingCompanyVoList> appMovingCompanyVoList;
List<AppMovingCompanyVoList>? appMovingCompanyVoList;
MovingCompanyModel({this.appMovingCompanyVoList});
@ -7,7 +7,7 @@ class MovingCompanyModel {
if (json['appMovingCompanyVoList'] != null) {
appMovingCompanyVoList = [];
json['appMovingCompanyVoList'].forEach((v) {
appMovingCompanyVoList.add(new AppMovingCompanyVoList.fromJson(v));
appMovingCompanyVoList!.add(new AppMovingCompanyVoList.fromJson(v));
});
}
}
@ -16,15 +16,15 @@ class MovingCompanyModel {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.appMovingCompanyVoList != null) {
data['appMovingCompanyVoList'] =
this.appMovingCompanyVoList.map((v) => v.toJson()).toList();
this.appMovingCompanyVoList!.map((v) => v.toJson()).toList();
}
return data;
}
}
class AppMovingCompanyVoList {
String name;
String tel;
String? name;
String? tel;
AppMovingCompanyVoList({this.name, this.tel});

@ -1,15 +1,15 @@
import 'package:aku_community/model/common/img_model.dart';
class QuestionnaireModel {
int id;
String title;
String description;
String beginDate;
String endDate;
int status;
int answerNum;
List<ImgModel> imgUrls;
List<ImgModel> headImgURls;
int? id;
String? title;
String? description;
String? beginDate;
String? endDate;
int? status;
int? answerNum;
List<ImgModel>? imgUrls;
List<ImgModel>? headImgURls;
QuestionnaireModel(
{this.id,
@ -33,14 +33,14 @@ class QuestionnaireModel {
if (json['imgUrls'] != null) {
imgUrls = [];
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v));
imgUrls!.add(new ImgModel.fromJson(v));
});
} else
imgUrls = [];
if (json['headImgURls'] != null) {
headImgURls = [];
json['headImgURls'].forEach((v) {
headImgURls.add(new ImgModel.fromJson(v));
headImgURls!.add(new ImgModel.fromJson(v));
});
} else
headImgURls = [];
@ -56,21 +56,21 @@ class QuestionnaireModel {
data['status'] = this.status;
data['answerNum'] = this.answerNum;
if (this.imgUrls != null) {
data['imgUrls'] = this.imgUrls.map((v) => v.toJson()).toList();
data['imgUrls'] = this.imgUrls!.map((v) => v.toJson()).toList();
}
if (this.headImgURls != null) {
data['headImgURls'] = this.headImgURls.map((v) => v.toJson()).toList();
data['headImgURls'] = this.headImgURls!.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});

@ -1,13 +1,13 @@
import 'package:aku_community/model/common/img_model.dart';
class QuestionnaireDetialModel {
int id;
String title;
String description;
String beginDate;
String endDate;
List<QuestionnaireTopicVoList> questionnaireTopicVoList;
List<ImgModel> voResourcesImgList;
int? id;
String? title;
String? description;
String? beginDate;
String? endDate;
List<QuestionnaireTopicVoList>? questionnaireTopicVoList;
List<ImgModel>? voResourcesImgList;
QuestionnaireDetialModel(
{this.id,
@ -27,13 +27,13 @@ class QuestionnaireDetialModel {
if (json['questionnaireTopicVoList'] != null) {
questionnaireTopicVoList = [];
json['questionnaireTopicVoList'].forEach((v) {
questionnaireTopicVoList.add(new QuestionnaireTopicVoList.fromJson(v));
questionnaireTopicVoList!.add(new QuestionnaireTopicVoList.fromJson(v));
});
}
if (json['voResourcesImgList'] != null) {
voResourcesImgList = [];
json['voResourcesImgList'].forEach((v) {
voResourcesImgList.add(new ImgModel.fromJson(v));
voResourcesImgList!.add(new ImgModel.fromJson(v));
});
} else
voResourcesImgList = [];
@ -48,21 +48,21 @@ class QuestionnaireDetialModel {
data['endDate'] = this.endDate;
if (this.questionnaireTopicVoList != null) {
data['questionnaireTopicVoList'] =
this.questionnaireTopicVoList.map((v) => v.toJson()).toList();
this.questionnaireTopicVoList!.map((v) => v.toJson()).toList();
}
if (this.voResourcesImgList != null) {
data['voResourcesImgList'] =
this.voResourcesImgList.map((v) => v.toJson()).toList();
this.voResourcesImgList!.map((v) => v.toJson()).toList();
}
return data;
}
}
class QuestionnaireTopicVoList {
int id;
int type;
String topic;
List<QuestionnaireChoiceVoList> questionnaireChoiceVoList;
int? id;
int? type;
String? topic;
List<QuestionnaireChoiceVoList>? questionnaireChoiceVoList;
QuestionnaireTopicVoList(
{this.id, this.type, this.topic, this.questionnaireChoiceVoList});
@ -74,7 +74,7 @@ class QuestionnaireTopicVoList {
if (json['questionnaireChoiceVoList'] != null) {
questionnaireChoiceVoList = [];
json['questionnaireChoiceVoList'].forEach((v) {
questionnaireChoiceVoList
questionnaireChoiceVoList!
.add(new QuestionnaireChoiceVoList.fromJson(v));
});
} else
@ -88,7 +88,7 @@ class QuestionnaireTopicVoList {
data['topic'] = this.topic;
if (this.questionnaireChoiceVoList != null) {
data['questionnaireChoiceVoList'] =
this.questionnaireChoiceVoList.map((v) => v.toJson()).toList();
this.questionnaireChoiceVoList!.map((v) => v.toJson()).toList();
} else
questionnaireChoiceVoList = [];
return data;
@ -96,9 +96,9 @@ class QuestionnaireTopicVoList {
}
class QuestionnaireChoiceVoList {
int id;
String options;
String answer;
int? id;
String? options;
String? answer;
QuestionnaireChoiceVoList({this.id, this.options, this.answer});

@ -1,6 +1,6 @@
class QuestionnaireSubmitModel {
int id;
List<AppQuestionnaireAnswerSubmits> appQuestionnaireAnswerSubmits;
int? id;
List<AppQuestionnaireAnswerSubmits>? appQuestionnaireAnswerSubmits;
QuestionnaireSubmitModel({this.id, this.appQuestionnaireAnswerSubmits});
@ -9,7 +9,7 @@ class QuestionnaireSubmitModel {
if (json['appQuestionnaireAnswerSubmits'] != null) {
appQuestionnaireAnswerSubmits = [];
json['appQuestionnaireAnswerSubmits'].forEach((v) {
appQuestionnaireAnswerSubmits
appQuestionnaireAnswerSubmits!
.add(new AppQuestionnaireAnswerSubmits.fromJson(v));
});
}
@ -20,16 +20,16 @@ class QuestionnaireSubmitModel {
data['id'] = this.id;
if (this.appQuestionnaireAnswerSubmits != null) {
data['appQuestionnaireAnswerSubmits'] =
this.appQuestionnaireAnswerSubmits.map((v) => v.toJson()).toList();
this.appQuestionnaireAnswerSubmits!.map((v) => v.toJson()).toList();
}
return data;
}
}
class AppQuestionnaireAnswerSubmits {
int topicId;
List<int> choiceAnswer;
String shortAnswer;
int? topicId;
List<int?>? choiceAnswer;
String? shortAnswer;
AppQuestionnaireAnswerSubmits(
{this.topicId, this.choiceAnswer, this.shortAnswer});

@ -3,13 +3,13 @@ import 'package:flustars/flustars.dart';
import 'package:aku_community/model/common/img_model.dart';
class SuggestionOrComplainModel {
int id;
int type;
int status;
String content;
int score;
DateTime createDate;
List<ImgModel> imgUrls;
int? id;
int? type;
int? status;
String? content;
int? score;
DateTime? createDate;
List<ImgModel>? imgUrls;
SuggestionOrComplainModel(
{this.id,
@ -30,18 +30,18 @@ class SuggestionOrComplainModel {
if (json['imgUrls'] != null) {
imgUrls = [];
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v));
imgUrls!.add(new ImgModel.fromJson(v));
});
}
}
}
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,15 +1,15 @@
import 'package:flustars/flustars.dart';
class VisitorListItemModel {
int id;
int accessCode;
int visitorStatus;
String name;
int isDrive;
String carNum;
String effectiveTime;
int? id;
int? accessCode;
int? visitorStatus;
String? name;
int? isDrive;
String? carNum;
String? effectiveTime;
DateTime get date => DateUtil.getDateTime(effectiveTime);
DateTime? get date => DateUtil.getDateTime(effectiveTime!);
bool get drive => isDrive == 1;
VisitorListItemModel(

@ -1,13 +1,13 @@
import 'package:aku_community/model/common/img_model.dart';
class VotingDetailModel {
int id;
String title;
String content;
int status;
int totals;
List<ImgModel> imgUrls;
List<AppVoteCandidateVos> appVoteCandidateVos;
int? id;
String? title;
String? content;
int? status;
int? totals;
List<ImgModel>? imgUrls;
List<AppVoteCandidateVos>? appVoteCandidateVos;
VotingDetailModel(
{this.id,
@ -27,14 +27,14 @@ class VotingDetailModel {
if (json['imgUrls'] != null) {
imgUrls = [];
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v));
imgUrls!.add(new ImgModel.fromJson(v));
});
} else
imgUrls = [];
if (json['appVoteCandidateVos'] != null) {
appVoteCandidateVos = [];
json['appVoteCandidateVos'].forEach((v) {
appVoteCandidateVos.add(new AppVoteCandidateVos.fromJson(v));
appVoteCandidateVos!.add(new AppVoteCandidateVos.fromJson(v));
});
}
}
@ -47,22 +47,22 @@ class VotingDetailModel {
data['status'] = this.status;
data['totals'] = this.totals;
if (this.imgUrls != null) {
data['imgUrls'] = this.imgUrls.map((v) => v.toJson()).toList();
data['imgUrls'] = this.imgUrls!.map((v) => v.toJson()).toList();
}
if (this.appVoteCandidateVos != null) {
data['appVoteCandidateVos'] =
this.appVoteCandidateVos.map((v) => v.toJson()).toList();
this.appVoteCandidateVos!.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});
@ -86,10 +86,10 @@ class ImgUrls {
}
class AppVoteCandidateVos {
int id;
String name;
int total;
List<ImgModel> imgUrls;
int? id;
String? name;
int? total;
List<ImgModel>? imgUrls;
AppVoteCandidateVos({this.id, this.name, this.total, this.imgUrls});
@ -100,7 +100,7 @@ class AppVoteCandidateVos {
if (json['imgUrls'] != null) {
imgUrls = [];
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v));
imgUrls!.add(new ImgModel.fromJson(v));
});
} else
imgUrls = [];
@ -112,7 +112,7 @@ class AppVoteCandidateVos {
data['name'] = this.name;
data['total'] = this.total;
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,17 +1,17 @@
import 'package:aku_community/model/common/img_model.dart';
class CommentMessageModel {
int id;
int gambitThemeId;
String respondentName;
int type;
String content;
int receiverAccount;
int sendStatus;
String createName;
String createDate;
List<ImgModel> imgUrls;
List<ImgModel> headSculpture;
int? id;
int? gambitThemeId;
String? respondentName;
int? type;
String? content;
int? receiverAccount;
int? sendStatus;
String? createName;
String? createDate;
List<ImgModel>? imgUrls;
List<ImgModel>? headSculpture;
CommentMessageModel(
{this.id,
@ -39,13 +39,13 @@ class CommentMessageModel {
if (json['imgUrls'] != null) {
imgUrls = [];
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v));
imgUrls!.add(new ImgModel.fromJson(v));
});
}
if (json['headSculpture'] != null) {
headSculpture = [];
json['headSculpture'].forEach((v) {
headSculpture.add(new ImgModel.fromJson(v));
headSculpture!.add(new ImgModel.fromJson(v));
});
}
}
@ -62,7 +62,7 @@ class CommentMessageModel {
data['createName'] = this.createName;
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,8 +1,8 @@
class MessageCenterModel {
String commentTitle;
int sysCount;
String sysTitle;
int commentCount;
String? commentTitle;
int? sysCount;
String? sysTitle;
int? commentCount;
MessageCenterModel.zero() {
commentTitle = '';

@ -1,7 +1,7 @@
class SystemMessageDetailModel {
int id;
String title;
String content;
int? id;
String? title;
String? content;
SystemMessageDetailModel({this.id, this.title, this.content});

@ -1,8 +1,8 @@
class SystemMessageModel {
int id;
String content;
int status;
String title;
int? id;
String? content;
int? status;
String? title;
SystemMessageModel({this.id, this.content, this.status, this.title});

@ -4,10 +4,10 @@ import 'package:flustars/flustars.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class CarParkingModel {
String code;
int type;
int status;
String effectiveTimeEnd;
String? code;
int? type;
int? status;
String? effectiveTimeEnd;
String get typeName {
switch (type) {
case 1:
@ -40,9 +40,9 @@ class CarParkingModel {
return effectiveDateValue;
}
DateTime get effectiveDate {
DateTime? get effectiveDate {
if (effectiveTimeEnd == null) return null;
return DateUtil.getDateTime(effectiveTimeEnd);
return DateUtil.getDateTime(effectiveTimeEnd!);
}
String get effectiveDateValue =>
@ -51,7 +51,7 @@ class CarParkingModel {
bool get outdated {
if (effectiveDate == null) return false;
DateTime now = DateTime.now();
return effectiveDate.isAfter(now);
return effectiveDate!.isAfter(now);
}
List<BoxShadow> get shadow {

@ -1,18 +1,18 @@
import 'package:aku_community/model/common/img_model.dart';
class CommitteeItemModel {
int id;
int positionId;
String name;
int sexId;
int age;
int educationId;
String roomName;
String profession;
String roomNumber;
int unitNo;
int estateNo;
List<ImgModel> imgUrls;
int? id;
int? positionId;
String? name;
int? sexId;
int? age;
int? educationId;
String? roomName;
String? profession;
String? roomNumber;
int? unitNo;
int? estateNo;
List<ImgModel>? imgUrls;
String get sexValue {
if (sexId == 0 || sexId == null) return '未设置';

@ -1,7 +1,7 @@
class ConvenientPhoneModel {
int id;
String name;
String tel;
int? id;
String? name;
String? tel;
ConvenientPhoneModel({this.id, this.name, this.tel});

@ -1,11 +1,11 @@
import 'package:aku_community/model/common/img_model.dart';
class FixedSubmitModel {
int id;
int type;
int status;
String reportDetail;
List<ImgModel> imgUrls;
int? id;
int? type;
int? status;
String? reportDetail;
List<ImgModel>? imgUrls;
FixedSubmitModel(
{this.id, this.type, this.status, this.reportDetail, this.imgUrls});
@ -18,7 +18,7 @@ class FixedSubmitModel {
if (json['imgUrls'] != null) {
imgUrls = [];
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v));
imgUrls!.add(new ImgModel.fromJson(v));
});
}
}
@ -30,7 +30,7 @@ class FixedSubmitModel {
data['status'] = this.status;
data['reportDetail'] = this.reportDetail;
if (this.imgUrls != null) {
data['imgUrls'] = this.imgUrls.map((v) => v.toJson()).toList();
data['imgUrls'] = this.imgUrls!.map((v) => v.toJson()).toList();
}
return data;
}

@ -3,21 +3,21 @@ import 'package:flutter/material.dart';
import 'package:flustars/flustars.dart';
class HouseModel {
int id;
String roomName;
int? id;
String? roomName;
int estateId;
int? estateId;
///1.3.4.
int status;
int? status;
///1 23
int type;
String effectiveTimeStart;
String effectiveTimeEnd;
int? type;
String? effectiveTimeStart;
String? effectiveTimeEnd;
DateTime get effectiveStartDate => DateUtil.getDateTime(effectiveTimeStart);
DateTime get effectiveEndDate => DateUtil.getDateTime(effectiveTimeEnd);
DateTime? get effectiveStartDate => DateUtil.getDateTime(effectiveTimeStart!);
DateTime? get effectiveEndDate => DateUtil.getDateTime(effectiveTimeEnd!);
//TODO
bool get reviewed => status == 4;

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

@ -1,19 +1,19 @@
class UserDetailModel {
int id;
String name;
int type;
String tel;
int idType;
String idNumber;
String pwd;
String confuse;
String email;
int createId;
String createDate;
String identity;
int roomStatus;
String nickName;
List<String> estateNames;
int? id;
String? name;
int? type;
String? tel;
int? idType;
String? idNumber;
String? pwd;
String? confuse;
String? email;
int? createId;
String? createDate;
String? identity;
int? roomStatus;
String? nickName;
List<String>? estateNames;
UserDetailModel(
{this.id,

@ -1,15 +1,15 @@
import 'package:flustars/flustars.dart';
class UserInfoModel {
int id;
String imgUrl;
String name;
String nickName;
String tel;
int? id;
String? imgUrl;
String? name;
String? nickName;
String? tel;
/// 1. 2.
int sex;
String birthday;
int? sex;
String? birthday;
String get sexValue {
if (sex == null) return '未设置';
@ -18,7 +18,7 @@ class UserInfoModel {
return '未设置';
}
DateTime get birthdayDate => DateUtil.getDateTime(birthday);
DateTime? get birthdayDate => DateUtil.getDateTime(birthday!);
String get birthdayValue {
if (TextUtil.isEmpty(birthday))
return '未设置';

@ -14,15 +14,15 @@ import 'package:aku_community/pages/things_page/widget/bee_list_view.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
class ConvenientPhonePage extends StatefulWidget {
ConvenientPhonePage({Key key}) : super(key: key);
ConvenientPhonePage({Key? key}) : super(key: key);
@override
_ConvenientPhonePageState createState() => _ConvenientPhonePageState();
}
class _ConvenientPhonePageState extends State<ConvenientPhonePage> {
EasyRefreshController _easyRefreshController;
TextEditingController _textEditingController;
EasyRefreshController? _easyRefreshController;
TextEditingController? _textEditingController;
@override
void initState() {
@ -47,9 +47,9 @@ class _ConvenientPhonePageState extends State<ConvenientPhonePage> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
model.name.text.black.size(32.sp).make(),
model.name!.text.black.size(32.sp).make(),
12.w.heightBox,
model.tel.text.color(Color(0xFF999999)).size(28.sp).make(),
model.tel!.text.color(Color(0xFF999999)).size(28.sp).make(),
],
).expand(),
IconButton(
@ -59,8 +59,8 @@ class _ConvenientPhonePageState extends State<ConvenientPhonePage> {
height: 40.w,
),
onPressed: () async {
bool result = await Get.dialog(CupertinoAlertDialog(
title: model.tel.text.isIntrinsic.make(),
bool? result = await Get.dialog(CupertinoAlertDialog(
title: model.tel!.text.isIntrinsic.make(),
actions: [
CupertinoDialogAction(
child: '取消'.text.isIntrinsic.make(),
@ -102,7 +102,7 @@ class _ConvenientPhonePageState extends State<ConvenientPhonePage> {
child: TextField(
controller: _textEditingController,
onSubmitted: (value) {
_easyRefreshController.callRefresh();
_easyRefreshController!.callRefresh();
setState(() {});
},
decoration: InputDecoration(
@ -121,12 +121,12 @@ class _ConvenientPhonePageState extends State<ConvenientPhonePage> {
),
),
Expanded(
child: BeeListView(
extraParams: {'name': _textEditingController.text},
child: BeeListView<ConvenientPhoneModel>(
extraParams: {'name': _textEditingController!.text},
controller: _easyRefreshController,
path: API.manager.convenientPhone,
convert: (model) {
return model.tableList
return model.tableList!
.map((e) => ConvenientPhoneModel.fromJson(e))
.toList();
},

@ -14,14 +14,14 @@ import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/others/stack_avatar.dart';
class EventVotingPage extends StatefulWidget {
EventVotingPage({Key key}) : super(key: key);
EventVotingPage({Key? key}) : super(key: key);
@override
_EventVotingPageState createState() => _EventVotingPageState();
}
class _EventVotingPageState extends State<EventVotingPage> {
EasyRefreshController _controller;
EasyRefreshController? _controller;
@override
void initState() {
super.initState();
@ -34,7 +34,7 @@ class _EventVotingPageState extends State<EventVotingPage> {
super.dispose();
}
String _getButtonText(int status) {
String _getButtonText(int? status) {
switch (status) {
case 1:
case 2:
@ -71,13 +71,13 @@ class _EventVotingPageState extends State<EventVotingPage> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
model.title.text.black
model.title!.text.black
.size(28.sp)
.bold
.overflow(TextOverflow.ellipsis)
.make(),
16.w.heightBox,
model.content.text.color(ktextSubColor).size(24.sp).make(),
model.content!.text.color(ktextSubColor).size(24.sp).make(),
8.w.heightBox,
RichText(
text: TextSpan(
@ -92,14 +92,14 @@ class _EventVotingPageState extends State<EventVotingPage> {
color: ktextPrimary,
fontSize: 24.sp,
),
text: model.beginDate + '' + model.endDate,
text: model.beginDate! + '' + model.endDate!,
),
])),
16.w.heightBox,
Row(
children: [
StackAvatar(
avatars: model.headImgURls.map((e) => e.url).toList()),
avatars: model.headImgURls!.map((e) => e.url).toList()),
Spacer(),
MaterialButton(
shape: RoundedRectangleBorder(
@ -134,11 +134,11 @@ class _EventVotingPageState extends State<EventVotingPage> {
Widget build(BuildContext context) {
return BeeScaffold(
title: '活动投票',
body: BeeListView(
body: BeeListView<EventVotingModel>(
path: API.manager.enventVotingList,
controller: _controller,
convert: (model) {
return model.tableList
return model.tableList!
.map((e) => EventVotingModel.fromJson(e))
.toList();
},

@ -20,20 +20,20 @@ import 'package:aku_community/widget/buttons/bee_single_check.dart';
import 'package:aku_community/widget/buttons/bottom_button.dart';
class VotingDetailPage extends StatefulWidget {
final int id;
final int? id;
VotingDetailPage({Key key, this.id}) : super(key: key);
VotingDetailPage({Key? key, this.id}) : super(key: key);
@override
_VotingDetailPageState createState() => _VotingDetailPageState();
}
class _VotingDetailPageState extends State<VotingDetailPage> {
VotingDetailModel _model;
EasyRefreshController _refreshController;
late VotingDetailModel _model;
EasyRefreshController? _refreshController;
bool _isOnload = true;
// List<int> _select = [];
int _selectId;
int? _selectId;
bool _hasVoted = false;
bool get finishVoted {
if ((_model.status == 4) || _hasVoted || (_model.status == 3)) {
@ -78,11 +78,11 @@ class _VotingDetailPageState extends State<VotingDetailPage> {
);
}
double _getPercent(num numerator, num denominator) {
double _getPercent(num? numerator, num? denominator) {
if (denominator == 0) {
return 0;
} else {
return (numerator / denominator) * 100;
return (numerator! / denominator!) * 100;
}
}
@ -147,7 +147,7 @@ class _VotingDetailPageState extends State<VotingDetailPage> {
children: [
// '测试'.text.black.size(32.sp).make(),
// 10.w.heightBox,
model.name.text.black.size(32.sp).make(),
model.name!.text.black.size(32.sp).make(),
33.w.heightBox,
finishVoted
? Row(
@ -225,7 +225,7 @@ class _VotingDetailPageState extends State<VotingDetailPage> {
vertical: 26.w,
),
children: [
_model.title.text.black.size(32.sp).bold.maxLines(2).make(),
_model.title!.text.black.size(32.sp).bold.maxLines(2).make(),
44.w.heightBox,
ClipRRect(
borderRadius: BorderRadius.circular(8.w),
@ -235,7 +235,7 @@ class _VotingDetailPageState extends State<VotingDetailPage> {
),
),
44.w.heightBox,
_model.content.text.black.size(28.sp).make(),
_model.content!.text.black.size(28.sp).make(),
44.w.heightBox,
Container(
padding: EdgeInsets.fromLTRB(32.w, 50.w, 32.w, 0),
@ -255,7 +255,7 @@ class _VotingDetailPageState extends State<VotingDetailPage> {
// .size(32.sp)
// .make(), //TODO:
// 26.w.heightBox,
..._model.appVoteCandidateVos
..._model.appVoteCandidateVos!
.map((e) => _buildVoteCard(e))
.toList()
.sepWidget(separate: BeeDivider.horizontal()),
@ -274,7 +274,7 @@ class _VotingDetailPageState extends State<VotingDetailPage> {
} else {
BaseModel baseModel =
await ManagerFunc.vote(widget.id, _selectId);
if (baseModel.status) {
if (baseModel.status!) {
await Get.dialog(_shouwVoteDialog());
_hasVoted = true;
setState(() {});

@ -13,9 +13,9 @@ import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/dotted_line.dart';
class DetoCodePage extends StatelessWidget {
final int id;
final ArticleQRModel model;
const DetoCodePage({Key key, this.id, this.model}) : super(key: key);
final int? id;
final ArticleQRModel? model;
const DetoCodePage({Key? key, this.id, this.model}) : super(key: key);
Widget _header(String estateName) {
return Container(
@ -24,7 +24,7 @@ class DetoCodePage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
S.of(Get.context).tempPlotName,
S.of(Get.context!)!.tempPlotName,
style: TextStyle(fontSize: 40.sp, color: Color(0xffffffff)),
),
SizedBox(height: 10.w),
@ -37,7 +37,7 @@ class DetoCodePage extends StatelessWidget {
);
}
Widget _card(String name, String effectiveTime) {
Widget _card(String? name, String? effectiveTime) {
return Container(
decoration: BoxDecoration(
color: Color(0xffffffff),
@ -117,7 +117,7 @@ class DetoCodePage extends StatelessWidget {
// SizedBox(height: 11.w),
QrImage(
padding: EdgeInsets.zero,
data: model.appArticleOutQRCodeVo.id.toString(),
data: model!.appArticleOutQRCodeVo!.id.toString(),
size: 260.w,
),
],
@ -152,10 +152,10 @@ class DetoCodePage extends StatelessWidget {
Column(
children: [
SizedBox(height: 192.w - kToolbarHeight),
_header(appProvider.selectedHouse.roomName),
_header(appProvider.selectedHouse!.roomName!),
SizedBox(height: 32.w),
_card(model.appArticleOutQRCodeVo.applicantName,
model.appArticleOutQRCodeVo.effectiveTime),
_card(model!.appArticleOutQRCodeVo!.applicantName,
model!.appArticleOutQRCodeVo!.effectiveTime),
],
),
],

@ -31,7 +31,7 @@ import 'package:aku_community/widget/picker/bee_date_picker.dart';
import 'package:aku_community/widget/picker/grid_image_picker.dart';
class DetoCreatePage extends StatefulWidget {
DetoCreatePage({Key key}) : super(key: key);
DetoCreatePage({Key? key}) : super(key: key);
@override
_DetoCreatePageState createState() => _DetoCreatePageState();
@ -41,12 +41,12 @@ class _DetoCreatePageState extends State<DetoCreatePage> {
List<File> _files = [];
UserProvider get userProvider => Provider.of<UserProvider>(context);
String _itemName;
DateTime _date;
String? _itemName;
DateTime? _date;
String get datetime =>
DateUtil.formatDate(_date, format: "yyyy-MM-dd HH:mm:ss");
int _selectWeight;
String _selectTel;
int? _selectWeight;
String? _selectTel;
List<String> _listWeight = [
'< 50kg',
'50kg-100kg',
@ -108,7 +108,7 @@ class _DetoCreatePageState extends State<DetoCreatePage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
S.of(context).tempPlotName,
S.of(context)!.tempPlotName,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 32.sp,
@ -214,7 +214,7 @@ class _DetoCreatePageState extends State<DetoCreatePage> {
title: e,
value: _listWeight.indexOf(e),
groupValue: _selectWeight,
onChange: (value) {
onChange: (dynamic value) {
_selectWeight = value;
setState(() {});
},
@ -242,7 +242,7 @@ class _DetoCreatePageState extends State<DetoCreatePage> {
title: e,
value: _listMode.indexOf(e),
groupValue: _selectApproach,
onChange: (value) {
onChange: (dynamic value) {
_selectApproach = value;
setState(() {});
},
@ -256,7 +256,7 @@ class _DetoCreatePageState extends State<DetoCreatePage> {
);
}
Widget _itemPicker(String title, String select, VoidCallback onTap) {
Widget _itemPicker(String title, String? select, VoidCallback onTap) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
@ -270,7 +270,7 @@ class _DetoCreatePageState extends State<DetoCreatePage> {
onTap: onTap,
child: Row(
children: [
((select?.isEmptyOrNull ?? true) ? '请选择' : select)
((select?.isEmptyOrNull ?? true) ? '请选择' : select)!
.text
.color((select?.isEmptyOrNull ?? true)
? ktextSubColor
@ -368,7 +368,7 @@ class _DetoCreatePageState extends State<DetoCreatePage> {
padding: EdgeInsets.symmetric(vertical: 30.w),
child: Row(
children: [
(_selectTel.isEmptyOrNull ? '请选择搬家公司' : _selectTel)
(_selectTel.isEmptyOrNull ? '请选择搬家公司' : _selectTel)!
.text
.color(ktextSubColor)
.size(36.sp)
@ -386,7 +386,7 @@ class _DetoCreatePageState extends State<DetoCreatePage> {
);
}
bool _canSubmit(int weight, int approach, DateTime dateTime, String item) {
bool _canSubmit(int? weight, int approach, DateTime? dateTime, String? item) {
if (weight == null) {
return false;
} else if (approach == null) {
@ -410,7 +410,7 @@ class _DetoCreatePageState extends State<DetoCreatePage> {
body: ListView(
padding: EdgeInsets.all(32.w),
children: [
_houseAddress(appProvider.selectedHouse.roomName),
_houseAddress(appProvider.selectedHouse!.roomName!),
_getWeight(),
_itemPicker('出户时间', datetime, () async {
_date = await BeeDatePicker.timePicker(DateTime.now());
@ -442,22 +442,22 @@ class _DetoCreatePageState extends State<DetoCreatePage> {
onPressed: _canSubmit(_selectWeight, _selectApproach, _date, _itemName)
? () async {
VoidCallback cancel = BotToast.showLoading();
List<String> urls = await NetUtil()
List<String?> urls = await NetUtil()
.uploadFiles(_files, API.upload.uploadRepair);
BaseModel baseModel = await ManagerFunc.articleOutSubmit(
id: BeeParse.getEstateNameId(
userProvider.userDetailModel.estateNames[0]),
userProvider.userDetailModel!.estateNames![0]),
name: _itemName,
weight: _selectWeight + 1,
weight: _selectWeight! + 1,
approach: _selectApproach + 1,
tel: _selectTel,
time: datetime,
urls: urls,
);
if (baseModel.status) {
if (baseModel.status!) {
Get.back();
} else
BotToast.showText(text: baseModel.message);
BotToast.showText(text: baseModel.message!);
cancel();
}
: () {

@ -5,11 +5,11 @@ import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/widget/animated/animated_scale.dart';
class CommonRadio<T> extends StatefulWidget {
final T value;
final T groupValue;
final Widget text;
final double size;
CommonRadio({Key key, this.value, this.groupValue, this.text, this.size})
final T? value;
final T? groupValue;
final Widget? text;
final double? size;
CommonRadio({Key? key, this.value, this.groupValue, this.text, this.size})
: super(key: key);
@override
@ -19,7 +19,7 @@ class CommonRadio<T> extends StatefulWidget {
class _CommonRadioState extends State<CommonRadio> {
bool get _selected => widget.value == widget.groupValue;
double get smallSize {
return widget.size.isNull ? 24.w : (widget.size * 24 / 40);
return widget.size!.isNull! ? 24.w : (widget.size! * 24 / 40);
}
@override
@ -60,7 +60,7 @@ class _CommonRadioState extends State<CommonRadio> {
? [SizedBox()]
: [
10.w.widthBox,
widget.text,
widget.text!,
10.w.widthBox,
]
],

@ -21,7 +21,7 @@ import 'package:aku_community/widget/buttons/radio_button.dart';
import 'widget/goods_info_card.dart';
class GoodsDetoPage extends StatefulWidget {
GoodsDetoPage({Key key}) : super(key: key);
GoodsDetoPage({Key? key}) : super(key: key);
@override
_GoodsDetoPageState createState() => _GoodsDetoPageState();
@ -29,9 +29,9 @@ class GoodsDetoPage extends StatefulWidget {
class _GoodsDetoPageState extends State<GoodsDetoPage> {
EasyRefreshController _refreshController = EasyRefreshController();
List<int> _select = [];
List<int?> _select = [];
bool _isEdit = false;
bool _canSkew(int state) {
bool _canSkew(int? state) {
switch (state) {
case 1:
case 2:
@ -79,11 +79,11 @@ class _GoodsDetoPageState extends State<GoodsDetoPage> {
],
body: Padding(
padding: EdgeInsets.only(bottom: 98.w),
child: BeeListView(
child: BeeListView<GoodsOutModel>(
controller: _refreshController,
path: API.manager.articleOut,
convert: (model) {
return model.tableList
return model.tableList!
.map((e) => GoodsOutModel.fromJson(e))
.toList();
},

@ -15,22 +15,22 @@ import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/buttons/bottom_button.dart';
class SelectMoveCompanyPage extends StatefulWidget {
SelectMoveCompanyPage({Key key}) : super(key: key);
SelectMoveCompanyPage({Key? key}) : super(key: key);
@override
_SelectMoveCompanyPageState createState() => _SelectMoveCompanyPageState();
}
class _SelectMoveCompanyPageState extends State<SelectMoveCompanyPage> {
int _selected;
MovingCompanyModel _companyModel;
EasyRefreshController _controller;
int? _selected;
late MovingCompanyModel _companyModel;
EasyRefreshController? _controller;
bool _onloading = true;
String get result {
if (_selected == _companyModel.appMovingCompanyVoList.length) {
String? get result {
if (_selected == _companyModel.appMovingCompanyVoList!.length) {
return '已选择自己联系';
} else {
return _companyModel.appMovingCompanyVoList[_selected].tel;
return _companyModel.appMovingCompanyVoList![_selected!].tel;
}
}
@ -46,7 +46,7 @@ class _SelectMoveCompanyPageState extends State<SelectMoveCompanyPage> {
super.dispose();
}
Widget _buildCard(int index, String name, String tel) {
Widget _buildCard(int index, String name, String? tel) {
return GestureDetector(
onTap: () {
_selected = index;
@ -143,13 +143,13 @@ class _SelectMoveCompanyPageState extends State<SelectMoveCompanyPage> {
: ListView(
padding: EdgeInsets.all(32.w),
children: [
..._companyModel.appMovingCompanyVoList
..._companyModel.appMovingCompanyVoList!
.map((e) => _buildCard(
_companyModel.appMovingCompanyVoList.indexOf(e),
e.name,
_companyModel.appMovingCompanyVoList!.indexOf(e),
e.name!,
e.tel))
.toList(),
_buildForself(_companyModel.appMovingCompanyVoList.length)
_buildForself(_companyModel.appMovingCompanyVoList!.length)
].sepWidget(separate: BeeDivider.horizontal()),
),
),

@ -9,9 +9,9 @@ import 'package:aku_community/widget/views/horizontal_image_view.dart';
import 'goods_info_card_button.dart';
class GoodsInfoCard extends StatelessWidget {
final GoodsOutModel model;
final GoodsOutModel? model;
GoodsInfoCard({
Key key,
Key? key,
this.model,
}) : super(key: key);
@ -34,7 +34,7 @@ class GoodsInfoCard extends StatelessWidget {
);
}
Color _getColor(int state) {
Color _getColor(int? state) {
switch (state) {
case 1:
case 2:
@ -98,11 +98,11 @@ class GoodsInfoCard extends StatelessWidget {
fontSize: 32.sp,
color: Color(0xff333333)),
),
Text(BeeMap.fixState[model.status],
Text(BeeMap.fixState[model!.status!]!,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 28.sp,
color: _getColor(model.status))),
color: _getColor(model!.status))),
],
),
),
@ -117,10 +117,10 @@ class GoodsInfoCard extends StatelessWidget {
BorderSide(color: Color(0xffeeeeee), width: 0.5)),
),
child: Column(children: [
_builTile('物品重量', BeeMap.goodsOutweight[model.weight]),
_builTile('出户时间', model.expectedTime),
_builTile('物品名称', model.name),
_builTile('搬运方式', BeeMap.goodsOutApproach[model.approach]),
_builTile('物品重量', BeeMap.goodsOutweight[model!.weight!]!),
_builTile('出户时间', model!.expectedTime!),
_builTile('物品名称', model!.name!),
_builTile('搬运方式', BeeMap.goodsOutApproach[model!.approach!]!),
]),
),
Container(
@ -142,7 +142,7 @@ class GoodsInfoCard extends StatelessWidget {
),
),
HorizontalImageView(
model.imgUrl.map((e) => e.url).toList()),
model!.imgUrl!.map((e) => e.url).toList()),
],
),
),
@ -150,8 +150,8 @@ class GoodsInfoCard extends StatelessWidget {
),
),
GoodsInfoCardButton(
id: model.id,
tel: model.movingCompanyTel,
id: model!.id,
tel: model!.movingCompanyTel,
)
],
),

@ -12,9 +12,9 @@ import 'package:aku_community/pages/manager_func.dart';
import 'package:aku_community/utils/headers.dart';
class GoodsInfoCardButton extends StatelessWidget {
final String tel;
final int id;
GoodsInfoCardButton({Key key, this.tel, this.id}) : super(key: key);
final String? tel;
final int? id;
GoodsInfoCardButton({Key? key, this.tel, this.id}) : super(key: key);
final List<Map<String, dynamic>> _listButton = [
{'title': '查看二维码', 'icon': MaterialCommunityIcons.qrcode},
@ -28,13 +28,13 @@ class GoodsInfoCardButton extends StatelessWidget {
}
}
void _showDialog(BuildContext context, String url) {
void _showDialog(BuildContext context, String? url) {
showCupertinoDialog(
context: context,
builder: (context) {
return CupertinoAlertDialog(
title: Text(
url,
url!,
style: TextStyle(
fontSize: 34.sp,
color: Color(0xff030303),
@ -96,10 +96,10 @@ class GoodsInfoCardButton extends StatelessWidget {
case '查看二维码':
ArticleQRModel _model =
await ManagerFunc.getQRcode(id);
if (_model.status) {
if (_model.status!) {
Get.to(() => DetoCodePage(id: id, model: _model));
} else {
BotToast.showText(text: _model.message);
BotToast.showText(text: _model.message!);
}
break;
case '搬家公司':

@ -10,9 +10,9 @@ import 'package:aku_community/pages/tab_navigator.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
class BorrowFinshPage extends StatefulWidget {
final bool isSuccess;
final String failText;
BorrowFinshPage({Key key, this.isSuccess, this.failText}) : super(key: key);
final bool? isSuccess;
final String? failText;
BorrowFinshPage({Key? key, this.isSuccess, this.failText}) : super(key: key);
@override
_BorrowFinshPageState createState() => _BorrowFinshPageState();
@ -30,19 +30,19 @@ class _BorrowFinshPageState extends State<BorrowFinshPage> {
SizedBox(
width: 110.w,
height: 110.w,
child: Image.asset(widget.isSuccess
child: Image.asset(widget.isSuccess!
? R.ASSETS_ICONS_BORROW_SUCCESS_PNG
: R.ASSETS_ICONS_BORROW_FAILURE_PNG),
),
48.w.heightBox,
'${widget.isSuccess ? '出借成功' : '出借失败'}'
'${widget.isSuccess! ? '出借成功' : '出借失败'}'
.text
.color(ktextPrimary)
.size(36.sp)
.bold
.make(),
16.w.heightBox,
'${widget.isSuccess ? '使用后请记得归还' : widget.failText}'
'${widget.isSuccess! ? '使用后请记得归还' : widget.failText}'
.text
.color(ktextSubColor)
.size(26.sp)
@ -59,16 +59,16 @@ class _BorrowFinshPageState extends State<BorrowFinshPage> {
disabledElevation: 0,
padding: EdgeInsets.symmetric(vertical: 24.w),
minWidth: double.infinity,
onPressed: widget.isSuccess
onPressed: widget.isSuccess!
? () {
Get.offAll(TabNavigator());
}
: () {
Get.back();
},
child: '${widget.isSuccess ? '返回首页' : '重新提交'}'
child: '${widget.isSuccess! ? '返回首页' : '重新提交'}'
.text
.color(widget.isSuccess ? ktextPrimary : Colors.white)
.color(widget.isSuccess! ? ktextPrimary : Colors.white)
.size(36.sp)
.make(),
)

@ -17,9 +17,9 @@ import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/buttons/radio_button.dart';
class BorrowGoodsDetailPage extends StatefulWidget {
final int articleId;
final List<int> receiveIds;
BorrowGoodsDetailPage({Key key, this.articleId, this.receiveIds})
final int? articleId;
final List<int?>? receiveIds;
BorrowGoodsDetailPage({Key? key, this.articleId, this.receiveIds})
: super(key: key);
@override
@ -27,16 +27,16 @@ class BorrowGoodsDetailPage extends StatefulWidget {
}
class _BorrowGoodsDetailPageState extends State<BorrowGoodsDetailPage> {
EasyRefreshController _easyRefreshController;
List<ArticleBorrowDetailModel> _models;
EasyRefreshController? _easyRefreshController;
late List<ArticleBorrowDetailModel> _models;
bool _onload = true;
List<int> _selectItems = [];
bool get allSelect => _selectItems.length == _models.length;
List<int?>? _selectItems = [];
bool get allSelect => _selectItems!.length == _models.length;
@override
void initState() {
super.initState();
_easyRefreshController = EasyRefreshController();
if (widget.receiveIds != null && widget.receiveIds.isNotEmpty) {
if (widget.receiveIds != null && widget.receiveIds!.isNotEmpty) {
_selectItems = widget.receiveIds;
}
}
@ -55,7 +55,7 @@ class _BorrowGoodsDetailPageState extends State<BorrowGoodsDetailPage> {
firstRefresh: true,
header: MaterialHeader(),
onRefresh: () async {
List models = await getModels();
List models = await (getModels());
_models =
models.map((e) => ArticleBorrowDetailModel.fromJson(e)).toList();
_onload = false;
@ -75,11 +75,11 @@ class _BorrowGoodsDetailPageState extends State<BorrowGoodsDetailPage> {
return GestureDetector(
onTap: () {
if (allSelect) {
_selectItems.clear();
_selectItems!.clear();
} else {
_selectItems.clear();
_selectItems!.clear();
_models.forEach((element) {
_selectItems.add(element.id);
_selectItems!.add(element.id);
});
}
setState(() {});
@ -125,7 +125,7 @@ class _BorrowGoodsDetailPageState extends State<BorrowGoodsDetailPage> {
'全选'.text.color(ktextSubColor).size(24.sp).make(),
Spacer(),
'已选择 '.richText.color(ktextPrimary).size(24.sp).withTextSpanChildren([
'${_selectItems.length}'
'${_selectItems!.length}'
.textSpan
.size(32.sp)
.color(ktextPrimary)
@ -163,7 +163,7 @@ class _BorrowGoodsDetailPageState extends State<BorrowGoodsDetailPage> {
await NetUtil().get(API.manager.articleBorrowFindDetail, params: {
"articleId": widget.articleId,
});
return baseModel.data as List;
return baseModel.data as List?;
}
Widget _goodsCard(ArticleBorrowDetailModel model) {
@ -172,10 +172,10 @@ class _BorrowGoodsDetailPageState extends State<BorrowGoodsDetailPage> {
children: [
GestureDetector(
onTap: () {
if (_selectItems.contains(model.id)) {
_selectItems.remove(model.id);
if (_selectItems!.contains(model.id)) {
_selectItems!.remove(model.id);
} else {
_selectItems.add(model.id);
_selectItems!.add(model.id);
}
setState(() {});
},

@ -18,15 +18,15 @@ import 'package:aku_community/utils/network/net_util.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
class BorrowGoodsPage extends StatefulWidget {
BorrowGoodsPage({Key key}) : super(key: key);
BorrowGoodsPage({Key? key}) : super(key: key);
@override
_BorrowGoodsPageState createState() => _BorrowGoodsPageState();
}
class _BorrowGoodsPageState extends State<BorrowGoodsPage> {
EasyRefreshController _easyRefreshController;
List<int> _receiveIds = [];
EasyRefreshController? _easyRefreshController;
List<int>? _receiveIds = [];
List<int> _submitIds = [];
List<int> _counts = [];
@override
@ -54,11 +54,11 @@ class _BorrowGoodsPageState extends State<BorrowGoodsPage> {
padding: EdgeInsets.symmetric(horizontal: 32.w),
),
],
body: BeeListView(
body: BeeListView<ArticleBorrowModel>(
path: API.manager.articleBorrow,
controller: _easyRefreshController,
convert: (models) {
return models.tableList
return models.tableList!
.map((e) => ArticleBorrowModel.fromJson(e))
.toList();
},
@ -194,17 +194,18 @@ class _BorrowGoodsPageState extends State<BorrowGoodsPage> {
.withRounded(value: 6.w)
.make()
.onInkTap(() async {
_receiveIds.forEach((element) {
_receiveIds!.forEach((element) {
_submitIds.remove(element);
});
await Get.to(() => BorrowGoodsDetailPage(
articleId: model.id,
receiveIds: _receiveIds,
)).then((value) {
))!
.then((value) {
_receiveIds = value;
});
_counts[index] = _receiveIds.length;
_submitIds.addAll(_receiveIds);
_counts[index] = _receiveIds!.length;
_submitIds.addAll(_receiveIds!);
setState(() {});
});
}

@ -19,7 +19,7 @@ import 'package:aku_community/widget/buttons/bottom_button.dart';
class GoodsManagePage extends StatefulWidget {
final bool isBorrow;
GoodsManagePage({Key key, this.isBorrow = true}) : super(key: key);
GoodsManagePage({Key? key, this.isBorrow = true}) : super(key: key);
@override
_GoodsManagePageState createState() => _GoodsManagePageState();
@ -99,11 +99,11 @@ class _GoodsManagePageState extends State<GoodsManagePage> {
padding: EdgeInsets.symmetric(horizontal: 32.w),
),
],
body: BeeListView(
body: BeeListView<ArticleBorrowModel>(
path: API.manager.articleBorrow,
controller: _easyRefreshController,
convert: (models) {
return models.tableList
return models.tableList!
.map((e) => ArticleBorrowModel.fromJson(e))
.toList();
},

@ -12,14 +12,14 @@ import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
class MineGoodsPage extends StatefulWidget {
MineGoodsPage({Key key}) : super(key: key);
MineGoodsPage({Key? key}) : super(key: key);
@override
_MineGoodsPageState createState() => _MineGoodsPageState();
}
class _MineGoodsPageState extends State<MineGoodsPage> {
EasyRefreshController _controller;
EasyRefreshController? _controller;
@override
void initState() {
@ -30,10 +30,10 @@ class _MineGoodsPageState extends State<MineGoodsPage> {
@override
void dispose() {
super.dispose();
_controller.dispose();
_controller!.dispose();
}
InkWell _frmLoss(int id) {
InkWell _frmLoss(int? id) {
return InkWell(
onTap: () async {
await ManagerFunc.fromLoss(id);
@ -118,7 +118,7 @@ class _MineGoodsPageState extends State<MineGoodsPage> {
Container(
margin: EdgeInsets.only(top: 16.w),
child: Text(
'借用时长: ${_getDatelength(model.borrowDate)}',
'借用时长: ${_getDatelength(model.borrowDate!)}',
style: TextStyle(
fontSize: 24.sp,
color: Color(0xff999999),
@ -147,7 +147,7 @@ class _MineGoodsPageState extends State<MineGoodsPage> {
? Container(
margin: EdgeInsets.only(bottom: 9.w),
child: Text(
'温馨提示:您的物品已借用${_getDatelength(model.borrowDate)},如果用完,请及时归还',
'温馨提示:您的物品已借用${_getDatelength(model.borrowDate!)},如果用完,请及时归还',
style: TextStyle(
fontSize: 22.sp,
color: Color(0xff999999),
@ -187,11 +187,11 @@ class _MineGoodsPageState extends State<MineGoodsPage> {
// ),
// ),
// ),
body: BeeListView(
body: BeeListView<MineGoodsModel>(
path: API.manager.articleBorrowMylist,
controller: _controller,
convert: (model) {
return model.tableList
return model.tableList!
.map((e) => MineGoodsModel.fromJson(e))
.toList();
},

@ -17,17 +17,17 @@ import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/buttons/radio_button.dart';
class ReturnGoodsDetailPage extends StatefulWidget {
ReturnGoodsDetailPage({Key key}) : super(key: key);
ReturnGoodsDetailPage({Key? key}) : super(key: key);
@override
_ReturnGoodsDetailPageState createState() => _ReturnGoodsDetailPageState();
}
class _ReturnGoodsDetailPageState extends State<ReturnGoodsDetailPage> {
EasyRefreshController _easyRefreshController;
List<ArticleReturnListModel> _models;
EasyRefreshController? _easyRefreshController;
late List<ArticleReturnListModel> _models;
bool _onload = true;
List<int> _selectItems = [];
List<int?> _selectItems = [];
bool get allSelect => _selectItems.length == _models.length;
@override
void initState() {
@ -49,7 +49,7 @@ class _ReturnGoodsDetailPageState extends State<ReturnGoodsDetailPage> {
firstRefresh: true,
header: MaterialHeader(),
onRefresh: () async {
List models = await getModels();
List models = await (getModels());
_models =
models.map((e) => ArticleReturnListModel.fromJson(e)).toList();
_onload = false;
@ -140,7 +140,7 @@ class _ReturnGoodsDetailPageState extends State<ReturnGoodsDetailPage> {
'ids': _selectItems,
},
showMessage: true);
if (baseModel.status) {
if (baseModel.status!) {
Get.back();
}
},
@ -162,7 +162,7 @@ class _ReturnGoodsDetailPageState extends State<ReturnGoodsDetailPage> {
Future getModels() async {
BaseModel baseModel = await NetUtil().get(API.manager.articleReturnList);
return baseModel.data as List;
return baseModel.data as List?;
}
Widget _goodsCard(ArticleReturnListModel model) {

@ -11,7 +11,7 @@ import 'package:aku_community/pages/goods_manage_page/goods_manage_page.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
class SelectBorrowReturnPage extends StatefulWidget {
SelectBorrowReturnPage({Key key}) : super(key: key);
SelectBorrowReturnPage({Key? key}) : super(key: key);
@override
_SelectBorrowReturnPageState createState() => _SelectBorrowReturnPageState();

@ -30,7 +30,7 @@ import 'package:aku_community/widget/views/application_view.dart';
import 'widget/home_search.dart';
class HomePage extends StatefulWidget {
HomePage({Key key}) : super(key: key);
HomePage({Key? key}) : super(key: key);
@override
_HomePageState createState() => _HomePageState();
@ -41,15 +41,15 @@ class _HomePageState extends State<HomePage>
@override
bool get wantKeepAlive => true;
ScrollController _scrollController;
ScrollController? _scrollController;
List<dynamic> data;
List<dynamic>? data;
EasyRefreshController _refreshController = EasyRefreshController();
int page = 1;
ActivityItemModel _activityItemModel;
ActivityItemModel? _activityItemModel;
List<BoardItemModel> _boardItemModels = [];
@override

@ -7,9 +7,9 @@ import 'package:aku_community/provider/app_provider.dart';
import 'package:aku_community/utils/headers.dart';
class AnimateAppBar extends StatefulWidget with PreferredSizeWidget {
final ScrollController scrollController;
final List<Widget> actions;
AnimateAppBar({Key key, this.scrollController, this.actions})
final ScrollController? scrollController;
final List<Widget>? actions;
AnimateAppBar({Key? key, this.scrollController, this.actions})
: super(key: key);
@override
@ -24,14 +24,14 @@ class _AnimateAppBarState extends State<AnimateAppBar> {
@override
void initState() {
super.initState();
widget.scrollController.addListener(() {
widget.scrollController!.addListener(() {
setState(() {
_bgColor = widget.scrollController.offset > 30
_bgColor = widget.scrollController!.offset > 30
? Color(0xFFFFBD00)
: widget.scrollController.offset < 0
: widget.scrollController!.offset < 0
? Colors.transparent
: Color(0xFFFFBD00)
.withOpacity((widget.scrollController.offset / 30));
.withOpacity((widget.scrollController!.offset / 30));
});
});
}
@ -40,7 +40,7 @@ class _AnimateAppBarState extends State<AnimateAppBar> {
Widget build(BuildContext context) {
final appProvider = Provider.of<AppProvider>(context);
return AppBar(
title: Text(S.of(context).tempPlotName),
title: Text(S.of(context)!.tempPlotName),
backgroundColor: _bgColor,
leading: Container(
margin: EdgeInsets.only(left: 32.w),
@ -48,9 +48,9 @@ class _AnimateAppBarState extends State<AnimateAppBar> {
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (appProvider?.location != null)
if (appProvider.location != null)
Text(
appProvider?.location['city'] ?? '',
appProvider.location!['city'] as String? ?? '',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 24.sp,

@ -8,7 +8,7 @@ import 'package:aku_community/ui/search/bee_search.dart';
import 'package:aku_community/utils/headers.dart';
class HomeSearch extends StatefulWidget {
HomeSearch({Key key}) : super(key: key);
HomeSearch({Key? key}) : super(key: key);
@override
_HomeSearchState createState() => _HomeSearchState();

@ -5,7 +5,7 @@ import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
class CommitteeMailboxPage extends StatefulWidget {
CommitteeMailboxPage({Key key}) : super(key: key);
CommitteeMailboxPage({Key? key}) : super(key: key);
@override
_CommitteeMailboxPageState createState() => _CommitteeMailboxPageState();

@ -16,7 +16,7 @@ import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
class IndustryCommitteePage extends StatefulWidget {
IndustryCommitteePage({Key key}) : super(key: key);
IndustryCommitteePage({Key? key}) : super(key: key);
@override
_IndustryCommitteePageState createState() => _IndustryCommitteePageState();
@ -93,7 +93,7 @@ class _IndustryCommitteePageState extends State<IndustryCommitteePage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
[
model.name.text.size(28.sp).color(ktextPrimary).make(),
model.name!.text.size(28.sp).color(ktextPrimary).make(),
Spacer(),
Container(
height: 44.w,
@ -135,10 +135,10 @@ class _IndustryCommitteePageState extends State<IndustryCommitteePage> {
return BeeScaffold(
title: '业委会',
systemStyle: SystemStyle.genStyle(bottom: Color(0xFF2A2A2A)),
body: BeeListView(
body: BeeListView<CommitteeItemModel>(
path: API.manager.commiteeStaff,
convert: (model) {
return model.tableList
return model.tableList!
.map((e) => CommitteeItemModel.fromJson(e))
.toList();
},

@ -6,7 +6,7 @@ import 'package:aku_community/widget/bee_scaffold.dart';
import 'widget/bill_card.dart';
class LifePayBillPage extends StatefulWidget {
LifePayBillPage({Key key}) : super(key: key);
LifePayBillPage({Key? key}) : super(key: key);
@override
_LifePayBillPageState createState() => _LifePayBillPageState();

@ -5,7 +5,7 @@ import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/utils/headers.dart';
class BillCard extends StatelessWidget {
BillCard({Key key}) : super(key: key);
BillCard({Key? key}) : super(key: key);
final List<Map<String, dynamic>> _listBill = [
{'title': '账单月份', 'value': '2020年1月'},

@ -21,20 +21,20 @@ import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/buttons/bee_check_radio.dart';
class LifePayPage extends StatefulWidget {
LifePayPage({Key key}) : super(key: key);
LifePayPage({Key? key}) : super(key: key);
@override
_LifePayPageState createState() => _LifePayPageState();
}
class SelectPay {
double payTotal;
int payCount;
double? payTotal;
int? payCount;
SelectPay({this.payCount, this.payTotal});
}
class _LifePayPageState extends State<LifePayPage> {
EasyRefreshController _controller;
EasyRefreshController? _controller;
List<int> _selectYears = [];
List<LifePayModel> _models = [];
List<SelectPay> _selectPay = [];
@ -66,7 +66,7 @@ class _LifePayPageState extends State<LifePayPage> {
GestureDetector(
onTap: () {
Get.to(() => PickMyHousePage());
_controller.callRefresh();
_controller!.callRefresh();
},
child: Row(
children: [
@ -81,7 +81,7 @@ class _LifePayPageState extends State<LifePayPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
S
.of(context)
.of(context)!
.tempPlotName
.text
.black
@ -89,7 +89,7 @@ class _LifePayPageState extends State<LifePayPage> {
.bold
.make(),
10.w.heightBox,
appProvider.selectedHouse.roomName.text.black
appProvider.selectedHouse!.roomName!.text.black
.size(32.sp)
.bold
.make()
@ -153,7 +153,7 @@ class _LifePayPageState extends State<LifePayPage> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
'${BeeParse.getCustomYears(model.years)}(${model.years})'
'${BeeParse.getCustomYears(model.years!)}(${model.years})'
.text
.color(ktextSubColor)
.size(28.sp)
@ -188,8 +188,8 @@ class _LifePayPageState extends State<LifePayPage> {
children: [
GestureDetector(
onTap: () async {
List payMent = await Get.to(
() => LifePayDetailPage(model: _models[index]));
List payMent = await (Get.to(
() => LifePayDetailPage(model: _models[index])));
_selectPay[index].payCount = payMent[0];
_selectPay[index].payTotal = payMent[1];
setState(() {});
@ -213,11 +213,11 @@ class _LifePayPageState extends State<LifePayPage> {
double getPayTotal(LifePayModel list) {
num total = 0;
for (var item in list.dailyPaymentTypeVos) {
total += ((item.detailedVoList[1].paymentPrice ?? 0) +
(item.detailedVoList[2].paymentPrice ?? 0));
for (var item in list.dailyPaymentTypeVos!) {
total += ((item.detailedVoList![1].paymentPrice ?? 0) +
(item.detailedVoList![2].paymentPrice ?? 0));
}
return total;
return total as double;
}
@override
@ -240,20 +240,20 @@ class _LifePayPageState extends State<LifePayPage> {
body: BeeListView(
path: API.manager.dailyPaymentList,
controller: _controller,
extraParams: {'estateId': appProvider.selectedHouse.estateId},
extraParams: {'estateId': appProvider.selectedHouse!.estateId},
convert: (model) {
List<LifePayModel> lifePayModels =
model.tableList.map((e) => LifePayModel.fromJson(e)).toList();
model.tableList!.map((e) => LifePayModel.fromJson(e)).toList();
_selectPay.addAll(lifePayModels
.map((e) => SelectPay(
payCount: e.dailyPaymentTypeVos.length,
payCount: e.dailyPaymentTypeVos!.length,
payTotal: getPayTotal(e),
))
.toList());
return lifePayModels;
},
builder: (items) {
_models = items;
_models = items as List<LifePayModel>;
return Column(
children: [
_buildHouseCard(),
@ -297,8 +297,8 @@ class _LifePayPageState extends State<LifePayPage> {
_totalCost = 0;
_count = 0;
for (var item in _selectPay) {
_totalCost += item.payTotal;
_count += item.payCount;
_totalCost += item.payTotal!;
_count += item.payCount!;
}
}
setState(() {});

@ -13,14 +13,14 @@ import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
class LifePayRecordPage extends StatefulWidget {
LifePayRecordPage({Key key}) : super(key: key);
LifePayRecordPage({Key? key}) : super(key: key);
@override
_LifePayRecordPageState createState() => _LifePayRecordPageState();
}
class _LifePayRecordPageState extends State<LifePayRecordPage> {
EasyRefreshController _refreshController;
EasyRefreshController? _refreshController;
Map<int, String> getPayType = {1: '支付宝', 2: '微信', 3: '现金', 4: 'pos'};
@override
void initState() {
@ -42,7 +42,7 @@ class _LifePayRecordPageState extends State<LifePayRecordPage> {
path: API.manager.paymentRecord,
controller: _refreshController,
convert: (models) {
return models.tableList
return models.tableList!
.map((e) => LifePayRecordModel.fromJson(e))
.toList();
},
@ -64,7 +64,9 @@ class _LifePayRecordPageState extends State<LifePayRecordPage> {
.color(ktextSubColor)
.make(),
32.w.heightBox,
...items.map((e) => _buildRecordCard(e)).toList()
...items
.map((e) => _buildRecordCard(e as LifePayRecordModel))
.toList()
],
);
},
@ -77,13 +79,13 @@ class _LifePayRecordPageState extends State<LifePayRecordPage> {
children: [
Row(
children: [
model.chargesTemplateDetailName.text
model.chargesTemplateDetailName!.text
.size(30.sp)
.color(ktextPrimary)
.bold
.make(),
Spacer(),
'${S.of(context).tempPlotName} ${model.roomName}'
'${S.of(context)!.tempPlotName} ${model.roomName}'
.text
.size(24.sp)
.color(Color(0xFF999999))
@ -107,7 +109,7 @@ class _LifePayRecordPageState extends State<LifePayRecordPage> {
children: [
'创建时间'.text.color(ktextSubColor).size(28.sp).make(),
Spacer(),
'${DateUtil.formatDateStr(model.createDate, format: "yyyy/MM/dd HH:mm")}'
'${DateUtil.formatDateStr(model.createDate!, format: "yyyy/MM/dd HH:mm")}'
.text
.color(ktextPrimary)
.size(28.sp)
@ -118,7 +120,7 @@ class _LifePayRecordPageState extends State<LifePayRecordPage> {
children: [
'付款方式'.text.color(ktextSubColor).size(28.sp).make(),
Spacer(),
'${getPayType[model.payType]}'
'${getPayType[model.payType!]}'
.text
.color(ktextPrimary)
.size(28.sp)

@ -13,9 +13,9 @@ import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/buttons/bee_check_radio.dart';
class LifePayDetailPage extends StatefulWidget {
final LifePayModel model;
final LifePayModel? model;
LifePayDetailPage({
Key key,
Key? key,
this.model,
}) : super(key: key);
@ -29,8 +29,8 @@ class _LifePayDetailPageState extends State<LifePayDetailPage> {
int _payNum = 0;
int get listLength {
int count = 0;
widget.model.dailyPaymentTypeVos.forEach((element) {
element.detailedVoList.forEach((element) {
widget.model!.dailyPaymentTypeVos!.forEach((element) {
element.detailedVoList!.forEach((element) {
count++;
});
});
@ -44,36 +44,36 @@ class _LifePayDetailPageState extends State<LifePayDetailPage> {
@override
void initState() {
super.initState();
for (var i = 0; i < widget.model.dailyPaymentTypeVos.length; i++) {
for (var i = 0; i < widget.model!.dailyPaymentTypeVos!.length; i++) {
for (var j = 0;
j < widget.model.dailyPaymentTypeVos[i].detailedVoList.length;
j < widget.model!.dailyPaymentTypeVos![i].detailedVoList!.length;
j++) {
String id = widget.model.dailyPaymentTypeVos[i].id.toString() +
widget.model.dailyPaymentTypeVos[i].detailedVoList[j].groupId
String id = widget.model!.dailyPaymentTypeVos![i].id.toString() +
widget.model!.dailyPaymentTypeVos![i].detailedVoList![j].groupId
.toString();
if (!_selectItems.contains(id)) {
_selectItems.add(id);
_payNum += 1;
_payTotal += widget
.model.dailyPaymentTypeVos[i].detailedVoList[j].paymentPrice
.model!.dailyPaymentTypeVos![i].detailedVoList![j].paymentPrice!
.toDouble();
}
}
}
}
Widget _buildTile(int groupId, int id, int years, double price) {
Widget _buildTile(int? groupId, int? id, int? years, double? price) {
return GestureDetector(
onTap: () {
String item = id.toString() + groupId.toString();
if (_selectItems.contains(item)) {
_selectItems.remove(item);
_payNum -= 1;
_payTotal -= price.toDouble();
_payTotal -= price!.toDouble();
} else {
_selectItems.add(item);
_payNum += 1;
_payTotal += price.toDouble();
_payTotal += price!.toDouble();
}
setState(() {});
@ -108,9 +108,9 @@ class _LifePayDetailPageState extends State<LifePayDetailPage> {
children: [
Row(
children: [
model.name.text.black.size(30.sp).bold.make(),
model.name!.text.black.size(30.sp).bold.make(),
Spacer(),
'${S.of(context).tempPlotName} ${appProvider.selectedHouse.estateId}'
'${S.of(context)!.tempPlotName} ${appProvider.selectedHouse!.estateId}'
.text
.color(ktextSubColor)
.size(24.sp)
@ -118,9 +118,9 @@ class _LifePayDetailPageState extends State<LifePayDetailPage> {
],
),
50.w.heightBox,
...model.detailedVoList
...model.detailedVoList!
.map((e) => _buildTile(
e.groupId, model.id, widget.model.years, e.paymentPrice))
e.groupId, model.id, widget.model!.years, e.paymentPrice))
.toList(),
],
),
@ -131,11 +131,11 @@ class _LifePayDetailPageState extends State<LifePayDetailPage> {
Widget build(BuildContext context) {
return BeeScaffold(
title:
'${BeeParse.getCustomYears(widget.model.years)}-${widget.model.years}年明细',
'${BeeParse.getCustomYears(widget.model!.years!)}-${widget.model!.years}年明细',
body: ListView(
padding: EdgeInsets.only(top: 16.w),
children: [
...widget.model.dailyPaymentTypeVos
...widget.model!.dailyPaymentTypeVos!
.map((e) => _buildCard(e))
.toList(),
],
@ -153,23 +153,23 @@ class _LifePayDetailPageState extends State<LifePayDetailPage> {
_payTotal = 0;
} else {
for (var i = 0;
i < widget.model.dailyPaymentTypeVos.length;
i < widget.model!.dailyPaymentTypeVos!.length;
i++) {
for (var j = 0;
j <
widget.model.dailyPaymentTypeVos[i].detailedVoList
widget.model!.dailyPaymentTypeVos![i].detailedVoList!
.length;
j++) {
String id =
widget.model.dailyPaymentTypeVos[i].id.toString() +
widget.model.dailyPaymentTypeVos[i]
.detailedVoList[j].groupId
widget.model!.dailyPaymentTypeVos![i].id.toString() +
widget.model!.dailyPaymentTypeVos![i]
.detailedVoList![j].groupId
.toString();
if (!_selectItems.contains(id)) {
_selectItems.add(id);
_payNum += 1;
_payTotal += widget.model.dailyPaymentTypeVos[i]
.detailedVoList[j].paymentPrice
_payTotal += widget.model!.dailyPaymentTypeVos![i]
.detailedVoList![j].paymentPrice!
.toDouble();
}
}

@ -5,8 +5,8 @@ import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/utils/headers.dart';
class SubmitBar extends StatefulWidget {
final String title;
SubmitBar({Key key, this.title}) : super(key: key);
final String? title;
SubmitBar({Key? key, this.title}) : super(key: key);
@override
_SubmitBarState createState() => _SubmitBarState();
@ -111,7 +111,7 @@ class _SubmitBarState extends State<SubmitBar> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
_selectAll(),
_submitOrder(widget.title),
_submitOrder(widget.title!),
],
),
);

@ -1,7 +1,3 @@
// Package imports:
import 'package:flutter/foundation.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:dio/dio.dart';
import 'package:flustars/flustars.dart';
@ -36,13 +32,13 @@ class ManagerFunc {
return baseModel;
}
static Future<String> shareVisitor({
@required int estateId,
String name,
String tel,
int sex,
String carNumber,
DateTime date,
static Future<String?> shareVisitor({
required int? estateId,
String? name,
String? tel,
int? sex,
String? carNumber,
DateTime? date,
}) async {
final cancel = BotToast.showLoading();
Map<String, dynamic> params = {
@ -54,7 +50,7 @@ class ManagerFunc {
if (carNumber != null) params.putIfAbsent('carNumber', () => carNumber);
if (date != null)
params.putIfAbsent('visitDateStart', () => NetUtil.getDate(date));
Response response = await NetUtil().dio.post(
Response response = await NetUtil().dio!.post(
API.manager.shareInvite,
data: params,
);
@ -66,7 +62,7 @@ class ManagerFunc {
}
static reportRepairInsert(
int id, int type, String reportDetail, List<String> fileUrls) async {
int? id, int type, String reportDetail, List<String?> fileUrls) async {
BaseModel baseModel = await NetUtil().post(
API.manager.reportRepairInsert,
params: {
@ -80,7 +76,7 @@ class ManagerFunc {
return baseModel;
}
static reportRepairDelete(List<int> ids) async {
static reportRepairDelete(List<int?> ids) async {
BaseModel baseModel = await NetUtil().post(
API.manager.reportRepairDelete,
params: {'ids': ids},
@ -89,8 +85,8 @@ class ManagerFunc {
return baseModel;
}
static Future<FixedDetailModel> reportRepairFindBYLD(int id) async {
Response response = await NetUtil().dio.get(
static Future<FixedDetailModel> reportRepairFindBYLD(int? id) async {
Response response = await NetUtil().dio!.get(
API.manager.reportRepairFindBYLD,
queryParameters: {
'repairId': id,
@ -99,7 +95,7 @@ class ManagerFunc {
return FixedDetailModel.fromJson(response.data);
}
static Future<BaseModel> reportRepairCancel(int id) async {
static Future<BaseModel> reportRepairCancel(int? id) async {
BaseModel baseModel = await NetUtil().get(API.manager.reportRepairCancel,
params: {
'repairId': id,
@ -109,7 +105,7 @@ class ManagerFunc {
}
static Future<BaseModel> reportRepairEvaluate(
int id, int rate, String text) async {
int? id, int? rate, String text) async {
BaseModel baseModel = await NetUtil().post(
API.manager.reportRepairEvaluate,
params: {
@ -122,7 +118,7 @@ class ManagerFunc {
return baseModel;
}
static Future<BaseModel> reportRepairComplete(int id) async {
static Future<BaseModel> reportRepairComplete(int? id) async {
BaseModel baseModel = await NetUtil().get(
API.manager.reportRepairComplete,
params: {
@ -134,20 +130,20 @@ class ManagerFunc {
}
static Future<MovingCompanyModel> getMovingCompanyTel() async {
Response response = await NetUtil().dio.get(
Response response = await NetUtil().dio!.get(
API.manager.getMovingCompanyTel,
);
return MovingCompanyModel.fromJson(response.data);
}
static Future<BaseModel> articleOutSubmit({
int id,
String name,
int weight,
int approach,
String tel,
String time,
List<String> urls,
int? id,
String? name,
int? weight,
int? approach,
String? tel,
required String time,
List<String?>? urls,
}) async {
BaseModel baseModel = await NetUtil().post(
API.manager.articleOutSubmit,
@ -166,8 +162,8 @@ class ManagerFunc {
return baseModel;
}
static Future<ArticleQRModel> getQRcode(int id) async {
Response response = await NetUtil().dio.get(
static Future<ArticleQRModel> getQRcode(int? id) async {
Response response = await NetUtil().dio!.get(
API.manager.getQRcode,
queryParameters: {
'articleOutId': id,
@ -176,7 +172,7 @@ class ManagerFunc {
return ArticleQRModel.fromJson(response.data);
}
static Future<BaseModel> articleOutDelete(List<int> ids) async {
static Future<BaseModel> articleOutDelete(List<int?> ids) async {
BaseModel baseModel = await NetUtil().post(
API.manager.articleOutDelete,
params: {'ids': ids},
@ -185,7 +181,7 @@ class ManagerFunc {
return baseModel;
}
static Future<BaseModel> fromLoss(int id) async {
static Future<BaseModel> fromLoss(int? id) async {
BaseModel baseModel = await NetUtil().post(
API.manager.fromLoss,
params: {'articleBorrowId': id},
@ -202,7 +198,7 @@ class ManagerFunc {
return baseModel;
}
static Future<VotingDetailModel> voteDetail(int id) async {
static Future<VotingDetailModel> voteDetail(int? id) async {
BaseModel baseModel = await NetUtil().get(
API.manager.voteDetail,
params: {'voteId': id},
@ -211,7 +207,7 @@ class ManagerFunc {
return VotingDetailModel.fromJson(baseModel.data);
}
static Future<BaseModel> vote(int voteId, int candleId) async {
static Future<BaseModel> vote(int? voteId, int? candleId) async {
BaseModel baseModel = await NetUtil().post(API.manager.vote, params: {
'voteId': voteId,
'candidateId': candleId,
@ -219,7 +215,7 @@ class ManagerFunc {
return baseModel;
}
static Future<QuestionnaireDetialModel> questionnairefindById(int id) async {
static Future<QuestionnaireDetialModel> questionnairefindById(int? id) async {
BaseModel baseModel = await NetUtil().get(
API.manager.questionnairefindById,
params: {
@ -231,7 +227,7 @@ class ManagerFunc {
}
static Future<BaseModel> questionnaireSubmit(
int id, List<AppQuestionnaireAnswerSubmits> model) async {
int? id, List<AppQuestionnaireAnswerSubmits> model) async {
BaseModel baseModel = await NetUtil().post(
API.manager.questionnaireSubmit,
params: {

@ -17,14 +17,14 @@ import 'package:aku_community/widget/bee_divider.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
class CommentMessagePage extends StatefulWidget {
CommentMessagePage({Key key}) : super(key: key);
CommentMessagePage({Key? key}) : super(key: key);
@override
_CommentMessagePageState createState() => _CommentMessagePageState();
}
class _CommentMessagePageState extends State<CommentMessagePage> {
EasyRefreshController _easyRefreshController;
EasyRefreshController? _easyRefreshController;
@override
void initState() {
super.initState();
@ -51,7 +51,7 @@ class _CommentMessagePageState extends State<CommentMessagePage> {
} else {
return ((model.respondentName?.isEmptyOrNull ?? true)
? model.content
: '回复了${model.respondentName}:${model.content}')
: '回复了${model.respondentName}:${model.content}')!
.text
.black
.size(28.sp)
@ -84,11 +84,11 @@ class _CommentMessagePageState extends State<CommentMessagePage> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
model.createName.text.black.size(36.sp).make(),
model.createName!.text.black.size(36.sp).make(),
10.w.heightBox,
_messageContent(model),
16.w.heightBox,
getTime(model.createDate)
getTime(model.createDate!)
.text
.color(Color(0xFF999999))
.size(28.sp)
@ -114,11 +114,11 @@ class _CommentMessagePageState extends State<CommentMessagePage> {
Widget build(BuildContext context) {
return BeeScaffold(
title: '评论通知',
body: BeeListView(
body: BeeListView<CommentMessageModel>(
path: API.message.commentMessageList,
controller: _easyRefreshController,
convert: (models) {
return models.tableList
return models.tableList!
.map((e) => CommentMessageModel.fromJson(e))
.toList();
},

@ -14,14 +14,14 @@ import 'package:aku_community/utils/network/net_util.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
class MessageCenterPage extends StatefulWidget {
MessageCenterPage({Key key}) : super(key: key);
MessageCenterPage({Key? key}) : super(key: key);
@override
_MessageCenterPageState createState() => _MessageCenterPageState();
}
class _MessageCenterPageState extends State<MessageCenterPage> {
EasyRefreshController _refreshController;
EasyRefreshController? _refreshController;
@override
void initState() {
super.initState();
@ -35,11 +35,11 @@ class _MessageCenterPageState extends State<MessageCenterPage> {
}
Widget _buildCard({
String path,
String title,
String content,
int count,
VoidCallback onTap,
required String path,
required String title,
required String content,
int? count,
VoidCallback? onTap,
}) {
return InkWell(
onTap: onTap,
@ -79,8 +79,8 @@ class _MessageCenterPageState extends State<MessageCenterPage> {
actions: [
MaterialButton(
onPressed: () async {
await NetUtil().dio.get(API.message.allRead);
_refreshController.callRefresh();
await NetUtil().dio!.get(API.message.allRead);
_refreshController!.callRefresh();
setState(() {});
},
child: '全部已读'.text.size(28.sp).black.make(),
@ -109,7 +109,7 @@ class _MessageCenterPageState extends State<MessageCenterPage> {
appProvider.messageCenterModel.commentTitle ?? '无评论通知消息',
count: appProvider.messageCenterModel.commentCount ?? 0,
onTap: () async {
await NetUtil().dio.get(API.message.allReadComment);
await NetUtil().dio!.get(API.message.allReadComment);
Get.to(() => CommentMessagePage());
setState(() {});
},

@ -4,7 +4,7 @@ import 'package:aku_community/utils/network/base_model.dart';
import 'package:aku_community/utils/network/net_util.dart';
class MessageFunc {
static Future<SystemMessageDetailModel> getSystemMessageDetial(int id) async {
static Future<SystemMessageDetailModel> getSystemMessageDetial(int? id) async {
BaseModel baseModel =
await NetUtil().get(API.message.getSystemMessageDetial, params: {
'sysMessageId': id,

@ -5,8 +5,8 @@ import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/utils/headers.dart';
class RefundDetails extends StatelessWidget {
final double statusHeight;
const RefundDetails({Key key, this.statusHeight}) : super(key: key);
final double? statusHeight;
const RefundDetails({Key? key, this.statusHeight}) : super(key: key);
Container _containerHeader() {
return Container(
@ -193,7 +193,7 @@ class RefundDetails extends StatelessWidget {
return SingleChildScrollView(
child: Container(
height:
MediaQuery.of(context).size.height - kToolbarHeight - statusHeight,
MediaQuery.of(context).size.height - kToolbarHeight - statusHeight!,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [

@ -8,8 +8,8 @@ import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
class SystemMessageDetailPage extends StatefulWidget {
final int id;
SystemMessageDetailPage({Key key, this.id}) : super(key: key);
final int? id;
SystemMessageDetailPage({Key? key, this.id}) : super(key: key);
@override
_SystemMessageDetailPageState createState() =>
@ -17,7 +17,7 @@ class SystemMessageDetailPage extends StatefulWidget {
}
class _SystemMessageDetailPageState extends State<SystemMessageDetailPage> {
SystemMessageDetailModel _model;
late SystemMessageDetailModel _model;
bool _onload = true;
Widget _empty() {
@ -46,9 +46,9 @@ class _SystemMessageDetailPageState extends State<SystemMessageDetailPage> {
20.w.heightBox,
'系统通知'.text.black.bold.size(32.sp).make(),
5.w.heightBox,
_model.title.text.black.size(28.sp).isIntrinsic.make(),
_model.title!.text.black.size(28.sp).isIntrinsic.make(),
110.w.heightBox,
_model.content.text.black.size(28.sp).isIntrinsic.make(),
_model.content!.text.black.size(28.sp).isIntrinsic.make(),
],
),
),

@ -16,14 +16,14 @@ import 'package:aku_community/widget/bee_divider.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
class SystemMessagePage extends StatefulWidget {
SystemMessagePage({Key key}) : super(key: key);
SystemMessagePage({Key? key}) : super(key: key);
@override
_SystemMessagePageState createState() => _SystemMessagePageState();
}
class _SystemMessagePageState extends State<SystemMessagePage> {
EasyRefreshController _refreshController;
EasyRefreshController? _refreshController;
@override
void initState() {
super.initState();
@ -39,7 +39,7 @@ class _SystemMessagePageState extends State<SystemMessagePage> {
Widget _buildCard(SystemMessageModel model) {
return InkWell(
onTap: () async {
await NetUtil().dio.get(API.message.readMessage, queryParameters: {
await NetUtil().dio!.get(API.message.readMessage, queryParameters: {
'sysMessageId': model.id,
});
Get.to(() => SystemMessageDetailPage(id: model.id));
@ -58,8 +58,8 @@ class _SystemMessagePageState extends State<SystemMessagePage> {
children: [
'系统通知'.text.black.bold.size(32.sp).make(),
Spacer(),
BeeMap.messageRead[model.status].text
.color(BeeMap.messageIsRead[model.status]
BeeMap.messageRead[model.status!]!.text
.color(BeeMap.messageIsRead[model.status!]!
? Color(0xFF999999)
: Colors.red)
.size(32.sp)
@ -67,14 +67,14 @@ class _SystemMessagePageState extends State<SystemMessagePage> {
],
),
5.w.heightBox,
model.title.text.black
model.title!.text.black
.size(28.sp)
.maxLines(1)
.isIntrinsic
.ellipsis
.make(),
5.w.heightBox,
model.content.text.black
model.content!.text.black
.size(28.sp)
.maxLines(1)
.overflow(TextOverflow.ellipsis)
@ -103,11 +103,11 @@ class _SystemMessagePageState extends State<SystemMessagePage> {
Widget build(BuildContext context) {
return BeeScaffold(
title: '系统通知',
body: BeeListView(
body: BeeListView<SystemMessageModel>(
path: API.message.sysMessageList,
controller: _refreshController,
convert: (models) {
return models.tableList
return models.tableList!
.map((e) => SystemMessageModel.fromJson(e))
.toList();
},

@ -4,7 +4,7 @@ import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
class AlarmDetailPage extends StatelessWidget {
const AlarmDetailPage({Key key}) : super(key: key);
const AlarmDetailPage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {

@ -22,14 +22,14 @@ class PermissionUtil {
}
class AlarmPage extends StatefulWidget {
AlarmPage({Key key}) : super(key: key);
AlarmPage({Key? key}) : super(key: key);
@override
_AlarmPageState createState() => _AlarmPageState();
}
class _AlarmPageState extends State<AlarmPage> {
AMapController _mapController;
AMapController? _mapController;
Future<void> _makephonenum(String url) async {
(await canLaunch(url)) ? await launch(url) : throw 'Could not launch $url';
@ -66,11 +66,11 @@ class _AlarmPageState extends State<AlarmPage> {
final appProvider =
Provider.of<AppProvider>(context, listen: false);
LatLng _target = LatLng(
appProvider.location['latitude'],
appProvider.location['longitude'],
appProvider.location!['latitude'] as double,
appProvider.location!['longitude'] as double,
);
_mapController = controller;
_mapController.moveCamera(
_mapController!.moveCamera(
CameraUpdate.newCameraPosition(
CameraPosition(target: _target, zoom: 18),
),
@ -125,7 +125,7 @@ class _AlarmPageState extends State<AlarmPage> {
child: Text(
(appProvider.location == null)
? '加载中……'
: appProvider.location['address'],
: appProvider.location!['address'] as String,
style: TextStyle(
color: Color(0xff666666),
fontSize: 28.sp,

@ -8,7 +8,7 @@ import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
class OpeningCodePage extends StatefulWidget {
OpeningCodePage({Key key}) : super(key: key);
OpeningCodePage({Key? key}) : super(key: key);
@override
_OpeningCodePageState createState() => _OpeningCodePageState();

@ -9,20 +9,20 @@ import 'package:aku_community/provider/user_provider.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
class ChangeNickName extends StatefulWidget {
ChangeNickName({Key key}) : super(key: key);
ChangeNickName({Key? key}) : super(key: key);
@override
_ChangeNickNameState createState() => _ChangeNickNameState();
}
class _ChangeNickNameState extends State<ChangeNickName> {
TextEditingController _textEditingController;
TextEditingController? _textEditingController;
@override
void initState() {
final userProvider = Provider.of<UserProvider>(context, listen: false);
super.initState();
_textEditingController =
TextEditingController(text: userProvider.userInfoModel.nickName);
TextEditingController(text: userProvider.userInfoModel!.nickName);
}
@override
@ -49,7 +49,7 @@ class _ChangeNickNameState extends State<ChangeNickName> {
controller: _textEditingController,
decoration: InputDecoration(
contentPadding: EdgeInsets.zero,
hintText: '${userProvider.userInfoModel.nickName}',
hintText: '${userProvider.userInfoModel!.nickName}',
hintStyle:
TextStyle(color: Color(0xFF999999), fontSize: 34.sp),
border: UnderlineInputBorder(
@ -62,7 +62,7 @@ class _ChangeNickNameState extends State<ChangeNickName> {
150.w.heightBox,
MaterialButton(
onPressed: () {
userProvider.setName(_textEditingController.text);
userProvider.setName(_textEditingController!.text);
Get.back();
},
child: '保存'.text.black.size(32.sp).make(),

@ -18,8 +18,8 @@ import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/widget/views/application_view.dart';
class PersonalIndex extends StatefulWidget {
final bool isSign;
PersonalIndex({Key key, this.isSign}) : super(key: key);
final bool? isSign;
PersonalIndex({Key? key, this.isSign}) : super(key: key);
@override
_PersonalIndexState createState() => _PersonalIndexState();
@ -72,7 +72,7 @@ class _PersonalIndexState extends State<PersonalIndex>
child: FadeInImage.assetNetwork(
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
image: API.image(
userProvider?.userInfoModel?.imgUrl ??
userProvider.userInfoModel?.imgUrl ??
''),
height: 106.w,
width: 106.w,

@ -16,18 +16,18 @@ import 'package:aku_community/provider/user_provider.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
class UpdateTelPage extends StatefulWidget {
UpdateTelPage({Key key}) : super(key: key);
UpdateTelPage({Key? key}) : super(key: key);
@override
_UpdateTelPageState createState() => _UpdateTelPageState();
}
class _UpdateTelPageState extends State<UpdateTelPage> {
TextEditingController _oldTelController;
TextEditingController _newTelController;
TextEditingController _codeController;
Timer _timer;
bool get validPhone => RegexUtil.isMobileSimple(_newTelController.text);
TextEditingController? _oldTelController;
TextEditingController? _newTelController;
TextEditingController? _codeController;
Timer? _timer;
bool get validPhone => RegexUtil.isMobileSimple(_newTelController!.text);
bool get _canGetCode {
bool timeActive = _timer?.isActive ?? false;
return (!timeActive) && validPhone;
@ -51,9 +51,9 @@ class _UpdateTelPageState extends State<UpdateTelPage> {
}
startTick() {
_timer = Timer.periodic(Duration(seconds: 1), (_timer) {
if (_timer.tick >= 60) {
_timer.cancel();
_timer = Timer.periodic(Duration(seconds: 1), (timer) {
if (timer.tick >= 60) {
_timer!.cancel();
_timer = null;
}
setState(() {});
@ -107,12 +107,13 @@ class _UpdateTelPageState extends State<UpdateTelPage> {
suffixIcon: MaterialButton(
onPressed: _canGetCode
? () {
SignFunc.sendNewMessageCode(_newTelController.text);
SignFunc.sendNewMessageCode(
_newTelController!.text);
startTick();
}
: () {},
child: _timer?.isActive ?? false
? '${60 - _timer.tick}'
? '${60 - _timer!.tick}'
.text
.color(kPrimaryColor)
.size(28.sp)
@ -168,15 +169,15 @@ class _UpdateTelPageState extends State<UpdateTelPage> {
64.w.heightBox,
MaterialButton(
onPressed: () {
if (TextUtil.isEmpty(_oldTelController.text)) {
if (TextUtil.isEmpty(_oldTelController!.text)) {
BotToast.showText(text: '旧手机号不能为空');
} else if (TextUtil.isEmpty(_newTelController.text)) {
} else if (TextUtil.isEmpty(_newTelController!.text)) {
BotToast.showText(text: '新手机号不能为空');
} else if (TextUtil.isEmpty(_codeController.text)) {
} else if (TextUtil.isEmpty(_codeController!.text)) {
BotToast.showText(text: '验证码不能为空');
} else {
userProvider.updateTel(_oldTelController.text,
_newTelController.text, _codeController.text);
userProvider.updateTel(_oldTelController!.text,
_newTelController!.text, _codeController!.text);
Get.back();
}
},

@ -24,7 +24,7 @@ import 'package:aku_community/widget/picker/bee_date_picker.dart';
import 'package:aku_community/widget/picker/bee_image_picker.dart';
class UserProfilePage extends StatefulWidget {
UserProfilePage({Key key}) : super(key: key);
UserProfilePage({Key? key}) : super(key: key);
@override
_UserProfilePageState createState() => _UserProfilePageState();
@ -32,7 +32,7 @@ class UserProfilePage extends StatefulWidget {
class _UserProfilePageState extends State<UserProfilePage> {
int _sex = 1;
Widget _buildTile(String title, Widget suffix, {VoidCallback onPressed}) {
Widget _buildTile(String title, Widget suffix, {VoidCallback? onPressed}) {
return MaterialButton(
color: Colors.white,
elevation: 0,
@ -49,7 +49,7 @@ class _UserProfilePageState extends State<UserProfilePage> {
32.wb,
title.text.make(),
Spacer(),
suffix ?? SizedBox(),
suffix,
24.wb,
Icon(
CupertinoIcons.chevron_forward,
@ -65,7 +65,7 @@ class _UserProfilePageState extends State<UserProfilePage> {
_pickAvatar() async {
final userProvider = Provider.of<UserProvider>(context, listen: false);
File file = await BeeImagePicker.pick(title: '选择头像');
File? file = await BeeImagePicker.pick(title: '选择头像');
if (file == null)
return;
else {
@ -73,10 +73,10 @@ class _UserProfilePageState extends State<UserProfilePage> {
Function cancel = BotToast.showLoading();
BaseFileModel model =
await NetUtil().upload(API.upload.uploadAvatar, file);
if (model.status)
if (model.status!)
userProvider.updateAvatar(model.url);
else
BotToast.showText(text: model.message);
BotToast.showText(text: model.message!);
cancel();
}
}
@ -127,9 +127,9 @@ class _UserProfilePageState extends State<UserProfilePage> {
),
_buildTile(
'性别',
userProvider.userInfoModel.sexValue.text.make(),
userProvider.userInfoModel!.sexValue.text.make(),
onPressed: () async {
int result = await Get.bottomSheet(BeeCustomPicker(
int? result = await Get.bottomSheet(BeeCustomPicker(
onPressed: () => Get.back(result: _sex),
body: CupertinoPicker(
itemExtent: 50,
@ -150,9 +150,9 @@ class _UserProfilePageState extends State<UserProfilePage> {
),
_buildTile(
'出生日期',
userProvider.userInfoModel.birthdayValue.text.make(),
userProvider.userInfoModel!.birthdayValue.text.make(),
onPressed: () async {
DateTime date = await BeeDatePicker.pick(DateTime.now());
DateTime? date = await BeeDatePicker.pick(DateTime.now());
if (date != null) userProvider.setBirthday(date);
},
),

@ -5,8 +5,8 @@ import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/utils/headers.dart';
class RefundShopCard extends StatelessWidget {
final String imagePath, content, specs;
RefundShopCard({Key key, this.imagePath, this.content, this.specs})
final String? imagePath, content, specs;
RefundShopCard({Key? key, this.imagePath, this.content, this.specs})
: super(key: key);
@override
@ -23,7 +23,7 @@ class RefundShopCard extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.start,
children: [
Image.asset(
imagePath,
imagePath!,
height: 179.w,
width: 173.w,
fit: BoxFit.fill,
@ -35,7 +35,7 @@ class RefundShopCard extends StatelessWidget {
Container(
width: 458.w,
child: Text(
content,
content!,
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
@ -48,7 +48,7 @@ class RefundShopCard extends StatelessWidget {
Container(
width: 456.w,
child: Text(
specs,
specs!,
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(

@ -7,8 +7,8 @@ import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/utils/headers.dart';
class RefundTileCard extends StatefulWidget {
final List<Map<String, dynamic>> listTile;
RefundTileCard({Key key, this.listTile}) : super(key: key);
final List<Map<String, dynamic>>? listTile;
RefundTileCard({Key? key, this.listTile}) : super(key: key);
@override
_RefundTileCardState createState() => _RefundTileCardState();
@ -51,7 +51,7 @@ class _RefundTileCardState extends State<RefundTileCard> {
return Container(
width: double.infinity,
child: Column(
children: widget.listTile
children: widget.listTile!
.map(
(item) => InkWell(
onTap: item['fun'],

@ -18,7 +18,7 @@ import 'widget/property_card.dart';
//TODO CLEAN BOTTOM CODES.
@Deprecated("sh*t property_index need to be cleaned.")
class PropertyIndex extends StatefulWidget {
PropertyIndex({Key key}) : super(key: key);
PropertyIndex({Key? key}) : super(key: key);
@override
_PropertyIndexState createState() => _PropertyIndexState();
@ -33,7 +33,7 @@ class _PropertyIndexState extends State<PropertyIndex>
EasyRefreshController _refreshController = EasyRefreshController();
int _page = 1;
int _pageCount = 0;
int? _pageCount = 0;
List<BoardItemModel> _models = [];
Future<List<BoardItemModel>> _getItems() async {
BaseListModel model = await NetUtil().getList(
@ -44,7 +44,7 @@ class _PropertyIndexState extends State<PropertyIndex>
},
);
_pageCount = model.pageCount;
return model.tableList.map((e) => BoardItemModel.fromJson(e)).toList();
return model.tableList!.map((e) => BoardItemModel.fromJson(e)).toList();
}
@override
@ -71,7 +71,7 @@ class _PropertyIndexState extends State<PropertyIndex>
onLoad: () async {
_page++;
_models.addAll(await _getItems());
if (_page >= _pageCount) _refreshController.finishLoad(noMore: true);
if (_page >= _pageCount!) _refreshController.finishLoad(noMore: true);
setState(() {});
},
child: CustomScrollView(
@ -109,7 +109,7 @@ class _PropertyIndexState extends State<PropertyIndex>
delegate: SliverChildBuilderDelegate(
(context, index) {
final BoardItemModel model = _models[index];
BoardItemModel preModel;
BoardItemModel? preModel;
if (index >= 1) preModel = _models[index - 1];
return Padding(
padding: EdgeInsets.only(bottom: 8.w),

@ -7,7 +7,7 @@ import 'package:url_launcher/url_launcher.dart';
import 'package:aku_community/utils/headers.dart';
class PropertyCard extends StatelessWidget {
PropertyCard({Key key}) : super(key: key);
PropertyCard({Key? key}) : super(key: key);
final List<Map<String, dynamic>> _listCard = [
{

@ -5,7 +5,7 @@ import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/widget/bee_scaffold.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:aku_community/pages/sign/sign_in_page.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
class AccountManagerPage extends StatefulWidget {
AccountManagerPage({Key key}) : super(key: key);
AccountManagerPage({Key? key}) : super(key: key);
@override
_AccountManagerPageState createState() => _AccountManagerPageState();

@ -4,7 +4,7 @@ import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
class PrivacyPage extends StatefulWidget {
PrivacyPage({Key key}) : super(key: key);
PrivacyPage({Key? key}) : super(key: key);
@override
_PrivacyPageState createState() => _PrivacyPageState();
}

@ -13,7 +13,7 @@ import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/picker/grid_image_picker.dart';
class FeedBackPage extends StatefulWidget {
FeedBackPage({Key key}) : super(key: key);
FeedBackPage({Key? key}) : super(key: key);
@override
_FeedBackPageState createState() => _FeedBackPageState();
@ -67,8 +67,8 @@ class _FeedBackPageState extends State<FeedBackPage> {
Widget _inkWellSubmit() {
return InkWell(
onTap: () async {
if (_formKey.currentState.validate()) {
if (_files?.isNotEmpty ?? false) {
if (_formKey.currentState!.validate()) {
if (_files.isNotEmpty) {
//TODO upload file
}
var cancelAction = BotToast.showLoading();

@ -7,7 +7,7 @@ import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
class InvitePage extends StatelessWidget {
const InvitePage({Key key}) : super(key: key);
const InvitePage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {

@ -19,7 +19,7 @@ import 'package:aku_community/provider/user_provider.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
class SettingsPage extends StatefulWidget {
SettingsPage({Key key}) : super(key: key);
SettingsPage({Key? key}) : super(key: key);
@override
_SettingsPageState createState() => _SettingsPageState();
@ -27,9 +27,9 @@ class SettingsPage extends StatefulWidget {
class _SettingsPageState extends State<SettingsPage> {
Widget _buildTile({
String title,
VoidCallback onTap,
Widget suffix,
required String title,
VoidCallback? onTap,
Widget? suffix,
}) {
return MaterialButton(
color: Colors.white,

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

Loading…
Cancel
Save