remove shit code

hmxc
小赖 4 years ago
parent dd6c988683
commit f5b484d3bb

@ -1,3 +0,0 @@
// class AppValues {
// static const String plotName = '人才公寓智慧小区';
// }

@ -3,7 +3,6 @@ import 'package:akuCommunity/ui/profile/car_parking/car_parking_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:akuCommunity/const/resource.dart'; import 'package:akuCommunity/const/resource.dart';
import 'package:akuCommunity/pages/address_page/address_page.dart';
import 'package:akuCommunity/pages/convenient_phone/convenient_phone_page.dart'; import 'package:akuCommunity/pages/convenient_phone/convenient_phone_page.dart';
import 'package:akuCommunity/pages/event_activity/event_voting_page.dart'; import 'package:akuCommunity/pages/event_activity/event_voting_page.dart';
import 'package:akuCommunity/pages/goods_deto_page/goods_deto_page.dart'; import 'package:akuCommunity/pages/goods_deto_page/goods_deto_page.dart';
@ -83,7 +82,7 @@ List<AO> userAppObjects = [
AO('社区活动', R.ASSETS_ICONS_USER_ICON_WDSQHD_PNG, () => ActivityListPage()), AO('社区活动', R.ASSETS_ICONS_USER_ICON_WDSQHD_PNG, () => ActivityListPage()),
AO('我的缴费', R.ASSETS_ICONS_USER_ICON_WDJF_PNG, () => LifePayPage()), AO('我的缴费', R.ASSETS_ICONS_USER_ICON_WDJF_PNG, () => LifePayPage()),
AO('我的报修', R.ASSETS_ICONS_USER_ICON_WDBX_PNG, () => FixedSubmitPage()), AO('我的报修', R.ASSETS_ICONS_USER_ICON_WDBX_PNG, () => FixedSubmitPage()),
AO('我的地址', R.ASSETS_ICONS_USER_ICON_WDDZ_PNG, () => AddressPage()), AO('我的地址', R.ASSETS_ICONS_USER_ICON_WDDZ_PNG, () => Scaffold()),
AO('我的管家', R.ASSETS_ICONS_USER_ICON_WDGJ_PNG, () => Scaffold()), AO('我的管家', R.ASSETS_ICONS_USER_ICON_WDGJ_PNG, () => Scaffold()),
AO('我的访客', R.ASSETS_ICONS_USER_ICON_WDFK_PNG, () => VisitorAccessPage()), AO('我的访客', R.ASSETS_ICONS_USER_ICON_WDFK_PNG, () => VisitorAccessPage()),
AO('设置', R.ASSETS_ICONS_USER_ICON_SZ_PNG, () => SettingsPage()), AO('设置', R.ASSETS_ICONS_USER_ICON_SZ_PNG, () => SettingsPage()),

@ -1,136 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'widget/address_edit_item.dart';
class AddressEditPage extends StatefulWidget {
final Bundle bundle;
AddressEditPage({Key key, this.bundle}) : super(key: key);
@override
_AddressEditPageState createState() => _AddressEditPageState();
}
class _AddressEditPageState extends State<AddressEditPage> {
GlobalKey _formKey = new GlobalKey<FormState>();
bool isDefault = false;
Widget _containerSelectDefault() {
return Container(
color: Colors.white,
height: 96.w,
padding: EdgeInsets.symmetric(
vertical: 28.w,
horizontal: 32.w,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'设为默认地址',
style: TextStyle(
fontSize: 28.sp,
color: Color(0xff333333),
),
),
InkWell(
onTap: () {
setState(() {
isDefault = !isDefault;
});
},
child: CupertinoSwitch(
value: isDefault,
activeColor: Color(0xffffc40c), //
onChanged: (bool val) {
setState(() {
isDefault = !isDefault;
});
},
),
),
],
),
);
}
Widget _containerDelete() {
return InkWell(
onTap: () {},
child: Container(
color: Colors.white,
height: 96.w,
padding: EdgeInsets.symmetric(
vertical: 28.w,
horizontal: 32.w,
),
alignment: Alignment.center,
child: Text(
'删除地址',
style: TextStyle(
fontSize: 28.sp,
color: Color(0xffe60e0e),
),
),
),
);
}
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '${widget.bundle.getMap('details')['title']}',
actions: [
InkWell(
onTap: () {
Get.back();
},
child: Container(
height: 98.w,
width: 48.w + 32.w * 2,
alignment: Alignment.center,
child: '保存'.text.color(Color(0xFFFFC40C)).size(24.sp).make()),
)
],
body: SingleChildScrollView(
physics: NeverScrollableScrollPhysics(),
child: Container(
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
FocusScope.of(context).requestFocus(FocusNode());
},
child: Column(
children: [
Form(
key: _formKey,
child: Column(
children: [
AddressEditItem(addressInfo: {
'name': widget.bundle.getMap('details')['name'],
'phone': widget.bundle.getMap('details')['phone'],
'address': widget.bundle.getMap('details')['address']
}),
],
),
),
SizedBox(height: 66.w),
_containerSelectDefault(),
SizedBox(height: 66.w),
widget.bundle.getMap('details')['isDelete']
? _containerDelete()
: SizedBox(),
],
),
),
),
),
);
}
}

@ -1,60 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'widget/address_item.dart';
class AddressPage extends StatefulWidget {
AddressPage({Key key}) : super(key: key);
@override
_AddressPageState createState() => _AddressPageState();
}
class _AddressPageState extends State<AddressPage> {
List _addressInfoList = [
{
'name': '马泽鹏',
'phone': '18868741879',
'address': '广东省深圳市福田区福华路8号',
'isDefualt': true
},
{
'name': '王珂',
'phone': '13868741123',
'address': '广东省深圳市福田区红荔西路8007号',
'isDefualt': false
},
{
'name': '叶一样',
'phone': '13944743213',
'address': '广东省深圳市布吉街道布沙路大芬油画村对面',
'isDefualt': false
},
];
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '我的收货地址',
actions: [
InkWell(
onTap: () {},
child: '添加新地址'.text.black.size(24.sp).make(),
)
],
body: ListView.builder(
itemBuilder: (BuildContext context, int index) => AddressItem(
name: _addressInfoList[index]['name'],
phone: _addressInfoList[index]['phone'],
address: _addressInfoList[index]['address'],
isDefualt: _addressInfoList[index]['isDefualt'],
),
itemCount: _addressInfoList.length,
),
);
}
}

@ -1,103 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:akuCommunity/utils/headers.dart';
class AddressEditItem extends StatefulWidget {
final Map addressInfo;
AddressEditItem({Key key, this.addressInfo}) : super(key: key);
@override
_AddressEditItemState createState() => _AddressEditItemState();
}
class _AddressEditItemState extends State<AddressEditItem> {
TextEditingController _userName = new TextEditingController();
TextEditingController _userPhone = new TextEditingController();
TextEditingController _userAddress = new TextEditingController();
TextEditingController _userAddressDetail = new TextEditingController();
RegExp phoneReg = RegExp(
'^((13[0-9])|(15[^4])|(16[0-9])|(17[0-9])|(18[0-9])|(19[8-9])|(147,145))\\d{8}\$');
@override
void initState() {
super.initState();
_userName = new TextEditingController(text: widget.addressInfo['name']);
_userPhone = new TextEditingController(text: widget.addressInfo['phone']);
_userAddress =
new TextEditingController(text: widget.addressInfo['address']);
_userAddressDetail =
new TextEditingController(text: widget.addressInfo['address']);
}
@override
Widget build(BuildContext context) {
List<Map<String, dynamic>> _listTextField = [
{'title': '收货人', 'hintText': '请输入', 'controller': _userName},
{'title': '手机号码', 'hintText': '请输入', 'controller': _userPhone},
{'title': '所在地区', 'hintText': '请输入', 'controller': _userAddress},
{
'title': '详细地址',
'hintText': '比如街道、门牌号、小区、楼栋号',
'controller': _userAddressDetail
},
];
List<Widget> _listTextFieldView() {
return _listTextField
.map((item) => TextFormField(
inputFormatters: item['title'] == '手机号码'
? [
LengthLimitingTextInputFormatter(11),
FilteringTextInputFormatter.digitsOnly
]
: [],
keyboardType: item['title'] == '手机号码'
? TextInputType.number
: TextInputType.name,
cursorColor: Color(0xffffc40c),
style: TextStyle(fontSize: 28.sp),
controller: item['controller'],
onChanged: (String value) {},
maxLines: item['title'] == '详细地址' ? 5 : 1,
decoration: InputDecoration(
contentPadding: EdgeInsets.only(
right: 32.w,
top: 28.w,
bottom: 28.w,
),
hintText: item['hintText'],
border: InputBorder.none, //线
fillColor: Colors.white,
filled: true,
hintStyle:
TextStyle(color: Color(0xff999999), fontSize: 28.sp),
prefixIcon: Padding(
padding: EdgeInsets.only(
left: 32.w,
right: (item['title'] == '收货人' ? 88 : 60).w,
top: 28.w,
bottom: (item['title'] == '详细地址' ? 158 : 28).w,
),
child: Text(
item['title'],
style: TextStyle(
color: Color(0xff333333),
fontSize: 28.sp,
fontWeight: FontWeight.w500,
),
),
),
),
))
.toList();
}
return Container(
color: Colors.white,
child: Column(
children: _listTextFieldView(),
),
);
}
}

@ -1,181 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:extended_text/extended_text.dart';
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;
final bool isDefualt;
AddressItem({Key key, this.name, this.phone, this.address, this.isDefualt})
: super(key: key);
Widget _containerImage() {
return Container(
alignment: Alignment.center,
width: 76.w,
height: 76.w,
margin: EdgeInsets.only(
right: 20.w,
),
padding: EdgeInsets.symmetric(vertical: 12.w),
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: isDefualt
? [Color(0xffffd000), Color(0xffff8500)]
: [Color(0xffd8d8d8), Color(0xffd8d8d8)],
),
borderRadius: BorderRadius.all(Radius.circular(76.w)),
),
child: Icon(SimpleLineIcons.location_pin, color: Colors.white),
);
}
Widget _containerColumn() {
return Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
name,
style: TextStyle(
fontSize: 28.sp,
color: Color(0xff333333),
),
),
SizedBox(width: 20.w),
Text(
phone,
style: TextStyle(
fontSize: 24.sp,
color: Color(0xff999999),
),
),
],
),
SizedBox(height: 12.w),
Container(
width: 432.w,
child: ExtendedText.rich(
TextSpan(
children: [
isDefualt
? ExtendedWidgetSpan(
child: Container(
margin: EdgeInsets.only(right: 16.w),
decoration: BoxDecoration(
color: Color(0xfffff7d2),
border: Border.all(
color: Color(0xffffd000), width: 0.5),
borderRadius:
BorderRadius.all(Radius.circular(4))),
padding: EdgeInsets.symmetric(
horizontal: 20.w,
vertical: 4.w,
),
child: Text(
'默认',
style: TextStyle(
fontSize: 24.sp,
color: Color(0xff333333),
),
),
),
)
: ExtendedWidgetSpan(child: SizedBox()),
TextSpan(
text: address,
style: TextStyle(
fontSize: 24.sp, color: Color(0xff999999), height: 1.5),
)
],
),
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
),
],
),
);
}
Widget _positionedEdit(BuildContext context) {
return Positioned(
right: 0,
top: 55.w,
child: InkWell(
onTap: () {
Get.to(() => AddressEditPage(
bundle: Bundle()
..putMap('details', {
'title': '编辑地址',
'name': name,
'phone': phone,
'address': address,
'isDelete': true
}),
));
},
child: Row(
children: [
SizedBox(width: 13.w),
SizedBox(
width: 1,
height: 30.w,
child: DecoratedBox(
decoration: BoxDecoration(color: Color(0xffd8d8d8)),
),
),
SizedBox(width: 13.w),
Text(
'编辑',
style: TextStyle(
fontSize: 24.sp,
color: Color(0xff999999),
),
),
],
),
),
);
}
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(8)),
),
margin: EdgeInsets.only(
left: 32.w,
right: 32.w,
top: 20.w,
),
padding: EdgeInsets.symmetric(
horizontal: 20.w,
vertical: 32.w,
),
child: Stack(
children: [
Row(
children: [
_containerImage(),
_containerColumn(),
],
),
_positionedEdit(context),
],
),
);
}
}

@ -1,38 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'widget/confirm_address.dart';
import 'widget/confirm_bottom_bar.dart';
import 'widget/confirm_content.dart';
class ConfirmOrderPage extends StatelessWidget {
final Bundle bundle;
ConfirmOrderPage({Key key, this.bundle}) : super(key: key);
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '确认订单',
body: Stack(
children: [
ListView(
padding: EdgeInsets.only(bottom: 98.w),
children: [
SizedBox(height: 20.w),
ConfirmAddress(),
SizedBox(height: 20.w),
ConfirmContent(cartMap: bundle.getMap('cartMap')),
],
),
Positioned(
bottom: 0,
child: ConfirmBottomBar(cartMap: bundle.getMap('cartMap')),
),
],
),
);
}
}

@ -1,160 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:akuCommunity/base/assets_image.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
class PayOrderPage extends StatelessWidget {
final Bundle bundle;
PayOrderPage({Key key, this.bundle}) : super(key: key);
final List<Map<String, dynamic>> _listPay = [
{
'title': '支付宝支付',
'widget': Icon(
AntDesign.alipay_circle,
color: Color(0xff06b4fd),
size: 50.w,
),
'id': 'alipay',
'isCheck': true
},
{
'title': '微信支付',
'widget': Image.asset(
AssetsImage.WXPAY,
height: 60.w,
width: 60.w,
),
'id': 'wxpay',
'isCheck': false
}
];
Widget fadeAlertAnimation(BuildContext context, Animation<double> animation,
Animation<double> secondaryAnimation, Widget child) {
return Align(
child: FadeTransition(
opacity: animation,
child: child,
),
);
}
InkWell _payMode(BuildContext context, Widget widget, String title) {
return InkWell(
onTap: () {
// Alert(
// context: context,
// title: "支付成功!~",
// image: Container(
// margin: EdgeInsets.only(top: 40.w),
// height: 200.w,
// width: 200.w,
// alignment: Alignment.center,
// decoration: BoxDecoration(
// gradient: LinearGradient(
// begin: Alignment.topCenter,
// end: Alignment.bottomCenter,
// colors: [Color(0xffffe16b), Color(0xffffc40d)],
// ),
// borderRadius: BorderRadius.all(Radius.circular(200.w)),
// ),
// child: Icon(
// Icons.check,
// color: Colors.white,
// size: 150.w,
// ),
// ),
// style: alertStyle,
// alertAnimation: fadeAlertAnimation,
// buttons: [
// DialogButton(
// child: Text(
// "确认",
// style: TextStyle(color: Colors.white, fontSize: 20),
// ),
// onPressed: () => Get.back(),
// color: Color(0xffffc40d),
// radius: BorderRadius.circular(8.w),
// ),
// ],
// ).show();
},
child: Container(
padding: EdgeInsets.only(
bottom: 27.w,
top: 28.w,
),
decoration: BoxDecoration(
border:
Border(bottom: BorderSide(color: Color(0xffd8d8d8), width: 0.5)),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
widget,
SizedBox(width: 24.w),
Text(
title,
style: TextStyle(fontSize: 28.sp, color: Color(0xff333333)),
),
],
),
Icon(
AntDesign.right,
color: Color(0xff999999),
size: 32.w,
),
],
),
),
);
}
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '付款方式',
body: Container(
color: Colors.white,
child: ListView(
children: [
Container(
margin: EdgeInsets.only(
top: 130.w,
bottom: 130.w,
),
alignment: Alignment.center,
child: Text(
'¥${(double.parse(bundle.getMap('cartMap')["itemprice"]) * bundle.getMap('cartMap')["count"]).toStringAsFixed(2)}',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 48.sp,
color: Color(0xffe60e0e),
),
),
),
Container(
margin: EdgeInsets.symmetric(horizontal: 32.w),
child: Column(
children: List.generate(
_listPay.length,
(index) => _payMode(
context,
_listPay[index]['widget'],
_listPay[index]['title'],
)),
),
),
],
),
),
);
}
}

@ -1,117 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:akuCommunity/base/assets_image.dart';
import 'package:akuCommunity/utils/headers.dart';
class ConfirmAddress extends StatefulWidget {
ConfirmAddress({Key key}) : super(key: key);
@override
_ConfirmAddressState createState() => _ConfirmAddressState();
}
class _ConfirmAddressState extends State<ConfirmAddress> {
Container _containerImage() {
return Container(
padding: EdgeInsets.symmetric(vertical: 12.w),
child: Image.asset(
AssetsImage.LOCATION,
height: 54.w,
width: 54.w,
),
);
}
Container _containerContent() {
return Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
'周玲慧',
style: TextStyle(
fontSize: 28.sp,
color: Color(0xff333333),
),
),
SizedBox(width: 20.w),
Text(
'18868945727',
style: TextStyle(
fontSize: 24.sp,
color: Color(0xff999999),
),
),
],
),
SizedBox(height: 6.w),
Text(
'浙江省 宁波市 江北区 工程学院阿库旅游f6',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 24.sp,
color: Color(0xff999999),
),
),
],
),
);
}
Positioned _positionedIcon() {
return Positioned(
bottom: 58.w,
right: 0,
child: Icon(
AntDesign.right,
size: 34.sp,
color: Color(0xff999999),
),
);
}
@override
Widget build(BuildContext context) {
return InkWell(
onTap: () {
// Get.to(CommonPage(
// bundle: Bundle()
// ..putMap('commentMap', {'title': '我的地址', 'isActions': true}),
// ));
},
child: Container(
margin: EdgeInsets.symmetric(horizontal: 32.w),
padding: EdgeInsets.symmetric(horizontal: 18.w),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(8)),
),
child: Stack(
children: [
Padding(
padding: EdgeInsets.symmetric(
horizontal: 18.w,
vertical: 32.w,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
_containerImage(),
SizedBox(width: 18.w),
_containerContent(),
],
),
),
_positionedIcon()
],
),
),
);
}
}

@ -1,83 +0,0 @@
import 'package:flutter/cupertino.dart';
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;
ConfirmBottomBar({Key key, this.cartMap}) : super(key: key);
Widget _countPrice() {
return Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Text(
'共计${cartMap["count"]}',
style: TextStyle(
color: BaseStyle.color999999,
fontSize: BaseStyle.fontSize24,
),
),
SizedBox(width: 10.w),
Text(
'合计:¥${(double.parse(cartMap["itemprice"]) * cartMap["count"]).toStringAsFixed(2)}',
style: TextStyle(
color: Color(0xffe60e0e),
fontSize: BaseStyle.fontSize28,
),
)
],
);
}
Widget _submit(BuildContext context) {
return InkWell(
onTap: () {
Get.to(()=>PayOrderPage());
},
child: Container(
decoration: BoxDecoration(
color: BaseStyle.colorffc40c,
borderRadius: BorderRadius.all(Radius.circular(33)),
),
padding: EdgeInsets.symmetric(
horizontal: 39.w,
vertical: 12.w,
),
child: Text(
'提交订单',
style: TextStyle(
fontSize: BaseStyle.fontSize30,
color: ktextPrimary,
),
),
),
);
}
@override
Widget build(BuildContext context) {
return Container(
color: Colors.white,
width: MediaQuery.of(context).size.width,
height: 98.w,
padding: EdgeInsets.only(
top: 15.w,
bottom: 17.w,
right: 34.w,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.end,
children: [
_countPrice(),
SizedBox(width: 12.w),
_submit(context),
],
),
);
}
}

@ -1,259 +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:akuCommunity/pages/invoice/invoice_page.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/cached_image_wrapper.dart';
// import 'package:akuCommunity/widget/cart_count.dart';
class ConfirmContent extends StatelessWidget {
final Map cartMap;
ConfirmContent({Key key, this.cartMap}) : super(key: key);
Widget _cartHeader() {
return Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CachedImageWrapper(
url: cartMap["itempic"],
height: 210.w,
width: 210.w,
),
SizedBox(width: 20.w),
Column(
children: [
Container(
width: 288.w,
child: Text(
cartMap["itemtitle"],
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 24.sp,
color: Color(0xff333333),
),
),
),
SizedBox(height: 10.w),
Container(
width: 280.w,
padding: EdgeInsets.all(10.w),
decoration: BoxDecoration(
color: Color(0xfff0f0f0),
borderRadius: BorderRadius.all(Radius.circular(2)),
boxShadow: [
BoxShadow(
color: Color(0xfff0f0f0),
offset: Offset(1, 1),
),
],
),
child: Text(
cartMap["itemtitle"],
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 20.sp,
color: Color(0xff666666),
),
),
),
],
),
],
);
}
Widget _cartFooter() {
return Positioned(
right: 0,
bottom: 0,
child: Row(
children: [
Text(
'共计${cartMap["count"]}',
style: TextStyle(
fontSize: 24.sp,
color: Color(0xff999999),
),
),
SizedBox(width: 10.w),
Text(
'合计:¥${(double.parse(cartMap["itemprice"]) * cartMap["count"]).toStringAsFixed(2)}',
style: TextStyle(
fontSize: 24.sp,
color: Color(0xffe60e0e),
),
)
],
),
);
}
Widget _cartPrice() {
return Positioned(
right: 0,
top: 0,
child: Container(
child: Text(
'${cartMap["itemprice"]}',
style: TextStyle(
fontSize: 24.sp,
color: Color(0xffe60e0e),
fontWeight: FontWeight.w600,
),
),
),
);
}
Widget _cartNum() {
return Positioned(
right: 0,
top: 38.w,
child: Container(
child: Text(
'x${cartMap["count"]}',
style: TextStyle(
fontSize: 20.sp,
color: Color(0xff999999),
fontWeight: FontWeight.w600,
),
),
),
);
}
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(8)),
),
margin: EdgeInsets.symmetric(horizontal: 32.w),
padding: EdgeInsets.symmetric(
horizontal: 20.w,
vertical: 32.w,
),
child: Stack(
children: [
Column(
children: [
_cartHeader(),
Container(
color: Colors.white,
padding: EdgeInsets.only(
left: 30.w,
right: 12.w,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(
top: 56.w,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
'配送方式',
style: TextStyle(
fontSize: 28.sp, color: Color(0xff333333)),
),
SizedBox(width: 26.w),
Text(
'普通配送',
style: TextStyle(
fontSize: 28.sp, color: Color(0xff999999)),
),
],
),
),
Container(
margin: EdgeInsets.only(
top: 56.w,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'开具发票',
style: TextStyle(
fontSize: 28.sp, color: Color(0xff333333)),
),
InkWell(
onTap: () {
Get.to(() => InvoicePage(
bundle: Bundle()
..putString('title', '1123123123123'),
));
},
child: Row(
children: [
Container(
height: 80.w,
width: 353.w,
child: Text(
'增值税电子普通发票-明显-企业-宁波阿库旅游有限公司',
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 28.sp,
color: Color(0xff999999),
),
),
),
SizedBox(width: 10.w),
Icon(
AntDesign.right,
size: 30.sp,
color: Color(0xff999999),
),
],
),
),
],
),
),
Container(
margin: EdgeInsets.only(
top: 56.w,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
'订单备注',
style: TextStyle(
fontSize: 28.sp, color: Color(0xff333333)),
),
SizedBox(width: 14.w),
Text(
'选填',
style: TextStyle(
fontSize: 28.sp, color: Color(0xff999999)),
),
],
),
),
],
),
),
SizedBox(height: 104.w),
],
),
_cartFooter(),
_cartPrice(),
_cartNum(),
],
),
);
}
}

@ -1,83 +0,0 @@
import 'dart:convert';
import 'package:flutter/cupertino.dart';
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';
import 'widget/product_detail.dart';
import 'widget/product_evaluate.dart';
import 'widget/product_service.dart';
import 'widget/product_swiper.dart';
class GoodsDetailsPage extends StatefulWidget {
final Bundle bundle;
GoodsDetailsPage({Key key, this.bundle}) : super(key: key);
@override
_GoodsDetailsPageState createState() => _GoodsDetailsPageState();
}
class _GoodsDetailsPageState extends State<GoodsDetailsPage> {
Map<String, dynamic> shopInfo = {};
@override
void initState() {
super.initState();
shopInfo = json.decode(widget.bundle.getString('shoplist'));
}
@override
Widget build(BuildContext context) {
final List<String> params = shopInfo["taobao_image"].split(',');
return Scaffold(
appBar: PreferredSize(
child: GoodsAppBar(
shareImg: params.first,
title: shopInfo["itemtitle"],
),
preferredSize: Size.fromHeight(kToolbarHeight),
),
body: Stack(
children: [
ListView(
padding: EdgeInsets.only(bottom: 100.w),
children: [
ProductSwiper(imageUrl: params),
ProductContent(
itemprice: shopInfo["itemprice"],
itemtitle: shopInfo["itemtitle"],
itemshorttitle: shopInfo["itemshorttitle"],
itemdesc: shopInfo["itemdesc"],
),
ProductService(),
// ProductSpecs(),
ProductEvaluate(
fun: () {
Get.to(() => ViewCommentsPage());
},
),
ProductDetail(
picDesc: shopInfo["itempic_copy"],
),
],
),
Positioned(
bottom: 0,
child: GoodsDetailsBottomBar(
itemid: shopInfo["itemid"],
itemtitle: shopInfo["itemtitle"],
itemprice: shopInfo["itemprice"],
itempic: shopInfo["itempic"],
),
),
],
),
);
}
}

@ -1,247 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'widget/goods_app_bar.dart';
import 'widget/goods_comments_card.dart';
final List<String> imageUrl = [
'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1599023251944&di=59dc4c919525b21567da91d7564b250b&imgtype=0&src=http%3A%2F%2Fku.90sjimg.com%2Felement_origin_min_pic%2F16%2F11%2F13%2Fd6882b6abd40c900655c87ebfc8dee0a.jpg',
'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1599023251944&di=114f065583b0fb949c2621df5eb2aeb0&imgtype=0&src=http%3A%2F%2Fwww.track-roller.com%2Fimg%2Ftk9912701.jpg',
'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1599023251943&di=2208befacee137736dced7bec5fc71a5&imgtype=0&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20170921%2F0ebcc71a45f24904a0f89ae90d65787e.jpeg'
];
class ViewCommentsPage extends StatefulWidget {
ViewCommentsPage({Key key}) : super(key: key);
@override
_ViewCommentsPageState createState() => _ViewCommentsPageState();
}
class _ViewCommentsPageState extends State<ViewCommentsPage> {
List<Map<String, dynamic>> _commentsClassList = [
{'title': "全部", 'isSelect': true},
{'title': "好评(23)", 'isSelect': false},
{'title': "差评(0)", 'isSelect': false},
{'title': "中评(0)", 'isSelect': false},
{'title': "追加(24)", 'isSelect': false},
];
List<Map<String, dynamic>> _commentsCardList = [
{
'imagePath':
"https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1812993978,4158651947&fm=26&gp=0.jpg",
'name': '就是安安啊',
'subtitle': "4天前 尺码[170-185cm] 颜色分类:黑色",
'content': '面料和版型都不错,会回购',
'contentImageList': imageUrl,
'viewNum': '5',
},
{
'imagePath':
"https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2690587153,2643787055&fm=26&gp=0.jpg",
'name': '马泽鹏',
'subtitle': "47天前 尺码[170-185cm] 颜色分类:黑色",
'content': '太好蓝了,现在天气有点热,赶快到秋天',
'contentImageList': [
'https://img.alicdn.com/imgextra/i3/409405727/O1CN01yNXzbp1sB0pPy06vu_!!409405727.jpg',
'https://img.alicdn.com/imgextra/i3/409405727/O1CN01yNXzbp1sB0pPy06vu_!!409405727.jpg',
'https://img.alicdn.com/imgextra/i2/409405727/O1CN01oaedss1sB0pPDo1JB_!!409405727.jpg'
],
'viewNum': '532',
},
{
'imagePath':
"https://dss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=3095823371,2737858048&fm=26&gp=0.jpg",
'name': '王珂珂',
'subtitle': "4天前 尺码[170-185cm] 颜色分类:黑色",
'content': '面料和版型都不错,会回购',
'contentImageList': [
'https://img.alicdn.com/bao/uploaded/i4/O1CN01XIzuhk1FdADbW7Cwf_!!0-rate.jpg_400x400.jpg',
'https://img.alicdn.com/bao/uploaded/i1/O1CN01KNMhVC242YySXXE4f_!!0-rate.jpg_400x400.jpg',
'https://img.alicdn.com/bao/uploaded/i4/O1CN01A2q4Bb2LhBZJ5elrj_!!0-rate.jpg_400x400.jpg',
],
'viewNum': '235',
},
];
// RefreshController _refreshController =
// RefreshController(initialRefresh: false);
@override
void initState() {
super.initState();
}
void _onRefresh() async {
await Future.delayed(Duration(milliseconds: 1500));
// _refreshController.refreshCompleted();
}
void _onLoading() async {
await Future.delayed(Duration(milliseconds: 1500));
_commentsCardList.add({
'imagePath':
"https://dss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=3095823371,2737858048&fm=26&gp=0.jpg",
'name': '王珂珂',
'subtitle': "4天前 尺码[170-185cm] 颜色分类:黑色",
'content': '面料和版型都不错,会回购',
'contentImageList': imageUrl,
'viewNum': '235',
});
if (mounted) setState(() {});
// _refreshController.loadComplete();
}
@override
void dispose() {
super.dispose();
// _refreshController.dispose();
}
Container _commentsClass() {
return Container(
color: Colors.white,
padding: EdgeInsets.only(
top: 29.w,
left: 32.w,
bottom: 40.w,
),
width: MediaQuery.of(context).size.width,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(bottom: 25.w),
child: Text(
'按分类评价',
style: TextStyle(
fontSize: BaseStyle.fontSize28,
color: BaseStyle.color999999,
),
),
),
Wrap(
spacing: 10.w,
runSpacing: 20.w,
children: _commentsClassList
.map((item) => InkWell(
onTap: () {
_commentsClassList.forEach((item) {
item['isSelect'] = false;
});
setState(() {
item['isSelect'] = true;
});
},
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(24)),
child: Container(
padding: EdgeInsets.only(
left: 24.w,
right: 23.w,
top: 9.w,
bottom: 10.w,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(24)),
color: item['isSelect']
? Color(0xfffff6da)
: Color(0xffededed),
border: Border.all(
color: item['isSelect']
? Color(0xffffc40c)
: Colors.transparent,
width: 0.5),
),
child: Text(
item['title'],
style: TextStyle(
fontSize: BaseStyle.fontSize24,
color: ktextPrimary,
),
),
),
),
))
.toList(),
),
],
),
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: PreferredSize(
child: GoodsAppBar(),
preferredSize: Size.fromHeight(kToolbarHeight),
),
body: Column(
children: [
_commentsClass(),
Expanded(
child: ListView.builder(
padding: EdgeInsets.only(top: 30.w),
itemBuilder: (BuildContext context, int index) => Container(
color: Colors.white,
child: GoodsCommentsCard(
imagePath: _commentsCardList[index]['imagePath'],
name: _commentsCardList[index]['name'],
subtitle: _commentsCardList[index]['subtitle'],
content: _commentsCardList[index]['content'],
contentImageList: _commentsCardList[index]
['contentImageList'],
viewNum: _commentsCardList[index]['viewNum'],
),
),
itemCount: _commentsCardList.length,
),
)
],
),
// NestedScrollView(
// headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
// return <Widget>[
// SliverPersistentHeader(
// pinned: true,
// delegate: SliverAppBarDelegate(
// minHeight: 200,
// maxHeight: 200,
// child: _commentsClass(),
// ),
// )
// ];
// },
// body: RefreshConfiguration(
// hideFooterWhenNotFull: true,
// child: SmartRefresher(
// controller: _refreshController,
// header: WaterDropHeader(),
// footer: ClassicFooter(),
// onRefresh: _onRefresh,
// onLoading: _onLoading,
// enablePullUp: true,
// child: ListView.builder(
// itemBuilder: (BuildContext context, int index) => Text('data'),
// itemCount: 6,
// ),
// ),
// ),
// children: [
// Positioned(
// top: 0,
// left: 0,
// right: 0,
// child: _commentsClass(),
// ),
// ],
// ),
);
}
}

@ -1,96 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:fluwx/fluwx.dart';
import 'package:get/get.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/pages/market/market_cart_page/market_cart_page.dart';
import 'package:akuCommunity/utils/headers.dart';
class GoodsAppBar extends StatefulWidget {
final String shareImg;
final String title;
GoodsAppBar({Key key, this.shareImg, this.title}) : super(key: key);
@override
_GoodsAppBarState createState() => _GoodsAppBarState();
}
class _GoodsAppBarState extends State<GoodsAppBar> {
@override
Widget build(BuildContext context) {
return AppBar(
elevation: 0,
backgroundColor: Color(0xffffffff),
titleSpacing: 0,
leading: IconButton(
icon: Icon(AntDesign.left, size: 40.sp),
onPressed: () {
Get.back();
},
),
title: Container(
padding: EdgeInsets.symmetric(
horizontal: 40.w,
vertical: 15.w,
),
decoration: BoxDecoration(
color: Color(0xfff3f3f3),
borderRadius: BorderRadius.all(Radius.circular(34)),
boxShadow: <BoxShadow>[
BoxShadow(color: Color(0xfff3f3f3), offset: Offset(1, 1)),
],
),
child: InkWell(
onTap: () {},
child: Container(
child: Row(children: [
Icon(
AntDesign.search1,
size: BaseStyle.fontSize30,
color: BaseStyle.color999999,
),
SizedBox(width: 5),
Text(
'搜索宝贝',
style: TextStyle(
fontSize: BaseStyle.fontSize28,
color: BaseStyle.color999999,
),
)
]),
),
),
),
actions: [
IconButton(
icon: Icon(
SimpleLineIcons.share,
size: 40.sp,
color: Color(0xff666666),
),
onPressed: () {
shareToWeChat(WeChatShareWebPageModel(
'https://mobile.baidu.com/item?docid=27505288',
thumbnail: WeChatImage.network(widget.shareImg),
title: widget.title,
description: '前往小蜜蜂智慧社区查看吧',
));
},
),
IconButton(
icon: Icon(
AntDesign.shoppingcart,
size: 40.sp,
color: Color(0xff666666),
),
onPressed: () {
Get.to(() => MarketCartPage());
},
),
],
);
}
}

@ -1,168 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/cached_image_wrapper.dart';
import 'package:akuCommunity/widget/expandable_text.dart';
import 'package:akuCommunity/widget/views/horizontal_image_view.dart';
class GoodsCommentsCard extends StatefulWidget {
final String imagePath,
name,
subtitle,
content,
addTime,
addContent,
viewNum,
usefulNum;
final List<String> contentImageList, addContentImageList;
GoodsCommentsCard(
{Key key,
this.imagePath,
this.name,
this.subtitle,
this.content,
this.addTime,
this.addContent,
this.viewNum,
this.usefulNum,
this.contentImageList,
this.addContentImageList})
: super(key: key);
@override
_GoodsCommentsCardState createState() => _GoodsCommentsCardState();
}
class _GoodsCommentsCardState extends State<GoodsCommentsCard> {
Container _cardHeader(String imagePath, name, subtitle) {
return Container(
child: Row(
children: [
Container(
margin: EdgeInsets.only(right: 12.w),
child: ClipOval(
child: CachedImageWrapper(
url: imagePath,
width: 50.w,
height: 50.w,
),
),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
name,
style: TextStyle(
fontSize: BaseStyle.fontSize24,
color: ktextPrimary,
),
),
SizedBox(height: 4.w),
Text(
subtitle,
style: TextStyle(
fontSize: BaseStyle.fontSize18,
color: BaseStyle.color999999,
),
),
],
),
],
),
);
}
Container _cardContent(
String content,
List<String> contentImageList,
) {
return Container(
margin: EdgeInsets.only(top: 15.w),
padding: EdgeInsets.only(bottom: 20.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(bottom: 20.w),
child: ExpandableText(
text: content,
maxLines: 3,
style: TextStyle(
fontSize: BaseStyle.fontSize24,
color: ktextPrimary,
),
expand: false,
),
),
HorizontalImageView(contentImageList),
],
),
);
}
Container _cardFooter(String viewNum) {
return Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'浏览$viewNum',
style: TextStyle(
fontSize: BaseStyle.fontSize22,
color: BaseStyle.color999999,
),
),
InkWell(
onTap: () {},
child: Row(
children: [
Icon(
Feather.triangle,
size: BaseStyle.fontSize22,
color: ktextPrimary,
),
SizedBox(width: 10.w),
Text(
'有用',
style: TextStyle(
fontSize: BaseStyle.fontSize22,
color: ktextPrimary,
),
),
],
),
),
],
),
);
}
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(
top: 32.w,
left: 32.w,
right: 32.w,
),
padding: EdgeInsets.only(bottom: 32.w),
decoration: BoxDecoration(
border:
Border(bottom: BorderSide(color: Color(0xffd8d8d8), width: 0.5)),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_cardHeader(widget.imagePath, widget.name, widget.subtitle),
_cardContent(widget.content, widget.contentImageList),
_cardFooter(widget.viewNum),
],
),
);
}
}

@ -1,188 +0,0 @@
import 'package:flutter/cupertino.dart';
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/pages/market/market_cart_page/market_cart_page.dart';
import 'package:akuCommunity/provider/cart.dart';
import 'package:akuCommunity/widget/goods_specs_sheet.dart';
class GoodsDetailsBottomBar extends StatefulWidget {
final String itemid, itemtitle, itemprice, itempic;
GoodsDetailsBottomBar(
{Key key, this.itemid, this.itemtitle, this.itemprice, this.itempic})
: super(key: key);
@override
_GoodsDetailsBottomBarState createState() => _GoodsDetailsBottomBarState();
}
class _GoodsDetailsBottomBarState extends State<GoodsDetailsBottomBar> {
int count = 1;
bool _isCollected = false;
void _showModelBotoomSheet(String type) {
showModalBottomSheet(
// isScrollControlled: true,
context: context,
backgroundColor: Colors.white,
builder: (context) {
return GoodsSpecsSheet(
itemid: widget.itemid,
itemtitle: widget.itemtitle,
itempic: widget.itempic,
itemprice: widget.itemprice,
type: type,
);
},
);
}
@override
Widget build(BuildContext context) {
return Consumer<CartProvidde>(builder: (context, model, child) {
return Container(
decoration: BoxDecoration(
color: Color(0xffffffff),
boxShadow: <BoxShadow>[
BoxShadow(
color: Colors.black,
offset: Offset(1.1, 1.1),
),
],
),
padding: EdgeInsets.only(
left: 35.w,
right: 35.w,
top: 13.w,
bottom: 47.w,
),
child: Row(
children: [
InkWell(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
_isCollected
? Icon(
AntDesign.star,
color: Colors.red,
size: 38.sp,
)
: Icon(
AntDesign.staro,
color: Color(0xff000000),
size: ScreenUtil().setSp(38),
),
SizedBox(height: 2),
Text(
'收藏',
style: TextStyle(
fontSize: ScreenUtil().setSp(18),
color: Color(0xff999999)),
)
],
),
onTap: () {
setState(() {
_isCollected = !_isCollected;
});
},
),
SizedBox(width: 46.w),
InkWell(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Icon(
AntDesign.shoppingcart,
color: Color(0xff000000),
size: ScreenUtil().setSp(38),
),
SizedBox(height: 2),
Text(
'购物车',
style: TextStyle(
fontSize: ScreenUtil().setSp(18),
color: Color(0xff999999)),
)
],
),
onTap: () {
Get.to(() => MarketCartPage());
},
),
SizedBox(width: 53.w),
InkWell(
child: Container(
decoration: BoxDecoration(
color: Color(0xff36373b),
borderRadius: BorderRadius.all(Radius.circular(33)),
boxShadow: <BoxShadow>[
BoxShadow(
color: Color(0xff36373b).withOpacity(0.3),
offset: Offset(1, 1),
),
],
),
padding: EdgeInsets.symmetric(
horizontal: 40.w,
vertical: 12.w,
),
child: Text(
'加入购物车',
style: TextStyle(
fontSize: ScreenUtil().setSp(30),
color: Color(0xffffffff),
),
),
),
onTap: () {
_showModelBotoomSheet('加入购物车');
}
// () {
// _showModelBotoomSheet();
// // await model.save(widget.itemid, widget.itemtitle, count,
// // widget.itemprice, widget.itempic);
// } //_showModelBotoomSheet,
),
SizedBox(width: 24.w),
InkWell(
child: Container(
decoration: BoxDecoration(
color: Color(0xffffc40c),
borderRadius: BorderRadius.all(Radius.circular(33)),
boxShadow: <BoxShadow>[
BoxShadow(
color: Color(0xffffc40c),
offset: Offset(1, 1),
),
],
),
padding: EdgeInsets.symmetric(
horizontal: 55.w,
vertical: 12.w,
),
child: Text(
'立即购买',
style: TextStyle(
fontSize: ScreenUtil().setSp(30),
color: Color(0xff333333),
),
),
),
onTap: () {
_showModelBotoomSheet('立即购买');
} //_showModelBotoomSheet,
),
],
),
);
});
}
}

@ -1,200 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:fluwx/fluwx.dart';
class ProductContent extends StatelessWidget {
final String itemprice, itemtitle, itemshorttitle, itemdesc;
ProductContent(
{Key key,
this.itemprice,
this.itemtitle,
this.itemshorttitle,
this.itemdesc})
: super(key: key);
Row _rowPrice(String price) {
return Row(
children: [
Text(
'$price',
style: TextStyle(
fontSize: ScreenUtil().setSp(42),
color: Color(0xff333333),
fontWeight: FontWeight.w500,
),
),
SizedBox(width: 10.w),
Text(
'',
style: TextStyle(
fontSize: ScreenUtil().setSp(20),
color: Color(0xff333333),
fontWeight: FontWeight.w500,
),
),
],
);
}
Container _containerTitle(String title) {
return Container(
margin: EdgeInsets.only(
top: 28.w,
bottom: 18.w,
right: 106.w,
),
child: Text(
title,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: ScreenUtil().setSp(30), color: Color(0xff333333)),
),
);
}
Container _containerSubtitle(String shortTitle) {
return Container(
margin: EdgeInsets.only(right: 286.w),
child: Text(
shortTitle,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: ScreenUtil().setSp(24), color: Color(0xff666666)),
),
);
}
Container _containerRecommend(String desc) {
return Container(
decoration: BoxDecoration(
color: Color(0xfff0f0f0),
borderRadius: BorderRadius.all(Radius.circular(4)),
boxShadow: <BoxShadow>[
BoxShadow(color: Color(0xfff3f3f3), offset: Offset(1, 1)),
],
),
margin: EdgeInsets.only(
left: 72.w,
right: 72.w,
top: 58.w,
),
padding: EdgeInsets.symmetric(
horizontal: 33.w,
vertical: 11.w,
),
child: Text(
desc,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: ScreenUtil().setSp(20),
color: Color(0xff666666),
),
),
);
}
Positioned _positionedShare() {
return Positioned(
right: 0,
top: 169.w,
child: InkWell(
onTap: () {
shareToWeChat(WeChatShareWebPageModel(
'https://mobile.baidu.com/item?docid=27505288',
title: itemtitle,
description: '前往小蜜蜂智慧社区查看吧',
));
},
child: Container(
decoration: BoxDecoration(
color: Color(0xfff0f0f0),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(100),
bottomLeft: Radius.circular(100),
),
boxShadow: <BoxShadow>[
BoxShadow(color: Color(0xfff3f3f3), offset: Offset(1, 1)),
],
),
padding: EdgeInsets.symmetric(
horizontal: 14.w,
vertical: 9.w,
),
child: Row(
children: [
Icon(
SimpleLineIcons.share,
size: ScreenUtil().setSp(20),
),
SizedBox(width: 12.w),
Text(
'分享',
style: TextStyle(
fontSize: ScreenUtil().setSp(20),
color: Color(0xff666666),
),
)
],
),
),
),
);
}
Positioned _positionedRecommend() {
return Positioned(
right: 453.w,
bottom: 100.w,
child: Row(
children: [
Icon(
AntDesign.hearto,
color: Color(0xff999999),
size: ScreenUtil().setSp(24),
),
SizedBox(width: 12.w),
Text(
'推荐理由',
style: TextStyle(
fontSize: ScreenUtil().setSp(20), color: Color(0xff999999)),
),
],
),
);
}
@override
Widget build(BuildContext context) {
return Container(
color: Color(0xffffffff),
child: Stack(
children: [
Padding(
padding: EdgeInsets.only(
left: 32.w,
top: 25.w,
bottom: 20.w,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_rowPrice(itemprice),
_containerTitle(itemtitle),
_containerSubtitle(itemshorttitle),
_containerRecommend(itemdesc),
],
),
),
_positionedShare(),
_positionedRecommend(),
],
),
);
}
}

@ -1,57 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/cached_image_wrapper.dart';
class ProductDetail extends StatelessWidget {
final String picDesc;
ProductDetail({Key key, this.picDesc}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
color: Color(0xffffffff),
margin: EdgeInsets.only(top: 30.w),
padding: EdgeInsets.only(
top: 20.w,
left: 32.w,
right: 32.w,
bottom: 32.w,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'商品详情',
style: TextStyle(
fontSize: BaseStyle.fontSize30,
color: Color(0xff333333),
),
),
SizedBox(height: 12.w),
Container(
child: AspectRatio(
aspectRatio: 1,
child: CachedImageWrapper(
url: picDesc.contains('http')
? picDesc
: 'http://img-haodanku-com.cdn.fudaiapp.com/' + picDesc,
width: 1,
height: 1,
fit: BoxFit.fill,
),
),
),
// Container(
// child: Image.asset(
// picDesc,
// fit: BoxFit.fill,
// ),
// ),
],
),
);
}
}

@ -1,111 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class ProductEvaluate extends StatelessWidget {
final Function fun;
ProductEvaluate({Key key, this.fun}) : super(key: key);
Stack _stackEvaluateHeader() {
return Stack(
children: [
Row(
children: [
Text(
'宝贝评价(1239)',
style: TextStyle(
fontSize: ScreenUtil().setSp(30),
color: Color(0xff333333),
),
),
],
),
Positioned(
right: 32.w,
child: InkWell(
onTap: () {
fun();
},
child: Row(
children: [
Text(
'查看全部',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: Color(0xff999999),
),
),
SizedBox(width: 20.w),
Icon(
AntDesign.right,
size: ScreenUtil().setSp(34),
color: Color(0xff999999),
),
],
),
),
),
],
);
}
Column _columnEvaluateContent() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
ClipOval(
child: Image.asset(
'assets/example/touxiang1.png',
height: 50.w,
width: 50.w,
fit: BoxFit.fill,
),
),
SizedBox(width: 10.w),
Text(
'就是安安啊',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: Color(0xff999999),
),
),
],
),
SizedBox(height: 12.w),
Text(
'面料和版型都不错,会回购',
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Color(0xff333333),
fontSize: ScreenUtil().setSp(24),
),
),
],
);
}
@override
Widget build(BuildContext context) {
return Container(
color: Color(0xffffffff),
margin: EdgeInsets.only(top: 30.w),
padding: EdgeInsets.only(
top: 20.w,
left: 32.w,
bottom: 32.w,
),
child: Column(
children: [
_stackEvaluateHeader(),
SizedBox(height: 32.w),
_columnEvaluateContent(),
],
),
);
}
}

@ -1,122 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class ProductService extends StatelessWidget {
const ProductService({Key key}) : super(key: key);
Row _rowDelivergoods() {
return Row(
children: [
Text(
'发货',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: Color(0xff999999),
),
),
SizedBox(width: 59.w),
Row(
children: [
Icon(
EvilIcons.location,
size: ScreenUtil().setSp(34),
color: Color(0xff666666),
),
SizedBox(
width: 9.w,
),
Text(
'浙江杭州',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: Color(0xff333333),
),
),
],
),
SizedBox(width: 38.w),
Row(
children: [
Text(
'快递:',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: Color(0xff333333),
),
),
SizedBox(
width: 9.w,
),
Text(
'全国包邮',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: Color(0xff333333),
),
),
],
),
],
);
}
Row _rowService() {
return Row(
children: [
Text(
'服务',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: Color(0xff999999),
),
),
SizedBox(width: 59.w),
Text(
'品质保证',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: Color(0xff333333),
),
),
SizedBox(width: 16.w),
SizedBox(
width: 1,
height: 24.w,
child: DecoratedBox(
decoration: BoxDecoration(color: Color(0xffd8d8d8)),
),
),
SizedBox(width: 16.w),
Text(
'售后无忧',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: Color(0xff333333),
),
),
],
);
}
@override
Widget build(BuildContext context) {
return Container(
color: Color(0xffffffff),
margin: EdgeInsets.only(top: 30.w),
padding: EdgeInsets.symmetric(
vertical: 20.w,
horizontal: 60.w,
),
child: Column(
children: [
_rowDelivergoods(),
SizedBox(height: 39.w),
_rowService(),
],
),
);
}
}

@ -1,74 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:akuCommunity/widget/goods_specs_sheet.dart';
class ProductSpecs extends StatefulWidget {
ProductSpecs({Key key}) : super(key: key);
@override
_ProductSpecsState createState() => _ProductSpecsState();
}
class _ProductSpecsState extends State<ProductSpecs> {
void _showModelBotoomSheet() {
showModalBottomSheet(
isScrollControlled: true,
context: context,
backgroundColor: Colors.white,
builder: (context) {
return GoodsSpecsSheet();
},
);
}
@override
Widget build(BuildContext context) {
return InkWell(
onTap: _showModelBotoomSheet,
child: Container(
color: Color(0xffffffff),
margin: EdgeInsets.only(top: 30.w),
padding: EdgeInsets.only(
left: 60.w,
top: 20.w,
bottom: 20.w,
),
child: Stack(
children: [
Row(
children: [
Text(
'规格',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: Color(0xff999999),
),
),
SizedBox(width: 59.w),
Text(
'请选择规格',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: Color(0xff333333),
),
),
],
),
Positioned(
right: 32.w,
child: Icon(
AntDesign.right,
size: ScreenUtil().setSp(34),
color: Color(0xff999999),
),
),
],
),
),
);
}
}

@ -1,79 +0,0 @@
import 'dart:math';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
// import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:akuCommunity/utils/fade_route.dart';
import 'package:akuCommunity/widget/gallery_photo_view_wrapper.dart';
class ProductSwiper extends StatelessWidget {
final List<String> imageUrl;
ProductSwiper({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: 500.w,
// child: Swiper(
// itemBuilder: (BuildContext context, int index) {
// return AspectRatio(
// aspectRatio: 1,
// 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: 3,
// scrollDirection: Axis.horizontal,
// autoplay: true,
// duration: 600,
// onTap: (index) {
// debugPrint("点击了第:$index");
// },
// controller: SwiperController(),
// pagination: SwiperPagination(
// //
// alignment: Alignment.bottomCenter, // Alignment.bottomCenter
// margin: const EdgeInsets.fromLTRB(0, 0, 0, 5), //
// builder: DotSwiperPaginationBuilder(
// activeColor: Color(0xffFEC200),
// color: Colors.white,
// size: 15.w,
// activeSize: 25.w,
// space: 10.w,
// ),
// ),
// autoplayDelay: 5000,
// autoplayDisableOnInteraction: true,
// ),
);
}
}

@ -2,7 +2,6 @@
import 'dart:io'; import 'dart:io';
import 'package:akuCommunity/constants/app_values.dart';
import 'package:akuCommunity/provider/app_provider.dart'; import 'package:akuCommunity/provider/app_provider.dart';
import 'package:akuCommunity/ui/profile/house/pick_my_house_page.dart'; import 'package:akuCommunity/ui/profile/house/pick_my_house_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -17,7 +16,6 @@ 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/pages/goods_deto_page/select_move_company_page.dart'; import 'package:akuCommunity/pages/goods_deto_page/select_move_company_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';
import 'package:akuCommunity/provider/user_provider.dart'; import 'package:akuCommunity/provider/user_provider.dart';
import 'package:akuCommunity/utils/bee_parse.dart'; import 'package:akuCommunity/utils/bee_parse.dart';

@ -1,4 +1,3 @@
import 'package:akuCommunity/constants/app_values.dart';
import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/utils/headers.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';

@ -1,252 +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:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:akuCommunity/widget/round_check_box.dart';
import 'widget/invoice_input.dart';
class InvoicePage extends StatefulWidget {
final Bundle bundle;
InvoicePage({Key key, this.bundle}) : super(key: key);
@override
_InvoicePageState createState() => _InvoicePageState();
}
class _InvoicePageState extends State<InvoicePage> {
var _scaffoldKey = new GlobalKey<ScaffoldState>();
GlobalKey _formKey = new GlobalKey<FormState>();
bool _checkDetail = false;
bool isEnterprise = false;
List _checkRise = [true, false];
@override
void initState() {
super.initState();
}
void checkDetail() {
setState(() {
_checkDetail = !_checkDetail;
});
}
Container _containerInvoiceDetailCheck() {
return Container(
color: Colors.white,
height: 96.w,
padding: EdgeInsets.symmetric(
vertical: 28.w,
horizontal: 32.w,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
InkWell(
onTap: () {},
child: Row(
children: [
Text(
'发票内容',
style: TextStyle(
fontSize: 28.sp,
color: Color(0xff333333),
),
),
SizedBox(width: 6.w),
Icon(
AntDesign.exclamationcircleo,
size: 20.sp,
color: Color(0xff999999),
),
],
),
),
RoundCheckBox(
value: _checkDetail,
onChanged: checkDetail,
title: '明细',
),
],
),
);
}
InkWell _containerSubmit() {
return InkWell(
onTap: () {},
child: Container(
color: Color(0xffffc40c),
height: 85.w,
margin: EdgeInsets.symmetric(
horizontal: 43.w,
),
padding: EdgeInsets.symmetric(
vertical: 20.w,
),
alignment: Alignment.center,
child: Text(
'确认',
style: TextStyle(
fontSize: 32.sp,
color: Color(0xff333333),
),
),
),
);
}
@override
Widget build(BuildContext context) {
List<Map<String, dynamic>> _listHeader = [
{
'title': '发票类型',
'rightWidget': Container(
child: InkWell(
onTap: () {},
child: Row(
children: [
Text(
'增值税电子普票',
style: TextStyle(
fontSize: 28.sp,
color: Color(0xff333333),
),
),
SizedBox(width: 12.w),
Icon(
AntDesign.right,
size: 20.sp,
color: Color(0xff333333),
),
],
),
),
)
},
{
'title': '抬头类型',
'rightWidget': Container(
child: Row(
children: [
RoundCheckBox(
value: _checkRise[0],
onChanged: () {
setState(() {
if (!_checkRise[0]) {
isEnterprise = false;
_checkRise = [true, false];
}
return;
});
},
title: '个人/事业单位',
),
SizedBox(width: 12.w),
RoundCheckBox(
value: _checkRise[1],
onChanged: () {
setState(() {
if (!_checkRise[1]) {
isEnterprise = true;
_checkRise = [false, true];
}
return;
});
},
title: '企业',
),
],
),
)
},
];
Container _containerHeader() {
return Container(
decoration: BoxDecoration(
color: Colors.white,
border: Border(
top: BorderSide(
width: 0.5, //
color: Color(0xffd8d8d8), //
),
),
),
child: Column(
children: _listHeader
.map((item) => Container(
padding: EdgeInsets.only(
left: 77.w,
right: 32.w,
top: 28.w,
// bottom: 28.w,
),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
item['title'],
style: TextStyle(
fontSize: 28.sp,
color: Color(0xff333333),
),
),
item['rightWidget']
],
),
SizedBox(height: 28.w),
Divider(height: 1),
],
),
))
.toList(),
),
);
}
return BeeScaffold(
key: _scaffoldKey,
title: '开具发票',
leading: IconButton(
icon: Icon(AntDesign.left, size: 40.sp),
onPressed: () {
Get.back();
},
),
body: SingleChildScrollView(
child: Container(
height: 1334.w,
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
FocusScope.of(context).requestFocus(FocusNode());
},
child: Column(
children: [
_containerHeader(),
Form(
key: _formKey,
child: Column(
children: [InvoiceInput(isEnterprise: isEnterprise)],
),
),
SizedBox(height: 66.w),
_containerInvoiceDetailCheck(),
SizedBox(height: 92.w),
_containerSubmit(),
],
),
),
),
),
);
}
}

@ -1,101 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/utils/headers.dart';
class InvoiceInput extends StatefulWidget {
final bool isEnterprise;
InvoiceInput({Key key, this.isEnterprise}) : super(key: key);
@override
_InvoiceInputState createState() => _InvoiceInputState();
}
class _InvoiceInputState extends State<InvoiceInput> {
TextEditingController _userName = new TextEditingController();
TextEditingController _userPhone = new TextEditingController();
TextEditingController _userAddress = new TextEditingController();
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
List<Map<String, dynamic>> _listTextField = [
{'title': '发票抬头', 'hintText': '请输入', 'controller': _userName},
{'title': '税号', 'hintText': '请输入', 'controller': _userPhone},
{'title': '开户银行', 'hintText': '选填', 'controller': _userAddress},
{'title': '银行账号', 'hintText': '选填', 'controller': _userAddress},
{'title': '企业地址', 'hintText': '选填', 'controller': _userAddress},
{'title': '企业电话', 'hintText': '选填', 'controller': _userAddress},
];
List<Widget> _listTextFieldView(List listInput) {
return listInput
.map((item) => Container(
padding: EdgeInsets.only(
left: 77.w,
right: 32.w,
top: 28.w,
// bottom: 28.w,
),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
item['title'],
style: TextStyle(
fontSize: 28.sp,
color: Color(0xff333333),
),
),
Expanded(
child: TextFormField(
// inputFormatters: item['title'] == '税号'
// ? [
// LengthLimitingTextInputFormatter(11),
// ]
// : [],
cursorColor: Color(0xffffc40c),
style: TextStyle(fontSize: 28.sp),
controller: item['controller'],
onChanged: (String value) {},
textAlign: TextAlign.end,
decoration: InputDecoration(
isDense: true,
contentPadding: EdgeInsets.only(
top: 0.w,
bottom: 0.w,
),
hintText: item['hintText'],
border: InputBorder.none, //线
fillColor: Colors.white,
filled: true,
hintStyle: TextStyle(
color: Color(0xff999999), fontSize: 24.sp),
),
),
),
],
),
SizedBox(height: 28.w),
Divider(height: 1),
],
),
))
.toList();
}
return Container(
color: Colors.white,
child: Column(
children: widget.isEnterprise
? _listTextFieldView(_listTextField)
: _listTextFieldView([_listTextField.first]),
),
);
}
}

@ -1,41 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/pages/life_pay/life_pay_bill_page/life_pay_bill_page.dart';
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';
class LifePayInfoPage extends StatefulWidget {
final Bundle bundle;
LifePayInfoPage({Key key, this.bundle}) : super(key: key);
@override
_LifePayInfoPageState createState() => _LifePayInfoPageState();
}
class _LifePayInfoPageState extends State<LifePayInfoPage> {
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: ' ${widget.bundle.getMap('detailMap')['title']}明细',
body: Stack(
children: [
ListView(
padding: EdgeInsets.only(bottom: 130.w),
children: [
DetailsCard(fun: () => Get.to(() => LifePayBillPage())),
],
),
Positioned(
bottom: 0,
child: SubmitBar(title: '选好了'),
),
],
),
);
}
}

@ -1,124 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/utils/headers.dart';
class DetailsCard extends StatefulWidget {
final Function fun;
DetailsCard({Key key, this.fun}) : super(key: key);
@override
_DetailsCardState createState() => _DetailsCardState();
}
class _DetailsCardState extends State<DetailsCard> {
Container _detailHeader() {
return Container(
margin: EdgeInsets.only(
top: 20.w,
bottom: 18.w,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'公共能耗费',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: BaseStyle.fontSize30,
color: ktextPrimary,
),
),
Text(
'宁波华茂悦峰 1幢-1单元-702室',
style: TextStyle(
fontSize: BaseStyle.fontSize30,
color: ktextPrimary,
),
),
],
),
);
}
InkWell _detailContent(Function fun) {
return InkWell(
onTap: fun,
child: Container(
margin: EdgeInsets.only(top: 32.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Icon(
Icons.radio_button_unchecked,
color: BaseStyle.color999999,
size: 40.w,
),
SizedBox(width: 24.w),
Text(
'2019上半年',
style: TextStyle(
fontSize: BaseStyle.fontSize28,
color: ktextPrimary,
),
),
],
),
Row(
children: [
Text(
'¥${50.90}',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: BaseStyle.fontSize28,
color: Color(0xfffc361d),
),
),
SizedBox(width: 28.w),
Icon(
AntDesign.right,
color: BaseStyle.color999999,
size: 30.w,
),
],
),
],
),
),
);
}
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(
top: 32.w,
left: 32.w,
right: 32.w,
),
padding: EdgeInsets.only(
left: 32.w,
right: 32.w,
bottom: 32.w,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(6)),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_detailHeader(),
_detailContent(widget.fun),
_detailContent(widget.fun),
],
),
);
}
}

@ -1,4 +1,3 @@
import 'package:akuCommunity/constants/app_values.dart';
import 'package:akuCommunity/pages/life_pay/life_pay_record_page.dart'; import 'package:akuCommunity/pages/life_pay/life_pay_record_page.dart';
import 'package:akuCommunity/provider/app_provider.dart'; import 'package:akuCommunity/provider/app_provider.dart';
import 'package:akuCommunity/ui/profile/house/pick_my_house_page.dart'; import 'package:akuCommunity/ui/profile/house/pick_my_house_page.dart';

@ -1,4 +1,3 @@
import 'package:akuCommunity/constants/app_values.dart';
import 'package:akuCommunity/provider/app_provider.dart'; import 'package:akuCommunity/provider/app_provider.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';

@ -1,438 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_slidable/flutter_slidable.dart';
import 'package:provider/provider.dart';
import 'package:akuCommunity/model/aku_shop_model.dart';
import 'package:akuCommunity/provider/cart.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/cached_image_wrapper.dart';
import 'package:akuCommunity/widget/cart_count.dart';
import 'widget/market_cart_app_bar.dart';
class MarketCartPage extends StatefulWidget {
final AkuShopModel cartItem;
MarketCartPage({Key key, this.cartItem}) : super(key: key);
@override
_MarketCartPageState createState() => _MarketCartPageState();
}
class _MarketCartPageState extends State<MarketCartPage> {
Widget _cardRadio(
BuildContext context, AkuShopModel cartItem, CartProvidde model, index) {
return InkWell(
onTap: () {
setState(() {
cartItem.isCheck = !cartItem.isCheck;
int _goods = shopList.indexWhere(
(element) => element.itemid == _cartList[index].itemid);
_goods > -1
? shopList.removeAt(_goods)
: shopList.add(_cartList[index]);
print(shopList);
});
},
child: Container(
alignment: Alignment.center,
child: Icon(
Icons.check_circle,
color: cartItem.isCheck ? Color(0xffdb0000) : Color(0xff999999),
size: 36.w,
),
),
);
}
Widget _image(String imagePath) {
return Container(
margin: EdgeInsets.symmetric(horizontal: 20.w),
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(2)),
child: CachedImageWrapper(
url: imagePath,
width: 180.w,
height: 180.w,
),
),
);
}
Widget _content(String content, specs, price) {
return Container(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 394.w,
child: Text(
content,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 24.sp,
color: Color(0xff333333),
),
),
),
Container(
margin: EdgeInsets.only(top: 40.w),
child: Text(
'$price',
style: TextStyle(
fontSize: 28.sp,
color: Color(0xffe60e0e),
),
),
),
],
),
);
}
// List<Map<String, dynamic>> _listGoods = [
// {
// 'imagePath':
// 'http://img.alicdn.com/imgextra/i3/2113905378/O1CN01aH72RP1pbAf1n1amP_!!2113905378.jpg',
// 'content': '2020很仙的开衫女春秋装韩版宽松加厚百搭外搭毛衣外套针织衫',
// 'specs': '165/M',
// 'price': 69.9,
// 'goodsNum': 1,
// 'isCheck': false
// },
// {
// 'imagePath':
// 'http://img.alicdn.com/imgextra/i3/2261315282/O1CN01FLPB6E1otCdaEw4OC_!!2261315282.jpg',
// 'content': '微商爆款女士MCKZ阳离子秋冬柔软舒适打底衫高领针织螺纹棉上衣',
// 'specs': '165/M',
// 'price': 129.9,
// 'goodsNum': 1,
// 'isCheck': false
// },
// ];
// bool isAll = false;
// double _currentPrice = 0;
// int _currentGoodsNum = 0;
// void funAll() {
// setState(() {
// isAll = !isAll;
// if (isAll) {
// _currentPrice = 0;
// _currentGoodsNum = 0;
// }
// _listGoods.forEach((item) {
// item["isCheck"] = isAll;
// if (item["isCheck"]) {
// _currentPrice += item["price"] * item["goodsNum"];
// _currentGoodsNum++;
// } else {
// _currentPrice -= item["price"] * item["goodsNum"];
// _currentGoodsNum--;
// }
// });
// });
// }
// void funIsSelect(int index) {
// setState(() {
// _listGoods[index]["isCheck"] = !_listGoods[index]["isCheck"];
// if (_listGoods[index]["isCheck"]) {
// _currentPrice +=
// _listGoods[index]["price"] * _listGoods[index]["goodsNum"];
// _currentGoodsNum++;
// } else {
// _currentPrice -=
// _listGoods[index]["price"] * _listGoods[index]["goodsNum"];
// _currentGoodsNum--;
// }
// if (_listGoods.every((item) => item["isCheck"])) {
// isAll = true;
// } else {
// isAll = false;
// }
// });
// }
// void reduce(int index) {
// setState(() {
// _listGoods[index]["goodsNum"]--;
// if (_currentPrice != 0) {
// _currentPrice = 0;
// _listGoods.forEach((item) {
// if (item["isCheck"]) {
// _currentPrice += item["price"] * item["goodsNum"];
// }
// });
// }
// });
// }
// void add(int index) {
// setState(() {
// _listGoods[index]["goodsNum"]++;
// if (_currentPrice != 0) {
// _currentPrice = 0;
// _listGoods.forEach((item) {
// if (item["isCheck"]) {
// _currentPrice += item["price"] * item["goodsNum"];
// }
// });
// }
// });
// }
// void funSubimt() {
// // setState(() {
// // isAll = !isAll;
// // });
// }
List<AkuShopModel> shopList = [];
bool get _selectALl {
for (var element in _cartList) {
int _selectGoods =
shopList.indexWhere((index) => element.itemid == index.itemid);
if (_selectGoods == -1) return false;
}
return true;
}
double get _allprice {
double _price = 0;
for (var element in shopList) {
_price += double.parse(element.itemprice) * element.count;
}
return _price;
}
int get _goodsCount => shopList.length;
List<AkuShopModel> _cartList;
Widget _selectAll(
CartProvidde model,
) {
return InkWell(
onTap: () {
for (var element in _cartList) {
element.isCheck = !_selectALl;
}
model.changeALlCheckState(true);
setState(() {
if (_selectALl == true)
shopList.clear();
else {
shopList.clear();
shopList.addAll(_cartList);
}
});
},
child: Container(
margin: EdgeInsets.symmetric(vertical: 29.w),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Icon(
_selectALl
? Icons.radio_button_checked
: Icons.radio_button_unchecked,
color: model.isAllCheck ? Color(0xffdb0000) : Color(0xff999999),
size: 40.w,
),
Container(
margin: EdgeInsets.only(left: 18.w),
child: Text(
'全选',
style: TextStyle(
fontSize: 28.sp,
color: Color(0xff333333),
),
),
),
],
),
),
);
}
Widget _settlement(CartProvidde model, BuildContext context) {
return Row(
children: [
model.allPrice != null
? Container(
margin: EdgeInsets.only(right: 10.w),
child: Text(
'合计:¥${_allprice.toStringAsFixed(2)}',
style: TextStyle(
fontSize: 28.sp,
color: Color(0xffe60e0e),
),
),
)
: SizedBox(),
InkWell(
onTap: model.allGoodsCount != 0 ? () {} : null,
child: Container(
alignment: Alignment.center,
decoration: BoxDecoration(
color: model.allGoodsCount != 0
? Color(0xffffc40c)
: Color(0xffd8d8d8),
borderRadius: BorderRadius.all(Radius.circular(30)),
),
width: 198.w,
margin: EdgeInsets.symmetric(vertical: 16.w),
padding: EdgeInsets.symmetric(vertical: 12.w),
child: Text(
'结算($_goodsCount)',
style: TextStyle(
fontSize: 30.sp,
color:
model.allGoodsCount != 0 ? Color(0xff333333) : Colors.white,
),
),
),
),
],
);
}
Widget _marketCartCard(AkuShopModel cartItem, index) {
return Consumer<CartProvidde>(builder: (context, model, child) {
return Container(
margin: EdgeInsets.only(
top: 20.w,
left: 32.w,
right: 32.w,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(6)),
),
child: Slidable.builder(
actionPane: SlidableBehindActionPane(),
actionExtentRatio: 0.25,
secondaryActionDelegate: SlideActionBuilderDelegate(
actionCount: 2,
builder: (context, index, animation, renderingMode) {
if (index == 0) {
return SlideAction(
child: Text(
'移至收藏夹',
style: TextStyle(fontSize: 28.sp, color: Colors.white),
),
color: renderingMode == SlidableRenderingMode.slide
? Color(0xffffc40c).withOpacity(animation.value)
: Color(0xffffc40c),
// onTap: () => _showSnackBar(context, 'More'),
closeOnTap: false,
);
} else {
return SlideAction(
onTap: () {
model.deleteGoods(cartItem.itemid);
},
decoration: BoxDecoration(
color: renderingMode == SlidableRenderingMode.slide
? Color(0xffe60e0e).withOpacity(animation.value)
: Color(0xffe60e0e),
borderRadius: BorderRadius.only(
topRight: Radius.circular(6),
bottomRight: Radius.circular(6),
),
),
child: Text(
'删除',
style: TextStyle(fontSize: 28.sp, color: Colors.white),
),
// onTap: () => _showSnackBar(context, 'Delete'),
);
}
},
),
child: Container(
color: Colors.white,
padding: EdgeInsets.only(
top: 30.w,
left: 15.w,
bottom: 37.w,
),
child: Stack(
children: [
Row(
children: [
_cardRadio(context, cartItem, model, index),
_image(cartItem.itempic),
_content(cartItem.itemtitle, '默认', cartItem.itemprice),
],
),
Positioned(
bottom: 0,
right: 16.w,
child: CartCount(
cartItem: cartItem,
// goodsNum: widget.goodsNum,
// index: widget.index,
// reduce: widget.reduce,
// add: widget.add,
),
),
],
),
),
),
);
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: PreferredSize(
preferredSize: Size.fromHeight(kToolbarHeight),
child: MarketCartAppBar(),
),
bottomNavigationBar:
Consumer<CartProvidde>(builder: (context, model, child) {
return Container(
color: Colors.white,
height: 98.w,
width: MediaQuery.of(context).size.width,
padding: EdgeInsets.symmetric(horizontal: 32.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
_selectAll(model),
_settlement(
model,
context,
)
],
),
);
}),
body: Stack(
children: [
Consumer<CartProvidde>(
builder: (context, model, child) {
List<AkuShopModel> cartList = model.cartList;
_cartList = model.cartList;
return ListView.builder(
itemCount: cartList.length,
itemBuilder: (BuildContext context, int index) {
return _marketCartCard(cartList[index], index);
});
},
),
// Positioned(
// bottom: 0,
// child: MarketCartBottomBar(
// selectAll: _selectALl,
// ),
// ),
],
));
}
}

@ -1,48 +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:akuCommunity/utils/headers.dart';
class MarketCartAppBar extends StatelessWidget {
const MarketCartAppBar({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
child: AppBar(
elevation: 0,
backgroundColor: Colors.white,
leading: IconButton(
padding: EdgeInsets.all(0),
icon: Icon(AntDesign.left, size: 40.sp),
onPressed: () {
Get.back();
},
),
centerTitle: false,
title: RichText(
text: TextSpan(
style: TextStyle(
color: Color(0xff333333),
),
children: <InlineSpan>[
TextSpan(
text: '购物车 ',
style: TextStyle(
fontSize: 38.sp,
),
),
TextSpan(
text: '业主尊享,购物更省心',
style: TextStyle(fontSize: 24.sp),
),
],
),
),
),
);
}
}

@ -1,108 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:akuCommunity/provider/cart.dart';
import 'package:akuCommunity/utils/headers.dart';
class MarketCartBottomBar extends StatelessWidget {
const MarketCartBottomBar({Key key}) : super(key: key);
Widget _selectAll(CartProvidde model) {
return InkWell(
onTap: () {
model.changeALlCheckState(!model.isAllCheck);
},
child: Container(
margin: EdgeInsets.symmetric(vertical: 29.w),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Icon(
model.isAllCheck
? Icons.radio_button_checked
: Icons.radio_button_unchecked,
color: model.isAllCheck ? Color(0xffdb0000) : Color(0xff999999),
size: 40.w,
),
Container(
margin: EdgeInsets.only(left: 18.w),
child: Text(
'全选',
style: TextStyle(
fontSize: 28.sp,
color: Color(0xff333333),
),
),
),
],
),
),
);
}
Widget _settlement(CartProvidde model, BuildContext context) {
return Row(
children: [
model.allPrice != 0
? Container(
margin: EdgeInsets.only(right: 10.w),
child: Text(
'合计:¥${model.allPrice.toStringAsFixed(2)}',
style: TextStyle(
fontSize: 28.sp,
color: Color(0xffe60e0e),
),
),
)
: SizedBox(),
InkWell(
onTap: model.allGoodsCount != 0 ? () {} : null,
child: Container(
alignment: Alignment.center,
decoration: BoxDecoration(
color: model.allGoodsCount != 0
? Color(0xffffc40c)
: Color(0xffd8d8d8),
borderRadius: BorderRadius.all(Radius.circular(30)),
),
width: 198.w,
margin: EdgeInsets.symmetric(vertical: 16.w),
padding: EdgeInsets.symmetric(vertical: 12.w),
child: Text(
'结算(${model.allGoodsCount})',
style: TextStyle(
fontSize: 30.sp,
color:
model.allGoodsCount != 0 ? Color(0xff333333) : Colors.white,
),
),
),
),
],
);
}
@override
Widget build(BuildContext context) {
return Consumer<CartProvidde>(builder: (context, model, child) {
return Container(
color: Colors.white,
height: 98.w,
width: MediaQuery.of(context).size.width,
padding: EdgeInsets.symmetric(horizontal: 32.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
_selectAll(model),
_settlement(
model,
context,
)
],
),
);
});
}
}

@ -1,207 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_slidable/flutter_slidable.dart';
import 'package:provider/provider.dart';
import 'package:akuCommunity/model/aku_shop_model.dart';
import 'package:akuCommunity/provider/cart.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/cached_image_wrapper.dart';
import 'package:akuCommunity/widget/cart_count.dart';
class MarketCartCard extends StatelessWidget {
final AkuShopModel cartItem;
MarketCartCard({Key key, this.cartItem}) : super(key: key);
Widget _cardRadio(
BuildContext context, AkuShopModel cartItem, CartProvidde model) {
return InkWell(
onTap: () {
cartItem.isCheck = !cartItem.isCheck;
model.changeCheckState(cartItem);
},
child: Container(
alignment: Alignment.center,
child: Icon(
Icons.check_circle,
color: cartItem.isCheck ? Color(0xffdb0000) : Color(0xff999999),
size: 36.w,
),
),
);
}
Widget _image(String imagePath) {
return Container(
margin: EdgeInsets.symmetric(horizontal: 20.w),
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(2)),
child: CachedImageWrapper(
url: imagePath,
width: 180.w,
height: 180.w,
),
),
);
}
Widget _content(String content, specs, price) {
return Container(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 394.w,
child: Text(
content,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 24.sp,
color: Color(0xff333333),
),
),
),
// InkWell(
// onTap: _showGoodsSpecsSheet,
// child: Container(
// margin: EdgeInsets.only(top: 10.w),
// padding: EdgeInsets.symmetric(
// vertical: 5.w,
// horizontal: 19.w,
// ),
// alignment: Alignment.center,
// decoration: BoxDecoration(
// color: Color(0xfff5f5f5),
// border: Border.all(color: Color(0xffd3d3d3), width: 0.5),
// borderRadius: BorderRadius.all(Radius.circular(15)),
// ),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// Text(
// specs,
// style: TextStyle(
// fontSize: 18.sp,
// color: Color(0xff333333),
// ),
// ),
// Container(
// alignment: Alignment.center,
// margin: EdgeInsets.only(left: 16.w),
// child: Icon(
// AntDesign.down,
// color: Color(0xff333333),
// size: 22.sp,
// ),
// ),
// ],
// ),
// ),
// ),
Container(
margin: EdgeInsets.only(top: 40.w),
child: Text(
'$price',
style: TextStyle(
fontSize: 28.sp,
color: Color(0xffe60e0e),
),
),
),
],
),
);
}
@override
Widget build(BuildContext context) {
return Consumer<CartProvidde>(builder: (context, model, child) {
return Container(
margin: EdgeInsets.only(
top: 20.w,
left: 32.w,
right: 32.w,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(6)),
),
child: Slidable.builder(
actionPane: SlidableBehindActionPane(),
actionExtentRatio: 0.25,
secondaryActionDelegate: SlideActionBuilderDelegate(
actionCount: 2,
builder: (context, index, animation, renderingMode) {
if (index == 0) {
return SlideAction(
child: Text(
'移至收藏夹',
style: TextStyle(fontSize: 28.sp, color: Colors.white),
),
color: renderingMode == SlidableRenderingMode.slide
? Color(0xffffc40c).withOpacity(animation.value)
: Color(0xffffc40c),
// onTap: () => _showSnackBar(context, 'More'),
closeOnTap: false,
);
} else {
return SlideAction(
onTap: () {
model.deleteGoods(cartItem.itemid);
},
decoration: BoxDecoration(
color: renderingMode == SlidableRenderingMode.slide
? Color(0xffe60e0e).withOpacity(animation.value)
: Color(0xffe60e0e),
borderRadius: BorderRadius.only(
topRight: Radius.circular(6),
bottomRight: Radius.circular(6),
),
),
child: Text(
'删除',
style: TextStyle(fontSize: 28.sp, color: Colors.white),
),
// onTap: () => _showSnackBar(context, 'Delete'),
);
}
},
),
child: Container(
color: Colors.white,
padding: EdgeInsets.only(
top: 30.w,
left: 15.w,
bottom: 37.w,
),
child: Stack(
children: [
Row(
children: [
_cardRadio(context, cartItem, model),
_image(cartItem.itempic),
_content(cartItem.itemtitle, '默认', cartItem.itemprice),
],
),
Positioned(
bottom: 0,
right: 16.w,
child: CartCount(
cartItem: cartItem,
// goodsNum: widget.goodsNum,
// index: widget.index,
// reduce: widget.reduce,
// add: widget.add,
),
),
],
),
),
),
);
});
}
}

@ -1,68 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import '../widget/market_list.dart';
import 'widget/market_details_app_bar.dart';
class MarketDetailPage extends StatefulWidget {
final Bundle bundle;
MarketDetailPage({Key key, this.bundle}) : super(key: key);
@override
_MarketDetailPageState createState() => _MarketDetailPageState();
}
class _MarketDetailPageState extends State<MarketDetailPage>
with AutomaticKeepAliveClientMixin, SingleTickerProviderStateMixin {
@override
bool get wantKeepAlive => true;
TabController _controller;
//
List<Map<String, dynamic>> treeList = [
{'name': '新品推荐', 'imagePath': 'assets/tab/nanz.png'},
{'name': '爆款集合', 'imagePath': 'assets/tab/bkjh.png'},
{'name': '口碑好物', 'imagePath': 'assets/tab/kbhw.png'},
{'name': '男装', 'imagePath': 'assets/tab/nanz.png'},
{'name': '女装', 'imagePath': 'assets/tab/nvz.png'}
];
@override
void initState() {
super.initState();
_controller = TabController(length: treeList.length, vsync: this);
}
@override
void dispose() {
_controller.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
super.build(context);
return Scaffold(
appBar: PreferredSize(
preferredSize: Size.fromHeight(kToolbarHeight), //319
child: MarketDetailsAppBar(title: widget.bundle.getString('title')),
),
body: MarketList(
isGroup: false,
title: widget.bundle.getString('title'),
),
// TabBarView(
// controller: _controller,
// children: List.generate(
// treeList.length,
// (index) => MarketListPage(
// isGroup: false,
// title: widget.bundle.getString('title'),
// ),
// ),
// ),
);
}
}

@ -1,208 +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:akuCommunity/utils/headers.dart';
class MarketDetailsAppBar extends StatefulWidget {
final String title;
MarketDetailsAppBar({Key key, this.title}) : super(key: key);
@override
_MarketDetailsAppBarState createState() => _MarketDetailsAppBarState();
}
class _MarketDetailsAppBarState extends State<MarketDetailsAppBar> {
List<Map<String, dynamic>> _classList = [
{'title': '居家生活'},
{'title': '数码家电'},
{'title': '休闲副食'},
{'title': '滋补保健'},
{'title': '彩妆香水'},
{'title': '服饰箱包'},
{'title': '母婴玩具'},
{'title': '饮料酒水'},
];
///
void _showModelTopSheet() {
showGeneralDialog(
context: context,
barrierLabel: "",
barrierColor: Colors.black.withOpacity(0.5),
transitionDuration: const Duration(milliseconds: 250),
barrierDismissible: true,
pageBuilder: (BuildContext context, Animation animation,
Animation secondaryAnimation) {
return Stack(
children: <Widget>[
Container(
alignment:
Alignment.lerp(Alignment.topCenter, Alignment.center, 0.25),
margin: EdgeInsets.symmetric(horizontal: 32.w),
child: Material(
color: Color(0xffffffff),
child: Container(
alignment: Alignment.topCenter,
height: 282.w,
width: 686.w,
color: Colors.black.withOpacity(animation.value),
child: GridView.builder(
padding: EdgeInsets.only(
top: 36.w,
left: 25.w,
right: 25.w,
bottom: 30.w,
),
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemCount: _classList.length,
itemBuilder: (BuildContext context, int index) {
return InkWell(
onTap: () {
Get.back();
},
child: Container(
decoration: BoxDecoration(
color: Color(0xfffbfbfb),
border: Border.all(
color: _classList[index]['title'] == widget.title
? Color(0xffe60e0e)
: Color(0xff979797),
width: 1.w,
),
),
child: Center(
child: Text(
_classList[index]['title'],
style: TextStyle(
color:
_classList[index]['title'] == widget.title
? Color(0xffe60e0e)
: Color(0xff333333),
fontSize: 24.sp),
)),
),
);
},
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3,
mainAxisSpacing: 20.w,
crossAxisSpacing: 30.w,
childAspectRatio: 192.w / 58.w),
),
),
),
),
Positioned(
top: 78,
left: MediaQuery.of(context).size.width / 2.05,
child: Material(
color: Colors.transparent,
child: Container(
child: Icon(
AntDesign.caretup,
color: Color(0xffffffff),
size: 36.sp,
),
),
),
),
],
);
},
transitionBuilder: (_, anim, __, child) {
return ScaleTransition(
alignment: Alignment.lerp(
Alignment.topCenter, Alignment.center, 0.145), //
scale: anim,
child: child,
);
},
);
}
@override
Widget build(BuildContext context) {
return Container(
child: AppBar(
elevation: 0,
backgroundColor: Color(0xffffffff),
leading: IconButton(
padding: EdgeInsets.all(0),
icon: Icon(AntDesign.left, size: 37.sp),
onPressed: () {
Get.back();
}),
title: InkWell(
onTap: _showModelTopSheet,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
widget.title,
style: TextStyle(fontSize: 32.sp, color: Color(0xff333333)),
),
SizedBox(width: 10.w),
Container(
padding: EdgeInsets.only(top: 1),
child: Icon(
AntDesign.caretdown,
size: 18.sp,
color: Color(0xff000000),
),
)
],
),
),
centerTitle: true,
actions: <Widget>[
IconButton(
icon: Icon(
AntDesign.search1,
size: 38.sp,
color: Color(0xff666666),
),
onPressed: () {},
)
],
// bottom: TabBar(
// controller: _controller,
// labelPadding: EdgeInsets.symmetric(horizontal: 15.w),
// indicator: BoxDecoration(),
// isScrollable: true,
// unselectedLabelStyle: TextStyle(
// fontSize: ScreenUtil().setSp(24),
// ),
// labelStyle: TextStyle(
// fontWeight: FontWeight.w600,
// fontSize: ScreenUtil().setSp(24),
// ),
// unselectedLabelColor: Color(0xff333333),
// labelColor: Color(0xffe60e0e),
// tabs: List.generate(
// treeList.length,
// (index) => Container(
// padding: EdgeInsets.symmetric(vertical:32.w),
// child: Column(
// children: <Widget>[
// Image.asset(
// treeList[index]['imagePath'],
// height: 110.w,
// width: 110.w,
// fit: BoxFit.fill,
// ),
// SizedBox(height: 14.w),
// Text(treeList[index]['name'])
// ],
// ),
// ),
// ),
// ),
),
);
}
}

@ -1,153 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/app_bar_action.dart';
import 'package:akuCommunity/widget/search_bar_delegate.dart';
import 'package:akuCommunity/widget/single_ad_space.dart';
import 'widget/market_list.dart';
import 'widget/market_sticky_bar.dart';
class MarketPage extends StatefulWidget {
MarketPage({Key key}) : super(key: key);
@override
_MarketPageState createState() => _MarketPageState();
}
class _MarketPageState extends State<MarketPage>
with AutomaticKeepAliveClientMixin, SingleTickerProviderStateMixin {
@override
bool get wantKeepAlive => true;
TabController _controller;
List<Map<String, dynamic>> actionsList = [
{
'title': '购物车',
'icon': AntDesign.shoppingcart,
},
{
'title': '分类',
'icon': AntDesign.appstore_o,
}
];
//
List<Map<String, dynamic>> treeList = [
{'name': '社区商城', 'isGroup': false},
{'name': '社区团购', 'isGroup': true}
];
List<Widget> _listActions() {
return actionsList
.map((item) => AppBarAction(
title: item['title'],
icon: item['icon'],
))
.toList();
}
@override
void initState() {
super.initState();
_controller = TabController(length: treeList.length, vsync: this);
}
@override
void dispose() {
_controller.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
// double _appBarHeight = 506.w;
super.build(context);
return Scaffold(
appBar: AppBar(
elevation: 0,
backgroundColor: Color(0xfff9f9f9),
title: Container(
padding: EdgeInsets.symmetric(
horizontal: 24.w,
vertical: 12.w,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(36)),
boxShadow: <BoxShadow>[
BoxShadow(
color: Colors.grey.withOpacity(0.1),
offset: Offset(1.1, 1.1),
blurRadius: 10.0),
],
),
child: InkWell(
onTap: () {
showSearch(context: context, delegate: SearchBarDelegate());
},
child: Container(
child: Row(children: [
Icon(
AntDesign.search1,
size: ScreenUtil().setSp(29),
color: Color(0xff999999),
),
SizedBox(width: 5),
Text(
'搜索宝贝',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: Color(0xff999999)),
)
]),
),
),
),
actions: _listActions(),
),
body: NestedScrollView(
headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
return <Widget>[
SliverAppBar(
expandedHeight: 676.w,
backgroundColor: Colors.transparent,
elevation: 0,
flexibleSpace: Stack(
children: [
Positioned(
top: 0,
left: 0,
right: 0,
child: Column(
children: [
SingleAdSpace(
imagePath: 'assets/example/guanggao5.png',
radius: 36,
),
],
),
),
],
),
),
MarketStickyBar(
treeList: treeList,
controller: _controller,
)
];
},
body: TabBarView(
controller: _controller,
children: List.generate(
treeList.length,
(index) => MarketList(
isGroup: treeList[index]['isGroup'],
))),
),
);
}
}

@ -1,224 +0,0 @@
import 'dart:async';
import 'dart:convert';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/model/aku_shop_model.dart';
import 'package:akuCommunity/service/base_model.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/goods_card_skeleton.dart';
import 'package:akuCommunity/widget/sliver_goods_card.dart';
import 'sliver_goods_group_card.dart';
class MarketList extends StatefulWidget {
final bool isGroup;
final String title;
MarketList({Key key, this.isGroup = false, this.title}) : super(key: key);
@override
_MarketListState createState() => _MarketListState();
}
class _MarketListState extends State<MarketList>
with AutomaticKeepAliveClientMixin {
@override
bool get wantKeepAlive => true;
List<AkuShopModel> _shopList = [];
int page = 1;
@override
void initState() {
super.initState();
akuShop();
}
Future<void> akuShop() async {
switch (widget.title) {
case '居家生活':
Future<String> loadString =
DefaultAssetBundle.of(context).loadString("assets/json/jjsh.json");
loadString.then((String response) {
Map<String, dynamic> result = json.decode(response.toString());
BaseModel model = BaseModel.fromJson(result);
model.result.forEach((item) {
item["count"] = 1;
item["isCheck"] = false;
AkuShopModel list = AkuShopModel.fromJson(item);
setState(() {
_shopList.add(list);
});
});
});
break;
case '数码家电':
Future<String> loadString =
DefaultAssetBundle.of(context).loadString("assets/json/smjd.json");
loadString.then((String response) {
Map<String, dynamic> result = json.decode(response.toString());
BaseModel model = BaseModel.fromJson(result);
model.result.forEach((item) {
item["count"] = 1;
item["isCheck"] = false;
AkuShopModel list = AkuShopModel.fromJson(item);
setState(() {
_shopList.add(list);
});
});
});
break;
case '休闲副食':
Future<String> loadString =
DefaultAssetBundle.of(context).loadString("assets/json/xxfs.json");
loadString.then((String response) {
Map<String, dynamic> result = json.decode(response.toString());
BaseModel model = BaseModel.fromJson(result);
model.result.forEach((item) {
item["count"] = 1;
item["isCheck"] = false;
AkuShopModel list = AkuShopModel.fromJson(item);
setState(() {
_shopList.add(list);
});
});
});
break;
case '滋补保健':
Future<String> loadString =
DefaultAssetBundle.of(context).loadString("assets/json/zbbj.json");
loadString.then((String response) {
Map<String, dynamic> result = json.decode(response.toString());
BaseModel model = BaseModel.fromJson(result);
model.result.forEach((item) {
item["count"] = 1;
item["isCheck"] = false;
AkuShopModel list = AkuShopModel.fromJson(item);
setState(() {
_shopList.add(list);
});
});
});
break;
case '彩妆香水':
Future<String> loadString =
DefaultAssetBundle.of(context).loadString("assets/json/czxs.json");
loadString.then((String response) {
Map<String, dynamic> result = json.decode(response.toString());
BaseModel model = BaseModel.fromJson(result);
model.result.forEach((item) {
item["count"] = 1;
item["isCheck"] = false;
AkuShopModel list = AkuShopModel.fromJson(item);
setState(() {
_shopList.add(list);
});
});
});
break;
case '服饰箱包':
Future<String> loadString =
DefaultAssetBundle.of(context).loadString("assets/json/fsxb.json");
loadString.then((String response) {
Map<String, dynamic> result = json.decode(response.toString());
BaseModel model = BaseModel.fromJson(result);
model.result.forEach((item) {
item["count"] = 1;
item["isCheck"] = false;
AkuShopModel list = AkuShopModel.fromJson(item);
setState(() {
_shopList.add(list);
});
});
});
break;
case '母婴玩具':
Future<String> loadString =
DefaultAssetBundle.of(context).loadString("assets/json/mywj.json");
loadString.then((String response) {
Map<String, dynamic> result = json.decode(response.toString());
BaseModel model = BaseModel.fromJson(result);
model.result.forEach((item) {
item["count"] = 1;
item["isCheck"] = false;
AkuShopModel list = AkuShopModel.fromJson(item);
setState(() {
_shopList.add(list);
});
});
});
break;
case '饮料酒水':
Future<String> loadString =
DefaultAssetBundle.of(context).loadString("assets/json/yljs.json");
loadString.then((String response) {
Map<String, dynamic> result = json.decode(response.toString());
BaseModel model = BaseModel.fromJson(result);
model.result.forEach((item) {
item["count"] = 1;
item["isCheck"] = false;
AkuShopModel list = AkuShopModel.fromJson(item);
setState(() {
_shopList.add(list);
});
});
});
break;
default:
Future<String> loadString =
DefaultAssetBundle.of(context).loadString("assets/json/shop.json");
loadString.then((String response) {
Map<String, dynamic> result = json.decode(response.toString());
BaseModel model = BaseModel.fromJson(result);
model.result.forEach((item) {
item["count"] = 1;
item["isCheck"] = false;
AkuShopModel list = AkuShopModel.fromJson(item);
setState(() {
_shopList.add(list);
});
});
});
break;
}
}
void _onLoading() async {
await Future.delayed(Duration(milliseconds: 1500));
page++;
// akuShop(page);
if (mounted) setState(() {});
}
@override
Widget build(BuildContext context) {
super.build(context);
return CustomScrollView(
slivers: [
widget.isGroup
? SliverGoodsGroupCard()
: SliverPadding(
padding: EdgeInsets.only(
top: 30.w,
left: 32.w,
right: 32.w,
),
sliver: _shopList.length == 0
? SliverToBoxAdapter(child: GoodsCardSkeleton())
: SliverGoodsCard(
shoplist: _shopList,
isShow: true,
)),
],
);
}
}

@ -1,76 +0,0 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class MarketStickyBar extends StatefulWidget {
final TabController controller;
final List<Map<String, dynamic>> treeList;
MarketStickyBar({Key key, this.controller, this.treeList}) : super(key: key);
@override
_MarketStickyBarState createState() => _MarketStickyBarState();
}
class _MarketStickyBarState extends State<MarketStickyBar> {
TabBar _tabBar() {
return TabBar(
controller: widget.controller,
isScrollable: true,
indicatorColor: Color(0xffFFC100),
labelColor: Color(0xff000000),
unselectedLabelColor: Color(0xFF3A5160).withOpacity(0.5),
indicatorWeight: 3.0,
indicatorSize: TabBarIndicatorSize.label,
labelStyle: TextStyle(
fontSize: ScreenUtil().setSp(34),
color: Color(0xff999999),
fontWeight: FontWeight.w600,
),
tabs: List.generate(
widget.treeList.length,
(index) => Tab(
text: widget.treeList[index]['name'],
)),
);
}
@override
Widget build(BuildContext context) {
return SliverPersistentHeader(
delegate: _SliverAppBarDelegate(
child: _tabBar(),
),
pinned: true,
floating: true,
);
}
}
class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
final TabBar child;
_SliverAppBarDelegate({
@required this.child,
});
@override
double get minExtent => this.child.preferredSize.height;
@override
double get maxExtent => this.child.preferredSize.height;
@override
Widget build(
BuildContext context, double shrinkOffset, bool overlapsContent) {
return new SizedBox.expand(
child: Container(
color: Color(0xfff9f9f9),
child: child,
),
);
}
@override
bool shouldRebuild(SliverPersistentHeaderDelegate oldDelegate) {
return true;
}
}

@ -1,235 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/cached_image_wrapper.dart';
class SliverGoodsGroupCard extends StatefulWidget {
SliverGoodsGroupCard({Key key}) : super(key: key);
@override
_SliverGoodsGroupCardState createState() => _SliverGoodsGroupCardState();
}
class _SliverGoodsGroupCardState extends State<SliverGoodsGroupCard> {
List<Map<String, dynamic>> _groupList = [
{
'title': '果众 厄瓜多尔散把香蕉12根约2.4kg',
'image':
'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1600934902545&di=c610a098ad4b433af8f89ee2768c6d28&imgtype=0&src=http%3A%2F%2Fd6.yihaodianimg.com%2FN06%2FM0A%2F85%2FCD%2FCgQIzVQiy3GAbvbDAAJatt79Mms90000_600x600.jpg',
'price': '36.6',
'subtitle': '第2期 中国新疆仙人蕉',
'remainingTime': '19天13时46分',
'address': '中国-新疆',
'arrivalTime': '2020年11月7日',
'isOverTime': false,
},
{
'title': '四川安岳新鲜黄柠檬尤力克包邮1斤中果现摘多汁产地直',
'image':
'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1600935221011&di=e7aecab551abef82de3fc3450916fe22&imgtype=0&src=http%3A%2F%2Fimg3.imgtn.bdimg.com%2Fit%2Fu%3D109616473%2C3735766861%26fm%3D214%26gp%3D0.jpg',
'price': '76.6',
'subtitle': '第3期 中国安岳黄柠檬',
'remainingTime': '21天13时46分',
'address': '中国-四川',
'arrivalTime': '2020年11月17日',
'isOverTime': false,
},
{
'title': '斤新鲜水果包邮76号甜瓜25新疆正宗吐鲁番哈密瓜西洲蜜',
'image':
'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=735601588,2284764256&fm=26&gp=0.jpg',
'price': '68.6',
'subtitle': '第1期 中国新疆哈密瓜',
'remainingTime': '--天--时--分',
'address': '中国-新疆',
'arrivalTime': '2019年12月17日',
'isOverTime': true,
}
];
Widget _image(String image) {
return ClipRRect(
borderRadius: BorderRadius.circular(6),
child: CachedImageWrapper(
url: image,
height: 120.w,
width: 160.w,
),
);
}
Widget _button(String price, isOverTime) {
return InkWell(
onTap: () {},
child: Container(
height: 52.w,
width: 170.w,
alignment: Alignment.center,
padding: EdgeInsets.only(
top: 10.w,
bottom: 9.w,
),
decoration: BoxDecoration(
color: isOverTime ? Color(0xffd9d9d9) : Color(0xffffc40c),
borderRadius: BorderRadius.all(Radius.circular(4.w)),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'¥$price',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 24.sp,
color: isOverTime ? Color(0xff333333) : Color(0xffe60e0e),
),
),
SizedBox(width: 10.w),
Text(
isOverTime ? '已过期' : '去团购',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 24.sp,
color: Color(0xff333333)),
),
],
),
),
);
}
Widget _content(String title, subtitle, remainingTime, address, arrivalTime,
price, isOverTime) {
return Container(
margin: EdgeInsets.only(left: 20.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(bottom: 8.w),
width: 474.w,
child: Text(
title,
textAlign: TextAlign.left,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 30.sp,
color: Color(0xff333333),
),
),
),
Container(
margin: EdgeInsets.only(bottom: 12.w),
child: Text(
subtitle,
style: TextStyle(
fontSize: 20.sp,
color: Color(0xff333333),
),
),
),
Container(
margin: EdgeInsets.only(bottom: 16.w),
padding: EdgeInsets.only(
top: 6.w,
left: 11.w,
bottom: 7.w,
right: 20.w,
),
decoration: BoxDecoration(
color: isOverTime ? Color(0xffd9d9d9) : Color(0xffffeee3),
borderRadius: BorderRadius.all(Radius.circular(4.w)),
),
child: Row(
children: [
Icon(
MaterialIcons.access_time,
size: 18.sp,
color: isOverTime ? Color(0xff333333) : Color(0xffff7f00),
),
Text(
'剩余时间:$remainingTime',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: isOverTime ? Color(0xff333333) : Color(0xffff7f00),
fontSize: 18.sp,
),
),
],
),
),
Container(
margin: EdgeInsets.only(bottom: 30.w),
width: 474.w,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'原产地:$address',
style:
TextStyle(color: Color(0xff999999), fontSize: 20.sp),
),
SizedBox(height: 10.w),
Text(
'预计到货:$arrivalTime',
style:
TextStyle(color: Color(0xff999999), fontSize: 20.sp),
)
],
),
_button(price, isOverTime)
],
),
),
],
),
);
}
@override
Widget build(BuildContext context) {
return SliverList(
delegate: SliverChildBuilderDelegate((BuildContext content, int index) {
return Container(
margin: EdgeInsets.only(
top: 20.w,
left: 32.w,
right: 32.w,
),
padding: EdgeInsets.only(
top: 12.w,
left: 12.w,
right: 20.w,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(8.w)),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
_image(_groupList[index]['image']),
_content(
_groupList[index]['title'],
_groupList[index]['subtitle'],
_groupList[index]['remainingTime'],
_groupList[index]['address'],
_groupList[index]['arrivalTime'],
_groupList[index]['price'],
_groupList[index]['isOverTime'],
),
],
),
);
}, childCount: _groupList.length),
);
}
}

@ -1,242 +0,0 @@
import 'dart:async';
import 'dart:convert';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/model/aku_shop_class_model.dart';
import 'package:akuCommunity/service/base_model.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/cached_image_wrapper.dart';
import 'widget/market_class_bar.dart';
class MarketClassPage extends StatefulWidget {
MarketClassPage({Key key}) : super(key: key);
@override
_MarketClassPageState createState() => _MarketClassPageState();
}
class _MarketClassPageState extends State<MarketClassPage> {
// Future.microtask(() => null)1
// void testSX(){
// new Future(() => print('s_1'));
// scheduleMicrotask(() => print('s_2'));
// print('s_3');
// }
int _currentIndex = 0;
List<AkuShopClassModel> _shopClassList = [];
List<String> _leftNav = [
'居家生活',
'服饰鞋包',
'休闲副食',
'数码家电',
'彩妆香水',
'母婴亲子',
'运动旅游',
'滋补保健',
];
ScrollController _controller = ScrollController();
@override
void initState() {
super.initState();
akuShopClass();
}
Future<void> akuShopClass() async {
Future<String> loadString =
DefaultAssetBundle.of(context).loadString("assets/json/shopclass.json");
loadString.then((String response) {
Map<String, dynamic> result = json.decode(response.toString());
BaseModel model = BaseModel.fromJson(result);
model.result.forEach((item) {
AkuShopClassModel list = AkuShopClassModel.fromJson(item);
setState(() {
_shopClassList.add(list);
});
});
});
}
Widget _leftInkWellNav(int index) {
return InkWell(
child: Stack(
children: [
Container(
height: 120.w,
alignment: Alignment.center,
color: _currentIndex == index ? Colors.white : Colors.transparent,
padding: EdgeInsets.symmetric(vertical: 24.w),
child: Text(
_shopClassList[index].mainName,
style: TextStyle(
fontSize: BaseStyle.fontSize28,
color: _currentIndex == index
? BaseStyle.colorffc40c
: ktextPrimary,
),
),
),
_currentIndex == index
? Positioned(
top: 42.w,
left: 1,
child: SizedBox(
width: 8.w,
height: 40.w,
child: DecoratedBox(
decoration: BoxDecoration(color: BaseStyle.colorffc40c),
),
),
)
: SizedBox(),
],
),
onTap: () {
setState(() {
// _controller.animateTo(0, duration: Duration(seconds: 2), curve: Curves.easeInQuad);
_controller.jumpTo(0);
_currentIndex = index;
});
},
);
}
Widget _classGridCard(List<Info> infoList) {
return Container(
child: GridView.builder(
padding: EdgeInsets.zero,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemCount: infoList.length,
itemBuilder: (BuildContext context, int index) {
return InkWell(
onTap: () {},
child: Container(
child: Column(
children: [
CachedImageWrapper(
url: infoList[index].imgurl,
width: 152.w,
height: 152.w,
),
Container(
margin: EdgeInsets.only(top: 14.w),
child: Text(
infoList[index].sonName,
style: TextStyle(
fontSize: BaseStyle.fontSize24,
color: ktextPrimary,
),
),
),
],
),
));
},
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3,
childAspectRatio: 152.w / 210.w,
),
),
);
}
Widget _classList(String nextName, List<Info> infoList) {
return Container(
margin: EdgeInsets.symmetric(horizontal: 32.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(bottom: 24.w),
padding: EdgeInsets.symmetric(vertical: 14.w),
width: 476.w,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(color: Color(0xffe8e8e8), width: 0.5),
),
),
child: Text(
nextName,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: BaseStyle.fontSize26,
color: ktextPrimary,
),
),
),
_classGridCard(infoList),
],
),
);
}
@override
Widget build(BuildContext context) {
double _statusHeight = MediaQuery.of(context).padding.top;
return Scaffold(
appBar: PreferredSize(
child: MarketClassBar(),
preferredSize: Size.fromHeight(kToolbarHeight),
),
body: _shopClassList.length != 0
? Container(
decoration: BoxDecoration(
color: Colors.white,
border: Border(
top: BorderSide(color: Color(0xffe8e8e8), width: 0.5)),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
width: 203.w,
height: MediaQuery.of(context).size.height -
kToolbarHeight -
_statusHeight,
decoration: BoxDecoration(
border: Border(
right:
BorderSide(color: Color(0xffe8e8e8), width: 0.5)),
),
child: ListView.builder(
shrinkWrap: true,
itemCount: _leftNav.length,
itemBuilder: (BuildContext context, int index) {
return _leftInkWellNav(index);
}),
),
Container(
width: 547.w,
height: MediaQuery.of(context).size.height -
kToolbarHeight -
_statusHeight,
child: ListView(
shrinkWrap: true,
controller: _controller,
children: List.generate(
_shopClassList[_currentIndex].data.length,
(index) => _classList(
_shopClassList[_currentIndex]
.data[index]
.nextName,
_shopClassList[_currentIndex]
.data[index]
.info,
))),
),
],
),
)
: Container(
child: CircularProgressIndicator(),
),
);
}
}

@ -1,58 +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:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/search_bar_delegate.dart';
class MarketClassBar extends StatelessWidget {
Widget _inkWellSearch(BuildContext context) {
return InkWell(
onTap: () {
showSearch(context: context, delegate: SearchBarDelegate());
},
child: Container(
margin: EdgeInsets.only(right: 32.w),
padding: EdgeInsets.only(left: 40.w, top: 15.w, bottom: 15.w),
decoration: BoxDecoration(
color: Color(0xfff3f3f3),
borderRadius: BorderRadius.all(Radius.circular(36)),
),
child: Row(children: [
Icon(
AntDesign.search1,
size: 28.sp,
color: Color(0xff999999),
),
SizedBox(width: 5),
Text(
'搜索商品、活动、帖子、应用',
style: TextStyle(
fontSize: 28.sp,
color: Color(0xff999999),
),
)
]),
),
);
}
@override
Widget build(BuildContext context) {
return Container(
child: AppBar(
elevation: 0,
titleSpacing: 0,
backgroundColor: Color(0xffffffff),
leading: InkWell(
onTap: () => Get.back(),
child: Icon(AntDesign.left, size: 40.sp),
),
centerTitle: true,
title: _inkWellSearch(context),
),
);
}
}

@ -22,7 +22,7 @@ class PermissionUtil {
} }
class AlarmPage extends StatefulWidget { class AlarmPage extends StatefulWidget {
AlarmPage({Key key, bundle}) : super(key: key); AlarmPage({Key key}) : super(key: key);
@override @override
_AlarmPageState createState() => _AlarmPageState(); _AlarmPageState createState() => _AlarmPageState();

@ -1,265 +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:akuCommunity/base/assets_image.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'widget/refund_shop_card.dart';
class EvaluateGoodPage extends StatefulWidget {
final Bundle bundle;
EvaluateGoodPage({Key key, this.bundle}) : super(key: key);
@override
_EvaluateGoodPageState createState() => _EvaluateGoodPageState();
}
class _EvaluateGoodPageState extends State<EvaluateGoodPage> {
TextEditingController _evaluateContent = new TextEditingController();
String hintText = '请您从多个角度评价该商品';
List<Map<String, dynamic>> _listRadio = [
{'radioName': '好评', 'isCheck': false},
{'radioName': '中评', 'isCheck': false},
{'radioName': '差评', 'isCheck': false}
];
Container _containerContentList(List<Map<String, dynamic>> listContent) {
return Container(
child: Column(
children: listContent
.map((item) => RefundShopCard(
imagePath: item['imagePath'],
content: item['content'],
specs: item['specs'],
))
.toList(),
),
);
}
Container _containerRadio() {
return Container(
margin: EdgeInsets.only(
top: 8.w,
),
padding: EdgeInsets.only(
left: 32.w,
),
child: Row(
children: [
Text(
'描述相符',
style:
TextStyle(fontSize: BaseStyle.fontSize28, color: ktextPrimary),
),
SizedBox(width: 34.w),
Row(
children: _listRadio
.map((item) => Container(
margin: EdgeInsets.only(left: 44.w),
child: InkWell(
onTap: () {
setState(() {
_listRadio.forEach((item) {
item['isCheck'] = false;
});
item['isCheck'] = true;
});
},
child: Row(
children: [
Icon(
Icons.radio_button_checked,
size: BaseStyle.fontSize36,
color: item['isCheck']
? BaseStyle.colorff8500
: BaseStyle.colord8d8d8,
),
SizedBox(width: 16.w),
Text(
item['radioName'],
style: TextStyle(
fontSize: BaseStyle.fontSize28,
color: item['isCheck']
? BaseStyle.colorff8500
: BaseStyle.colord8d8d8,
),
),
],
),
),
))
.toList(),
),
],
),
);
}
Container _containerEvaluateTextField() {
return Container(
margin: EdgeInsets.only(
top: 70.w,
),
padding: EdgeInsets.only(
top: 22.w,
left: 32.w,
right: 32.w,
),
color: Colors.white,
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextFormField(
cursorColor: Color(0xffffc40c),
style: TextStyle(
fontSize: BaseStyle.fontSize34,
),
controller: _evaluateContent,
onChanged: (String value) {},
maxLines: 8,
decoration: InputDecoration(
isDense: true,
contentPadding: EdgeInsets.only(
top: 0.w,
bottom: 0.w,
),
hintText: hintText,
border: InputBorder.none, //线
fillColor: Colors.white,
filled: true,
hintStyle: TextStyle(
color: BaseStyle.color999999,
fontSize: BaseStyle.fontSize28,
fontWeight: FontWeight.normal,
),
),
),
],
),
),
);
}
Container _containerAddImage() {
return Container(
padding:
EdgeInsets.only(left: 36.w, right: 36.w, top: 32.w, bottom: 24.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'添加图片信息(0/9)',
style:
TextStyle(fontSize: BaseStyle.fontSize28, color: ktextPrimary),
),
SizedBox(height: 24.w),
InkWell(
onTap: () {},
child: Container(
width: 218.w,
height: 218.w,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(8)),
border: Border.all(color: Color(0xffd4cfbe), width: 1.0),
image: DecorationImage(
image: AssetImage(AssetsImage.IMAGEADD), fit: BoxFit.fill),
),
// child: ,
),
),
],
),
);
}
InkWell _inkWellRelease() {
return InkWell(
child: Container(
alignment: Alignment.center,
height: 85.w,
width: 686.w,
padding: EdgeInsets.symmetric(
vertical: 20.w,
),
decoration: BoxDecoration(
color: Color(0xffffc40c),
borderRadius: BorderRadius.all(Radius.circular(4))),
child: Text(
'发布',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: BaseStyle.fontSize32,
color: ktextPrimary),
),
),
);
}
@override
Widget build(BuildContext context) {
double _statusHeight = MediaQuery.of(context).padding.top;
return BeeScaffold(
leading: IconButton(
icon: Icon(AntDesign.left, size: 40.sp),
onPressed: () {
Get.back();
},
),
title: '发表评价',
body: SingleChildScrollView(
child: Container(
height: MediaQuery.of(context).size.height -
kToolbarHeight -
_statusHeight,
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
FocusScope.of(context).requestFocus(FocusNode());
},
child: Column(
children: [
Container(
margin: EdgeInsets.only(
top: 21.w,
left: 24.w,
right: 24.w,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(4)),
boxShadow: <BoxShadow>[
BoxShadow(
color: Colors.grey.withOpacity(0.1),
offset: Offset(1, 1),
blurRadius: 10.0),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_containerContentList(
widget.bundle.getMap('details')['listContent']),
_containerRadio(),
_containerEvaluateTextField(),
_containerAddImage(),
],
),
),
SizedBox(height: 26.w),
_inkWellRelease(),
],
),
),
),
),
);
}
}

@ -1,478 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:extended_text/extended_text.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:get/get.dart';
import 'package:akuCommunity/base/assets_image.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/pages/personal/refund_select_page.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
class OrderDetailsPage extends StatefulWidget {
final Bundle bundle;
OrderDetailsPage({Key key, this.bundle}) : super(key: key);
@override
_OrderDetailsPageState createState() => _OrderDetailsPageState();
}
class _OrderDetailsPageState extends State<OrderDetailsPage> {
Container _containerHeader(String status) {
return Container(
width: double.infinity,
color: Color(0xffffd000),
padding: EdgeInsets.only(
top: 44.w,
bottom: 44.w,
left: 33.w,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
status,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: BaseStyle.fontSize32,
color: ktextPrimary,
),
),
SizedBox(height: 10.w),
Text(
'还剩9小时33分自动确认',
style: TextStyle(
fontSize: BaseStyle.fontSize24,
color: ktextPrimary,
),
),
],
),
);
}
Container _containerAddress() {
return Container(
color: Color(0xffffffff),
padding: EdgeInsets.only(
left: 32.w,
top: 24.w,
bottom: 24.w,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.asset(
AssetsImage.LOCATION,
height: 78.w,
width: 78.w,
),
SizedBox(width: 24.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
'马泽鹏',
style: TextStyle(
fontSize: BaseStyle.fontSize28,
color: ktextPrimary,
),
),
SizedBox(width: 16.w),
Text(
'18809801254',
style: TextStyle(
fontSize: BaseStyle.fontSize24,
color: BaseStyle.color999999,
),
),
],
),
SizedBox(height: 16.w),
Container(
width: 584.w,
child: ExtendedText.rich(
TextSpan(
children: [
TextSpan(
text: '浙江省 宁波市 江北区 工程学院阿库旅游6楼606室',
style: TextStyle(
fontSize: BaseStyle.fontSize28,
color: BaseStyle.color999999,
height: 1.5),
)
],
),
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
),
],
),
],
),
);
}
InkWell _inkWellRefund(
List<Map<String, dynamic>> listContent, double payPrice) {
return InkWell(
onTap: () {
Get.to(() => RefundSelectPage(
bundle: Bundle()
..putMap('details', {
'listContent': listContent,
'payPrice': payPrice,
}),
));
},
child: Container(
alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: 6.w),
width: 134.w,
decoration: BoxDecoration(
border: Border.all(color: BaseStyle.color999999, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(36)),
),
child: Text(
'退款',
style: TextStyle(fontSize: BaseStyle.fontSize28, color: ktextPrimary),
),
),
);
}
Container _containerContent(
String imagePath,
content,
specs,
double price,
payPrice,
int shopNum,
List<Map<String, dynamic>> listContent,
) {
return Container(
child: Stack(
children: [
Column(
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Image.asset(
imagePath,
height: 179.w,
width: 173.w,
fit: BoxFit.fill,
),
SizedBox(width: 24.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 252.w,
child: Text(
content,
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: BaseStyle.fontSize28,
color: ktextPrimary,
),
),
),
SizedBox(height: 16.w),
Text(
specs,
style: TextStyle(
fontSize: BaseStyle.fontSize28,
color: BaseStyle.color999999,
),
),
],
),
],
),
SizedBox(height: 73.w),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Container(
margin: EdgeInsets.only(right: 25.w),
child: Text(
'实付款¥$payPrice',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: BaseStyle.fontSize28,
color: BaseStyle.colorff8500,
),
),
),
],
),
],
),
Positioned(
top: 0,
right: 23.w,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
'$price',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: BaseStyle.fontSize28,
color: ktextPrimary,
),
),
Text(
'x$shopNum',
style: TextStyle(
fontSize: BaseStyle.fontSize28,
color: BaseStyle.color999999,
),
),
],
),
),
Positioned(
top: 103.w,
right: 0,
child: _inkWellRefund(listContent, payPrice),
),
],
),
);
}
Container _containerContentList(
List<Map<String, dynamic>> listContent, double payPrice) {
return Container(
color: Color(0xffffffff),
margin: EdgeInsets.only(top: 32.w),
padding: EdgeInsets.only(
top: 32.w,
left: 32.w,
right: 32.w,
bottom: 24.w,
),
child: Column(
children: listContent
.map((item) => _containerContent(
item['imagePath'],
item['content'],
item['specs'],
item['price'],
payPrice,
item['shopNum'],
listContent))
.toList(),
),
);
}
Container _containerOrderDetail(List<Map<String, dynamic>> listOrderDetail) {
return Container(
color: Color(0xffffffff),
width: double.infinity,
margin: EdgeInsets.only(top: 24.w),
padding: EdgeInsets.only(
top: 32.w,
left: 31.w,
bottom: 39.w,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'订单信息',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: BaseStyle.fontSize28,
color: ktextPrimary),
),
Column(
children: listOrderDetail
.map((item) => Container(
margin: EdgeInsets.only(top: 22.w),
child: Row(
children: [
Text(
item['title'],
style: TextStyle(
fontSize: BaseStyle.fontSize24,
color: BaseStyle.color999999),
),
SizedBox(width: 75.w),
Text(
item['subtitle'],
style: TextStyle(
fontSize: BaseStyle.fontSize24,
color: BaseStyle.color999999),
),
],
),
))
.toList(),
),
],
),
);
}
InkWell _inkWellBottom(String title, Color color, Color fontColor) {
return InkWell(
onTap: () {},
child: Container(
alignment: Alignment.center,
color: color,
padding: EdgeInsets.symmetric(
vertical: 26.5.w,
),
child: Text(
title,
style: TextStyle(
fontSize: BaseStyle.fontSize32,
color: fontColor,
),
),
),
);
}
Positioned _positionedBottomBar(String status) {
List<Map<String, dynamic>> _listBottom;
switch (status) {
case '等待买家付款':
_listBottom = [
{
'title': '修改地址',
'color': Color(0xff2a2a2a),
'fontColor': Color(0xffffffff),
},
{
'title': '付款',
'color': Color(0xffffc40c),
'fontColor': Color(0xff333333),
},
];
break;
case '买家已付款':
_listBottom = [
{
'title': '申请退款',
'color': Color(0xffffc40c),
'fontColor': Color(0xff333333),
},
];
break;
case '卖家已发货':
_listBottom = [
{
'title': '查看物流',
'color': Color(0xff2a2a2a),
'fontColor': Color(0xffffffff),
},
{
'title': '确认收货',
'color': Color(0xffffc40c),
'fontColor': Color(0xff333333),
},
];
break;
case '退款中':
_listBottom = [
{
'title': '查看物流',
'color': Color(0xff2a2a2a),
'fontColor': Color(0xffffffff),
},
];
break;
case '交易成功':
_listBottom = [
{
'title': '查看物流',
'color': Color(0xff2a2a2a),
'fontColor': Color(0xffffffff),
},
{
'title': '申请售后',
'color': Color(0xffffc40c),
'fontColor': Color(0xff333333),
},
];
break;
default:
_listBottom = [];
break;
}
return Positioned(
bottom: 0,
child: Container(
alignment: Alignment.center,
height: 98.w,
width: MediaQuery.of(context).size.width,
child: Row(
children: _listBottom
.map((item) => Expanded(
child: _inkWellBottom(
item['title'],
item['color'],
item['fontColor'],
),
))
.toList(),
),
),
);
}
@override
Widget build(BuildContext context) {
double statusHeight = MediaQuery.of(context).padding.top;
return BeeScaffold(
leading: IconButton(
icon: Icon(AntDesign.left, size: 40.sp),
onPressed: () {
Get.back();
},
),
title: '订单详情',
body: SingleChildScrollView(
child: Container(
height: MediaQuery.of(context).size.height -
kToolbarHeight -
statusHeight,
child: Stack(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_containerHeader(widget.bundle.getMap('details')['status']),
_containerAddress(),
_containerContentList(
widget.bundle.getMap('details')['listContent'],
widget.bundle.getMap('details')['payPrice'],
),
_containerOrderDetail(
widget.bundle.getMap('details')['listOrderDetail']),
],
),
_positionedBottomBar(widget.bundle.getMap('details')['status'])
],
),
),
),
);
}
}

@ -1,133 +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:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'widget/order_list.dart';
class OrderPage extends StatefulWidget {
final Bundle bundle;
OrderPage({Key key, this.bundle}) : super(key: key);
@override
_OrderPageState createState() => _OrderPageState();
}
class _OrderPageState extends State<OrderPage>
with SingleTickerProviderStateMixin {
TabController _tabController;
List<Map<String, dynamic>> tabs = [
{'name': '全部', 'id': 'new'},
{'name': '待付款', 'id': 'new'},
{'name': '待发货', 'id': 'new'},
{'name': '待收货', 'id': 'new'},
{'name': '待评价', 'id': 'new'},
{'name': '售后', 'id': 'new'},
];
@override
void initState() {
super.initState();
// Controller
_tabController = TabController(length: tabs.length, vsync: this);
}
PreferredSize _preferredSizeBottom() {
return PreferredSize(
preferredSize: Size.fromHeight(kToolbarHeight),
child: Align(
alignment: Alignment.centerLeft,
child: TabBar(
controller: _tabController,
isScrollable: true,
indicator: BoxDecoration(),
labelColor: BaseStyle.colorff8500,
unselectedLabelColor: ktextPrimary,
labelStyle: TextStyle(
fontSize: 28.sp,
fontWeight: FontWeight.w600,
),
unselectedLabelStyle: TextStyle(
fontSize: 28.sp,
fontWeight: FontWeight.w500,
),
tabs: List.generate(
tabs.length,
(index) => Tab(
text: tabs[index]['name'],
),
),
),
),
);
}
InkWell _inkWellSearch() {
return InkWell(
onTap: () {},
child: Container(
margin: EdgeInsets.only(right: 32.w),
padding: EdgeInsets.only(left: 40.w, top: 20.w, bottom: 20.w),
decoration: BoxDecoration(
color: BaseStyle.colorf3f3f3,
borderRadius: BorderRadius.all(Radius.circular(36)),
boxShadow: <BoxShadow>[
BoxShadow(
color: Colors.grey.withOpacity(0.1),
offset: Offset(1.1, 1.1),
blurRadius: 10.0),
],
),
child: Row(children: [
Icon(
AntDesign.search1,
size: BaseStyle.fontSize28,
color: BaseStyle.color999999,
),
SizedBox(width: 5),
Text(
'搜索我的订单',
style: TextStyle(
fontSize: BaseStyle.fontSize28,
color: BaseStyle.color999999,
),
)
]),
),
);
}
AppBar _appBar() {
return AppBar(
elevation: 0,
titleSpacing: 0,
backgroundColor: Color(0xffffffff),
leading: InkWell(
onTap: () => Get.back(),
child: Icon(AntDesign.left, size: 40.sp),
),
centerTitle: false,
title: _inkWellSearch(),
bottom: _preferredSizeBottom(),
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: _appBar(),
body: TabBarView(
controller: _tabController,
children: List.generate(
tabs.length,
(index) => OrderList(),
),
),
);
}
}

@ -2,7 +2,6 @@ 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: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:get/get.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -12,7 +11,6 @@ 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/constants/application_objects.dart'; import 'package:akuCommunity/constants/application_objects.dart';
import 'package:akuCommunity/pages/personal/order_page.dart';
import 'package:akuCommunity/pages/personal/user_profile_page.dart'; import 'package:akuCommunity/pages/personal/user_profile_page.dart';
import 'package:akuCommunity/pages/sign/sign_in_page.dart'; import 'package:akuCommunity/pages/sign/sign_in_page.dart';
import 'package:akuCommunity/painters/user_bottom_bar_painter.dart'; import 'package:akuCommunity/painters/user_bottom_bar_painter.dart';
@ -159,32 +157,6 @@ class _PersonalIndexState extends State<PersonalIndex>
color: ktextPrimary, color: ktextPrimary,
), ),
), ),
title == '我的物业'
? SizedBox()
: InkWell(
onTap: () {
Get.to(() => OrderPage());
},
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
'查看全部',
style: TextStyle(
fontSize: BaseStyle.fontSize22,
color: ktextPrimary,
),
),
SizedBox(width: 8.w),
Icon(
AntDesign.right,
size: BaseStyle.fontSize28,
color: BaseStyle.color999999,
),
],
),
),
], ],
), ),
); );
@ -204,46 +176,6 @@ class _PersonalIndexState extends State<PersonalIndex>
child: CustomScrollView( child: CustomScrollView(
slivers: <Widget>[ slivers: <Widget>[
_sliverAppBar(_statusHeight), _sliverAppBar(_statusHeight),
// SliverToBoxAdapter(
// child: _containerBar('我的订单'),
// ),
// SliverToBoxAdapter(
// child: Container(
// margin: EdgeInsets.only(top: 10.w),
// color: BaseStyle.colorf9f9f9,
// child: GridButtons(
// gridList: _orderList,
// crossCount: 5,
// ),
// ),
// ),
// SliverToBoxAdapter(
// child: Container(
// margin: EdgeInsets.only(top: 32.w, left: 32.w, right: 32.w),
// child: Divider(
// color: Color(0xffd8d8d8),
// ),
// ),
// ),
// SliverToBoxAdapter(
// child: _containerBar('我的团购'),
// ),
// SliverToBoxAdapter(
// child: Container(
// color: BaseStyle.colorf9f9f9,
// margin: EdgeInsets.only(top: 10.w),
// alignment: Alignment.center,
// child: GridButtons(
// gridList: _groupOrderList,
// crossCount: 5,
// ),
// ),
// ),
// SliverToBoxAdapter(
// child: SingleAdSpace(
// imagePath: 'assets/example/guanggao7.png',
// ),
// ),
SliverToBoxAdapter( SliverToBoxAdapter(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(

@ -1,216 +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:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'widget/refund_shop_card.dart';
import 'widget/refund_tile_card.dart';
class RefundApplyPage extends StatefulWidget {
final Bundle bundle;
RefundApplyPage({Key key, this.bundle}) : super(key: key);
@override
_RefundApplyPageState createState() => _RefundApplyPageState();
}
class _RefundApplyPageState extends State<RefundApplyPage> {
TextEditingController _refundContent = new TextEditingController();
String hintText = '选填';
Container _containerContentList(List<Map<String, dynamic>> listContent) {
return Container(
child: Column(
children: listContent
.map((item) => RefundShopCard(
imagePath: item['imagePath'],
content: item['content'],
specs: item['specs'],
))
.toList(),
),
);
}
Container _containerRefundPrice(double payPrice) {
return Container(
padding: EdgeInsets.only(
top: 22.w,
left: 32.w,
right: 32.w,
),
color: Colors.white,
child: Container(
padding: EdgeInsets.only(bottom: 26.w),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(color: BaseStyle.coloreeeeee, width: 0.5)),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'退款金额',
style: TextStyle(
fontSize: BaseStyle.fontSize34,
color: ktextPrimary,
),
),
Text(
'$payPrice',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: BaseStyle.fontSize32,
color: BaseStyle.colorff8500,
),
),
],
),
),
);
}
Container _containerRefundTextField() {
return Container(
padding: EdgeInsets.only(
top: 22.w,
left: 32.w,
right: 32.w,
),
color: Colors.white,
child: Container(
padding: EdgeInsets.only(bottom: 26.w),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(color: BaseStyle.coloreeeeee, width: 0.5)),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'退款说明',
style: TextStyle(
fontSize: BaseStyle.fontSize34,
color: ktextPrimary,
),
),
SizedBox(height: 23.w),
TextFormField(
cursorColor: Color(0xffffc40c),
style: TextStyle(
fontSize: BaseStyle.fontSize34,
),
controller: _refundContent,
onChanged: (String value) {},
maxLines: 1,
decoration: InputDecoration(
isDense: true,
contentPadding: EdgeInsets.only(
top: 0.w,
bottom: 0.w,
),
hintText: hintText,
border: InputBorder.none, //线
fillColor: Colors.white,
filled: true,
hintStyle: TextStyle(
color: BaseStyle.color999999,
fontSize: BaseStyle.fontSize28,
fontWeight: FontWeight.normal,
),
),
),
],
),
),
);
}
InkWell _inkWellBottom() {
return InkWell(
onTap: () {},
child: Container(
alignment: Alignment.center,
color: BaseStyle.colorffc40c,
padding: EdgeInsets.symmetric(
vertical: 26.5.w,
),
child: Text(
'提交',
style: TextStyle(
fontSize: BaseStyle.fontSize32,
color: ktextPrimary,
),
),
),
);
}
@override
Widget build(BuildContext context) {
double _statusHeight = MediaQuery.of(context).padding.top;
List<Map<String, dynamic>> _listTile = [
{'title': '退款原因', 'subtitle': '请选择', 'fun': null, 'isRight': true},
{'title': '退款方式', 'subtitle': '物业上门取件', 'fun': null, 'isRight': false}
];
return BeeScaffold(
title: '申请退款',
leading: IconButton(
icon: Icon(AntDesign.left, size: 40.sp),
onPressed: () {
Get.back();
},
),
body: SingleChildScrollView(
child: Container(
height: MediaQuery.of(context).size.height -
kToolbarHeight -
_statusHeight,
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
FocusScope.of(context).requestFocus(FocusNode());
},
child: Stack(
children: [
Column(
children: [
SizedBox(height: 24.w),
_containerContentList(
widget.bundle.getMap('details')['listContent'],
),
SizedBox(height: 24.w),
RefundTileCard(
listTile:
widget.bundle.getMap('details')['isRefundGood']
? _listTile
: _listTile.take(1).toList()),
_containerRefundPrice(
widget.bundle.getMap('details')['payPrice']),
SizedBox(height: 24.w),
_containerRefundTextField(),
],
),
Positioned(
bottom: 0,
child: Container(
alignment: Alignment.center,
height: 98.w,
width: MediaQuery.of(context).size.width,
child: Row(children: [Expanded(child: _inkWellBottom())]),
),
)
],
),
),
),
),
);
}
}

@ -1,91 +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:akuCommunity/pages/personal/refund_apply_page.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'widget/refund_shop_card.dart';
import 'widget/refund_tile_card.dart';
class RefundSelectPage extends StatefulWidget {
final Bundle bundle;
RefundSelectPage({Key key, this.bundle}) : super(key: key);
@override
_RefundSelectPageState createState() => _RefundSelectPageState();
}
class _RefundSelectPageState extends State<RefundSelectPage> {
Container _containerContentList(List<Map<String, dynamic>> listContent) {
return Container(
child: Column(
children: listContent
.map((item) => RefundShopCard(
imagePath: item['imagePath'],
content: item['content'],
specs: item['specs'],
))
.toList(),
),
);
}
@override
Widget build(BuildContext context) {
List<Map<String, dynamic>> _listTile = [
{
'title': '我要退款',
'subtitle': '没有收到货,与物业协商直接退货',
'fun': () {
// RefundApplyPage(
// bundle: Bundle()
// ..putMap('details', {
// 'listContent': widget.bundle.getMap('details')['listContent'],
// 'payPrice': widget.bundle.getMap('details')['payPrice'],
// 'isRefundGood': false
// }),
// );
},
'isRight': true
},
{
'title': '我要退款退货',
'subtitle': '已收到货,需要退还货物',
'fun': () {
// RefundApplyPage(
// bundle: Bundle()
// ..putMap('details', {
// 'listContent': widget.bundle.getMap('details')['listContent'],
// 'payPrice': widget.bundle.getMap('details')['payPrice'],
// 'isRefundGood': true
// }),
// );
},
'isRight': true
}
];
return BeeScaffold(
leading: IconButton(
icon: Icon(AntDesign.left, size: 40.sp),
onPressed: () {
Get.back();
},
),
title: '选择服务类型',
body: ListView(
children: [
SizedBox(height: 24.w),
_containerContentList(
widget.bundle.getMap('details')['listContent'],
),
SizedBox(height: 24.w),
RefundTileCard(listTile: _listTile)
],
),
);
}
}

@ -1,284 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/pages/personal/evaluate_good_page.dart';
import 'package:akuCommunity/pages/personal/look_logistics_page.dart';
import 'package:akuCommunity/pages/personal/order_details_page.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart';
class OrderCard extends StatefulWidget {
final String status;
final double totalPrice, payPrice;
final List<Map<String, dynamic>> listButton, listContent, listOrderDetail;
OrderCard(
{Key key,
this.status,
this.totalPrice,
this.payPrice,
this.listButton,
this.listContent,
this.listOrderDetail})
: super(key: key);
@override
_OrderCardState createState() => _OrderCardState();
}
class _OrderCardState extends State<OrderCard> {
Container _containerStatus(String status) {
return Container(
width: double.infinity,
padding: EdgeInsets.only(bottom: 13.w),
decoration: BoxDecoration(
border:
Border(bottom: BorderSide(color: Color(0xffd8d8d8), width: 0.5)),
),
child: Text(
status,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: BaseStyle.fontSize28,
color: ktextPrimary,
),
),
);
}
Container _containerContent(
String imagePath, content, specs, double price, int shopNum) {
return Container(
margin: EdgeInsets.only(top: 24.w),
child: Stack(
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Image.asset(
imagePath,
height: 179.w,
width: 173.w,
fit: BoxFit.fill,
),
SizedBox(width: 24.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 262.w,
child: Text(
content,
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: BaseStyle.fontSize28,
color: ktextPrimary,
),
),
),
SizedBox(height: 16.w),
Text(
specs,
style: TextStyle(
fontSize: BaseStyle.fontSize28,
color: BaseStyle.color999999,
),
),
],
),
],
),
Positioned(
top: 0,
right: 8.w,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
'$price',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: BaseStyle.fontSize28,
color: ktextPrimary,
),
),
Text(
'x$shopNum',
style: TextStyle(
fontSize: BaseStyle.fontSize28,
color: BaseStyle.color999999,
),
),
],
),
),
],
),
);
}
Container _containerContentList(List<Map<String, dynamic>> listContent) {
return Container(
child: Column(
children: listContent
.map((item) => _containerContent(
item['imagePath'],
item['content'],
item['specs'],
item['price'],
item['shopNum'],
))
.toList(),
),
);
}
Container _containerPayInfo(double totalPrice, payPrice) {
return Container(
margin: EdgeInsets.only(right: 8.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Text(
'总价¥$totalPrice',
style: TextStyle(
fontSize: BaseStyle.fontSize28,
color: BaseStyle.color999999,
),
),
SizedBox(width: 16.w),
Text(
'实付款¥$payPrice',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: BaseStyle.fontSize28,
color: ktextPrimary,
),
),
],
),
);
}
InkWell _inkWellButton(String buttonName) {
Color buttonColor;
switch (buttonName) {
case '确认收货':
case '评价':
case '付款':
buttonColor = BaseStyle.colorff8500;
break;
default:
buttonColor = BaseStyle.color999999;
}
return InkWell(
onTap: () {
// 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),
alignment: Alignment.center,
width: 171.w,
height: 60.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(30)),
border: Border.all(color: buttonColor, width: 1),
),
child: Text(
buttonName,
style: TextStyle(
fontSize: BaseStyle.fontSize28,
color: buttonColor,
),
),
),
);
}
Container _containerButtonList(List<Map<String, dynamic>> listButton) {
return Container(
margin: EdgeInsets.only(
top: 42.w,
right: 8.w,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: listButton
.map((item) => _inkWellButton(item['buttonName']))
.toList(),
),
);
}
@override
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;
},
child: Container(
decoration: BoxDecoration(
color: Color(0xffffffff),
borderRadius: BorderRadius.all(Radius.circular(4)),
boxShadow: <BoxShadow>[
BoxShadow(
color: Colors.grey.withOpacity(0.1),
offset: Offset(1, 1),
blurRadius: 10.0),
],
),
padding: EdgeInsets.only(
top: 18.w,
left: 20.w,
right: 16.w,
bottom: 42.w,
),
margin: EdgeInsets.only(
top: 24.w,
left: 32.w,
right: 32.w,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_containerStatus(widget.status),
_containerContentList(widget.listContent),
_containerPayInfo(
widget.totalPrice,
widget.payPrice,
),
widget.listButton.length != 0
? _containerButtonList(widget.listButton)
: SizedBox(),
],
),
),
);
}
}

@ -1,168 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'order_card.dart';
class OrderList extends StatefulWidget {
OrderList({Key key}) : super(key: key);
@override
_OrderListState createState() => _OrderListState();
}
class _OrderListState extends State<OrderList>
with AutomaticKeepAliveClientMixin {
@override
bool get wantKeepAlive => true;
List<Map<String, dynamic>> _listGood = [
{
'status': '卖家已发货',
'listContent': <Map<String, dynamic>>[
{
'imagePath': 'assets/example/tz1.png',
'content': '男士精致生活休闲全羊毛修身西装 全套…',
'specs': 'S;深蓝色',
'price': 1123.30,
'shopNum': 1
}
],
'totalPrice': 1123.30,
'payPrice': 1123.30,
'listButton': <Map<String, dynamic>>[
{'buttonName': '查看物流'},
{'buttonName': '确认收货'},
],
'listOrderDetail': <Map<String, dynamic>>[
{'title': '订单编号', 'subtitle': '3569285692852983'},
{'title': '创建时间', 'subtitle': '2020-07-23 10:45:12'},
{'title': '付款时间', 'subtitle': '2020-07-23 10:48:10'},
{'title': '发货时间', 'subtitle': '2020-07-24 11:21:58'},
],
},
{
'status': '交易成功',
'listContent': <Map<String, dynamic>>[
{
'imagePath': 'assets/example/tz2.png',
'content': '简约气质精致餐具共套 可拼装盘子 海…',
'specs': '四件套;海豚样式',
'price': 459.90,
'shopNum': 1
}
],
'totalPrice': 459.90,
'payPrice': 459.90,
'listButton': <Map<String, dynamic>>[
{'buttonName': '查看物流'},
{'buttonName': '申请售后'},
{'buttonName': '评价'},
],
'listOrderDetail': <Map<String, dynamic>>[
{'title': '订单编号', 'subtitle': '3569285692852983'},
{'title': '创建时间', 'subtitle': '2020-07-23 10:45:12'},
{'title': '付款时间', 'subtitle': '2020-07-23 10:48:10'},
{'title': '发货时间', 'subtitle': '2020-07-24 11:21:58'},
],
},
{
'status': '等待买家付款',
'listContent': <Map<String, dynamic>>[
{
'imagePath': 'assets/example/tz3.png',
'content': 'ichoo冷淡风白衬衫七分慵懒风 百搭衬衫…',
'specs': '白色;S',
'price': 249.00,
'shopNum': 1
}
],
'totalPrice': 249.00,
'payPrice': 249.00,
'listButton': <Map<String, dynamic>>[
{'buttonName': '修改地址'},
{'buttonName': '付款'},
],
'listOrderDetail': <Map<String, dynamic>>[
{'title': '订单编号', 'subtitle': '3569285692852983'},
{'title': '创建时间', 'subtitle': '2020-07-23 10:45:12'},
],
},
{
'status': '买家已付款',
'listContent': <Map<String, dynamic>>[
{
'imagePath': 'assets/example/tz1.png',
'content': '设计款不规则高弹力小吊带显瘦修身 搭配简…',
'specs': '白色;S',
'price': 99.90,
'shopNum': 1
}
],
'totalPrice': 99.90,
'payPrice': 99.90,
'listButton': <Map<String, dynamic>>[],
'listOrderDetail': <Map<String, dynamic>>[
{'title': '订单编号', 'subtitle': '3569285692852983'},
{'title': '创建时间', 'subtitle': '2020-07-23 10:45:12'},
{'title': '付款时间', 'subtitle': '2020-07-23 10:48:10'},
],
},
{
'status': '退款中',
'listContent': <Map<String, dynamic>>[
{
'imagePath': 'assets/example/tz3.png',
'content': '冠军体恤 正版 显瘦修身宽松',
'specs': '白色;S',
'price': 99.90,
'shopNum': 1
}
],
'totalPrice': 99.90,
'payPrice': 99.90,
'listButton': <Map<String, dynamic>>[],
'listOrderDetail': <Map<String, dynamic>>[
{'title': '订单编号', 'subtitle': '3569285692852983'},
{'title': '创建时间', 'subtitle': '2020-07-23 10:45:12'},
{'title': '付款时间', 'subtitle': '2020-07-23 10:48:10'},
{'title': '发货时间', 'subtitle': '2020-07-24 11:21:58'},
],
}
];
@override
void initState() {
super.initState();
}
void _onRefresh() async {
await Future.delayed(Duration(milliseconds: 1500));
}
void _onLoading() async {
await Future.delayed(Duration(milliseconds: 1500));
if (mounted) setState(() {});
}
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
super.build(context);
return ListView.builder(
itemBuilder: (context, index) => OrderCard(
status: _listGood[index]['status'],
totalPrice: _listGood[index]['totalPrice'],
payPrice: _listGood[index]['payPrice'],
listContent: _listGood[index]['listContent'],
listButton: _listGood[index]['listButton'],
listOrderDetail: _listGood[index]['listOrderDetail'],
),
itemCount: _listGood.length,
);
}
}

@ -1,238 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:flutter_rating_bar/flutter_rating_bar.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
class ThingsEvaluatePage extends StatefulWidget {
final Bundle bundle;
ThingsEvaluatePage({Key key, this.bundle}) : super(key: key);
@override
_ThingsEvaluatePageState createState() => _ThingsEvaluatePageState();
}
class _ThingsEvaluatePageState extends State<ThingsEvaluatePage> {
var rating = 0.0;
TextEditingController _proposeContent = new TextEditingController();
String hintText = '您对我们的工作有什么建议吗?欢迎您提供给我们宝贵的建议,谢谢';
Container _containerEvaluateCard() {
return Container(
decoration: BoxDecoration(
color: Color(0xffffffff),
borderRadius: BorderRadius.all(Radius.circular(8)),
),
padding: EdgeInsets.only(
top: 27.w,
bottom: 52.w,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'请您对本次服务进行评价',
style: TextStyle(fontSize: 28.sp, color: Color(0xff999999)),
),
SizedBox(height: 50.w),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
'综合评价',
style: TextStyle(fontSize: 28.sp, color: Color(0xff999999)),
),
SizedBox(width: 47.w),
RatingBar(
ignoreGestures: false,
itemSize: 46.w,
// filledIconData: AntDesign.star,
// // halfFilledIconData: Icons.star_half,
// defaultIconData: AntDesign.staro,
// color: Color(0xffffc40c),
// borderColor: Color(0xffffc40c),
ratingWidget: RatingWidget(
full: Icon(
AntDesign.star,
color: kPrimaryColor,
),
empty: Icon(
AntDesign.staro,
color: kDarkPrimaryColor,
),
half: Icon(Icons.star_half)),
itemCount: 5,
allowHalfRating: false,
itemPadding: EdgeInsets.symmetric(horizontal: 10.w),
onRatingUpdate: (value) {
print("rating value -> $value");
// print("rating value dd -> ${value.truncate()}");
},
)
],
),
],
),
);
}
Container _containerTextField(String hintText) {
return Container(
padding: EdgeInsets.only(top: 32.w, left: 22.w, right: 35.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(8)),
border: Border.all(color: Color(0xffd4cfbe), width: 1.0),
),
child: TextFormField(
cursorColor: Color(0xffffc40c),
style: TextStyle(
fontSize: 28.sp,
fontWeight: FontWeight.w600,
),
controller: _proposeContent,
onChanged: (String value) {},
maxLines: 8,
decoration: InputDecoration(
isDense: true,
contentPadding: EdgeInsets.only(
top: 0.w,
bottom: 0.w,
),
hintText: hintText,
border: InputBorder.none, //线
fillColor: Colors.white,
filled: true,
hintStyle: TextStyle(
color: Color(0xff999999),
fontSize: 28.sp,
fontWeight: FontWeight.normal,
),
),
),
);
}
InkWell _inkWellButton(String title) {
return InkWell(
child: Container(
alignment: Alignment.center,
height: 96.w,
margin: EdgeInsets.symmetric(horizontal: 32.w),
padding: EdgeInsets.symmetric(vertical: 25.5.w),
decoration: BoxDecoration(
color: Color(0xffffc40c),
borderRadius: BorderRadius.all(Radius.circular(48)),
),
child: Text(
title,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 32.sp,
color: Color(0xff333333),
),
),
),
);
}
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '${widget.bundle.getMap('details')['title']}',
body: SingleChildScrollView(
child: Container(
color: Colors.white,
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
FocusScope.of(context).requestFocus(FocusNode());
},
child: Container(
padding: EdgeInsets.symmetric(
horizontal: 32.w,
vertical: 36.w,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
widget.bundle.getMap('details')['isShow']
? _containerEvaluateCard()
: SizedBox(),
widget.bundle.getMap('details')['isShow']
? SizedBox()
: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'请输入内容',
style: TextStyle(
fontSize: 28.sp, color: Color(0xff333333)),
),
SizedBox(height: 24.w),
_containerTextField(hintText),
SizedBox(height: 42.w),
],
),
_inkWellButton('确认提交'),
],
),
),
),
),
),
);
// return widget.isAlone
// ? Container(
// child: Column(
// children: [
// _containerEvaluateCard(),
// SizedBox(height: 42.w),
// _inkWellButton('确认'),
// ],
// ),
// )
// : SingleChildScrollView(
// child: Container(
// height: MediaQuery.of(context).size.height -
// kToolbarHeight -
// widget.statusHeight,
// color: Colors.white,
// child: GestureDetector(
// behavior: HitTestBehavior.opaque,
// onTap: () {
// FocusScope.of(context).requestFocus(FocusNode());
// },
// child: Container(
// padding: EdgeInsets.symmetric(
// horizontal: 32.w,
// vertical: 36.w,
// ),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// widget.isPropose ? SizedBox() : _containerEvaluateCard(),
// Text(
// '请输入内容',
// style: TextStyle(
// fontSize: 28.sp,
// color: Color(0xff333333)),
// ),
// SizedBox(height: 24.w),
// _containerTextField(hintText),
// SizedBox(height: 42.w),
// _inkWellButton(widget.isPropose ? '确认提交' : '发布'),
// ],
// ),
// ),
// ),
// ),
// );
}
}

@ -1,6 +1,5 @@
import 'dart:io'; import 'dart:io';
import 'package:akuCommunity/constants/app_values.dart';
import 'package:akuCommunity/provider/app_provider.dart'; import 'package:akuCommunity/provider/app_provider.dart';
import 'package:akuCommunity/ui/profile/house/house_owners_page.dart'; import 'package:akuCommunity/ui/profile/house/house_owners_page.dart';
import 'package:akuCommunity/ui/profile/house/pick_my_house_page.dart'; import 'package:akuCommunity/ui/profile/house/pick_my_house_page.dart';

@ -1,4 +1,3 @@
import 'package:akuCommunity/constants/app_values.dart';
import 'package:akuCommunity/provider/app_provider.dart'; import 'package:akuCommunity/provider/app_provider.dart';
import 'package:akuCommunity/ui/profile/house/pick_my_house_page.dart'; import 'package:akuCommunity/ui/profile/house/pick_my_house_page.dart';
import 'package:flustars/flustars.dart'; import 'package:flustars/flustars.dart';

@ -1,35 +0,0 @@
//TODO CLEAN BOTTOM CODES.
@Deprecated("sh*t page_routers need to be cleaned.")
class Bundle {
Map<String, dynamic> _map = {};
_setValue(var k, var v) => _map[k] = v;
_getValue(String k) {
if (!_map.containsKey(k)) {
throw Exception("你使用的$k\在payload不存在,请检查你的key名字是否正确,或者确定key是否存在payload");
}
return _map[k];
}
putString(String k, String v) => _setValue(k, v);
putBool(String k, bool v) => _setValue(k, v);
putList<V>(String k, List<V> v) => _setValue(k, v);
putMap<K, V>(String k, Map<K, V> v) => _setValue(k, v);
int getInt(String k) => _getValue(k) as int;
String getString(String k) => _getValue(k) as String;
bool getBool(String k) => _getValue(k) as bool;
Map getMap(String k) => _getValue(k) as Map;
@override
String toString() {
return _map.toString();
}
}

@ -1,6 +1,5 @@
import 'dart:io'; import 'dart:io';
import 'package:akuCommunity/constants/app_values.dart';
import 'package:akuCommunity/provider/app_provider.dart'; import 'package:akuCommunity/provider/app_provider.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';

@ -1,4 +1,3 @@
import 'package:akuCommunity/constants/app_values.dart';
import 'package:akuCommunity/model/user/car_parking_model.dart'; import 'package:akuCommunity/model/user/car_parking_model.dart';
import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/utils/headers.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';

@ -1,4 +1,3 @@
import 'package:akuCommunity/constants/app_values.dart';
import 'package:akuCommunity/model/user/car_parking_model.dart'; import 'package:akuCommunity/model/user/car_parking_model.dart';
import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/utils/headers.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';

@ -1,4 +1,3 @@
import 'package:akuCommunity/constants/app_values.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';

@ -1,5 +1,4 @@
import 'package:akuCommunity/const/resource.dart'; import 'package:akuCommunity/const/resource.dart';
import 'package:akuCommunity/constants/app_values.dart';
import 'package:akuCommunity/model/user/house_model.dart'; import 'package:akuCommunity/model/user/house_model.dart';
import 'package:akuCommunity/ui/profile/house/pick_my_house_page.dart'; import 'package:akuCommunity/ui/profile/house/pick_my_house_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';

@ -1,5 +1,4 @@
import 'package:akuCommunity/constants/api.dart'; import 'package:akuCommunity/constants/api.dart';
import 'package:akuCommunity/constants/app_values.dart';
import 'package:akuCommunity/model/user/house_model.dart'; import 'package:akuCommunity/model/user/house_model.dart';
import 'package:akuCommunity/provider/app_provider.dart'; import 'package:akuCommunity/provider/app_provider.dart';
import 'package:akuCommunity/ui/profile/house/add_house_page.dart'; import 'package:akuCommunity/ui/profile/house/add_house_page.dart';

@ -1,60 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
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;
final String title;
AppBarAction({Key key, this.icon, this.title}) : super(key: key);
@override
_AppBarActionState createState() => _AppBarActionState();
}
class _AppBarActionState extends State<AppBarAction> {
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(right: 32.w),
child: InkWell(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
widget.icon,
color: Color(0xff333333),
),
SizedBox(height: 4.w),
Text(
widget.title,
style: TextStyle(
fontSize: 20.sp,
color: Color(0xff333333),
),
)
],
),
onTap: () {
switch (widget.title) {
case '扫一扫':
break;
case '消息':
Get.to(() => MessageCenterPage());
break;
case '购物车':
Get.to(() => MarketCartPage());
break;
case '分类':
Get.to(() => MarketClassPage());
break;
default:
}
}),
);
}
}

@ -1,357 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:akuCommunity/pages/confirm_order_page/confirm_order_page.dart';
import 'package:akuCommunity/provider/cart.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'cached_image_wrapper.dart';
class GoodsSpecsSheet extends StatefulWidget {
final String itemid, itemtitle, itemprice, itempic, type;
GoodsSpecsSheet(
{Key key,
this.itemid,
this.itemtitle,
this.itemprice,
this.itempic,
this.type})
: super(key: key);
@override
_GoodsSpecsSheetState createState() => _GoodsSpecsSheetState();
}
class _GoodsSpecsSheetState extends State<GoodsSpecsSheet> {
int count = 1;
List<Map<String, dynamic>> colorsList = [
{'title': "深蓝", 'isSelect': false},
{'title': "浅蓝", 'isSelect': false},
{'title': "褐色", 'isSelect': false},
{'title': "黑色", 'isSelect': false},
];
List<Map<String, dynamic>> sizesList = [
{'title': "XS(170/80A)", 'isSelect': false},
{'title': "S(175/80A)", 'isSelect': false},
{'title': "XL(180/80A)", 'isSelect': false},
{'title': "XXL(185/80A)", 'isSelect': false},
{'title': "XXXL(190/80A)", 'isSelect': false},
];
//
Widget _reduceBtn() {
return InkWell(
onTap: count > 1
? () {
setState(() {
count--;
});
}
: null,
child: Container(
width: 52.w,
height: 52.w,
alignment: Alignment.center,
decoration: BoxDecoration(
color: count > 1 ? Color(0xffffffff) : Colors.black12,
border:
Border(right: BorderSide(width: 0.5, color: Colors.black12))),
child: Icon(
Icons.remove,
color: Color(0xff979797),
size: 38.sp,
),
),
);
}
//
Widget _addBtn() {
return InkWell(
onTap: () {
setState(() {
count++;
});
},
child: Container(
width: 52.w,
height: 52.w,
alignment: Alignment.center,
decoration: BoxDecoration(
color: Color(0xffffffff),
border:
Border(left: BorderSide(width: 0.5, color: Colors.black12))),
child: Icon(
Icons.add,
color: Color(0xff979797),
size: 38.sp,
),
),
);
}
//
Widget _countArea() {
return Container(
width: 52.w,
height: 52.w,
alignment: Alignment.center,
color: Colors.white,
child: Text(
'$count',
style: TextStyle(
fontSize: 24.sp,
color: Color(0xff333333),
),
),
);
}
Widget _stackHeader(String image, price) {
return Stack(
children: [
Padding(
padding: EdgeInsets.all(32.w),
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Container(
margin: EdgeInsets.only(right: 20.w),
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(4.w)),
child: CachedImageWrapper(
url: image,
height: 180.w,
width: 180.w,
),
),
),
Column(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'价格:¥$price',
style: TextStyle(
color: Color(0xffe60e0e),
fontSize: 28.sp,
),
),
SizedBox(height: 5.w),
// Row(
// children: [
// Text(
// '已选中:',
// style: TextStyle(
// color: Color(0xff333333),
// fontSize: 28.sp,
// ),
// ),
// SizedBox(width: 10.w),
// Text(
// '中蓝XS170/80A',
// style: TextStyle(
// color: Color(0xff333333),
// fontSize: 28.sp,
// ),
// ),
// ],
// ),
],
),
],
),
),
Positioned(
top: 0,
right: 0,
child: IconButton(
icon: Icon(
AntDesign.close,
size: 38.sp,
color: Color(0xff999999),
),
onPressed: () => Get.back(),
),
),
],
);
}
// Widget _paddingSelect(String title, List<Map<String, dynamic>> selectList) {
// return Padding(
// padding: EdgeInsets.symmetric(horizontal: 52.w),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Text(
// title,
// style: TextStyle(
// color: Color(0xff333333),
// fontSize: 28.sp,
// ),
// ),
// SizedBox(height: 20.w),
// Wrap(
// spacing: 30.w,
// runSpacing: 20.w,
// children: selectList
// .map((item) => InkWell(
// onTap: () {
// selectList.forEach((item) {
// item['isSelect'] = false;
// });
// setState(() {
// item['isSelect'] = true;
// });
// },
// child: Container(
// decoration: BoxDecoration(
// color: item['isSelect']
// ? Color(0xfffff8e4)
// : Color(0xffffffff),
// border: Border.all(
// color: item['isSelect']
// ? Color(0xffffc40c)
// : Color(0xff979797),
// width: 0.5),
// borderRadius: BorderRadius.all(Radius.circular(4))),
// padding: EdgeInsets.symmetric(
// horizontal: 32.w,
// vertical: 15.w,
// ),
// child: Text(
// item['title'],
// style: TextStyle(
// fontSize: 28.sp,
// color: Color(0xff333333),
// ),
// ),
// ),
// ))
// .toList(),
// ),
// ],
// ),
// );
// }
Widget _paddingNum() {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 52.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'数量',
style: TextStyle(
color: Color(0xff333333),
fontSize: 28.w,
),
),
SizedBox(height: 20.w),
// CartCount(),
Container(
width: 160.w,
decoration: BoxDecoration(
border: Border.all(
width: 0.5, color: Colors.black12) //1
),
child: Row(
children: <Widget>[
_reduceBtn(),
_countArea(),
_addBtn(),
],
),
)
],
),
);
}
Widget _inkwellSubmit(String type, CartProvidde model) {
return InkWell(
onTap: () {
Get.back();
switch (type) {
case '加入购物车':
BotToast.showText(text: '已添加入购物车');
model.save(widget.itemid, widget.itemtitle, count, widget.itemprice,
widget.itempic);
break;
case '立即购买':
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: '已添加入购物车');
break;
default:
}
},
child: Container(
decoration: BoxDecoration(
color: Color(0xffffc40c),
borderRadius: BorderRadius.all(Radius.circular(1)),
boxShadow: <BoxShadow>[
BoxShadow(
color: Color(0xffffc40c),
offset: Offset(1, 1),
),
],
),
alignment: Alignment.center,
margin: EdgeInsets.symmetric(horizontal: 52.w),
padding: EdgeInsets.symmetric(vertical: 20.w),
child: Text(
'确认',
style: TextStyle(
fontSize: 32.w,
color: Color(0xff333333),
),
),
),
);
}
@override
Widget build(BuildContext context) {
return SizedBox(
// height: 1334.w,
child: Container(
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
_stackHeader(widget.itempic, widget.itemprice),
SizedBox(height: 91.w),
// _paddingSelect('颜色', colorsList),
// SizedBox(height: 70.w),
// _paddingSelect('尺寸', sizesList),
// SizedBox(height: 50.w),
_paddingNum(),
SizedBox(height: 79.w),
Consumer<CartProvidde>(builder: (context, model, child) {
return _inkwellSubmit(widget.type, model);
}),
SizedBox(height: 79.w),
],
),
),
);
}
}

@ -1,147 +0,0 @@
import 'dart:convert';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/model/aku_shop_model.dart';
import 'package:akuCommunity/pages/goods_details/goods_details_page.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/cached_image_wrapper.dart';
class SliverGoodsCard extends StatelessWidget {
final bool isShow;
final List<AkuShopModel> shoplist;
const SliverGoodsCard({Key key, this.isShow = false, this.shoplist})
: super(key: key);
@override
Widget build(BuildContext context) {
return SliverGrid(
delegate: SliverChildBuilderDelegate(
(BuildContext context, int index) {
return InkWell(
onTap: () {
GoodsDetailsPage(
bundle: Bundle()
..putString(
'shoplist', json.encode(shoplist[index]).toString()),
);
},
child: Container(
color: Colors.white,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Stack(
children: [
Container(
child: CachedImageWrapper(
url: shoplist[index].itempic,
width: 333.w,
height: 344.w,
),
),
],
),
Padding(
padding: EdgeInsets.only(
left: 12.w,
right: 25.w,
top: 20.w,
),
child: Container(
width: 296.w,
child: Text(
shoplist[index].itemtitle,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 24.sp,
color: Color(0xff4a4b51),
),
),
),
),
Container(
margin: EdgeInsets.only(
top: 20.w,
left: 12.w,
right: 8.w,
bottom: 17.w,
),
child: Row(
mainAxisAlignment: isShow
? MainAxisAlignment.start
: MainAxisAlignment.spaceBetween,
children: [
Container(
margin: EdgeInsets.only(right: 8.w),
child: Text(
'${shoplist[index].itemprice}',
style: TextStyle(
color: Color(0xffe60e0e),
fontSize: 28.sp,
fontWeight: FontWeight.w500,
),
),
),
isShow
? Text(
'${shoplist[index].itemsale}人已付款',
style: TextStyle(
color: Color(0xff999999),
fontSize: 20.w,
),
)
: InkWell(
onTap: () {
GoodsDetailsPage(
bundle: Bundle()
..putString(
'shoplist',
json
.encode(shoplist[index])
.toString()),
);
},
child: Container(
width: 134.w,
alignment: Alignment.center,
padding: EdgeInsets.only(
top: 6.w,
bottom: 5.w,
),
decoration: BoxDecoration(
color: Color(0xffffc40c),
borderRadius:
BorderRadius.all(Radius.circular(20.w)),
),
child: Text(
'立即购买',
style: TextStyle(
fontSize: 24.sp,
color: Color(0xff333333),
),
),
),
)
],
),
),
],
),
),
);
},
childCount: shoplist.length,
),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
mainAxisSpacing: 30.w,
crossAxisSpacing: 20.w,
childAspectRatio: 343.w / 539.w),
);
}
}
Loading…
Cancel
Save