refactor route tool

hmxc
小赖 4 years ago
parent 2749f96e04
commit bfe9f274c2

@ -1,7 +0,0 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
extension PageExt on Widget {
Function get to => () => Get.to(() => this);
}

@ -7,6 +7,7 @@ import 'package:flutter_icons/flutter_icons.dart';
import 'package:akuCommunity/pages/address_page/address_edit_page.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:get/get.dart';
class AddressItem extends StatelessWidget {
final String name, phone, address;
@ -113,16 +114,16 @@ class AddressItem extends StatelessWidget {
top: 55.w,
child: InkWell(
onTap: () {
AddressEditPage(
bundle: Bundle()
..putMap('details', {
'title': '编辑地址',
'name': name,
'phone': phone,
'address': address,
'isDelete': true
}),
).to();
Get.to(() => AddressEditPage(
bundle: Bundle()
..putMap('details', {
'title': '编辑地址',
'name': name,
'phone': phone,
'address': address,
'isDelete': true
}),
));
},
child: Row(
children: [

@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/pages/confirm_order_page/pay_order_page.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:get/get.dart';
class ConfirmBottomBar extends StatelessWidget {
final Map cartMap;
@ -35,7 +36,7 @@ class ConfirmBottomBar extends StatelessWidget {
Widget _submit(BuildContext context) {
return InkWell(
onTap: () {
PayOrderPage().to();
Get.to(()=>PayOrderPage());
},
child: Container(
decoration: BoxDecoration(

@ -10,6 +10,7 @@ import 'package:akuCommunity/pages/things_page/widget/bee_list_view.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:akuCommunity/widget/others/stack_avatar.dart';
import 'package:get/get.dart';
class EventVotingPage extends StatefulWidget {
EventVotingPage({Key key}) : super(key: key);
@ -108,9 +109,7 @@ class _EventVotingPageState extends State<EventVotingPage> {
// EdgeInsets.symmetric(horizontal: 30.w, vertical: 8.w),
elevation: 0,
onPressed: () {
VotingDetailPage(
id: model.id,
).to();
Get.to(() => VotingDetailPage(id: model.id));
},
child: (_getButtonText(model.status))
.text

@ -6,6 +6,7 @@ import 'package:flutter/material.dart';
import 'package:akuCommunity/pages/goods_details/view_comments_page.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:get/get.dart';
import 'widget/goods_app_bar.dart';
import 'widget/goods_details_bottom_bar.dart';
import 'widget/product_content.dart';
@ -58,7 +59,7 @@ class _GoodsDetailsPageState extends State<GoodsDetailsPage> {
// ProductSpecs(),
ProductEvaluate(
fun: () {
ViewCommentsPage().to();
Get.to(() => ViewCommentsPage());
},
),
ProductDetail(

@ -87,7 +87,7 @@ class _GoodsAppBarState extends State<GoodsAppBar> {
color: Color(0xff666666),
),
onPressed: () {
MarketCartPage().to();
Get.to(() => MarketCartPage());
},
),
],

@ -3,9 +3,9 @@ import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:akuCommunity/extensions/page_router.dart';
import 'package:akuCommunity/pages/market/market_cart_page/market_cart_page.dart';
import 'package:akuCommunity/provider/cart.dart';
import 'package:akuCommunity/widget/goods_specs_sheet.dart';
@ -113,7 +113,7 @@ class _GoodsDetailsBottomBarState extends State<GoodsDetailsBottomBar> {
],
),
onTap: () {
MarketCartPage().to();
Get.to(() => MarketCartPage());
},
),
SizedBox(width: 53.w),

@ -362,7 +362,7 @@ class _DetoCreatePageState extends State<DetoCreatePage> {
16.w.heightBox,
InkWell(
onTap: () async {
_selectTel = await SelectMoveCompanyPage().to();
_selectTel = await Get.to(() => SelectMoveCompanyPage());
setState(() {});
},
child: Padding(

@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:velocity_x/velocity_x.dart';
@ -125,7 +126,7 @@ class _GoodsDetoPageState extends State<GoodsDetoPage> {
}
: () {
userProvider.isLogin
? DetoCreatePage().to()
? Get.to(()=>DetoCreatePage())
: BotToast.showText(text: '请先登录!');
},
child: _isEdit

@ -6,7 +6,6 @@ import 'package:flutter_icons/flutter_icons.dart';
import 'package:get/get.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:akuCommunity/extensions/page_router.dart';
import 'package:akuCommunity/model/manager/article_QR_code_model.dart';
import 'package:akuCommunity/pages/goods_deto_page/deto_code_page/deto_code_page.dart';
import 'package:akuCommunity/pages/manager_func.dart';
@ -98,7 +97,7 @@ class GoodsInfoCardButton extends StatelessWidget {
ArticleQRModel _model =
await ManagerFunc.getQRcode(id);
if (_model.status) {
DetoCodePage(id: id, model: _model).to();
Get.to(() => DetoCodePage(id: id, model: _model));
} else {
BotToast.showText(text: _model.message);
}

@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:akuCommunity/const/resource.dart';
@ -87,7 +88,7 @@ class _GoodsManagePageState extends State<GoodsManagePage> {
actions: [
MaterialButton(
onPressed: () {
MineGoodsPage().to();
Get.to(() => MineGoodsPage());
},
child: '我的借还物品'.text.black.size(28.sp).make(),
padding: EdgeInsets.symmetric(horizontal: 32.w),

@ -6,11 +6,11 @@ import 'package:flutter/material.dart';
import 'package:badges/badges.dart';
import 'package:flutter_easyrefresh/easy_refresh.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:akuCommunity/const/resource.dart';
import 'package:akuCommunity/extensions/page_router.dart';
import 'package:akuCommunity/model/aku_shop_model.dart';
import 'package:akuCommunity/model/community/activity_item_model.dart';
import 'package:akuCommunity/model/community/board_model.dart';
@ -75,7 +75,7 @@ class _HomePageState extends State<HomePage>
child: ColumnActionButton(
onPressed: () {
if (LoginUtil.isNotLogin) return;
MessageCenterPage().to();
Get.to(() => MessageCenterPage());
},
title: '消息',
path: R.ASSETS_ICONS_ALARM_PNG,
@ -150,7 +150,7 @@ class _HomePageState extends State<HomePage>
HomeTitle(
title: '社区活动',
suffixTitle: '更多活动',
onTap: ActivityListPage().to,
onTap: () => Get.to(() => ActivityListPage()),
),
_activityItemModel == null
? SizedBox()

@ -5,6 +5,7 @@ import 'package:akuCommunity/pages/life_pay/life_pay_bill_page/life_pay_bill_pag
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:get/get.dart';
import '../widget/submit_bar.dart';
import 'widget/details_card.dart';
@ -26,7 +27,7 @@ class _LifePayInfoPageState extends State<LifePayInfoPage> {
ListView(
padding: EdgeInsets.only(bottom: 130.w),
children: [
DetailsCard(fun: LifePayBillPage().to),
DetailsCard(fun: () => Get.to(() => LifePayBillPage())),
],
),
Positioned(

@ -183,9 +183,8 @@ class _LifePayPageState extends State<LifePayPage> {
children: [
GestureDetector(
onTap: () async {
List payMent = await LifePayDetailPage(
model: _models[index],
).to();
List payMent = await Get.to(
() => LifePayDetailPage(model: _models[index]));
_selectPay[index].payCount = payMent[0];
_selectPay[index].payTotal = payMent[1];
setState(() {});

@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:badges/badges.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:akuCommunity/constants/api.dart';
@ -99,7 +100,7 @@ class _MessageCenterPageState extends State<MessageCenterPage> {
title: '系统通知',
content: appProvider.messageCenterModel.sysTitle ?? '无系统通知消息',
count: appProvider.messageCenterModel.sysCount ?? 0,
onTap: SystemMessagePage().to,
onTap: () => Get.to(() => SystemMessagePage()),
),
_buildCard(
path: R.ASSETS_ICONS_COMMENT_NOTICE_PNG,
@ -109,7 +110,7 @@ class _MessageCenterPageState extends State<MessageCenterPage> {
count: appProvider.messageCenterModel.commentCount ?? 0,
onTap: () async {
// await NetUtil().dio.get(API.message.allReadComment);
CommentMessagePage().to();
Get.to(() => CommentMessagePage());
},
),
// _buildCard(

@ -13,6 +13,7 @@ import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/utils/network/net_util.dart';
import 'package:akuCommunity/widget/bee_divider.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:get/get.dart';
class SystemMessagePage extends StatefulWidget {
SystemMessagePage({Key key}) : super(key: key);
@ -41,9 +42,7 @@ class _SystemMessagePageState extends State<SystemMessagePage> {
await NetUtil().dio.get(API.message.readMessage, queryParameters: {
'sysMessageId': model.id,
});
SystemMessageDetailPage(
id: model.id,
).to();
Get.to(() => SystemMessageDetailPage(id: model.id));
},
child: Container(
decoration: BoxDecoration(

@ -58,7 +58,7 @@ class _OpenDoorPageState extends State<OpenDoorPage> {
),
onPressed: () {
Get.back();
CertificationPage().to;
Get.to(() => CertificationPage());
},
),
],

@ -124,13 +124,13 @@ class _OrderDetailsPageState extends State<OrderDetailsPage> {
List<Map<String, dynamic>> listContent, double payPrice) {
return InkWell(
onTap: () {
RefundSelectPage(
bundle: Bundle()
..putMap('details', {
'listContent': listContent,
'payPrice': payPrice,
}),
).to;
Get.to(() => RefundSelectPage(
bundle: Bundle()
..putMap('details', {
'listContent': listContent,
'payPrice': payPrice,
}),
));
},
child: Container(
alignment: Alignment.center,

@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:akuCommunity/base/assets_image.dart';
@ -60,9 +61,9 @@ class _PersonalIndexState extends State<PersonalIndex>
padding: EdgeInsets.all(5.w),
onPressed: () {
if (!userProvider.isLogin)
SignInPage().to();
Get.to(() => SignInPage());
else
UserProfilePage().to();
Get.to(() => UserProfilePage());
},
child: Container(
margin: EdgeInsets.only(left: 32.w),
@ -162,7 +163,7 @@ class _PersonalIndexState extends State<PersonalIndex>
? SizedBox()
: InkWell(
onTap: () {
OrderPage().to;
Get.to(() => OrderPage());
},
child: Row(
mainAxisAlignment: MainAxisAlignment.start,

@ -41,14 +41,14 @@ class _RefundSelectPageState extends State<RefundSelectPage> {
'title': '我要退款',
'subtitle': '没有收到货,与物业协商直接退货',
'fun': () {
RefundApplyPage(
bundle: Bundle()
..putMap('details', {
'listContent': widget.bundle.getMap('details')['listContent'],
'payPrice': widget.bundle.getMap('details')['payPrice'],
'isRefundGood': false
}),
).to;
// RefundApplyPage(
// bundle: Bundle()
// ..putMap('details', {
// 'listContent': widget.bundle.getMap('details')['listContent'],
// 'payPrice': widget.bundle.getMap('details')['payPrice'],
// 'isRefundGood': false
// }),
// );
},
'isRight': true
},
@ -56,14 +56,14 @@ class _RefundSelectPageState extends State<RefundSelectPage> {
'title': '我要退款退货',
'subtitle': '已收到货,需要退还货物',
'fun': () {
RefundApplyPage(
bundle: Bundle()
..putMap('details', {
'listContent': widget.bundle.getMap('details')['listContent'],
'payPrice': widget.bundle.getMap('details')['payPrice'],
'isRefundGood': true
}),
).to;
// RefundApplyPage(
// bundle: Bundle()
// ..putMap('details', {
// 'listContent': widget.bundle.getMap('details')['listContent'],
// 'payPrice': widget.bundle.getMap('details')['payPrice'],
// 'isRefundGood': true
// }),
// );
},
'isRight': true
}

@ -114,14 +114,14 @@ class _UserProfilePageState extends State<UserProfilePage> {
'昵称',
(userProvider.userInfoModel?.nickName ?? '').text.make(),
onPressed: () {
ChangeNickName().to();
Get.to(() => ChangeNickName());
},
),
_buildTile(
'手机号',
TextUtil.hideNumber(userProvider.userInfoModel.tel).text.make(),
onPressed: () {
UpdateTelPage().to();
Get.to(() => UpdateTelPage());
},
),
_buildTile(

@ -176,20 +176,20 @@ class _OrderCardState extends State<OrderCard> {
}
return InkWell(
onTap: () {
switch (buttonName) {
case '评价':
EvaluateGoodPage(
bundle: Bundle()
..putMap('details', {
'listContent': widget.listContent,
}),
).to;
break;
case '查看物流':
LookLogisticsPage().to;
break;
default:
}
// switch (buttonName) {
// case '评价':
// EvaluateGoodPage(
// bundle: Bundle()
// ..putMap('details', {
// 'listContent': widget.listContent,
// }),
// ).to;
// break;
// case '查看物流':
// LookLogisticsPage().to;
// break;
// default:
// }
},
child: Container(
margin: EdgeInsets.only(left: 16.w),
@ -230,17 +230,17 @@ class _OrderCardState extends State<OrderCard> {
Widget build(BuildContext context) {
return InkWell(
onTap: () {
OrderDetailsPage(
bundle: Bundle()
..putMap('details', {
'status': widget.status,
'listContent': widget.listContent,
'totalPrice': widget.totalPrice,
'payPrice': widget.payPrice,
'listButton': widget.listButton,
'listOrderDetail': widget.listOrderDetail,
}),
).to;
// OrderDetailsPage(
// bundle: Bundle()
// ..putMap('details', {
// 'status': widget.status,
// 'listContent': widget.listContent,
// 'totalPrice': widget.totalPrice,
// 'payPrice': widget.payPrice,
// 'listButton': widget.listButton,
// 'listOrderDetail': widget.listOrderDetail,
// }),
// ).to;
},
child: Container(
decoration: BoxDecoration(

@ -8,7 +8,6 @@ import 'package:velocity_x/velocity_x.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/extensions/num_ext.dart';
import 'package:akuCommunity/extensions/page_router.dart';
import 'package:akuCommunity/extensions/widget_list_ext.dart';
import 'package:akuCommunity/pages/setting_page/about_page/about_page.dart';
import 'package:akuCommunity/pages/setting_page/account_manager_page.dart';
@ -81,7 +80,7 @@ class _SettingsPageState extends State<SettingsPage> {
),
onPressed: () {
userProvider.logout();
Get.offAll(()=>TabNavigator());
Get.offAll(() => TabNavigator());
},
),
],
@ -116,7 +115,7 @@ class _SettingsPageState extends State<SettingsPage> {
// ),
_buildTile(
title: '关于小蜜蜂智慧社区',
onTap: () => AboutPage().to(),
onTap: () => Get.to(() => AboutPage()),
),
//TODO
// _buildTile(
@ -139,19 +138,19 @@ class _SettingsPageState extends State<SettingsPage> {
),
_buildTile(
title: '意见反馈',
onTap: FeedBackPage().to,
onTap: () => Get.to(() => FeedBackPage()),
),
_buildTile(
title: '账号管理',
onTap: AccountManagerPage().to,
onTap: () => Get.to(() => AccountManagerPage()),
),
_buildTile(
title: '小蜜蜂用户协议',
onTap: AgreementPage().to,
onTap: () => Get.to(() => AgreementPage()),
),
_buildTile(
title: '小蜜蜂隐私政策',
onTap: PrivacyPage().to,
onTap: () => Get.to(() => PrivacyPage()),
),
].sepWidget(
separate: Divider(

@ -271,7 +271,7 @@ class _SignInPageState extends State<SignInPage> {
FlatButton(
shape: StadiumBorder(),
padding: EdgeInsets.zero,
onPressed: AgreementPage().to,
onPressed: () => Get.to(AgreementPage()),
child: Text(
'《小蜜蜂用户协议》',
style: TextStyle(
@ -282,7 +282,7 @@ class _SignInPageState extends State<SignInPage> {
FlatButton(
shape: StadiumBorder(),
padding: EdgeInsets.zero,
onPressed: PrivacyPage().to,
onPressed: () => Get.to(() => PrivacyPage()),
child: Text(
'《小蜜蜂隐私政策》',
style: TextStyle(

@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:akuCommunity/extensions/page_router.dart';
import 'package:akuCommunity/pages/sign/sign_up/sign_up_pick_building_page.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
@ -22,7 +22,7 @@ class _SignUpPickPlotPageState extends State<SignUpPickPlotPage> {
children: [
ListTile(
title: '五象新区人才公寓'.text.make(),
onTap: SignUpPickBuildingPage().to,
onTap: () => Get.to(SignUpPickBuildingPage()),
).material(color: Colors.white),
],
),

@ -10,7 +10,7 @@ import 'package:velocity_x/velocity_x.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/constants/api.dart';
import 'package:akuCommunity/extensions/num_ext.dart';
import 'package:akuCommunity/extensions/page_router.dart';
import 'package:akuCommunity/model/user/fixed_submit_model.dart';
import 'package:akuCommunity/pages/manager_func.dart';
import 'package:akuCommunity/pages/things_page/widget/add_fixed_submit_page.dart';
@ -87,7 +87,7 @@ class _FixedSubmitPageState extends State<FixedSubmitPage> {
curve: Curves.easeInOutCubic,
child: GestureDetector(
onTap: () {
FixedDetailPage(model.id).to();
Get.to(() => FixedDetailPage(model.id));
},
child: Container(
width: 686.w,

@ -1,182 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:akuCommunity/pages/things_page/things_evaluate_page/things_evaluate_page.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:akuCommunity/widget/expandable_text.dart';
import 'package:akuCommunity/widget/views/horizontal_image_view.dart';
import 'widget/goods_info_card.dart';
class ThingsDetailPage extends StatefulWidget {
final Bundle bundle;
ThingsDetailPage({Key key, this.bundle}) : super(key: key);
@override
_ThingsDetailPageState createState() => _ThingsDetailPageState();
}
class _ThingsDetailPageState extends State<ThingsDetailPage> {
void againRouter() {
ThingsEvaluatePage(
bundle: Bundle()..putMap('details', {'title': '继续提问', 'isShow': false}),
).to;
}
Widget _containerCard(
String tag, String content, String time, List<String> imageList) {
return Container(
padding: EdgeInsets.only(
top: 46.w,
left: 33.w,
right: 44.w,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
tag,
style: TextStyle(
fontSize: 38.sp,
color: Color(0xff333333),
),
),
SizedBox(height: 30.w),
ExpandableText(
text: content,
maxLines: 2,
style: TextStyle(
fontSize: 28.sp,
color: Color(0xff666666),
),
expand: false,
),
SizedBox(height: 29.w),
imageList.length != 0 ? HorizontalImageView(imageList) : SizedBox(),
SizedBox(height: 24.w),
Text(
time,
style: TextStyle(
fontSize: 24.sp,
color: Color(0xff999999),
),
),
],
),
);
}
Widget _positionedButton() {
return Positioned(
bottom: 0,
child: InkWell(
onTap: () {
switch (widget.bundle.getMap('things')['isRepair']) {
case true:
break;
case false:
againRouter();
break;
default:
}
},
child: Container(
alignment: Alignment.center,
height: 98.w,
width: 750.w,
padding: EdgeInsets.symmetric(vertical: 26.5.w),
color: Color(0xffffc40c),
child: Text(
widget.bundle.getMap('things')['isRepair'] ? '确认完成' : '继续提问',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 32.sp,
color: Color(0xff333333),
),
),
),
),
);
}
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '查看详情',
actions: [
widget.bundle.getMap('things')['isRepair']
? SizedBox()
: InkWell(
onTap: () {},
child: Container(
padding: EdgeInsets.fromLTRB(32.w, 28.w, 32.w, 20.w),
child: '评价'.text.black.size(28.sp).make(),
alignment: Alignment.center,
),
)
],
body: Container(
color: Colors.white,
child: Stack(
children: [
widget.bundle.getMap('things')['isRepair']
? ListView(
padding: EdgeInsets.only(bottom: 108.w),
children: [
GoodsInfoCard(
status: widget.bundle.getMap('things')['time'],
listImage: widget.bundle.getMap('things')['imageList'],
infodetails: widget.bundle.getMap('things')['content'],
isShow: false,
),
GoodsInfoCard(
status: widget.bundle.getMap('things')['time'],
detoInfoList: [
{'title': '订单编号', 'content': 'LC20200630064682'},
{'title': '下单时间', 'content': '2020-06-30 22:54:30'},
{'title': '派单类型', 'content': '无偿服务'},
{'title': '维修人员', 'content': '王珂'},
{'title': '分配人', 'content': '马泽鹏'},
],
isShow: false,
),
GoodsInfoCard(
status: widget.bundle.getMap('things')['time'],
detoInfoList: [
{'title': '报修时间', 'content': '2020-06-30 10:23'},
{'title': '管家分派', 'content': '2020-06-30 13:54'},
{'title': '师傅接单', 'content': '2020-06-30 14:30'},
{'title': '回访', 'content': '2020-06-31 12:30'},
],
isShow: true,
),
],
)
: ListView(
padding: EdgeInsets.only(bottom: 108.w),
children: [
_containerCard(
'您的建议',
widget.bundle.getMap('things')['content'],
widget.bundle.getMap('things')['time'],
widget.bundle.getMap('things')['imageList'],
),
SizedBox(height: 3.w),
_containerCard(
'物业回复',
widget.bundle.getMap('things')['content'],
widget.bundle.getMap('things')['time'],
<String>[],
),
],
),
_positionedButton(),
],
),
),
);
}
}

@ -1,157 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'goods_info_card_button.dart';
import 'image_horizontal_list.dart';
class GoodsInfoCard extends StatelessWidget {
final List<String> listImage;
final String status, infodetails;
final List<Map<String, dynamic>> detoInfoList;
final bool isShow;
GoodsInfoCard(
{Key key,
this.listImage,
this.status,
this.detoInfoList,
this.isShow,
this.infodetails})
: super(key: key);
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(
top: 32.w,
left: 32.w,
right: 32.w,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(6)),
),
child: Column(
children: [
Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(6),
topRight: Radius.circular(6),
),
boxShadow: <BoxShadow>[
BoxShadow(
color: Colors.grey.withOpacity(0.2),
offset: Offset(1.1, 1.1),
blurRadius: 10.0),
],
),
padding: EdgeInsets.only(top: 25.w, left: 24.w, right: 24.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: EdgeInsets.only(bottom: 24.w),
decoration: BoxDecoration(
border: Border(
bottom:
BorderSide(color: Color(0xffeeeeee), width: 0.5)),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'出户信息',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 32.sp,
color: Color(0xff333333)),
),
Text(status,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 28.sp,
color: Color(0xff333333))),
],
),
),
Container(
padding: EdgeInsets.only(
bottom: 33.w,
top: 16.w,
),
decoration: BoxDecoration(
border: Border(
bottom:
BorderSide(color: Color(0xffeeeeee), width: 0.5)),
),
child: infodetails != null
? Container(
width: 630.w,
child: Text(
infodetails,
style: TextStyle(
fontSize: 28.sp, color: Color(0xff333333)),
),
)
: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: detoInfoList
.map(
(item) => Container(
padding: EdgeInsets.only(top: 8.w),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text(
item['title'],
style: TextStyle(
fontSize: 28.sp,
color: Color(0xff999999)),
),
Text(
item['content'],
style: TextStyle(
fontSize: 28.sp,
color: Color(0xff333333)),
),
],
),
),
)
.toList(),
),
),
listImage != null
? Container(
margin: EdgeInsets.only(
top: 19.w,
bottom: 30.w,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(bottom: 25.w),
child: Text(
'图片信息',
style: TextStyle(
fontSize: 28.sp, color: Color(0xff333333)),
),
),
ImageHorizontalList(imageUrl: listImage),
],
),
)
: SizedBox(),
],
),
),
isShow ? GoodsInfoCardButton() : SizedBox()
],
),
);
}
}

@ -1,140 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:get/get.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:akuCommunity/pages/goods_deto_page/deto_code_page/deto_code_page.dart';
import 'package:akuCommunity/utils/headers.dart';
class GoodsInfoCardButton extends StatelessWidget {
GoodsInfoCardButton({Key key}) : super(key: key);
final List<Map<String, dynamic>> _listButton = [
{'title': '查看二维码', 'icon': MaterialCommunityIcons.qrcode},
{'title': '搬家公司', 'icon': SimpleLineIcons.phone}
];
Future<void> _phoneCall(String url) async {
if (await canLaunch(url)) {
await launch(url);
} else {
throw 'Could not launch $url';
}
}
void _showDialog(BuildContext context, String url) {
showCupertinoDialog(
context: context,
builder: (context) {
return CupertinoAlertDialog(
title: Text(
url,
style: TextStyle(
fontSize: 34.sp,
color: Color(0xff030303),
),
),
actions: <Widget>[
CupertinoDialogAction(
child: Text(
'取消',
style: TextStyle(
fontSize: 34.sp,
color: Color(0xff333333),
),
),
onPressed: () {
Get.back();
},
),
CupertinoDialogAction(
child: Text(
'呼叫',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 34.sp,
color: Color(0xffff8200),
),
),
onPressed: () {
_phoneCall('tel:$url');
Get.back();
},
),
],
);
},
);
}
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.6),
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(6),
bottomRight: Radius.circular(6),
),
),
height: 96.w,
child: Row(
children: _listButton
.asMap()
.keys
.map((index) => Expanded(
child: InkWell(
onTap: () {
switch (_listButton[index]['title']) {
case '查看二维码':
DetoCodePage().to;
break;
case '搬家公司':
_showDialog(context, '0574-88467897');
break;
default:
}
},
child: Container(
alignment: Alignment.center,
padding: EdgeInsets.symmetric(
vertical: 26.5.w,
),
decoration: BoxDecoration(
border: Border(
right: BorderSide(
color: Color(0xffeeeeee),
width: index == _listButton.length - 1 ? 0 : 0.5),
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Icon(
_listButton[index]['icon'],
size: 36.sp,
color: Color(0xff333333),
),
Container(
margin: EdgeInsets.only(left: 14.w),
child: Text(
_listButton[index]['title'],
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 32.sp,
color: Color(0xff333333),
),
),
),
],
),
),
),
))
.toList(),
),
);
}
}

@ -1,64 +0,0 @@
import 'dart:math';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/utils/fade_route.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/gallery_photo_view_wrapper.dart';
class ImageHorizontalList extends StatelessWidget {
final List<String> imageUrl;
ImageHorizontalList({Key key, this.imageUrl}) : super(key: key);
final Random _random = new Random();
int next(int min, int max) => min + _random.nextInt(max - min);
List imageModel() {
List imgList = List();
for (int x = 0; x < imageUrl.length; x++) {
GalleryExampleItem item = GalleryExampleItem();
item.id = '${next(x + 100, x + 1000)}';
item.resource = imageUrl[x];
imgList.add(item);
}
return imgList;
}
@override
Widget build(BuildContext context) {
return Container(
height: 184.w,
child: ListView.builder(
shrinkWrap: true,
scrollDirection: Axis.horizontal,
itemBuilder: (BuildContext context, int index) {
return AspectRatio(
aspectRatio: 1,
child: Container(
margin: EdgeInsets.only(right: 16.w),
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(4)),
child: GalleryExampleItemThumbnail(
galleryExampleItem: imageModel()[index],
onTap: () {
Navigator.of(context).push(new FadeRoute(
page: GalleryPhotoViewWrapper(
galleryItems: imageModel(),
backgroundDecoration: const BoxDecoration(
color: Colors.black,
),
initialIndex: index,
),
));
},
),
),
),
);
},
itemCount: imageUrl.length,
),
);
}
}

@ -16,7 +16,7 @@ import 'package:velocity_x/velocity_x.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/const/resource.dart';
import 'package:akuCommunity/constants/api.dart';
import 'package:akuCommunity/extensions/page_router.dart';
import 'package:akuCommunity/extensions/widget_list_ext.dart';
import 'package:akuCommunity/pages/life_pay/widget/my_house_page.dart';
import 'package:akuCommunity/pages/manager_func.dart';

@ -1,112 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/pages/things_page/things_detail_page/things_detail_page.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/expandable_text.dart';
import 'package:akuCommunity/widget/views/horizontal_image_view.dart';
class ThingsCard extends StatefulWidget {
final String time, tag, content;
final List<String> imageList;
final bool isRepair;
ThingsCard(
{this.time,
this.tag,
this.content,
this.imageList,
this.isRepair,
Key key})
: super(key: key);
@override
_ThingsCardState createState() => _ThingsCardState();
}
class _ThingsCardState extends State<ThingsCard> {
void detailRouter() {
ThingsDetailPage(
bundle: Bundle()
..putMap('things', {
'isRepair': widget.isRepair,
'content': widget.content,
'time': widget.time,
'imageList': widget.imageList,
}),
).to;
}
InkWell _inkWellPropose(
String time, String tag, String content, List<String> imageList) {
return InkWell(
onTap: detailRouter,
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
time,
style: TextStyle(
fontSize: 32.sp,
color: Color(0xff333333),
),
),
Text(
tag,
style: TextStyle(
fontSize: 24.sp,
color: Color(0xffff8200),
),
),
],
),
SizedBox(height: 24.w),
Divider(height: 0.5),
SizedBox(height: 24.w),
ExpandableText(
text: content,
maxLines: 2,
style: TextStyle(
fontSize: 28.sp,
color: Color(0xff333333),
),
expand: false,
),
SizedBox(height: 29.w),
imageList.length != 0 ? HorizontalImageView(imageList) : SizedBox()
],
),
),
);
}
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
color: Color(0xffffffff),
borderRadius: BorderRadius.all(Radius.circular(8))),
margin: EdgeInsets.only(
left: 32.w,
right: 32.w,
top: 20.w,
),
padding: EdgeInsets.only(
left: 28.w,
right: 28.w,
top: 21.w,
bottom: 24.w,
),
child: _inkWellPropose(
widget.time,
widget.tag,
widget.content,
widget.imageList,
),
);
}
}

@ -1,36 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'things_card.dart';
class ThingsList extends StatefulWidget {
final List<Map<String, dynamic>> listCard;
final bool isRepair;
ThingsList({Key key, this.listCard, this.isRepair}) : super(key: key);
@override
_ThingsListState createState() => _ThingsListState();
}
class _ThingsListState extends State<ThingsList>
with AutomaticKeepAliveClientMixin {
@override
bool get wantKeepAlive => true;
@override
Widget build(BuildContext context) {
super.build(context);
return ListView.builder(
padding: EdgeInsets.only(bottom: 98.w),
itemBuilder: (context, index) => ThingsCard(
time: widget.listCard[index]['time'],
tag: widget.listCard[index]['tag'],
content: widget.listCard[index]['content'],
imageList: widget.listCard[index]['imageList'],
isRepair: widget.isRepair,
),
itemCount: widget.listCard.length,
);
}
}

@ -288,7 +288,7 @@ class _VisitorAccessPageState extends State<VisitorAccessPage> {
MaterialButton(
padding: EdgeInsets.symmetric(horizontal: 20.w),
onPressed: () {
VisitorRecordPage().to();
Get.to(() => VisitorRecordPage());
},
child: '访客记录'.text.black.size(28.sp).make(),
)

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flustars/flustars.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:akuCommunity/const/resource.dart';
@ -25,7 +26,7 @@ class ActivityCard extends StatelessWidget {
clipBehavior: Clip.antiAlias,
color: Colors.white,
padding: EdgeInsets.zero,
onPressed: ActivityDetailPage(id: model.id).to,
onPressed: () => Get.to(() => ActivityDetailPage(id: model.id)),
elevation: 0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.w),
@ -87,7 +88,11 @@ class ActivityCard extends StatelessWidget {
height: 44.w,
minWidth: 120.w,
disabledColor: Color(0xFFABABAB),
onPressed: outdate ? null : ActivityDetailPage(id: model.id).to,
onPressed: outdate
? null
: () {
Get.to(() => ActivityDetailPage(id: model.id));
},
child: outdate
? '已结束'.text.size(20.sp).bold.make()
: '去看看'.text.size(20.sp).bold.make(),

@ -59,7 +59,7 @@ class _CommunityPageState extends State<CommunityPage>
ColumnActionButton(
onPressed: () {
if (LoginUtil.isNotLogin) return;
MessageCenter().to();
Get.to(() => MessageCenter());
},
title: '消息',
path: R.ASSETS_ICONS_ALARM_PNG,

@ -75,7 +75,7 @@ class _HomeNotificationState extends State<HomeNotification> {
shape: StadiumBorder(),
padding: EdgeInsets.symmetric(horizontal: 12.w),
onPressed: () {
NoticePage().to();
Get.to(() => NoticePage());
},
child: Row(
children: [

@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flustars/flustars.dart';
import 'package:flutter_rating_bar/flutter_rating_bar.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:akuCommunity/base/base_style.dart';
@ -53,7 +54,7 @@ class _AdviceCardState extends State<AdviceCard> {
elevation: 0,
padding: EdgeInsets.zero,
color: Colors.white,
onPressed: AdviceDetailPage(model: widget.model).to,
onPressed: () => Get.to(() => AdviceDetailPage(model: widget.model)),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.w),
),

@ -163,7 +163,8 @@ class _AdviceDetailPageState extends State<AdviceDetailPage> {
title: '查看详情',
actions: [
FlatButton(
onPressed: AdviceEvaluatePage(id: widget.model.id).to,
onPressed: () =>
Get.to(() => AdviceEvaluatePage(id: widget.model.id)),
child: '评价'.text.make(),
),
],

@ -254,10 +254,10 @@ class _QuestionnaireDetailPageState extends State<QuestionnaireDetailPage> {
onPressed: () async {
BaseModel baseModel =
await ManagerFunc.questionnaireSubmit(widget.id, _submitModels);
SubmitComplishPage(
status: baseModel.status,
message: baseModel.message,
).to();
Get.to(() => SubmitComplishPage(
status: baseModel.status,
message: baseModel.message,
));
},
),
);

@ -11,6 +11,7 @@ import 'package:akuCommunity/ui/manager/questionnaire/questionnaire_detail_page.
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:akuCommunity/widget/others/stack_avatar.dart';
import 'package:get/get.dart';
class QuestionnairePage extends StatefulWidget {
QuestionnairePage({Key key}) : super(key: key);
@ -43,9 +44,9 @@ class _QuestionnairePageState extends State<QuestionnairePage> {
Widget _buildCard(QuestionnaireModel model) {
return GestureDetector(
onTap: () {
QuestionnaireDetailPage(
id: model.id,
).to();
Get.to(() => QuestionnaireDetailPage(
id: model.id,
));
},
child: Container(
decoration: BoxDecoration(
@ -126,9 +127,9 @@ class _QuestionnairePageState extends State<QuestionnairePage> {
// EdgeInsets.symmetric(horizontal: 30.w, vertical: 8.w),
elevation: 0,
onPressed: () {
QuestionnaireDetailPage(
id: model.id,
).to();
Get.to(() => QuestionnaireDetailPage(
id: model.id,
));
},
child: (_getButtonText(model.status))
.text

@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flustars/flustars.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:akuCommunity/model/manager/visitor_list_item_model.dart';
@ -58,7 +59,7 @@ class _VisitorListItemState extends State<VisitorListItem> {
return MaterialButton(
onPressed: () {
if (!outDate) {
VisitorPassportPage(model: widget.model).to();
Get.to(() => VisitorPassportPage(model: widget.model));
}
},
color: Colors.white,

@ -1,5 +1,4 @@
export 'package:flutter_screenutil/flutter_screenutil.dart';
export 'package:akuCommunity/extensions/page_router.dart';
export 'package:akuCommunity/extensions/num_ext.dart';
export 'package:akuCommunity/extensions/widget_list_ext.dart';
export 'package:velocity_x/velocity_x.dart';

@ -5,6 +5,7 @@ import 'package:akuCommunity/pages/market/market_cart_page/market_cart_page.dart
import 'package:akuCommunity/pages/market_class/market_class_page.dart';
import 'package:akuCommunity/pages/message_center_page/message_center_page.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:get/get.dart';
class AppBarAction extends StatefulWidget {
final IconData icon;
@ -43,13 +44,13 @@ class _AppBarActionState extends State<AppBarAction> {
case '扫一扫':
break;
case '消息':
MessageCenterPage().to;
Get.to(() => MessageCenterPage());
break;
case '购物车':
MarketCartPage().to;
Get.to(() => MarketCartPage());
break;
case '分类':
MarketClassPage().to;
Get.to(() => MarketClassPage());
break;
default:
}

@ -286,16 +286,16 @@ class _GoodsSpecsSheetState extends State<GoodsSpecsSheet> {
widget.itempic);
break;
case '立即购买':
ConfirmOrderPage(
bundle: Bundle()
..putMap('cartMap', {
'itemid': widget.itemid,
'itemtitle': widget.itemtitle,
'itemprice': widget.itemprice,
'itempic': widget.itempic,
'count': count
}),
).to;
Get.to(() => ConfirmOrderPage(
bundle: Bundle()
..putMap('cartMap', {
'itemid': widget.itemid,
'itemtitle': widget.itemtitle,
'itemprice': widget.itemprice,
'itempic': widget.itempic,
'count': count
}),
));
break;
case '请选择规格':
BotToast.showText(text: '已添加入购物车');

@ -1,75 +0,0 @@
import 'package:akuCommunity/constants/app_values.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/pages/life_pay/widget/my_house_page.dart';
import 'package:akuCommunity/provider/user_provider.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bee_divider.dart';
class BeeHeaderHouse extends StatefulWidget {
BeeHeaderHouse({Key key}) : super(key: key);
@override
_BeeHeaderHouseState createState() => _BeeHeaderHouseState();
}
class _BeeHeaderHouseState extends State<BeeHeaderHouse> {
@override
Widget build(BuildContext context) {
UserProvider userProvider = Provider.of<UserProvider>(context);
return Material(
color: Colors.transparent,
child: Padding(
padding: EdgeInsets.all(32.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
'当前房屋'.text.black.size(28.sp).make(),
32.w.heightBox,
GestureDetector(
onTap: () {
MyHousePage(
needFindPayTag: true,
).to();
},
child: Row(
children: [
Image.asset(
R.ASSETS_ICONS_HOUSE_PNG,
width: 60.w,
height: 60.w,
),
40.w.widthBox,
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppValues.plotName.text.black.size(32.sp).bold.make(),
10.w.heightBox,
userProvider.currentHouse.text.black
.size(32.sp)
.bold
.make()
],
),
),
Icon(
CupertinoIcons.chevron_forward,
size: 40.w,
),
],
).material(color: Colors.transparent),
),
24.w.heightBox,
BeeDivider.horizontal()
],
),
),
);
}
}

@ -26,7 +26,7 @@ class SliverGoodsCard extends StatelessWidget {
bundle: Bundle()
..putString(
'shoplist', json.encode(shoplist[index]).toString()),
).to;
);
},
child: Container(
color: Colors.white,
@ -104,7 +104,7 @@ class SliverGoodsCard extends StatelessWidget {
json
.encode(shoplist[index])
.toString()),
).to;
);
},
child: Container(
width: 134.w,

Loading…
Cancel
Save