Merge branch 'master' of git.oa00.com:bee/aku_community

hmxc
小赖 3 years ago
commit 25cb61b055

@ -1,5 +1,6 @@
// import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/pages/express_packages/express_package_page.dart';
import 'package:flutter/material.dart';
import 'package:aku_community/const/resource.dart';
@ -76,6 +77,7 @@ List<AO> appObjects = [
AO('借还管理', R.ASSETS_APPLICATIONS_BORROW_PNG, () => SelectBorrowReturnPage()),
AO('一键报警', R.ASSETS_APPLICATIONS_POLICE_PNG, () => AlarmPage()),
AO('设施预约', R.ASSETS_ICONS_TOOL_FACILITY_PNG, () => FacilityAppointmentPage()),
AO('快递包裹', R.ASSETS_IMAGES_PLACEHOLDER_WEBP, () => ExpressPackagePage()),
// AO(
// '小区教育',
// R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
@ -150,6 +152,7 @@ List<String> _smartManagerApp = [
'借还管理',
'一键报警',
'设施预约',
'快递包裹'
// '小区教育',
// '健康运动',
// '家政服务',

@ -0,0 +1,107 @@
import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/widget/bee_divider.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:aku_community/extensions/widget_list_ext.dart';
import 'package:aku_community/const/resource.dart';
class ExpressPackageCard extends StatefulWidget {
final int index;
ExpressPackageCard({Key? key, required this.index}) : super(key: key);
@override
_ExpressPackageCardState createState() => _ExpressPackageCardState();
}
class _ExpressPackageCardState extends State<ExpressPackageCard> {
@override
Widget build(BuildContext context) {
return Container(
width: double.infinity,
padding: EdgeInsets.all(24.w),
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(8.w)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
'3号柜7号箱',
style: TextStyle(
fontSize: 32.sp,
fontWeight: FontWeight.bold,
color: ktextPrimary,
),
),
Spacer(),
(widget.index == 0 ? '未领取' : '已领取')
.text
.size(30.sp)
.color(ktextPrimary)
.bold
.make(),
],
),
16.w.heightBox,
BeeDivider.horizontal(),
24.w.heightBox,
...<Widget>[
_rowTile(R.ASSETS_ICONS_APPOINTMENT_ADDRESS_PNG, '包裹单号',
'131891726735'.text.size(24.sp).color(ktextSubColor).make()),
_rowTile(R.ASSETS_ICONS_APPOINTMENT_ADDRESS_PNG, '收件人',
'小蒋'.text.size(24.sp).color(ktextSubColor).make()),
_rowTile(R.ASSETS_ICONS_APPOINTMENT_ADDRESS_PNG, '联系方式',
'131891726735'.text.size(24.sp).color(ktextSubColor).make()),
_rowTile(R.ASSETS_ICONS_APPOINTMENT_ADDRESS_PNG, '配送公司',
'顺丰速递'.text.size(24.sp).color(ktextSubColor).make()),
_rowTile(
R.ASSETS_ICONS_APPOINTMENT_DATE_PNG,
'送达时间',
'2020-04-13 11:21'
.text
.size(24.sp)
.color(ktextSubColor)
.make()),
].sepWidget(separate: 12.w.heightBox),
40.w.heightBox,
Row(
children: [
Spacer(),
MaterialButton(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(74.w)),
padding: EdgeInsets.symmetric(vertical: 8.w, horizontal: 24.w),
height: 50.w,
color: kPrimaryColor,
elevation: 0,
focusElevation: 0,
hoverElevation: 0,
disabledElevation: 0,
highlightElevation: 0,
onPressed: () {},
child: '确认领取'.text.size(24.sp).bold.color(ktextPrimary).make(),
)
],
),
],
),
);
}
Widget _rowTile(String assetPath, String titile, Widget content) {
return Row(
children: [
Image.asset(
assetPath,
width: 40.w,
height: 40.w,
),
12.w.widthBox,
titile.text.size(24.sp).color(ktextSubColor).make(),
Spacer(),
content,
],
);
}
}

@ -0,0 +1,35 @@
import 'package:aku_community/pages/express_packages/express_package_view.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/tab_bar/bee_tab_bar.dart';
import 'package:flutter/material.dart';
class ExpressPackagePage extends StatefulWidget {
ExpressPackagePage({Key? key}) : super(key: key);
@override
_ExpressPackagePageState createState() => _ExpressPackagePageState();
}
class _ExpressPackagePageState extends State<ExpressPackagePage>
with TickerProviderStateMixin {
List<String> _tabs = ['未领取', '已领取'];
late TabController _tabController;
@override
void initState() {
super.initState();
_tabController = TabController(length: _tabs.length, vsync: this);
}
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '快递包裹',
appBarBottom: BeeTabBar(controller: _tabController, tabs: _tabs),
body: TabBarView(
controller: _tabController,
children:List.generate(_tabs.length, (index) => ExpressPackageView(index:index)) ),
);
}
}

@ -0,0 +1,21 @@
import 'package:aku_community/pages/express_packages/express_package_card.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class ExpressPackageView extends StatefulWidget {
final int index;
ExpressPackageView({Key? key, required this.index}) : super(key: key);
@override
_ExpressPackageViewState createState() => _ExpressPackageViewState();
}
class _ExpressPackageViewState extends State<ExpressPackageView> {
@override
Widget build(BuildContext context) {
return ListView(
padding: EdgeInsets.symmetric(vertical: 16.w,horizontal: 32.w),
children: [ExpressPackageCard(index: widget.index)],
);
}
}
Loading…
Cancel
Save