small update

hmxc
小赖 4 years ago
parent 7e833f80b7
commit 06ec3f9233

@ -14,8 +14,10 @@ class MainInitialize {
///firebase
static Future initFirebase() async {
await Firebase.initializeApp();
//TODO setCrashlyticsCollectionEnabled state
FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true);
FlutterError.onError = (detail) {
LoggerData.addData(detail.exception.toString(), tag: 'EXCEPTION');
FirebaseCrashlytics.instance.recordFlutterError(detail);
};
}
@ -47,7 +49,7 @@ class MainInitialize {
debug: true,
);
String rID = await jpush.getRegistrationID();
LoggerData.addData('RegistrationID:$rID');
LoggerData.addData(rID, tag: 'RegistrationID');
}
static initWechat() {

@ -1,136 +0,0 @@
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/model/manager/estate_payment_model.dart';
import 'package:akuCommunity/pages/goods_deto_page/deto_create_page/widget/common_radio.dart';
import 'package:akuCommunity/pages/manager_func.dart';
import 'package:akuCommunity/provider/app_provider.dart';
import 'package:akuCommunity/provider/user_provider.dart';
import 'package:akuCommunity/utils/bee_parse.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bee_divider.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
@Deprecated("my_house_page need to be cleaned.")
class MyHousePage extends StatefulWidget {
final bool needFindPayTag;
MyHousePage({Key key, this.needFindPayTag = false}) : super(key: key);
@override
_MyHousePageState createState() => _MyHousePageState();
}
Widget _currentHouseTag() {
return Container(
padding: EdgeInsets.symmetric(vertical: 12.w, horizontal: 20.w),
constraints: BoxConstraints(minWidth: 120.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(36.w),
color: Color(0xFFFFF4D3),
border: Border.all(width: 2.w, color: Color(0xFFFFC40C))),
child: '当前房屋'.text.color(ktextPrimary).size(20.sp).make(),
);
}
Widget _unPaidTag() {
return Container(
padding: EdgeInsets.symmetric(vertical: 12.w, horizontal: 20.w),
constraints: BoxConstraints(minWidth: 120.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(36.w),
color: Color(0xFFFFEBE8),
border: Border.all(width: 2.w, color: Color(0xFFFC361D))),
child: '未缴费'.text.color(Color(0xFFFC361D)).size(20.sp).make(),
);
}
class _MyHousePageState extends State<MyHousePage> {
List<EstatePaymentModel> _list = [];
List<EstatePaymentModel> get _unPaidList =>
_list.where((element) => element.status == 1).toList();
@override
void initState() {
super.initState();
if (widget.needFindPayTag) {
ManagerFunc.findEstatelsPayment().then((value) {
_list = (value.data as List)
.map((e) => EstatePaymentModel.fromJson(e))
.toList();
return _list;
});
}
}
Widget _buildCard(int currentHouseId, String estateName, int index,
{bool paid = false}) {
AppProvider appProvider = Provider.of<AppProvider>(context);
return Container(
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 32.w),
child: GestureDetector(
onTap: () {
setState(() {});
},
child: Row(
children: [
CommonRadio(
value: BeeParse.getEstateNameId(estateName),
groupValue: 0,
size: 32.w,
),
24.w.widthBox,
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
S
.of(context)
.tempPlotName
.text
.size(24.sp)
.color(ktextSubColor)
.bold
.make(),
16.w.heightBox,
appProvider.selectedHouse.roomName.text
.color(ktextPrimary)
.size(28.sp)
.bold
.make(),
],
),
Spacer(),
currentHouseId == BeeParse.getEstateNameId(estateName)
? _currentHouseTag()
: paid
? _unPaidTag()
: SizedBox()
],
).material(color: Colors.transparent),
),
);
}
@override
Widget build(BuildContext context) {
UserProvider userProvider = Provider.of<UserProvider>(context);
return BeeScaffold(
title: '我的房屋',
body: ListView(
children: <Widget>[
...userProvider.userDetailModel.estateNames.isEmpty
? [SizedBox()]
: userProvider.userDetailModel.estateNames
.map((e) => _buildCard(
0, e, userProvider.userDetailModel.estateNames.indexOf(e),
paid: widget.needFindPayTag
? false
: _unPaidList
.one((element) => element.roomName == e)))
.toList(),
].sepWidget(separate: BeeDivider.horizontal()),
),
);
}
}

@ -1,142 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/utils/headers.dart';
class OrderCard extends StatefulWidget {
OrderCard({
Key key,
}) : super(key: key);
@override
_OrderCardState createState() => _OrderCardState();
}
class _OrderCardState extends State<OrderCard> {
Widget _orderInfo() {
return Container(
margin: EdgeInsets.only(
top: 20.w,
bottom: 20.w,
left: 24.w,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'去年2019年',
style: TextStyle(
fontSize: BaseStyle.fontSize28,
color: ktextSubColor,
),
),
Container(
margin: EdgeInsets.symmetric(vertical: 24.w),
child: Row(
children: [
Text(
'待缴4项',
style: TextStyle(
fontSize: BaseStyle.fontSize28,
color: ktextPrimary,
),
),
SizedBox(width: 40.w),
Text(
'已选4项',
style: TextStyle(
fontSize: BaseStyle.fontSize28,
color: ktextPrimary,
),
),
],
),
),
RichText(
text: TextSpan(
style: TextStyle(
fontSize: BaseStyle.fontSize28,
fontWeight: FontWeight.bold),
children: <InlineSpan>[
TextSpan(
text: '合计:',
style: TextStyle(color: ktextPrimary),
),
TextSpan(
text: '¥${747.98}',
style: TextStyle(color: Color(0xfffc361d)),
),
]),
),
],
),
);
}
Widget _checkInfo() {
return InkWell(
onTap: () {
// LifePayInfoPage(bundle: Bundle()
// ..putMap('detailMap', {'title': '去年2019年'}),).to;
},
child: Container(
margin: EdgeInsets.only(top: 20.w),
alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: 7.w),
height: 44.w,
width: 128.w,
decoration: BoxDecoration(
color: Color(0xff2a2a2a),
borderRadius: BorderRadius.all(Radius.circular(20)),
),
child: Text(
'选择明细',
style: TextStyle(
fontSize: BaseStyle.fontSize22,
color: Color(0xffffffff),
),
),
),
);
}
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(
top: 32.w,
left: 32.w,
right: 32.w,
),
padding: EdgeInsets.symmetric(horizontal: 32.w),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(8.w)),
),
child: InkWell(
onTap: () {},
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Icon(
Icons.radio_button_unchecked,
color: BaseStyle.color999999,
size: 40.w,
),
Expanded(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// _orderInfo(),
// _checkInfo(),
],
),
)
],
),
),
);
}
}

@ -16,18 +16,19 @@ import 'package:akuCommunity/utils/network/net_util.dart';
class ManagerFunc {
static insertVisitorInfo(int id, int type, String name, int sex, String tel,
String carNum, DateTime expectedVisitDate) async {
BaseModel baseModel = await NetUtil().post(API.manager.insertVisitorInfo,
params: {
'buildingUnitEstateId': id,
'type': type,
'name': name,
'sex': sex,
'tel': tel,
'carNum': carNum,
'expectedVisitDate': DateUtil.formatDate(expectedVisitDate,
format: "yyyy-MM-dd HH:mm:ss")
},
showMessage: true);
BaseModel baseModel = await NetUtil().post(
API.manager.insertVisitorInfo,
params: {
'buildingUnitEstateId': id,
'type': type,
'name': name,
'sex': sex,
'tel': tel,
'carNum': carNum,
'expectedVisitDate': NetUtil.getDate(expectedVisitDate),
},
showMessage: true,
);
return baseModel;
}

@ -9,7 +9,7 @@ class AboutPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
String aboutText =
const aboutText =
'“小蜜蜂社区”APP是由凯达来科技有限公司研究开发为全国社区业主量身定做本产品融合了基础物业服务园区生活服务周边商圈服务和邻里社交服务的一站式园区生活服务平台。该平台可提供超过30种的线上服务其中包括维修、意见建议、投诉表扬物业缴费、访客通行、粮油宅配、团购商城等并可通过支付宝、微信支付来未完成线上支付真正打造了智慧园区O2O平台为广大业主打造更安全、更便捷、更和睦的幸福园区。';
TextStyle _style = TextStyle(

@ -52,7 +52,10 @@ class _SplashPageState extends State<SplashPage> {
@override
void initState() {
super.initState();
PowerLogger.start(context, debug: DeveloperUtil.dev);
PowerLogger.start(
context,
debug: DeveloperUtil.dev,
);
_initOp().then((value) => Get.offAll(() => TabNavigator()));
}

@ -252,8 +252,15 @@ class _VisitorAccessPageState extends State<VisitorAccessPage> {
return;
}
VoidCallback cancel = BotToast.showLoading();
await ManagerFunc.insertVisitorInfo(id, type, _userName.text,
_selectSex, tel, _userCarNum.text, dateTime);
await ManagerFunc.insertVisitorInfo(
id,
type,
_userName.text,
_selectSex,
tel,
_userCarNum.text,
dateTime,
);
cancel();
Get.off(VisitorRecordPage());
}

@ -1,34 +0,0 @@
import 'dart:math';
import 'package:flutter/material.dart';
class SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
SliverAppBarDelegate({
@required this.minHeight,
@required this.maxHeight,
@required this.child,
});
final double minHeight;
final double maxHeight;
final Widget child;
@override
double get minExtent => minHeight;
@override
double get maxExtent => max(maxHeight, minHeight);
@override
Widget build(
BuildContext context, double shrinkOffset, bool overlapsContent) {
return new SizedBox.expand(child: child);
}
@override
bool shouldRebuild(SliverAppBarDelegate oldDelegate) {
return maxHeight != oldDelegate.maxHeight ||
minHeight != oldDelegate.minHeight ||
child != oldDelegate.child;
}
}

@ -252,7 +252,7 @@ packages:
name: flutter_easyrefresh
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.8"
version: "2.2.1"
flutter_highlight:
dependency: transitive
description:
@ -351,7 +351,7 @@ packages:
name: hive
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.2"
version: "2.0.3"
hive_flutter:
dependency: "direct main"
description:
@ -547,7 +547,7 @@ packages:
name: power_logger
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.1-nullsafety.1"
version: "1.1.1-nullsafety.3"
process:
dependency: transitive
description:

@ -40,17 +40,17 @@ dependencies:
fluwx: ^3.3.0
get: ^4.0.0-nullsafety.2
velocity_x: ^2.6.0
hive: ^2.0.0
hive: ^2.0.3
hive_flutter: ^1.0.0
logger: ^1.0.0
flutter_easyrefresh: 2.1.8
flutter_easyrefresh: ^2.2.1
random_character:
git:
url: http://159.75.73.143:8080/mengfucius/random_character
ref: null-safety
image_picker: ^0.7.3
power_logger: ^1.0.0-nullsafety.1
power_logger: ^1.1.1-nullsafety.3
flutter_rating_bar: ^4.0.0
jpush_flutter: ^2.0.1
open_file: ^3.1.0

Loading…
Cancel
Save