小赖 4 years ago
parent b9a0443201
commit 6f27a6c626

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

@ -62,7 +62,7 @@ class AppTheme {
unselectedLabelStyle: TextStyle(), unselectedLabelStyle: TextStyle(),
), ),
radioTheme: RadioThemeData( radioTheme: RadioThemeData(
fillColor: MaterialStateProperty.resolveWith<Color>((states) { fillColor: MaterialStateProperty.resolveWith<Color?>((states) {
if (states.contains(MaterialState.selected)) return Color(0xFFFFD000); if (states.contains(MaterialState.selected)) return Color(0xFFFFD000);
return null; return null;
}), }),
@ -121,7 +121,7 @@ class SystemStyle {
systemNavigationBarColor: Color(0xFFFFD000), systemNavigationBarColor: Color(0xFFFFD000),
); );
static genStyle({@required Color bottom}) { static genStyle({required Color bottom}) {
return SystemUiOverlayStyle( return SystemUiOverlayStyle(
statusBarIconBrightness: Brightness.light, statusBarIconBrightness: Brightness.light,
systemNavigationBarColor: bottom, systemNavigationBarColor: bottom,

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -3,13 +3,13 @@ import 'package:flustars/flustars.dart';
import 'package:aku_community/model/common/img_model.dart'; import 'package:aku_community/model/common/img_model.dart';
class SuggestionOrComplainModel { class SuggestionOrComplainModel {
int id; int? id;
int type; int? type;
int status; int? status;
String content; String? content;
int score; int? score;
DateTime createDate; DateTime? createDate;
List<ImgModel> imgUrls; List<ImgModel>? imgUrls;
SuggestionOrComplainModel( SuggestionOrComplainModel(
{this.id, {this.id,
@ -30,18 +30,18 @@ class SuggestionOrComplainModel {
if (json['imgUrls'] != null) { if (json['imgUrls'] != null) {
imgUrls = []; imgUrls = [];
json['imgUrls'].forEach((v) { json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v)); imgUrls!.add(new ImgModel.fromJson(v));
}); });
} }
} }
} }
class ImgUrls { class ImgUrls {
String url; String? url;
String size; String? size;
int longs; int? longs;
int paragraph; int? paragraph;
int sort; int? sort;
ImgUrls({this.url, this.size, this.longs, this.paragraph, this.sort}); ImgUrls({this.url, this.size, this.longs, this.paragraph, this.sort});

@ -1,15 +1,15 @@
import 'package:flustars/flustars.dart'; import 'package:flustars/flustars.dart';
class VisitorListItemModel { class VisitorListItemModel {
int id; int? id;
int accessCode; int? accessCode;
int visitorStatus; int? visitorStatus;
String name; String? name;
int isDrive; int? isDrive;
String carNum; String? carNum;
String effectiveTime; String? effectiveTime;
DateTime get date => DateUtil.getDateTime(effectiveTime); DateTime? get date => DateUtil.getDateTime(effectiveTime!);
bool get drive => isDrive == 1; bool get drive => isDrive == 1;
VisitorListItemModel( VisitorListItemModel(

@ -1,13 +1,13 @@
import 'package:aku_community/model/common/img_model.dart'; import 'package:aku_community/model/common/img_model.dart';
class VotingDetailModel { class VotingDetailModel {
int id; int? id;
String title; String? title;
String content; String? content;
int status; int? status;
int totals; int? totals;
List<ImgModel> imgUrls; List<ImgModel>? imgUrls;
List<AppVoteCandidateVos> appVoteCandidateVos; List<AppVoteCandidateVos>? appVoteCandidateVos;
VotingDetailModel( VotingDetailModel(
{this.id, {this.id,
@ -27,14 +27,14 @@ class VotingDetailModel {
if (json['imgUrls'] != null) { if (json['imgUrls'] != null) {
imgUrls = []; imgUrls = [];
json['imgUrls'].forEach((v) { json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v)); imgUrls!.add(new ImgModel.fromJson(v));
}); });
} else } else
imgUrls = []; imgUrls = [];
if (json['appVoteCandidateVos'] != null) { if (json['appVoteCandidateVos'] != null) {
appVoteCandidateVos = []; appVoteCandidateVos = [];
json['appVoteCandidateVos'].forEach((v) { 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['status'] = this.status;
data['totals'] = this.totals; data['totals'] = this.totals;
if (this.imgUrls != null) { if (this.imgUrls != null) {
data['imgUrls'] = this.imgUrls.map((v) => v.toJson()).toList(); data['imgUrls'] = this.imgUrls!.map((v) => v.toJson()).toList();
} }
if (this.appVoteCandidateVos != null) { if (this.appVoteCandidateVos != null) {
data['appVoteCandidateVos'] = data['appVoteCandidateVos'] =
this.appVoteCandidateVos.map((v) => v.toJson()).toList(); this.appVoteCandidateVos!.map((v) => v.toJson()).toList();
} }
return data; return data;
} }
} }
class ImgUrls { class ImgUrls {
String url; String? url;
String size; String? size;
int longs; int? longs;
int paragraph; int? paragraph;
int sort; int? sort;
ImgUrls({this.url, this.size, this.longs, this.paragraph, this.sort}); ImgUrls({this.url, this.size, this.longs, this.paragraph, this.sort});
@ -86,10 +86,10 @@ class ImgUrls {
} }
class AppVoteCandidateVos { class AppVoteCandidateVos {
int id; int? id;
String name; String? name;
int total; int? total;
List<ImgModel> imgUrls; List<ImgModel>? imgUrls;
AppVoteCandidateVos({this.id, this.name, this.total, this.imgUrls}); AppVoteCandidateVos({this.id, this.name, this.total, this.imgUrls});
@ -100,7 +100,7 @@ class AppVoteCandidateVos {
if (json['imgUrls'] != null) { if (json['imgUrls'] != null) {
imgUrls = []; imgUrls = [];
json['imgUrls'].forEach((v) { json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v)); imgUrls!.add(new ImgModel.fromJson(v));
}); });
} else } else
imgUrls = []; imgUrls = [];
@ -112,7 +112,7 @@ class AppVoteCandidateVos {
data['name'] = this.name; data['name'] = this.name;
data['total'] = this.total; data['total'] = this.total;
if (this.imgUrls != null) { if (this.imgUrls != null) {
data['imgUrls'] = this.imgUrls.map((v) => v.toJson()).toList(); data['imgUrls'] = this.imgUrls!.map((v) => v.toJson()).toList();
} }
return data; return data;
} }

@ -1,17 +1,17 @@
import 'package:aku_community/model/common/img_model.dart'; import 'package:aku_community/model/common/img_model.dart';
class CommentMessageModel { class CommentMessageModel {
int id; int? id;
int gambitThemeId; int? gambitThemeId;
String respondentName; String? respondentName;
int type; int? type;
String content; String? content;
int receiverAccount; int? receiverAccount;
int sendStatus; int? sendStatus;
String createName; String? createName;
String createDate; String? createDate;
List<ImgModel> imgUrls; List<ImgModel>? imgUrls;
List<ImgModel> headSculpture; List<ImgModel>? headSculpture;
CommentMessageModel( CommentMessageModel(
{this.id, {this.id,
@ -39,13 +39,13 @@ class CommentMessageModel {
if (json['imgUrls'] != null) { if (json['imgUrls'] != null) {
imgUrls = []; imgUrls = [];
json['imgUrls'].forEach((v) { json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v)); imgUrls!.add(new ImgModel.fromJson(v));
}); });
} }
if (json['headSculpture'] != null) { if (json['headSculpture'] != null) {
headSculpture = []; headSculpture = [];
json['headSculpture'].forEach((v) { 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['createName'] = this.createName;
data['createDate'] = this.createDate; data['createDate'] = this.createDate;
if (this.imgUrls != null) { if (this.imgUrls != null) {
data['imgUrls'] = this.imgUrls.map((v) => v.toJson()).toList(); data['imgUrls'] = this.imgUrls!.map((v) => v.toJson()).toList();
} }
return data; return data;
} }

@ -1,8 +1,8 @@
class MessageCenterModel { class MessageCenterModel {
String commentTitle; String? commentTitle;
int sysCount; int? sysCount;
String sysTitle; String? sysTitle;
int commentCount; int? commentCount;
MessageCenterModel.zero() { MessageCenterModel.zero() {
commentTitle = ''; commentTitle = '';

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

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

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

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

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

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

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

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

@ -1,15 +1,15 @@
import 'package:flustars/flustars.dart'; import 'package:flustars/flustars.dart';
class UserInfoModel { class UserInfoModel {
int id; int? id;
String imgUrl; String? imgUrl;
String name; String? name;
String nickName; String? nickName;
String tel; String? tel;
/// 1. 2. /// 1. 2.
int sex; int? sex;
String birthday; String? birthday;
String get sexValue { String get sexValue {
if (sex == null) return '未设置'; if (sex == null) return '未设置';
@ -18,7 +18,7 @@ class UserInfoModel {
return '未设置'; return '未设置';
} }
DateTime get birthdayDate => DateUtil.getDateTime(birthday); DateTime? get birthdayDate => DateUtil.getDateTime(birthday!);
String get birthdayValue { String get birthdayValue {
if (TextUtil.isEmpty(birthday)) if (TextUtil.isEmpty(birthday))
return '未设置'; 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'; import 'package:aku_community/widget/bee_scaffold.dart';
class ConvenientPhonePage extends StatefulWidget { class ConvenientPhonePage extends StatefulWidget {
ConvenientPhonePage({Key key}) : super(key: key); ConvenientPhonePage({Key? key}) : super(key: key);
@override @override
_ConvenientPhonePageState createState() => _ConvenientPhonePageState(); _ConvenientPhonePageState createState() => _ConvenientPhonePageState();
} }
class _ConvenientPhonePageState extends State<ConvenientPhonePage> { class _ConvenientPhonePageState extends State<ConvenientPhonePage> {
EasyRefreshController _easyRefreshController; EasyRefreshController? _easyRefreshController;
TextEditingController _textEditingController; TextEditingController? _textEditingController;
@override @override
void initState() { void initState() {
@ -47,9 +47,9 @@ class _ConvenientPhonePageState extends State<ConvenientPhonePage> {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
model.name.text.black.size(32.sp).make(), model.name!.text.black.size(32.sp).make(),
12.w.heightBox, 12.w.heightBox,
model.tel.text.color(Color(0xFF999999)).size(28.sp).make(), model.tel!.text.color(Color(0xFF999999)).size(28.sp).make(),
], ],
).expand(), ).expand(),
IconButton( IconButton(
@ -59,8 +59,8 @@ class _ConvenientPhonePageState extends State<ConvenientPhonePage> {
height: 40.w, height: 40.w,
), ),
onPressed: () async { onPressed: () async {
bool result = await Get.dialog(CupertinoAlertDialog( bool? result = await Get.dialog(CupertinoAlertDialog(
title: model.tel.text.isIntrinsic.make(), title: model.tel!.text.isIntrinsic.make(),
actions: [ actions: [
CupertinoDialogAction( CupertinoDialogAction(
child: '取消'.text.isIntrinsic.make(), child: '取消'.text.isIntrinsic.make(),
@ -102,7 +102,7 @@ class _ConvenientPhonePageState extends State<ConvenientPhonePage> {
child: TextField( child: TextField(
controller: _textEditingController, controller: _textEditingController,
onSubmitted: (value) { onSubmitted: (value) {
_easyRefreshController.callRefresh(); _easyRefreshController!.callRefresh();
setState(() {}); setState(() {});
}, },
decoration: InputDecoration( decoration: InputDecoration(
@ -121,12 +121,12 @@ class _ConvenientPhonePageState extends State<ConvenientPhonePage> {
), ),
), ),
Expanded( Expanded(
child: BeeListView( child: BeeListView<ConvenientPhoneModel>(
extraParams: {'name': _textEditingController.text}, extraParams: {'name': _textEditingController!.text},
controller: _easyRefreshController, controller: _easyRefreshController,
path: API.manager.convenientPhone, path: API.manager.convenientPhone,
convert: (model) { convert: (model) {
return model.tableList return model.tableList!
.map((e) => ConvenientPhoneModel.fromJson(e)) .map((e) => ConvenientPhoneModel.fromJson(e))
.toList(); .toList();
}, },

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

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

@ -13,9 +13,9 @@ import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/dotted_line.dart'; import 'package:aku_community/widget/dotted_line.dart';
class DetoCodePage extends StatelessWidget { class DetoCodePage extends StatelessWidget {
final int id; final int? id;
final ArticleQRModel model; final ArticleQRModel? model;
const DetoCodePage({Key key, this.id, this.model}) : super(key: key); const DetoCodePage({Key? key, this.id, this.model}) : super(key: key);
Widget _header(String estateName) { Widget _header(String estateName) {
return Container( return Container(
@ -24,7 +24,7 @@ class DetoCodePage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Text( Text(
S.of(Get.context).tempPlotName, S.of(Get.context!)!.tempPlotName,
style: TextStyle(fontSize: 40.sp, color: Color(0xffffffff)), style: TextStyle(fontSize: 40.sp, color: Color(0xffffffff)),
), ),
SizedBox(height: 10.w), 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( return Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xffffffff), color: Color(0xffffffff),
@ -117,7 +117,7 @@ class DetoCodePage extends StatelessWidget {
// SizedBox(height: 11.w), // SizedBox(height: 11.w),
QrImage( QrImage(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
data: model.appArticleOutQRCodeVo.id.toString(), data: model!.appArticleOutQRCodeVo!.id.toString(),
size: 260.w, size: 260.w,
), ),
], ],
@ -152,10 +152,10 @@ class DetoCodePage extends StatelessWidget {
Column( Column(
children: [ children: [
SizedBox(height: 192.w - kToolbarHeight), SizedBox(height: 192.w - kToolbarHeight),
_header(appProvider.selectedHouse.roomName), _header(appProvider.selectedHouse!.roomName!),
SizedBox(height: 32.w), SizedBox(height: 32.w),
_card(model.appArticleOutQRCodeVo.applicantName, _card(model!.appArticleOutQRCodeVo!.applicantName,
model.appArticleOutQRCodeVo.effectiveTime), 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'; import 'package:aku_community/widget/picker/grid_image_picker.dart';
class DetoCreatePage extends StatefulWidget { class DetoCreatePage extends StatefulWidget {
DetoCreatePage({Key key}) : super(key: key); DetoCreatePage({Key? key}) : super(key: key);
@override @override
_DetoCreatePageState createState() => _DetoCreatePageState(); _DetoCreatePageState createState() => _DetoCreatePageState();
@ -41,12 +41,12 @@ class _DetoCreatePageState extends State<DetoCreatePage> {
List<File> _files = []; List<File> _files = [];
UserProvider get userProvider => Provider.of<UserProvider>(context); UserProvider get userProvider => Provider.of<UserProvider>(context);
String _itemName; String? _itemName;
DateTime _date; DateTime? _date;
String get datetime => String get datetime =>
DateUtil.formatDate(_date, format: "yyyy-MM-dd HH:mm:ss"); DateUtil.formatDate(_date, format: "yyyy-MM-dd HH:mm:ss");
int _selectWeight; int? _selectWeight;
String _selectTel; String? _selectTel;
List<String> _listWeight = [ List<String> _listWeight = [
'< 50kg', '< 50kg',
'50kg-100kg', '50kg-100kg',
@ -108,7 +108,7 @@ class _DetoCreatePageState extends State<DetoCreatePage> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
S.of(context).tempPlotName, S.of(context)!.tempPlotName,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 32.sp, fontSize: 32.sp,
@ -214,7 +214,7 @@ class _DetoCreatePageState extends State<DetoCreatePage> {
title: e, title: e,
value: _listWeight.indexOf(e), value: _listWeight.indexOf(e),
groupValue: _selectWeight, groupValue: _selectWeight,
onChange: (value) { onChange: (dynamic value) {
_selectWeight = value; _selectWeight = value;
setState(() {}); setState(() {});
}, },
@ -242,7 +242,7 @@ class _DetoCreatePageState extends State<DetoCreatePage> {
title: e, title: e,
value: _listMode.indexOf(e), value: _listMode.indexOf(e),
groupValue: _selectApproach, groupValue: _selectApproach,
onChange: (value) { onChange: (dynamic value) {
_selectApproach = value; _selectApproach = value;
setState(() {}); 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( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
@ -270,7 +270,7 @@ class _DetoCreatePageState extends State<DetoCreatePage> {
onTap: onTap, onTap: onTap,
child: Row( child: Row(
children: [ children: [
((select?.isEmptyOrNull ?? true) ? '请选择' : select) ((select?.isEmptyOrNull ?? true) ? '请选择' : select)!
.text .text
.color((select?.isEmptyOrNull ?? true) .color((select?.isEmptyOrNull ?? true)
? ktextSubColor ? ktextSubColor
@ -368,7 +368,7 @@ class _DetoCreatePageState extends State<DetoCreatePage> {
padding: EdgeInsets.symmetric(vertical: 30.w), padding: EdgeInsets.symmetric(vertical: 30.w),
child: Row( child: Row(
children: [ children: [
(_selectTel.isEmptyOrNull ? '请选择搬家公司' : _selectTel) (_selectTel.isEmptyOrNull ? '请选择搬家公司' : _selectTel)!
.text .text
.color(ktextSubColor) .color(ktextSubColor)
.size(36.sp) .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) { if (weight == null) {
return false; return false;
} else if (approach == null) { } else if (approach == null) {
@ -410,7 +410,7 @@ class _DetoCreatePageState extends State<DetoCreatePage> {
body: ListView( body: ListView(
padding: EdgeInsets.all(32.w), padding: EdgeInsets.all(32.w),
children: [ children: [
_houseAddress(appProvider.selectedHouse.roomName), _houseAddress(appProvider.selectedHouse!.roomName!),
_getWeight(), _getWeight(),
_itemPicker('出户时间', datetime, () async { _itemPicker('出户时间', datetime, () async {
_date = await BeeDatePicker.timePicker(DateTime.now()); _date = await BeeDatePicker.timePicker(DateTime.now());
@ -442,22 +442,22 @@ class _DetoCreatePageState extends State<DetoCreatePage> {
onPressed: _canSubmit(_selectWeight, _selectApproach, _date, _itemName) onPressed: _canSubmit(_selectWeight, _selectApproach, _date, _itemName)
? () async { ? () async {
VoidCallback cancel = BotToast.showLoading(); VoidCallback cancel = BotToast.showLoading();
List<String> urls = await NetUtil() List<String?> urls = await NetUtil()
.uploadFiles(_files, API.upload.uploadRepair); .uploadFiles(_files, API.upload.uploadRepair);
BaseModel baseModel = await ManagerFunc.articleOutSubmit( BaseModel baseModel = await ManagerFunc.articleOutSubmit(
id: BeeParse.getEstateNameId( id: BeeParse.getEstateNameId(
userProvider.userDetailModel.estateNames[0]), userProvider.userDetailModel!.estateNames![0]),
name: _itemName, name: _itemName,
weight: _selectWeight + 1, weight: _selectWeight! + 1,
approach: _selectApproach + 1, approach: _selectApproach + 1,
tel: _selectTel, tel: _selectTel,
time: datetime, time: datetime,
urls: urls, urls: urls,
); );
if (baseModel.status) { if (baseModel.status!) {
Get.back(); Get.back();
} else } else
BotToast.showText(text: baseModel.message); BotToast.showText(text: baseModel.message!);
cancel(); cancel();
} }
: () { : () {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -13,14 +13,14 @@ import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/widget/bee_scaffold.dart'; import 'package:aku_community/widget/bee_scaffold.dart';
class LifePayRecordPage extends StatefulWidget { class LifePayRecordPage extends StatefulWidget {
LifePayRecordPage({Key key}) : super(key: key); LifePayRecordPage({Key? key}) : super(key: key);
@override @override
_LifePayRecordPageState createState() => _LifePayRecordPageState(); _LifePayRecordPageState createState() => _LifePayRecordPageState();
} }
class _LifePayRecordPageState extends State<LifePayRecordPage> { class _LifePayRecordPageState extends State<LifePayRecordPage> {
EasyRefreshController _refreshController; EasyRefreshController? _refreshController;
Map<int, String> getPayType = {1: '支付宝', 2: '微信', 3: '现金', 4: 'pos'}; Map<int, String> getPayType = {1: '支付宝', 2: '微信', 3: '现金', 4: 'pos'};
@override @override
void initState() { void initState() {
@ -42,7 +42,7 @@ class _LifePayRecordPageState extends State<LifePayRecordPage> {
path: API.manager.paymentRecord, path: API.manager.paymentRecord,
controller: _refreshController, controller: _refreshController,
convert: (models) { convert: (models) {
return models.tableList return models.tableList!
.map((e) => LifePayRecordModel.fromJson(e)) .map((e) => LifePayRecordModel.fromJson(e))
.toList(); .toList();
}, },
@ -64,7 +64,9 @@ class _LifePayRecordPageState extends State<LifePayRecordPage> {
.color(ktextSubColor) .color(ktextSubColor)
.make(), .make(),
32.w.heightBox, 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: [ children: [
Row( Row(
children: [ children: [
model.chargesTemplateDetailName.text model.chargesTemplateDetailName!.text
.size(30.sp) .size(30.sp)
.color(ktextPrimary) .color(ktextPrimary)
.bold .bold
.make(), .make(),
Spacer(), Spacer(),
'${S.of(context).tempPlotName} ${model.roomName}' '${S.of(context)!.tempPlotName} ${model.roomName}'
.text .text
.size(24.sp) .size(24.sp)
.color(Color(0xFF999999)) .color(Color(0xFF999999))
@ -107,7 +109,7 @@ class _LifePayRecordPageState extends State<LifePayRecordPage> {
children: [ children: [
'创建时间'.text.color(ktextSubColor).size(28.sp).make(), '创建时间'.text.color(ktextSubColor).size(28.sp).make(),
Spacer(), Spacer(),
'${DateUtil.formatDateStr(model.createDate, format: "yyyy/MM/dd HH:mm")}' '${DateUtil.formatDateStr(model.createDate!, format: "yyyy/MM/dd HH:mm")}'
.text .text
.color(ktextPrimary) .color(ktextPrimary)
.size(28.sp) .size(28.sp)
@ -118,7 +120,7 @@ class _LifePayRecordPageState extends State<LifePayRecordPage> {
children: [ children: [
'付款方式'.text.color(ktextSubColor).size(28.sp).make(), '付款方式'.text.color(ktextSubColor).size(28.sp).make(),
Spacer(), Spacer(),
'${getPayType[model.payType]}' '${getPayType[model.payType!]}'
.text .text
.color(ktextPrimary) .color(ktextPrimary)
.size(28.sp) .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'; import 'package:aku_community/widget/buttons/bee_check_radio.dart';
class LifePayDetailPage extends StatefulWidget { class LifePayDetailPage extends StatefulWidget {
final LifePayModel model; final LifePayModel? model;
LifePayDetailPage({ LifePayDetailPage({
Key key, Key? key,
this.model, this.model,
}) : super(key: key); }) : super(key: key);
@ -29,8 +29,8 @@ class _LifePayDetailPageState extends State<LifePayDetailPage> {
int _payNum = 0; int _payNum = 0;
int get listLength { int get listLength {
int count = 0; int count = 0;
widget.model.dailyPaymentTypeVos.forEach((element) { widget.model!.dailyPaymentTypeVos!.forEach((element) {
element.detailedVoList.forEach((element) { element.detailedVoList!.forEach((element) {
count++; count++;
}); });
}); });
@ -44,36 +44,36 @@ class _LifePayDetailPageState extends State<LifePayDetailPage> {
@override @override
void initState() { void initState() {
super.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; for (var j = 0;
j < widget.model.dailyPaymentTypeVos[i].detailedVoList.length; j < widget.model!.dailyPaymentTypeVos![i].detailedVoList!.length;
j++) { j++) {
String id = widget.model.dailyPaymentTypeVos[i].id.toString() + String id = widget.model!.dailyPaymentTypeVos![i].id.toString() +
widget.model.dailyPaymentTypeVos[i].detailedVoList[j].groupId widget.model!.dailyPaymentTypeVos![i].detailedVoList![j].groupId
.toString(); .toString();
if (!_selectItems.contains(id)) { if (!_selectItems.contains(id)) {
_selectItems.add(id); _selectItems.add(id);
_payNum += 1; _payNum += 1;
_payTotal += widget _payTotal += widget
.model.dailyPaymentTypeVos[i].detailedVoList[j].paymentPrice .model!.dailyPaymentTypeVos![i].detailedVoList![j].paymentPrice!
.toDouble(); .toDouble();
} }
} }
} }
} }
Widget _buildTile(int groupId, int id, int years, double price) { Widget _buildTile(int? groupId, int? id, int? years, double? price) {
return GestureDetector( return GestureDetector(
onTap: () { onTap: () {
String item = id.toString() + groupId.toString(); String item = id.toString() + groupId.toString();
if (_selectItems.contains(item)) { if (_selectItems.contains(item)) {
_selectItems.remove(item); _selectItems.remove(item);
_payNum -= 1; _payNum -= 1;
_payTotal -= price.toDouble(); _payTotal -= price!.toDouble();
} else { } else {
_selectItems.add(item); _selectItems.add(item);
_payNum += 1; _payNum += 1;
_payTotal += price.toDouble(); _payTotal += price!.toDouble();
} }
setState(() {}); setState(() {});
@ -108,9 +108,9 @@ class _LifePayDetailPageState extends State<LifePayDetailPage> {
children: [ children: [
Row( Row(
children: [ children: [
model.name.text.black.size(30.sp).bold.make(), model.name!.text.black.size(30.sp).bold.make(),
Spacer(), Spacer(),
'${S.of(context).tempPlotName} ${appProvider.selectedHouse.estateId}' '${S.of(context)!.tempPlotName} ${appProvider.selectedHouse!.estateId}'
.text .text
.color(ktextSubColor) .color(ktextSubColor)
.size(24.sp) .size(24.sp)
@ -118,9 +118,9 @@ class _LifePayDetailPageState extends State<LifePayDetailPage> {
], ],
), ),
50.w.heightBox, 50.w.heightBox,
...model.detailedVoList ...model.detailedVoList!
.map((e) => _buildTile( .map((e) => _buildTile(
e.groupId, model.id, widget.model.years, e.paymentPrice)) e.groupId, model.id, widget.model!.years, e.paymentPrice))
.toList(), .toList(),
], ],
), ),
@ -131,11 +131,11 @@ class _LifePayDetailPageState extends State<LifePayDetailPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BeeScaffold( return BeeScaffold(
title: title:
'${BeeParse.getCustomYears(widget.model.years)}-${widget.model.years}年明细', '${BeeParse.getCustomYears(widget.model!.years!)}-${widget.model!.years}年明细',
body: ListView( body: ListView(
padding: EdgeInsets.only(top: 16.w), padding: EdgeInsets.only(top: 16.w),
children: [ children: [
...widget.model.dailyPaymentTypeVos ...widget.model!.dailyPaymentTypeVos!
.map((e) => _buildCard(e)) .map((e) => _buildCard(e))
.toList(), .toList(),
], ],
@ -153,23 +153,23 @@ class _LifePayDetailPageState extends State<LifePayDetailPage> {
_payTotal = 0; _payTotal = 0;
} else { } else {
for (var i = 0; for (var i = 0;
i < widget.model.dailyPaymentTypeVos.length; i < widget.model!.dailyPaymentTypeVos!.length;
i++) { i++) {
for (var j = 0; for (var j = 0;
j < j <
widget.model.dailyPaymentTypeVos[i].detailedVoList widget.model!.dailyPaymentTypeVos![i].detailedVoList!
.length; .length;
j++) { j++) {
String id = String id =
widget.model.dailyPaymentTypeVos[i].id.toString() + widget.model!.dailyPaymentTypeVos![i].id.toString() +
widget.model.dailyPaymentTypeVos[i] widget.model!.dailyPaymentTypeVos![i]
.detailedVoList[j].groupId .detailedVoList![j].groupId
.toString(); .toString();
if (!_selectItems.contains(id)) { if (!_selectItems.contains(id)) {
_selectItems.add(id); _selectItems.add(id);
_payNum += 1; _payNum += 1;
_payTotal += widget.model.dailyPaymentTypeVos[i] _payTotal += widget.model!.dailyPaymentTypeVos![i]
.detailedVoList[j].paymentPrice .detailedVoList![j].paymentPrice!
.toDouble(); .toDouble();
} }
} }

@ -5,8 +5,8 @@ import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/utils/headers.dart'; import 'package:aku_community/utils/headers.dart';
class SubmitBar extends StatefulWidget { class SubmitBar extends StatefulWidget {
final String title; final String? title;
SubmitBar({Key key, this.title}) : super(key: key); SubmitBar({Key? key, this.title}) : super(key: key);
@override @override
_SubmitBarState createState() => _SubmitBarState(); _SubmitBarState createState() => _SubmitBarState();
@ -111,7 +111,7 @@ class _SubmitBarState extends State<SubmitBar> {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
_selectAll(), _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:bot_toast/bot_toast.dart';
import 'package:dio/dio.dart'; import 'package:dio/dio.dart';
import 'package:flustars/flustars.dart'; import 'package:flustars/flustars.dart';
@ -36,13 +32,13 @@ class ManagerFunc {
return baseModel; return baseModel;
} }
static Future<String> shareVisitor({ static Future<String?> shareVisitor({
@required int estateId, required int? estateId,
String name, String? name,
String tel, String? tel,
int sex, int? sex,
String carNumber, String? carNumber,
DateTime date, DateTime? date,
}) async { }) async {
final cancel = BotToast.showLoading(); final cancel = BotToast.showLoading();
Map<String, dynamic> params = { Map<String, dynamic> params = {
@ -54,7 +50,7 @@ class ManagerFunc {
if (carNumber != null) params.putIfAbsent('carNumber', () => carNumber); if (carNumber != null) params.putIfAbsent('carNumber', () => carNumber);
if (date != null) if (date != null)
params.putIfAbsent('visitDateStart', () => NetUtil.getDate(date)); params.putIfAbsent('visitDateStart', () => NetUtil.getDate(date));
Response response = await NetUtil().dio.post( Response response = await NetUtil().dio!.post(
API.manager.shareInvite, API.manager.shareInvite,
data: params, data: params,
); );
@ -66,7 +62,7 @@ class ManagerFunc {
} }
static reportRepairInsert( 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( BaseModel baseModel = await NetUtil().post(
API.manager.reportRepairInsert, API.manager.reportRepairInsert,
params: { params: {
@ -80,7 +76,7 @@ class ManagerFunc {
return baseModel; return baseModel;
} }
static reportRepairDelete(List<int> ids) async { static reportRepairDelete(List<int?> ids) async {
BaseModel baseModel = await NetUtil().post( BaseModel baseModel = await NetUtil().post(
API.manager.reportRepairDelete, API.manager.reportRepairDelete,
params: {'ids': ids}, params: {'ids': ids},
@ -89,8 +85,8 @@ class ManagerFunc {
return baseModel; return baseModel;
} }
static Future<FixedDetailModel> reportRepairFindBYLD(int id) async { static Future<FixedDetailModel> reportRepairFindBYLD(int? id) async {
Response response = await NetUtil().dio.get( Response response = await NetUtil().dio!.get(
API.manager.reportRepairFindBYLD, API.manager.reportRepairFindBYLD,
queryParameters: { queryParameters: {
'repairId': id, 'repairId': id,
@ -99,7 +95,7 @@ class ManagerFunc {
return FixedDetailModel.fromJson(response.data); 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, BaseModel baseModel = await NetUtil().get(API.manager.reportRepairCancel,
params: { params: {
'repairId': id, 'repairId': id,
@ -109,7 +105,7 @@ class ManagerFunc {
} }
static Future<BaseModel> reportRepairEvaluate( static Future<BaseModel> reportRepairEvaluate(
int id, int rate, String text) async { int? id, int? rate, String text) async {
BaseModel baseModel = await NetUtil().post( BaseModel baseModel = await NetUtil().post(
API.manager.reportRepairEvaluate, API.manager.reportRepairEvaluate,
params: { params: {
@ -122,7 +118,7 @@ class ManagerFunc {
return baseModel; return baseModel;
} }
static Future<BaseModel> reportRepairComplete(int id) async { static Future<BaseModel> reportRepairComplete(int? id) async {
BaseModel baseModel = await NetUtil().get( BaseModel baseModel = await NetUtil().get(
API.manager.reportRepairComplete, API.manager.reportRepairComplete,
params: { params: {
@ -134,20 +130,20 @@ class ManagerFunc {
} }
static Future<MovingCompanyModel> getMovingCompanyTel() async { static Future<MovingCompanyModel> getMovingCompanyTel() async {
Response response = await NetUtil().dio.get( Response response = await NetUtil().dio!.get(
API.manager.getMovingCompanyTel, API.manager.getMovingCompanyTel,
); );
return MovingCompanyModel.fromJson(response.data); return MovingCompanyModel.fromJson(response.data);
} }
static Future<BaseModel> articleOutSubmit({ static Future<BaseModel> articleOutSubmit({
int id, int? id,
String name, String? name,
int weight, int? weight,
int approach, int? approach,
String tel, String? tel,
String time, required String time,
List<String> urls, List<String?>? urls,
}) async { }) async {
BaseModel baseModel = await NetUtil().post( BaseModel baseModel = await NetUtil().post(
API.manager.articleOutSubmit, API.manager.articleOutSubmit,
@ -166,8 +162,8 @@ class ManagerFunc {
return baseModel; return baseModel;
} }
static Future<ArticleQRModel> getQRcode(int id) async { static Future<ArticleQRModel> getQRcode(int? id) async {
Response response = await NetUtil().dio.get( Response response = await NetUtil().dio!.get(
API.manager.getQRcode, API.manager.getQRcode,
queryParameters: { queryParameters: {
'articleOutId': id, 'articleOutId': id,
@ -176,7 +172,7 @@ class ManagerFunc {
return ArticleQRModel.fromJson(response.data); 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( BaseModel baseModel = await NetUtil().post(
API.manager.articleOutDelete, API.manager.articleOutDelete,
params: {'ids': ids}, params: {'ids': ids},
@ -185,7 +181,7 @@ class ManagerFunc {
return baseModel; return baseModel;
} }
static Future<BaseModel> fromLoss(int id) async { static Future<BaseModel> fromLoss(int? id) async {
BaseModel baseModel = await NetUtil().post( BaseModel baseModel = await NetUtil().post(
API.manager.fromLoss, API.manager.fromLoss,
params: {'articleBorrowId': id}, params: {'articleBorrowId': id},
@ -202,7 +198,7 @@ class ManagerFunc {
return baseModel; return baseModel;
} }
static Future<VotingDetailModel> voteDetail(int id) async { static Future<VotingDetailModel> voteDetail(int? id) async {
BaseModel baseModel = await NetUtil().get( BaseModel baseModel = await NetUtil().get(
API.manager.voteDetail, API.manager.voteDetail,
params: {'voteId': id}, params: {'voteId': id},
@ -211,7 +207,7 @@ class ManagerFunc {
return VotingDetailModel.fromJson(baseModel.data); 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: { BaseModel baseModel = await NetUtil().post(API.manager.vote, params: {
'voteId': voteId, 'voteId': voteId,
'candidateId': candleId, 'candidateId': candleId,
@ -219,7 +215,7 @@ class ManagerFunc {
return baseModel; return baseModel;
} }
static Future<QuestionnaireDetialModel> questionnairefindById(int id) async { static Future<QuestionnaireDetialModel> questionnairefindById(int? id) async {
BaseModel baseModel = await NetUtil().get( BaseModel baseModel = await NetUtil().get(
API.manager.questionnairefindById, API.manager.questionnairefindById,
params: { params: {
@ -231,7 +227,7 @@ class ManagerFunc {
} }
static Future<BaseModel> questionnaireSubmit( static Future<BaseModel> questionnaireSubmit(
int id, List<AppQuestionnaireAnswerSubmits> model) async { int? id, List<AppQuestionnaireAnswerSubmits> model) async {
BaseModel baseModel = await NetUtil().post( BaseModel baseModel = await NetUtil().post(
API.manager.questionnaireSubmit, API.manager.questionnaireSubmit,
params: { params: {

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

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

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

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

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

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

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

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

@ -9,20 +9,20 @@ import 'package:aku_community/provider/user_provider.dart';
import 'package:aku_community/widget/bee_scaffold.dart'; import 'package:aku_community/widget/bee_scaffold.dart';
class ChangeNickName extends StatefulWidget { class ChangeNickName extends StatefulWidget {
ChangeNickName({Key key}) : super(key: key); ChangeNickName({Key? key}) : super(key: key);
@override @override
_ChangeNickNameState createState() => _ChangeNickNameState(); _ChangeNickNameState createState() => _ChangeNickNameState();
} }
class _ChangeNickNameState extends State<ChangeNickName> { class _ChangeNickNameState extends State<ChangeNickName> {
TextEditingController _textEditingController; TextEditingController? _textEditingController;
@override @override
void initState() { void initState() {
final userProvider = Provider.of<UserProvider>(context, listen: false); final userProvider = Provider.of<UserProvider>(context, listen: false);
super.initState(); super.initState();
_textEditingController = _textEditingController =
TextEditingController(text: userProvider.userInfoModel.nickName); TextEditingController(text: userProvider.userInfoModel!.nickName);
} }
@override @override
@ -49,7 +49,7 @@ class _ChangeNickNameState extends State<ChangeNickName> {
controller: _textEditingController, controller: _textEditingController,
decoration: InputDecoration( decoration: InputDecoration(
contentPadding: EdgeInsets.zero, contentPadding: EdgeInsets.zero,
hintText: '${userProvider.userInfoModel.nickName}', hintText: '${userProvider.userInfoModel!.nickName}',
hintStyle: hintStyle:
TextStyle(color: Color(0xFF999999), fontSize: 34.sp), TextStyle(color: Color(0xFF999999), fontSize: 34.sp),
border: UnderlineInputBorder( border: UnderlineInputBorder(
@ -62,7 +62,7 @@ class _ChangeNickNameState extends State<ChangeNickName> {
150.w.heightBox, 150.w.heightBox,
MaterialButton( MaterialButton(
onPressed: () { onPressed: () {
userProvider.setName(_textEditingController.text); userProvider.setName(_textEditingController!.text);
Get.back(); Get.back();
}, },
child: '保存'.text.black.size(32.sp).make(), 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'; import 'package:aku_community/widget/views/application_view.dart';
class PersonalIndex extends StatefulWidget { class PersonalIndex extends StatefulWidget {
final bool isSign; final bool? isSign;
PersonalIndex({Key key, this.isSign}) : super(key: key); PersonalIndex({Key? key, this.isSign}) : super(key: key);
@override @override
_PersonalIndexState createState() => _PersonalIndexState(); _PersonalIndexState createState() => _PersonalIndexState();
@ -72,7 +72,7 @@ class _PersonalIndexState extends State<PersonalIndex>
child: FadeInImage.assetNetwork( child: FadeInImage.assetNetwork(
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
image: API.image( image: API.image(
userProvider?.userInfoModel?.imgUrl ?? userProvider.userInfoModel?.imgUrl ??
''), ''),
height: 106.w, height: 106.w,
width: 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'; import 'package:aku_community/widget/bee_scaffold.dart';
class UpdateTelPage extends StatefulWidget { class UpdateTelPage extends StatefulWidget {
UpdateTelPage({Key key}) : super(key: key); UpdateTelPage({Key? key}) : super(key: key);
@override @override
_UpdateTelPageState createState() => _UpdateTelPageState(); _UpdateTelPageState createState() => _UpdateTelPageState();
} }
class _UpdateTelPageState extends State<UpdateTelPage> { class _UpdateTelPageState extends State<UpdateTelPage> {
TextEditingController _oldTelController; TextEditingController? _oldTelController;
TextEditingController _newTelController; TextEditingController? _newTelController;
TextEditingController _codeController; TextEditingController? _codeController;
Timer _timer; Timer? _timer;
bool get validPhone => RegexUtil.isMobileSimple(_newTelController.text); bool get validPhone => RegexUtil.isMobileSimple(_newTelController!.text);
bool get _canGetCode { bool get _canGetCode {
bool timeActive = _timer?.isActive ?? false; bool timeActive = _timer?.isActive ?? false;
return (!timeActive) && validPhone; return (!timeActive) && validPhone;
@ -51,9 +51,9 @@ class _UpdateTelPageState extends State<UpdateTelPage> {
} }
startTick() { startTick() {
_timer = Timer.periodic(Duration(seconds: 1), (_timer) { _timer = Timer.periodic(Duration(seconds: 1), (timer) {
if (_timer.tick >= 60) { if (timer.tick >= 60) {
_timer.cancel(); _timer!.cancel();
_timer = null; _timer = null;
} }
setState(() {}); setState(() {});
@ -107,12 +107,13 @@ class _UpdateTelPageState extends State<UpdateTelPage> {
suffixIcon: MaterialButton( suffixIcon: MaterialButton(
onPressed: _canGetCode onPressed: _canGetCode
? () { ? () {
SignFunc.sendNewMessageCode(_newTelController.text); SignFunc.sendNewMessageCode(
_newTelController!.text);
startTick(); startTick();
} }
: () {}, : () {},
child: _timer?.isActive ?? false child: _timer?.isActive ?? false
? '${60 - _timer.tick}' ? '${60 - _timer!.tick}'
.text .text
.color(kPrimaryColor) .color(kPrimaryColor)
.size(28.sp) .size(28.sp)
@ -168,15 +169,15 @@ class _UpdateTelPageState extends State<UpdateTelPage> {
64.w.heightBox, 64.w.heightBox,
MaterialButton( MaterialButton(
onPressed: () { onPressed: () {
if (TextUtil.isEmpty(_oldTelController.text)) { if (TextUtil.isEmpty(_oldTelController!.text)) {
BotToast.showText(text: '旧手机号不能为空'); BotToast.showText(text: '旧手机号不能为空');
} else if (TextUtil.isEmpty(_newTelController.text)) { } else if (TextUtil.isEmpty(_newTelController!.text)) {
BotToast.showText(text: '新手机号不能为空'); BotToast.showText(text: '新手机号不能为空');
} else if (TextUtil.isEmpty(_codeController.text)) { } else if (TextUtil.isEmpty(_codeController!.text)) {
BotToast.showText(text: '验证码不能为空'); BotToast.showText(text: '验证码不能为空');
} else { } else {
userProvider.updateTel(_oldTelController.text, userProvider.updateTel(_oldTelController!.text,
_newTelController.text, _codeController.text); _newTelController!.text, _codeController!.text);
Get.back(); 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'; import 'package:aku_community/widget/picker/bee_image_picker.dart';
class UserProfilePage extends StatefulWidget { class UserProfilePage extends StatefulWidget {
UserProfilePage({Key key}) : super(key: key); UserProfilePage({Key? key}) : super(key: key);
@override @override
_UserProfilePageState createState() => _UserProfilePageState(); _UserProfilePageState createState() => _UserProfilePageState();
@ -32,7 +32,7 @@ class UserProfilePage extends StatefulWidget {
class _UserProfilePageState extends State<UserProfilePage> { class _UserProfilePageState extends State<UserProfilePage> {
int _sex = 1; int _sex = 1;
Widget _buildTile(String title, Widget suffix, {VoidCallback onPressed}) { Widget _buildTile(String title, Widget suffix, {VoidCallback? onPressed}) {
return MaterialButton( return MaterialButton(
color: Colors.white, color: Colors.white,
elevation: 0, elevation: 0,
@ -49,7 +49,7 @@ class _UserProfilePageState extends State<UserProfilePage> {
32.wb, 32.wb,
title.text.make(), title.text.make(),
Spacer(), Spacer(),
suffix ?? SizedBox(), suffix,
24.wb, 24.wb,
Icon( Icon(
CupertinoIcons.chevron_forward, CupertinoIcons.chevron_forward,
@ -65,7 +65,7 @@ class _UserProfilePageState extends State<UserProfilePage> {
_pickAvatar() async { _pickAvatar() async {
final userProvider = Provider.of<UserProvider>(context, listen: false); final userProvider = Provider.of<UserProvider>(context, listen: false);
File file = await BeeImagePicker.pick(title: '选择头像'); File? file = await BeeImagePicker.pick(title: '选择头像');
if (file == null) if (file == null)
return; return;
else { else {
@ -73,10 +73,10 @@ class _UserProfilePageState extends State<UserProfilePage> {
Function cancel = BotToast.showLoading(); Function cancel = BotToast.showLoading();
BaseFileModel model = BaseFileModel model =
await NetUtil().upload(API.upload.uploadAvatar, file); await NetUtil().upload(API.upload.uploadAvatar, file);
if (model.status) if (model.status!)
userProvider.updateAvatar(model.url); userProvider.updateAvatar(model.url);
else else
BotToast.showText(text: model.message); BotToast.showText(text: model.message!);
cancel(); cancel();
} }
} }
@ -127,9 +127,9 @@ class _UserProfilePageState extends State<UserProfilePage> {
), ),
_buildTile( _buildTile(
'性别', '性别',
userProvider.userInfoModel.sexValue.text.make(), userProvider.userInfoModel!.sexValue.text.make(),
onPressed: () async { onPressed: () async {
int result = await Get.bottomSheet(BeeCustomPicker( int? result = await Get.bottomSheet(BeeCustomPicker(
onPressed: () => Get.back(result: _sex), onPressed: () => Get.back(result: _sex),
body: CupertinoPicker( body: CupertinoPicker(
itemExtent: 50, itemExtent: 50,
@ -150,9 +150,9 @@ class _UserProfilePageState extends State<UserProfilePage> {
), ),
_buildTile( _buildTile(
'出生日期', '出生日期',
userProvider.userInfoModel.birthdayValue.text.make(), userProvider.userInfoModel!.birthdayValue.text.make(),
onPressed: () async { onPressed: () async {
DateTime date = await BeeDatePicker.pick(DateTime.now()); DateTime? date = await BeeDatePicker.pick(DateTime.now());
if (date != null) userProvider.setBirthday(date); if (date != null) userProvider.setBirthday(date);
}, },
), ),

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

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

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

@ -7,7 +7,7 @@ import 'package:url_launcher/url_launcher.dart';
import 'package:aku_community/utils/headers.dart'; import 'package:aku_community/utils/headers.dart';
class PropertyCard extends StatelessWidget { class PropertyCard extends StatelessWidget {
PropertyCard({Key key}) : super(key: key); PropertyCard({Key? key}) : super(key: key);
final List<Map<String, dynamic>> _listCard = [ 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'; import 'package:aku_community/widget/bee_scaffold.dart';
class AboutPage extends StatelessWidget { class AboutPage extends StatelessWidget {
const AboutPage({Key key}) : super(key: key); const AboutPage({Key? key}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

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

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

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

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

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

Loading…
Cancel
Save