LIFE IS SHORT

BUT WE ARE WASTING TIME  TO DELETE THOSE SHHHHH*T CODES.
hmxc
小赖 4 years ago
parent 942f1a94f0
commit e5714f6865

@ -1,3 +1,5 @@
//TODO CLEAN BOTTOM CODES.
@Deprecated("sh*t assets_image need to be cleaned.")
class AssetsImage { class AssetsImage {
static const TAB_HOME_UNSELECT = 'assets/icons/tabbar_home_no.png'; static const TAB_HOME_UNSELECT = 'assets/icons/tabbar_home_no.png';

@ -7,87 +7,26 @@ import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/widget/activity_card.dart'; import 'package:akuCommunity/widget/activity_card.dart';
class ActivitiesPage extends StatefulWidget { class ActivitiesPage extends StatefulWidget {
final Bundle bundle; ActivitiesPage({Key key}) : super(key: key);
ActivitiesPage({Key key, this.bundle}) : super(key: key);
@override @override
_ActivitiesPageState createState() => _ActivitiesPageState(); _ActivitiesPageState createState() => _ActivitiesPageState();
} }
class _ActivitiesPageState extends State<ActivitiesPage> { class _ActivitiesPageState extends State<ActivitiesPage> {
List<String> images = [ List<String> images = [];
"https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1151143562,4115642159&fm=26&gp=0.jpg",
"https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=2551412680,857245643&fm=26&gp=0.jpg",
"https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3604827221,1047385274&fm=26&gp=0.jpg",
];
List<Map<String, dynamic>> _listView = []; List<Map<String, dynamic>> _listView = [];
List<Map<String, dynamic>> _listVote = [ List<Map<String, dynamic>> _listVote = [];
{
'imagePath':
'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1600058454436&di=76f6d526c4108b582c540d24bad316d8&imgtype=0&src=http%3A%2F%2Fimg003.hc360.cn%2Fm2%2FM00%2FFD%2FB9%2FwKhQclRLWoqEAosNAAAAABnzxUo896.jpg',
'title': '为优秀点赞2020第一届最美服务之星评选',
'subtitleFirst': '快来为你支持的保洁员投票吧!~',
'subtitleSecond': '06月17日 12:00至06月27日18:30',
'isOver': false,
'isVoteOver': true,
},
{
'imagePath':
'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1600058583164&di=04000bc0e0394edb0c74f7c8fa0efcb2&imgtype=0&src=http%3A%2F%2Fn.sinaimg.cn%2Ftranslate%2F161%2Fw1080h681%2F20180814%2FzWKK-hhtfwqr0303774.jpg',
'title': '投票!选出你心中“乘风破浪的绿化保卫员”',
'subtitleFirst': '建设美丽的边疆,爱护我们的家园',
'subtitleSecond': '04月17日 13:00至04月23日18:30',
'isOver': false,
'isVoteOver': true,
},
{
'imagePath':
'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1600058626924&di=568c1c35b47e6c8bb762f71a883c9e09&imgtype=0&src=http%3A%2F%2Fimg.soufunimg.com%2Fnews%2F2015_11%2F26%2F1448505277039.jpg',
'title': '特别忠诚,在生死抉择的时刻,他把人民利益举过他把人民利益举过……',
'subtitleFirst': '平凡服务者,最美保安员',
'subtitleSecond': '04月12日 12:00至04月15日18:30',
'isOver': true,
'isVoteOver': false,
}
];
List<Map<String, dynamic>> _listEnter = [ List<Map<String, dynamic>> _listEnter = [];
{
'imagePath':
'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3786472598,2225627644&fm=26&gp=0.jpg',
'title': '宁化社区第一届煎蛋比赛报名开始',
'subtitleFirst': '活动室二楼',
'subtitleSecond': '06月17日 12:00至06月27日18:30',
'isOver': false,
'isVoteOver': true,
},
{
'imagePath':
'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1600339523640&di=be179b5e314f9e198c000e7726affef6&imgtype=0&src=http%3A%2F%2Fa.hiphotos.baidu.com%2Fbaike%2Fpic%2Fitem%2F7e3e6709c93d70cf7371f1f3f1dcd100bba12b40.jpg',
'title': '美嘉社区第三届六一亲子活动开始啦',
'subtitleFirst': '中央活动区',
'subtitleSecond': '04月17日 13:00至04月23日18:30',
'isOver': false,
'isVoteOver': true,
},
{
'imagePath':
'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=347834970,829932821&fm=26&gp=0.jpg',
'title': '生命在与运动,华侨小区拔河比赛开始',
'subtitleFirst': '小区外围体育馆',
'subtitleSecond': '04月12日 12:00至04月15日18:30',
'isOver': true,
'isVoteOver': false,
}
];
RefreshController _refreshController = RefreshController _refreshController =
RefreshController(initialRefresh: false); RefreshController(initialRefresh: false);
@override @override
void initState() { void initState() {
super.initState(); super.initState();
_listView = widget.bundle.getBool('isVote') ? _listVote : _listEnter; _listView = _listVote;
} }
void _onRefresh() async { void _onRefresh() async {
@ -105,17 +44,7 @@ class _ActivitiesPageState extends State<ActivitiesPage> {
void detailsRouter(String imagePath, title, bool isOver, isVote, isVoteOver, void detailsRouter(String imagePath, title, bool isOver, isVote, isVoteOver,
List<String> memberList) { List<String> memberList) {
Get.to(ActivitiesPage( Get.to(ActivitiesPage());
bundle: Bundle()
..putMap('details', {
'title': title,
'imagePath': imagePath,
'isOver': isOver,
'isVote': isVote,
'isVoteOver': isVoteOver,
'memberList': memberList
}),
));
} }
@override @override
@ -148,7 +77,7 @@ class _ActivitiesPageState extends State<ActivitiesPage> {
subtitleSecond: _listView[index]['subtitleSecond'], subtitleSecond: _listView[index]['subtitleSecond'],
memberList: images, memberList: images,
isOver: _listView[index]['isOver'], isOver: _listView[index]['isOver'],
isVote: widget.bundle.getBool('isVote'), isVote: false,
isVoteOver: _listView[index]['isVoteOver'], isVoteOver: _listView[index]['isVoteOver'],
fun: detailsRouter, fun: detailsRouter,
), ),

@ -4,7 +4,6 @@ import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/base/assets_image.dart'; import 'package:akuCommunity/base/assets_image.dart';
import 'package:akuCommunity/widget/common_image_picker.dart';
import 'package:akuCommunity/widget/bottom_button.dart'; import 'package:akuCommunity/widget/bottom_button.dart';
import 'widget/common_radio.dart'; import 'widget/common_radio.dart';
import 'widget/common_picker.dart'; import 'widget/common_picker.dart';
@ -188,7 +187,7 @@ class _DetoCreatePageState extends State<DetoCreatePage> {
), ),
), ),
), ),
GridImagePicker(), GridImagePicker(onChange: (files) {}),
], ],
), ),
), ),

@ -7,7 +7,6 @@ import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:akuCommunity/widget/bottom_button.dart'; import 'package:akuCommunity/widget/bottom_button.dart';
import 'widget/goods_info_card.dart'; import 'widget/goods_info_card.dart';

@ -14,6 +14,7 @@ import 'package:akuCommunity/pages/things_page/things_page.dart';
import 'package:akuCommunity/pages/total_application_page/total_applications_page.dart'; import 'package:akuCommunity/pages/total_application_page/total_applications_page.dart';
import 'package:akuCommunity/pages/visitor_access_page/visitor_access_page.dart'; import 'package:akuCommunity/pages/visitor_access_page/visitor_access_page.dart';
import 'package:akuCommunity/extensions/num_ext.dart'; import 'package:akuCommunity/extensions/num_ext.dart';
import 'package:akuCommunity/ui/manager/advice/advice_page.dart';
import 'package:akuCommunity/widget/grid_buttons.dart'; import 'package:akuCommunity/widget/grid_buttons.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -58,39 +59,16 @@ class _HomePageState extends State<HomePage>
int page = 1; int page = 1;
List<GridButton> _gridList = [ List<GridButton> _gridList = [
GridButton('一键开门', R.ASSETS_ICONS_TOOL_YJKM_PNG, () { GridButton('一键开门', R.ASSETS_ICONS_TOOL_YJKM_PNG, OpenDoorPage().to),
OpenDoorPage().to(); GridButton('访客通行', R.ASSETS_ICONS_TOOL_FKYQ_PNG, VisitorAccessPage().to),
}), GridButton('报事报修', R.ASSETS_ICONS_TOOL_BSBX_PNG, FixedSubmitPage().to),
GridButton('访客通行', R.ASSETS_ICONS_TOOL_FKYQ_PNG, () { GridButton('生活缴费', R.ASSETS_ICONS_TOOL_SHJF_PNG, LifePayPage().to),
VisitorAccessPage().to(); GridButton('业委会', R.ASSETS_ICONS_TOOL_YWH_PNG, IndustryCommitteePage().to),
}), GridButton('建议咨询', R.ASSETS_ICONS_TOOL_JYTS_PNG,
GridButton('报事报修', R.ASSETS_ICONS_TOOL_BSBX_PNG, () { AdvicePage(type: AdviceType.SUGGESTION).to),
FixedSubmitPage().to(); GridButton('便民电话', R.ASSETS_ICONS_TOOL_BMDH_PNG, ConvenientPhonePage().to),
}), GridButton(
GridButton('生活缴费', R.ASSETS_ICONS_TOOL_SHJF_PNG, () { '全部应用', R.ASSETS_ICONS_TOOL_QBYY_PNG, TotalApplicationsPage().to),
LifePayPage().to();
}),
GridButton('业委会', R.ASSETS_ICONS_TOOL_YWH_PNG, () {
IndustryCommitteePage().to();
}),
GridButton('建议咨询', R.ASSETS_ICONS_TOOL_JYTS_PNG, () {
Get.to(ThingsPage(
bundle: Bundle()
..putMap('things', {
'title': '建议咨询',
'treeList': <Map<String, dynamic>>[
{'name': '您的建议'},
{'name': '您的咨询'},
]
}),
));
}),
GridButton('便民电话', R.ASSETS_ICONS_TOOL_BMDH_PNG, () {
ConvenientPhonePage().to();
}),
GridButton('全部应用', R.ASSETS_ICONS_TOOL_QBYY_PNG, () {
TotalApplicationsPage().to();
}),
]; ];
@override @override
@ -157,12 +135,12 @@ class _HomePageState extends State<HomePage>
_buildColButton( _buildColButton(
icon: AntDesign.scan1, icon: AntDesign.scan1,
title: '扫一扫', title: '扫一扫',
onTap: () => Get.to(ScanPage()), onTap: ScanPage().to,
), ),
_buildColButton( _buildColButton(
icon: AntDesign.bells, icon: AntDesign.bells,
title: '消息', title: '消息',
onTap: () => Get.to(MessageCenterPage()), onTap: MessageCenterPage().to,
), ),
16.wb, 16.wb,
], ],
@ -207,9 +185,7 @@ class _HomePageState extends State<HomePage>
tag: '活动', tag: '活动',
isShowImage: false, isShowImage: false,
fun: () { fun: () {
ActivitiesPage( ActivitiesPage().to;
bundle: Bundle()..putBool('isVote', false),
).to;
}, },
), ),
HomeCard( HomeCard(

@ -52,9 +52,7 @@ class _PersonalIndexState extends State<PersonalIndex>
)); ));
}), }),
GridButton('社区活动', R.ASSETS_ICONS_USER_ICON_WDSQHD_PNG, () { GridButton('社区活动', R.ASSETS_ICONS_USER_ICON_WDSQHD_PNG, () {
Get.to(ActivitiesPage( Get.to(ActivitiesPage());
bundle: Bundle()..putBool('isVote', false),
));
}), }),
GridButton('我的缴费', R.ASSETS_ICONS_USER_ICON_WDJF_PNG, () { GridButton('我的缴费', R.ASSETS_ICONS_USER_ICON_WDJF_PNG, () {
LifePayPage().to(); LifePayPage().to();

@ -10,6 +10,7 @@ import 'package:akuCommunity/utils/network/base_file_model.dart';
import 'package:akuCommunity/utils/network/net_util.dart'; import 'package:akuCommunity/utils/network/net_util.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/picker/bee_image_picker.dart';
import 'package:bot_toast/bot_toast.dart'; import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart'; import 'package:common_utils/common_utils.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -62,35 +63,14 @@ class _UserProfilePageState extends State<UserProfilePage> {
_pickAvatar() async { _pickAvatar() async {
final userProvider = Provider.of<UserProvider>(context, listen: false); final userProvider = Provider.of<UserProvider>(context, listen: false);
PickedFile file = await Get.bottomSheet(CupertinoActionSheet( File file = await BeeImagePicker.pick(title: '选择头像');
title: '选择头像'.text.isIntrinsic.make(),
actions: [
CupertinoDialogAction(
onPressed: () async => Get.back(
result: await ImagePicker().getImage(source: ImageSource.gallery),
),
child: '相册'.text.isIntrinsic.make(),
),
CupertinoDialogAction(
onPressed: () async => Get.back(
result: await ImagePicker().getImage(source: ImageSource.camera),
),
child: '相机'.text.isIntrinsic.make(),
),
],
cancelButton: CupertinoDialogAction(
onPressed: Get.back,
child: '取消'.text.isIntrinsic.make(),
),
));
if (file == null) if (file == null)
return; return;
else { else {
//Upload Avatar //Upload Avatar
Function cancel = BotToast.showLoading(); Function cancel = BotToast.showLoading();
File rawFile = File(file.path);
BaseFileModel model = BaseFileModel model =
await NetUtil().upload(API.upload.uploadAvatar, rawFile); await NetUtil().upload(API.upload.uploadAvatar, file);
if (model.status) if (model.status)
userProvider.updateAvatar(model.url); userProvider.updateAvatar(model.url);
else else

@ -73,9 +73,7 @@ class _PropertyIndexState extends State<PropertyIndex>
ConvenientPhonePage().to(); ConvenientPhonePage().to();
}), }),
GridButton('活动投票', R.ASSETS_ICONS_TOOL_HDTP_PNG, () { GridButton('活动投票', R.ASSETS_ICONS_TOOL_HDTP_PNG, () {
Get.to(ActivitiesPage( Get.to(ActivitiesPage());
bundle: Bundle()..putBool('isVote', true),
));
}), }),
GridButton('物品出户', R.ASSETS_ICONS_TOOL_WPCM_PNG, () { GridButton('物品出户', R.ASSETS_ICONS_TOOL_WPCM_PNG, () {
GoodsDetoPage().to(); GoodsDetoPage().to();
@ -165,9 +163,7 @@ class _PropertyIndexState extends State<PropertyIndex>
} }
void activityRouter() { void activityRouter() {
ActivitiesPage( ActivitiesPage().to;
bundle: Bundle()..putBool('isVote', false),
).to;
} }
void activityDetailsRouter(String imagePath, title, bool isOver, isVote, void activityDetailsRouter(String imagePath, title, bool isOver, isVote,

@ -48,7 +48,7 @@ class _AccountManagerPageState extends State<AccountManagerPage> {
}, },
); );
}, },
), ).material(color: Colors.white),
], ],
), ),
); );

@ -105,13 +105,13 @@ class _SettingsPageState extends State<SettingsPage> {
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
children: [ children: [
...[ ...[
_buildTile( // _buildTile(
title: '是否接受信息通知', // title: '是否接受信息通知',
suffix: CupertinoSwitch( // suffix: CupertinoSwitch(
value: false, // value: false,
onChanged: (state) {}, // onChanged: (state) {},
), // ),
), // ),
_buildTile( _buildTile(
title: '关于小蜜蜂智慧社区', title: '关于小蜜蜂智慧社区',
onTap: () => AboutPage().to(), onTap: () => AboutPage().to(),

@ -1,3 +1,4 @@
import 'package:akuCommunity/const/resource.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -62,16 +63,16 @@ class _TabNavigatorState extends State<TabNavigator> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
// //
List<BottomNavigationBarItem> _bottomNav = <BottomNavigationBarItem>[ List<BottomNavigationBarItem> _bottomNav = <BottomNavigationBarItem>[
_buildBottomBar( _buildBottomBar('首页', R.ASSETS_ICONS_TABBAR_HOME_NO_PNG,
'首页', AssetsImage.TAB_HOME_UNSELECT, AssetsImage.TAB_HOME_SELECT), R.ASSETS_ICONS_TABBAR_HOME_PNG),
// _buildBottomBar( // _buildBottomBar(
// '商城', AssetsImage.TAB_MARKET_UNSELECT, AssetsImage.TAB_MARKET_SELECT), // '商城', AssetsImage.TAB_MARKET_UNSELECT, AssetsImage.TAB_MARKET_SELECT),
_buildBottomBar( _buildBottomBar('物业', R.ASSETS_ICONS_TABBAR_HOUSE_NO_PNG,
'物业', AssetsImage.TAB_HOUSE_UNSELECT, AssetsImage.TAB_HOUSE_SELECT), R.ASSETS_ICONS_TABBAR_HOUSE_PNG),
_buildBottomBar('社区', AssetsImage.TAB_MESSAGE_UNSELECT, _buildBottomBar('社区', R.ASSETS_ICONS_TABBAR_MESSAGE_NO_PNG,
AssetsImage.TAB_MESSAGE_SELECT), R.ASSETS_ICONS_TABBAR_MESSAGE_PNG),
_buildBottomBar( _buildBottomBar('我的', R.ASSETS_ICONS_TABBAR_USER_NO_PNG,
'我的', AssetsImage.TAB_USER_UNSELECT, AssetsImage.TAB_USER_SELECT), R.ASSETS_ICONS_TABBAR_USER_PNG),
]; ];
return Scaffold( return Scaffold(
body: WillPopScope( body: WillPopScope(

@ -7,6 +7,8 @@ import 'package:akuCommunity/widget/common_app_bar.dart';
import 'widget/things_app_bar.dart'; import 'widget/things_app_bar.dart';
import 'widget/things_list.dart'; import 'widget/things_list.dart';
//TODO CLEAN BOTTOM CODES.
@Deprecated("sh*t page need to be cleaned.")
class ThingsPage extends StatefulWidget { class ThingsPage extends StatefulWidget {
final Bundle bundle; final Bundle bundle;
ThingsPage({Key key, this.bundle}) : super(key: key); ThingsPage({Key key, this.bundle}) : super(key: key);

@ -4,6 +4,8 @@ import 'package:flutter_icons/flutter_icons.dart';
import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/utils/headers.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
//TODO CLEAN BOTTOM CODES.
@Deprecated("sh*t app bar need to be cleaned.")
class ThingsAppBar extends StatelessWidget { class ThingsAppBar extends StatelessWidget {
final String title, subtitle; final String title, subtitle;
final List<Map<String, dynamic>> treeList; final List<Map<String, dynamic>> treeList;

@ -165,14 +165,10 @@ class _TotalApplicationsPageState extends State<TotalApplicationsPage> {
ConvenientPhonePage().to(); ConvenientPhonePage().to();
break; break;
case '活动投票': case '活动投票':
ActivitiesPage( ActivitiesPage().to;
bundle: Bundle()..putBool('isVote', true),
).to;
break; break;
case '社区活动': case '社区活动':
ActivitiesPage( ActivitiesPage().to;
bundle: Bundle()..putBool('isVote', false),
).to;
break; break;
case '物品出户': case '物品出户':
GoodsDetoPage().to(); GoodsDetoPage().to();

@ -1,5 +1,5 @@
//TODO CLEAN BOTTOM CODES.
@Deprecated("sh*t page_routers need to be cleaned.")
class Bundle { class Bundle {
Map<String, dynamic> _map = {}; Map<String, dynamic> _map = {};
@ -12,7 +12,6 @@ class Bundle {
return _map[k]; return _map[k];
} }
putString(String k, String v) => _setValue(k, v); putString(String k, String v) => _setValue(k, v);
putBool(String k, bool v) => _setValue(k, v); putBool(String k, bool v) => _setValue(k, v);
@ -34,4 +33,3 @@ class Bundle {
return _map.toString(); return _map.toString();
} }
} }

@ -14,6 +14,7 @@ class BeeScaffold extends StatefulWidget {
final List<Widget> actions; final List<Widget> actions;
final Widget leading; final Widget leading;
final Widget bottomNavi; final Widget bottomNavi;
final PreferredSizeWidget appBarBottom;
BeeScaffold( BeeScaffold(
{Key key, {Key key,
@required this.title, @required this.title,
@ -21,7 +22,8 @@ class BeeScaffold extends StatefulWidget {
this.actions, this.actions,
this.leading, this.leading,
this.bgColor, this.bgColor,
this.bottomNavi}) this.bottomNavi,
this.appBarBottom})
: super(key: key); : super(key: key);
@override @override
@ -41,6 +43,7 @@ class _BeeScaffoldState extends State<BeeScaffold> {
centerTitle: true, centerTitle: true,
leading: widget.leading ?? BeeBackButton(), leading: widget.leading ?? BeeBackButton(),
actions: widget.actions, actions: widget.actions,
bottom: widget.appBarBottom,
), ),
body: widget.body, body: widget.body,
bottomNavigationBar: widget.bottomNavi, bottomNavigationBar: widget.bottomNavi,

@ -12,6 +12,8 @@ import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/pages/one_alarm/widget/explain_template.dart'; import 'package:akuCommunity/pages/one_alarm/widget/explain_template.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
//TODO CLEAN BOTTOM CODES.
@Deprecated("sh*t common_app_bar need to be cleaned.")
class CommonAppBar extends StatelessWidget { class CommonAppBar extends StatelessWidget {
final String title, subtitle; final String title, subtitle;
final List<Map<String, dynamic>> treeList; final List<Map<String, dynamic>> treeList;

@ -1,5 +1,5 @@
import 'dart:io'; import 'dart:io';
import 'package:akuCommunity/utils/headers.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:image_picker/image_picker.dart'; import 'package:image_picker/image_picker.dart';
@ -16,13 +16,21 @@ class BeeImagePicker {
onPressed: () async => Get.back( onPressed: () async => Get.back(
result: await ImagePicker().getImage(source: ImageSource.gallery), result: await ImagePicker().getImage(source: ImageSource.gallery),
), ),
child: '相册'.text.isIntrinsic.make(), child: [
Icon(CupertinoIcons.photo),
30.wb,
'相册'.text.isIntrinsic.make(),
].row(),
), ),
CupertinoDialogAction( CupertinoDialogAction(
onPressed: () async => Get.back( onPressed: () async => Get.back(
result: await ImagePicker().getImage(source: ImageSource.camera), result: await ImagePicker().getImage(source: ImageSource.camera),
), ),
child: '相机'.text.isIntrinsic.make(), child: [
Icon(CupertinoIcons.camera),
30.wb,
'相机'.text.isIntrinsic.make(),
].row(),
), ),
], ],
cancelButton: CupertinoDialogAction( cancelButton: CupertinoDialogAction(

Loading…
Cancel
Save