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

@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
import 'package:akuCommunity/base/base_style.dart'; import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/pages/confirm_order_page/pay_order_page.dart'; import 'package:akuCommunity/pages/confirm_order_page/pay_order_page.dart';
import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/utils/headers.dart';
import 'package:get/get.dart';
class ConfirmBottomBar extends StatelessWidget { class ConfirmBottomBar extends StatelessWidget {
final Map cartMap; final Map cartMap;
@ -35,7 +36,7 @@ class ConfirmBottomBar extends StatelessWidget {
Widget _submit(BuildContext context) { Widget _submit(BuildContext context) {
return InkWell( return InkWell(
onTap: () { onTap: () {
PayOrderPage().to(); Get.to(()=>PayOrderPage());
}, },
child: Container( child: Container(
decoration: BoxDecoration( 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/utils/headers.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:akuCommunity/widget/others/stack_avatar.dart'; import 'package:akuCommunity/widget/others/stack_avatar.dart';
import 'package:get/get.dart';
class EventVotingPage extends StatefulWidget { class EventVotingPage extends StatefulWidget {
EventVotingPage({Key key}) : super(key: key); EventVotingPage({Key key}) : super(key: key);
@ -108,9 +109,7 @@ class _EventVotingPageState extends State<EventVotingPage> {
// EdgeInsets.symmetric(horizontal: 30.w, vertical: 8.w), // EdgeInsets.symmetric(horizontal: 30.w, vertical: 8.w),
elevation: 0, elevation: 0,
onPressed: () { onPressed: () {
VotingDetailPage( Get.to(() => VotingDetailPage(id: model.id));
id: model.id,
).to();
}, },
child: (_getButtonText(model.status)) child: (_getButtonText(model.status))
.text .text

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

@ -87,7 +87,7 @@ class _GoodsAppBarState extends State<GoodsAppBar> {
color: Color(0xff666666), color: Color(0xff666666),
), ),
onPressed: () { 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_icons/flutter_icons.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:provider/provider.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/pages/market/market_cart_page/market_cart_page.dart';
import 'package:akuCommunity/provider/cart.dart'; import 'package:akuCommunity/provider/cart.dart';
import 'package:akuCommunity/widget/goods_specs_sheet.dart'; import 'package:akuCommunity/widget/goods_specs_sheet.dart';
@ -113,7 +113,7 @@ class _GoodsDetailsBottomBarState extends State<GoodsDetailsBottomBar> {
], ],
), ),
onTap: () { onTap: () {
MarketCartPage().to(); Get.to(() => MarketCartPage());
}, },
), ),
SizedBox(width: 53.w), SizedBox(width: 53.w),

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

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

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

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

@ -6,11 +6,11 @@ import 'package:flutter/material.dart';
import 'package:badges/badges.dart'; import 'package:badges/badges.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:velocity_x/velocity_x.dart'; import 'package:velocity_x/velocity_x.dart';
import 'package:akuCommunity/const/resource.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/aku_shop_model.dart';
import 'package:akuCommunity/model/community/activity_item_model.dart'; import 'package:akuCommunity/model/community/activity_item_model.dart';
import 'package:akuCommunity/model/community/board_model.dart'; import 'package:akuCommunity/model/community/board_model.dart';
@ -75,7 +75,7 @@ class _HomePageState extends State<HomePage>
child: ColumnActionButton( child: ColumnActionButton(
onPressed: () { onPressed: () {
if (LoginUtil.isNotLogin) return; if (LoginUtil.isNotLogin) return;
MessageCenterPage().to(); Get.to(() => MessageCenterPage());
}, },
title: '消息', title: '消息',
path: R.ASSETS_ICONS_ALARM_PNG, path: R.ASSETS_ICONS_ALARM_PNG,
@ -150,7 +150,7 @@ class _HomePageState extends State<HomePage>
HomeTitle( HomeTitle(
title: '社区活动', title: '社区活动',
suffixTitle: '更多活动', suffixTitle: '更多活动',
onTap: ActivityListPage().to, onTap: () => Get.to(() => ActivityListPage()),
), ),
_activityItemModel == null _activityItemModel == null
? SizedBox() ? 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/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:get/get.dart';
import '../widget/submit_bar.dart'; import '../widget/submit_bar.dart';
import 'widget/details_card.dart'; import 'widget/details_card.dart';
@ -26,7 +27,7 @@ class _LifePayInfoPageState extends State<LifePayInfoPage> {
ListView( ListView(
padding: EdgeInsets.only(bottom: 130.w), padding: EdgeInsets.only(bottom: 130.w),
children: [ children: [
DetailsCard(fun: LifePayBillPage().to), DetailsCard(fun: () => Get.to(() => LifePayBillPage())),
], ],
), ),
Positioned( Positioned(

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

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

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

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

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

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

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

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

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

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

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

@ -1,8 +1,8 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.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/pages/sign/sign_up/sign_up_pick_building_page.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:akuCommunity/widget/bee_scaffold.dart';
@ -22,7 +22,7 @@ class _SignUpPickPlotPageState extends State<SignUpPickPlotPage> {
children: [ children: [
ListTile( ListTile(
title: '五象新区人才公寓'.text.make(), title: '五象新区人才公寓'.text.make(),
onTap: SignUpPickBuildingPage().to, onTap: () => Get.to(SignUpPickBuildingPage()),
).material(color: Colors.white), ).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/base/base_style.dart';
import 'package:akuCommunity/constants/api.dart'; import 'package:akuCommunity/constants/api.dart';
import 'package:akuCommunity/extensions/num_ext.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/model/user/fixed_submit_model.dart';
import 'package:akuCommunity/pages/manager_func.dart'; import 'package:akuCommunity/pages/manager_func.dart';
import 'package:akuCommunity/pages/things_page/widget/add_fixed_submit_page.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, curve: Curves.easeInOutCubic,
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: () {
FixedDetailPage(model.id).to(); Get.to(() => FixedDetailPage(model.id));
}, },
child: Container( child: Container(
width: 686.w, 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/base/base_style.dart';
import 'package:akuCommunity/const/resource.dart'; import 'package:akuCommunity/const/resource.dart';
import 'package:akuCommunity/constants/api.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/extensions/widget_list_ext.dart';
import 'package:akuCommunity/pages/life_pay/widget/my_house_page.dart'; import 'package:akuCommunity/pages/life_pay/widget/my_house_page.dart';
import 'package:akuCommunity/pages/manager_func.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( MaterialButton(
padding: EdgeInsets.symmetric(horizontal: 20.w), padding: EdgeInsets.symmetric(horizontal: 20.w),
onPressed: () { onPressed: () {
VisitorRecordPage().to(); Get.to(() => VisitorRecordPage());
}, },
child: '访客记录'.text.black.size(28.sp).make(), child: '访客记录'.text.black.size(28.sp).make(),
) )

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

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

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

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

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

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

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

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

@ -1,5 +1,4 @@
export 'package:flutter_screenutil/flutter_screenutil.dart'; 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/num_ext.dart';
export 'package:akuCommunity/extensions/widget_list_ext.dart'; export 'package:akuCommunity/extensions/widget_list_ext.dart';
export 'package:velocity_x/velocity_x.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/market_class/market_class_page.dart';
import 'package:akuCommunity/pages/message_center_page/message_center_page.dart'; import 'package:akuCommunity/pages/message_center_page/message_center_page.dart';
import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/utils/headers.dart';
import 'package:get/get.dart';
class AppBarAction extends StatefulWidget { class AppBarAction extends StatefulWidget {
final IconData icon; final IconData icon;
@ -43,13 +44,13 @@ class _AppBarActionState extends State<AppBarAction> {
case '扫一扫': case '扫一扫':
break; break;
case '消息': case '消息':
MessageCenterPage().to; Get.to(() => MessageCenterPage());
break; break;
case '购物车': case '购物车':
MarketCartPage().to; Get.to(() => MarketCartPage());
break; break;
case '分类': case '分类':
MarketClassPage().to; Get.to(() => MarketClassPage());
break; break;
default: default:
} }

@ -286,7 +286,7 @@ class _GoodsSpecsSheetState extends State<GoodsSpecsSheet> {
widget.itempic); widget.itempic);
break; break;
case '立即购买': case '立即购买':
ConfirmOrderPage( Get.to(() => ConfirmOrderPage(
bundle: Bundle() bundle: Bundle()
..putMap('cartMap', { ..putMap('cartMap', {
'itemid': widget.itemid, 'itemid': widget.itemid,
@ -295,7 +295,7 @@ class _GoodsSpecsSheetState extends State<GoodsSpecsSheet> {
'itempic': widget.itempic, 'itempic': widget.itempic,
'count': count 'count': count
}), }),
).to; ));
break; break;
case '请选择规格': case '请选择规格':
BotToast.showText(text: '已添加入购物车'); 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() bundle: Bundle()
..putString( ..putString(
'shoplist', json.encode(shoplist[index]).toString()), 'shoplist', json.encode(shoplist[index]).toString()),
).to; );
}, },
child: Container( child: Container(
color: Colors.white, color: Colors.white,
@ -104,7 +104,7 @@ class SliverGoodsCard extends StatelessWidget {
json json
.encode(shoplist[index]) .encode(shoplist[index])
.toString()), .toString()),
).to; );
}, },
child: Container( child: Container(
width: 134.w, width: 134.w,

Loading…
Cancel
Save