pull/1/head
张萌 3 years ago
parent 450e0117bf
commit c0bda239e2

@ -260,7 +260,7 @@ class _LifePayPageState extends State<LifePayPage> {
Future<double> _dailyPaymentPrePay() async {
BaseModel baseModel =
await NetUtil().get(API.manager.dailyPaymentPrePay, params: {
"estateId": UserTool.appProveider.selectedHouse!.estateId,
"estateId": UserTool.appProvider.selectedHouse!.estateId,
});
if (baseModel.success) {
return (baseModel.data as num).toDouble();

@ -44,9 +44,7 @@ class _LifePayRecordPageState extends State<LifePayRecordPage> {
title: '生活缴费',
body: BeeListView(
path: API.manager.paymentRecord,
extraParams: {
"estateId": UserTool.appProveider.selectedHouse!.estateId
},
extraParams: {"estateId": UserTool.appProvider.selectedHouse!.estateId},
controller: _refreshController,
convert: (models) {
return models.rows

@ -157,7 +157,7 @@ class _LifePrePayPageState extends State<LifePrePayPage> {
try {
BaseModel baseModel =
await NetUtil().post(API.pay.dailPaymentPrePay, params: {
"estateId": UserTool.appProveider.selectedHouse!.estateId,
"estateId": UserTool.appProvider.selectedHouse!.estateId,
"payType": 1,
"payPrice": _editingController.text
});

@ -8,7 +8,7 @@ class PropertyFunc {
static Future<double> getDailyPaymentPrePay() async {
BaseModel baseModel =
await NetUtil().get(API.manager.dailyPaymentPrePay, params: {
"estateId": UserTool.appProveider.selectedHouse!.estateId,
"estateId": UserTool.appProvider.selectedHouse!.estateId,
});
if (baseModel.success) {
return (baseModel.data as num).toDouble();
@ -21,7 +21,7 @@ class PropertyFunc {
static Future<double> getFindUnpaidAmount() async {
BaseModel baseModel =
await NetUtil().get(API.manager.findUnpaidAmount, params: {
"estateId": UserTool.appProveider.selectedHouse!.estateId,
"estateId": UserTool.appProvider.selectedHouse!.estateId,
});
if (baseModel.success) {
return (baseModel.data as num).toDouble();

@ -58,12 +58,12 @@ class _NewRenovationAddPageState extends State<NewRenovationAddPage> {
),
bottomNavi: BottomButton(
onPressed: () async {
if (UserTool.appProveider.selectedHouse != null) {
if (UserTool.appProvider.selectedHouse != null) {
BaseModel baseModel =
await NetUtil().post(API.manager.insertNewRenovation,
params: {
"estateId":
UserTool.appProveider.selectedHouse!.estateId,
UserTool.appProvider.selectedHouse!.estateId,
"constructionUnit": _unitController.text,
"director": _directorController.text,
"directorTel": _telController.text,

@ -1,11 +1,3 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/extensions/num_ext.dart';
import 'package:aku_new_community/extensions/widget_list_ext.dart';
@ -20,6 +12,12 @@ import 'package:aku_new_community/utils/developer_util.dart';
import 'package:aku_new_community/utils/websocket/web_socket_util.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:velocity_x/velocity_x.dart';
class SettingsPage extends StatefulWidget {
SettingsPage({Key? key}) : super(key: key);
@ -179,7 +177,7 @@ class _SettingsPageState extends State<SettingsPage> {
children: [
'接收火灾报警通知'.text.size(28.sp).color(ktextPrimary).bold.make().expand(),
CupertinoSwitch(
value: UserTool.appProveider.fireAlert,
value: UserTool.appProvider.fireAlert,
onChanged: (value) {
if (value) {
WebSocketUtil().startWebSocket();

@ -281,7 +281,7 @@ class _SharePayPageState extends State<SharePayPage> {
onRefresh: () async {
BaseModel baseModel =
await NetUtil().get(API.manager.sharePayList, params: {
'estateId': UserTool.appProveider.selectedHouse?.estateId,
'estateId': UserTool.appProvider.selectedHouse?.estateId,
});
_models = (baseModel.data as List)
.map((e) => SharePayListModel.fromJson(e))

@ -79,7 +79,7 @@ class _CodeMessagePageState extends State<CodeMessagePage> {
var re = await SignFunc.loginBySms(
widget.tel,
code,
UserTool.appProveider.pickedCityAndCommunity!
UserTool.appProvider.pickedCityAndCommunity!
.communityModel!.id);
if (re.data['success']) {
await UserTool.userProvider
@ -111,18 +111,18 @@ class _CodeMessagePageState extends State<CodeMessagePage> {
onPressed: () async {
var base = await SignFunc.sendMessageCode(
widget.tel,
UserTool.appProveider.pickedCityAndCommunity!
UserTool.appProvider.pickedCityAndCommunity!
.communityModel!.id);
if (base.success) {
_errorMessage = null;
UserTool.appProveider.startTimer();
UserTool.appProvider.startTimer();
} else {
BotToast.showText(text: base.msg);
}
},
child: (UserTool.appProveider.second >= 60
child: (UserTool.appProvider.second >= 60
? '重新发送验证码'
: '${UserTool.appProveider.second}秒后可重新发送')
: '${UserTool.appProvider.second}秒后可重新发送')
.text
.size(28.sp)
.color(Color(0xFF5096F1))

@ -1,16 +1,15 @@
import 'package:flutter/material.dart';
import 'package:aku_new_community/pages/sign/login/forgot_set_psd_page.dart';
import 'package:aku_new_community/pages/sign/widget/login_button_widget.dart';
import 'package:aku_new_community/pages/sign/widget/tel_text_field.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:aku_new_community/pages/sign/login/forgot_set_psd_page.dart';
import 'package:aku_new_community/pages/sign/widget/login_button_widget.dart';
import 'package:aku_new_community/pages/sign/widget/tel_text_field.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/others/user_tool.dart';
import '../sign_func.dart';
class ForgotPsdPage extends StatefulWidget {
@ -74,13 +73,13 @@ class _ForgotPsdPageState extends State<ForgotPsdPage> {
}
var base = await SignFunc.sendForgotMessageCode(
_telController.text,
UserTool.appProveider.pickedCityAndCommunity!
UserTool.appProvider.pickedCityAndCommunity!
.communityModel!.id);
if (base.success) {
Get.to(() => ForgotSetPsdPage(
tel: _telController.text,
));
UserTool.appProveider.startTimer();
UserTool.appProvider.startTimer();
} else {
BotToast.showText(text: base.msg);
}

@ -1,17 +1,16 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:aku_new_community/pages/sign/login/psd_verify.dart';
import 'package:aku_new_community/pages/sign/sign_func.dart';
import 'package:aku_new_community/pages/sign/widget/login_button_widget.dart';
import 'package:aku_new_community/pages/sign/widget/psd_text_field.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
import 'login_page.dart';
class ForgotSetPsdPage extends StatefulWidget {
@ -125,13 +124,13 @@ class _ForgotSetPsdPageState extends State<ForgotSetPsdPage> {
onTap: () async {
var base = await SignFunc.sendMessageCode(
widget.tel,
UserTool.appProveider.pickedCityAndCommunity!
UserTool.appProvider.pickedCityAndCommunity!
.communityModel!.id);
if (base.success) {
Get.to(() => ForgotSetPsdPage(
tel: widget.tel,
));
UserTool.appProveider.startTimer();
UserTool.appProvider.startTimer();
} else {
BotToast.showText(text: base.msg);
}
@ -139,7 +138,7 @@ class _ForgotSetPsdPageState extends State<ForgotSetPsdPage> {
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
'${UserTool.appProveider.second < 60 ? '${UserTool.appProveider.second}秒后重新获取' : '获取验证码'}'
'${UserTool.appProvider.second < 60 ? '${UserTool.appProvider.second}秒后重新获取' : '获取验证码'}'
.text
.size(28.sp)
.color(Color(0xFF5096F1))

@ -102,7 +102,7 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
_tel.text,
_psd.text,
UserTool
.appProveider.pickedCityAndCommunity!.communityModel!.id);
.appProvider.pickedCityAndCommunity!.communityModel!.id);
if (response.data['success']) {
await UserTool.userProvider.setLogin(response.data['data']);
await UserTool.dataProvider.addHistories();
@ -127,7 +127,7 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
BotToast.showText(text: '请输入正确的手机号!');
return false;
}
if (UserTool.appProveider.pickedCityAndCommunity == null) {
if (UserTool.appProvider.pickedCityAndCommunity == null) {
BotToast.showText(text: '请先选择小区!');
return false;
}
@ -151,7 +151,7 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
TelTextField(controller: _tel),
100.w.heightBox,
LoginButtonWidget(
onTap: UserTool.appProveider.second < 60
onTap: UserTool.appProvider.second < 60
? () {}
: () async {
var check = checkInput();
@ -160,7 +160,7 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
}
var base = await SignFunc.sendMessageCode(
_tel.text,
UserTool.appProveider.pickedCityAndCommunity!
UserTool.appProvider.pickedCityAndCommunity!
.communityModel!.id);
if (base.success) {
Get.to(() => CodeMessagePage(tel: _tel.text));

@ -1,11 +1,3 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:aku_new_community/constants/api.dart';
import 'package:aku_new_community/constants/saas_api.dart';
import 'package:aku_new_community/models/login/community_model.dart';
import 'package:aku_new_community/models/login/history_login_model.dart';
@ -14,6 +6,11 @@ import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:aku_new_community/widget/picker/bee_city_picker.dart';
import 'package:aku_new_community/widget/picker/bee_community_picker.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
class SelectCommunity extends StatefulWidget {
const SelectCommunity({
@ -26,7 +23,7 @@ class SelectCommunity extends StatefulWidget {
class _SelectCommunityState extends State<SelectCommunity> {
String get cityName {
var _model = UserTool.appProveider.pickedCityAndCommunity;
var _model = UserTool.appProvider.pickedCityAndCommunity;
if (_model == null) {
return '请选择省、市、县/区';
} else {
@ -38,7 +35,7 @@ class _SelectCommunityState extends State<SelectCommunity> {
String get communityName {
var _community =
UserTool.appProveider.pickedCityAndCommunity?.communityModel;
UserTool.appProvider.pickedCityAndCommunity?.communityModel;
if (_community == null) {
return '请选择小区';
} else {
@ -54,10 +51,9 @@ class _SelectCommunityState extends State<SelectCommunity> {
@override
void deactivate() {
Future.delayed(Duration(milliseconds: 0), () async {
if (UserTool.appProveider.pickedCityAndCommunity != null &&
UserTool.appProveider.pickedCityAndCommunity?.communityModel ==
null) {
UserTool.appProveider.resetPickedCity();
if (UserTool.appProvider.pickedCityAndCommunity != null &&
UserTool.appProvider.pickedCityAndCommunity?.communityModel == null) {
UserTool.appProvider.resetPickedCity();
}
});
super.deactivate();
@ -69,7 +65,7 @@ class _SelectCommunityState extends State<SelectCommunity> {
onTap: () async {
var _city = await BeeCityPicker.pick(context);
if (_city != null) {
UserTool.appProveider.setPickedCity(city: _city);
UserTool.appProvider.setPickedCity(city: _city);
}
setState(() {});
},
@ -98,7 +94,7 @@ class _SelectCommunityState extends State<SelectCommunity> {
List<CommunityModel> _communities = [];
var base = await NetUtil().get(SAASAPI.login.allCommunity, params: {
'cityId': UserTool
.appProveider.pickedCityAndCommunity!.cityModel.district.id,
.appProvider.pickedCityAndCommunity!.cityModel.district.id,
});
if (base.success) {
_communities = (base.data as List)
@ -109,7 +105,7 @@ class _SelectCommunityState extends State<SelectCommunity> {
var _community = await BeeCommunityPicker.pick(context, _communities);
print(_community?.name);
if (_community != null) {
UserTool.appProveider.setPickedCity(community: _community);
UserTool.appProvider.setPickedCity(community: _community);
}
setState(() {});
},
@ -152,9 +148,8 @@ class _SelectCommunityState extends State<SelectCommunity> {
);
return WillPopScope(
onWillPop: () async {
var bool = UserTool.appProveider.pickedCityAndCommunity != null &&
UserTool.appProveider.pickedCityAndCommunity?.communityModel ==
null;
var bool = UserTool.appProvider.pickedCityAndCommunity != null &&
UserTool.appProvider.pickedCityAndCommunity?.communityModel == null;
if (bool) {
BotToast.showText(text: '请选择小区');
return false;

@ -146,7 +146,7 @@ class SignFunc {
'tel': tel,
'telCode': telcode,
'communityId':
UserTool.appProveider.pickedCityAndCommunity!.communityModel!.id
UserTool.appProvider.pickedCityAndCommunity!.communityModel!.id
},
showMessage: true);
if (baseModel.data == null || !baseModel.success) return false;

@ -9,6 +9,7 @@ import 'package:aku_new_community/utils/headers.dart';
import 'package:aku_new_community/utils/hive_store.dart';
import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:amap_flutter_location/amap_flutter_location.dart';
import 'package:equatable/equatable.dart';
// import 'package:amap_search_fluttify/amap_search_fluttify.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/gestures.dart';
@ -108,13 +109,14 @@ class _SplashPageState extends State<SplashPage> {
await Permission.locationWhenInUse.request();
}
//
EquatableConfig.stringify = true;
AMapFlutterLocation.updatePrivacyShow(true, true);
AMapFlutterLocation.updatePrivacyAgree(true);
MainInitialize.initTheme();
MainInitialize.initWechat();
MainInitialize.initWebSocket();
UserTool.appProveider.startLocation();
UserTool.appProveider.initApplications();
UserTool.appProvider.startLocation();
UserTool.appProvider.initApplications();
//
await UserTool.dataProvider.init();
//

@ -330,6 +330,7 @@ class AppProvider extends ChangeNotifier {
notifyListeners();
}
///
HistoryLoginModel? _pickedCityAndCommunity;
HistoryLoginModel? get pickedCityAndCommunity => _pickedCityAndCommunity;

@ -43,7 +43,7 @@ class DataProvider extends ChangeNotifier {
List<HistoryLoginModel> get loginHistories => _loginHistories;
Future addHistories() async {
_loginHistories.insert(0, UserTool.appProveider.pickedCityAndCommunity!);
_loginHistories.insert(0, UserTool.appProvider.pickedCityAndCommunity!);
if (_loginHistories.length > 4) {
_loginHistories.removeAt(_loginHistories.length - 1);
}

@ -27,8 +27,8 @@ class _LocationViewState extends State<LocationView> {
await Permission.locationWhenInUse.request();
}
_target = LatLng(
(UserTool.appProveider.location?['latitude'] ?? 0) as double,
(UserTool.appProveider.location?['longitude'] ?? 0) as double,
(UserTool.appProvider.location?['latitude'] ?? 0) as double,
(UserTool.appProvider.location?['longitude'] ?? 0) as double,
);
// poiList = await search.AmapSearch.instance.searchAround(search.LatLng(
// (UserTool.appProveider.location?['latitude'] ?? 0) as double,

@ -65,7 +65,7 @@ class _AddHouseKeepingPageState extends State<AddHouseKeepingPage> {
List<String> urls = await NetUtil()
.uploadFiles(_files, API.upload.uploadHouseKeepingPhotos);
bool result = await HouseKeepingFunc.submitHouseKeeping(
UserTool.appProveider.selectedHouse!.estateId,
UserTool.appProvider.selectedHouse!.estateId,
_selectType! + 1,
_editingController.text,
urls);

@ -1,15 +1,5 @@
import 'dart:io';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:open_file/open_file.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/extensions/widget_list_ext.dart';
import 'package:aku_new_community/ui/profile/house/house_func.dart';
@ -21,6 +11,14 @@ import 'package:aku_new_community/widget/others/upload_widget.dart';
import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:aku_new_community/widget/picker/bee_date_picker.dart';
import 'package:aku_new_community/widget/views/doc_view.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:open_file/open_file.dart';
import 'package:velocity_x/velocity_x.dart';
class UploadEmptyListPage extends StatefulWidget {
UploadEmptyListPage({Key? key}) : super(key: key);
@ -33,7 +31,7 @@ class _UploadEmptyListPageState extends State<UploadEmptyListPage> {
List<File> _files = [];
List<String> _urls = [];
int get sysLeaseId => UserTool.appProveider.selectedHouse!.sysLeaseId ?? 0;
int get sysLeaseId => UserTool.appProvider.selectedHouse!.sysLeaseId ?? 0;
DateTime? _date = DateTime.now();
@override

@ -1,13 +1,3 @@
import 'package:flutter/material.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:power_logger/power_logger.dart';
import 'package:provider/provider.dart';
import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/const/resource.dart';
import 'package:aku_new_community/models/house/lease_detail_model.dart';
@ -26,6 +16,14 @@ import 'package:aku_new_community/ui/profile/house/my_house_list.dart';
import 'package:aku_new_community/utils/headers.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:power_logger/power_logger.dart';
import 'package:provider/provider.dart';
class HouseOwnersPage extends StatefulWidget {
final int identify;
@ -45,11 +43,11 @@ class _HouseOwnersPageState extends State<HouseOwnersPage> {
}
int get currentSysLeaseId {
if (UserTool.appProveider.selectedHouse!.sysLeaseId == null) {
if (UserTool.appProvider.selectedHouse!.sysLeaseId == null) {
BotToast.showText(text: '无租赁合同!请先签订租赁合同');
return -1;
}
return UserTool.appProveider.selectedHouse!.sysLeaseId!;
return UserTool.appProvider.selectedHouse!.sysLeaseId!;
}
///
@ -109,7 +107,7 @@ class _HouseOwnersPageState extends State<HouseOwnersPage> {
Function cancel = BotToast.showLoading();
try {
await UserTool.userProvider.updateMyHouseInfo();
UserTool.appProveider.updateHouses(await HouseFunc.passedHouses);
UserTool.appProvider.updateHouses(await HouseFunc.passedHouses);
} catch (e) {
LoggerData.addData(e);
}

@ -1,13 +1,5 @@
import 'package:flutter/material.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart';
import 'package:get/get.dart';
import 'package:power_logger/power_logger.dart';
import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/constants/api.dart';
import 'package:aku_new_community/constants/saas_api.dart';
import 'package:aku_new_community/models/house/lease_fee_list_model.dart';
import 'package:aku_new_community/pages/life_pay/pay_finish_page.dart';
import 'package:aku_new_community/pages/life_pay/pay_util.dart';
@ -17,6 +9,11 @@ import 'package:aku_new_community/widget/bee_divider.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/buttons/bottom_button.dart';
import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:power_logger/power_logger.dart';
class LeasePayQueryDetailPage extends StatefulWidget {
final LeaseFeeListModel model;
@ -62,7 +59,7 @@ class _LeasePayQueryDetailPageState extends State<LeasePayQueryDetailPage> {
bool result = false;
try {
String code = await HouseFunc().leaseRentBillOrder(
UserTool.appProveider.selectedHouse!.sysLeaseId!,
UserTool.appProvider.selectedHouse!.sysLeaseId!,
1, //
widget.model.price.toDouble());
result = await PayUtil()
@ -133,7 +130,7 @@ class _LeasePayQueryDetailPageState extends State<LeasePayQueryDetailPage> {
children: [
'对应房屋'.text.size(28.sp).color(ktextSubColor).make(),
Spacer(),
'${S.of(context)!.tempPlotName}·${UserTool.appProveider.selectedHouse!.roomName}'
'${S.of(context)!.tempPlotName}·${UserTool.appProvider.selectedHouse!.roomName}'
.text
.size(28.sp)
.black

@ -186,7 +186,7 @@ class _LeasePayQueryPageState extends State<LeasePayQueryPage> {
children: [
model.typeString.text.size(28.sp).black.bold.make(),
Spacer(),
'${S.of(context)!.tempPlotName} ${UserTool.appProveider.selectedHouse!.roomName}'
'${S.of(context)!.tempPlotName} ${UserTool.appProvider.selectedHouse!.roomName}'
.text
.size(24.sp)
.color(ktextSubColor)

@ -1,12 +1,11 @@
import 'dart:async';
import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:power_logger/power_logger.dart';
import 'package:web_socket_channel/io.dart';
import 'package:web_socket_channel/web_socket_channel.dart';
import 'package:aku_new_community/widget/others/user_tool.dart';
const String baseUri = 'wss://shop.kaidalai.cn/websocket/app';
enum SOCKETSTATUS {
CONNECTED, //
@ -108,7 +107,7 @@ class WebSocketUtil {
}
WebSocketUtil().setPrintHeart(true);
UserTool.appProveider.setFireAlert(true);
UserTool.appProvider.setFireAlert(true);
}
//
@ -183,7 +182,7 @@ class WebSocketUtil {
}
endReconnect();
destoryHeart();
UserTool.appProveider.setFireAlert(false);
UserTool.appProvider.setFireAlert(false);
_socketStatus = SOCKETSTATUS.CLOSED;
}

@ -1,15 +1,14 @@
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:aku_new_community/provider/app_provider.dart';
import 'package:aku_new_community/provider/data_provider.dart';
import 'package:aku_new_community/provider/user_provider.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
class UserTool {
static UserProvider get userProvider =>
Provider.of<UserProvider>(Get.context!, listen: false);
static AppProvider get appProveider =>
static AppProvider get appProvider =>
Provider.of<AppProvider>(Get.context!, listen: false);
static DataProvider get dataProvider =>
Provider.of<DataProvider>(Get.context!, listen: false);

Loading…
Cancel
Save