# Conflicts:
#	lib/utils/headers.dart
hmxc
张萌 4 years ago
commit 49999a666b

@ -53,10 +53,10 @@ class _GoodsDetailsBottomBarState extends State<GoodsDetailsBottomBar> {
], ],
), ),
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: ScreenUtil().setWidth(35), left: 35.w,
right: ScreenUtil().setWidth(35), right: 35.w,
top: ScreenUtil().setWidth(13), top: 13.w,
bottom: ScreenUtil().setWidth(47), bottom: 47.w,
), ),
child: Row( child: Row(
children: [ children: [
@ -91,7 +91,7 @@ class _GoodsDetailsBottomBarState extends State<GoodsDetailsBottomBar> {
}); });
}, },
), ),
SizedBox(width: ScreenUtil().setWidth(46)), SizedBox(width: 46.w),
InkWell( InkWell(
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -115,7 +115,7 @@ class _GoodsDetailsBottomBarState extends State<GoodsDetailsBottomBar> {
Get.to(MarketCartPage()); Get.to(MarketCartPage());
}, },
), ),
SizedBox(width: ScreenUtil().setWidth(53)), SizedBox(width: 53.w),
InkWell( InkWell(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
@ -129,8 +129,8 @@ class _GoodsDetailsBottomBarState extends State<GoodsDetailsBottomBar> {
], ],
), ),
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(40), horizontal: 40.w,
vertical: ScreenUtil().setWidth(12), vertical: 12.w,
), ),
child: Text( child: Text(
'加入购物车', '加入购物车',
@ -150,7 +150,7 @@ class _GoodsDetailsBottomBarState extends State<GoodsDetailsBottomBar> {
// // widget.itemprice, widget.itempic); // // widget.itemprice, widget.itempic);
// } //_showModelBotoomSheet, // } //_showModelBotoomSheet,
), ),
SizedBox(width: ScreenUtil().setWidth(24)), SizedBox(width: 24.w),
InkWell( InkWell(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
@ -164,8 +164,8 @@ class _GoodsDetailsBottomBarState extends State<GoodsDetailsBottomBar> {
], ],
), ),
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(55), horizontal: 55.w,
vertical: ScreenUtil().setWidth(12), vertical: 12.w,
), ),
child: Text( child: Text(
'立即购买', '立即购买',

@ -25,7 +25,7 @@ class ProductContent extends StatelessWidget {
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
), ),
), ),
SizedBox(width: ScreenUtil().setWidth(10)), SizedBox(width: 10.w),
Text( Text(
'', '',
style: TextStyle( style: TextStyle(
@ -41,9 +41,9 @@ class ProductContent extends StatelessWidget {
Container _containerTitle(String title) { Container _containerTitle(String title) {
return Container( return Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
top: ScreenUtil().setWidth(28), top: 28.w,
bottom: ScreenUtil().setWidth(18), bottom: 18.w,
right: ScreenUtil().setWidth(106), right: 106.w,
), ),
child: Text( child: Text(
title, title,
@ -57,7 +57,7 @@ class ProductContent extends StatelessWidget {
Container _containerSubtitle(String shortTitle) { Container _containerSubtitle(String shortTitle) {
return Container( return Container(
margin: EdgeInsets.only(right: ScreenUtil().setWidth(286)), margin: EdgeInsets.only(right: 286.w),
child: Text( child: Text(
shortTitle, shortTitle,
maxLines: 1, maxLines: 1,
@ -78,13 +78,13 @@ class ProductContent extends StatelessWidget {
], ],
), ),
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: ScreenUtil().setWidth(72), left: 72.w,
right: ScreenUtil().setWidth(72), right: 72.w,
top: ScreenUtil().setWidth(58), top: 58.w,
), ),
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(33), horizontal: 33.w,
vertical: ScreenUtil().setWidth(11), vertical: 11.w,
), ),
child: Text( child: Text(
desc, desc,
@ -101,12 +101,11 @@ class ProductContent extends StatelessWidget {
Positioned _positionedShare() { Positioned _positionedShare() {
return Positioned( return Positioned(
right: 0, right: 0,
top: ScreenUtil().setWidth(169), top: 169.w,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
shareToWeChat(WeChatShareWebPageModel( shareToWeChat(WeChatShareWebPageModel(
'https://mobile.baidu.com/item?docid=27505288', 'https://mobile.baidu.com/item?docid=27505288',
title: itemtitle, title: itemtitle,
description: '前往小蜜蜂智慧社区查看吧', description: '前往小蜜蜂智慧社区查看吧',
)); ));
@ -123,8 +122,8 @@ class ProductContent extends StatelessWidget {
], ],
), ),
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(14), horizontal: 14.w,
vertical: ScreenUtil().setWidth(9), vertical: 9.w,
), ),
child: Row( child: Row(
children: [ children: [
@ -132,7 +131,7 @@ class ProductContent extends StatelessWidget {
SimpleLineIcons.share, SimpleLineIcons.share,
size: ScreenUtil().setSp(20), size: ScreenUtil().setSp(20),
), ),
SizedBox(width: ScreenUtil().setWidth(12)), SizedBox(width: 12.w),
Text( Text(
'分享', '分享',
style: TextStyle( style: TextStyle(
@ -149,7 +148,7 @@ class ProductContent extends StatelessWidget {
Positioned _positionedRecommend() { Positioned _positionedRecommend() {
return Positioned( return Positioned(
right: ScreenUtil().setWidth(453), right: 453.w,
bottom: 100.w, bottom: 100.w,
child: Row( child: Row(
children: [ children: [
@ -158,7 +157,7 @@ class ProductContent extends StatelessWidget {
color: Color(0xff999999), color: Color(0xff999999),
size: ScreenUtil().setSp(24), size: ScreenUtil().setSp(24),
), ),
SizedBox(width: ScreenUtil().setWidth(12)), SizedBox(width: 12.w),
Text( Text(
'推荐理由', '推荐理由',
style: TextStyle( style: TextStyle(
@ -177,9 +176,9 @@ class ProductContent extends StatelessWidget {
children: [ children: [
Padding( Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: ScreenUtil().setWidth(32), left: 32.w,
top: ScreenUtil().setWidth(25), top: 25.w,
bottom: ScreenUtil().setWidth(20), bottom: 20.w,
), ),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,

@ -22,7 +22,7 @@ class ProductEvaluate extends StatelessWidget {
], ],
), ),
Positioned( Positioned(
right: ScreenUtil().setWidth(32), right: 32.w,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
fun(); fun();
@ -36,7 +36,7 @@ class ProductEvaluate extends StatelessWidget {
color: Color(0xff999999), color: Color(0xff999999),
), ),
), ),
SizedBox(width: ScreenUtil().setWidth(20)), SizedBox(width: 20.w),
Icon( Icon(
AntDesign.right, AntDesign.right,
size: ScreenUtil().setSp(34), size: ScreenUtil().setSp(34),
@ -59,12 +59,12 @@ class ProductEvaluate extends StatelessWidget {
ClipOval( ClipOval(
child: Image.asset( child: Image.asset(
'assets/example/touxiang1.png', 'assets/example/touxiang1.png',
height: ScreenUtil().setWidth(50), height: 50.w,
width: ScreenUtil().setWidth(50), width: 50.w,
fit: BoxFit.fill, fit: BoxFit.fill,
), ),
), ),
SizedBox(width: ScreenUtil().setWidth(10)), SizedBox(width: 10.w),
Text( Text(
'就是安安啊', '就是安安啊',
style: TextStyle( style: TextStyle(
@ -74,7 +74,7 @@ class ProductEvaluate extends StatelessWidget {
), ),
], ],
), ),
SizedBox(height: ScreenUtil().setWidth(12)), SizedBox(height: 12.w),
Text( Text(
'面料和版型都不错,会回购', '面料和版型都不错,会回购',
maxLines: 2, maxLines: 2,
@ -92,16 +92,16 @@ class ProductEvaluate extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
color: Color(0xffffffff), color: Color(0xffffffff),
margin: EdgeInsets.only(top: ScreenUtil().setWidth(30)), margin: EdgeInsets.only(top: 30.w),
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: ScreenUtil().setWidth(20), top: 20.w,
left: ScreenUtil().setWidth(32), left: 32.w,
bottom: ScreenUtil().setWidth(32), bottom: 32.w,
), ),
child: Column( child: Column(
children: [ children: [
_stackEvaluateHeader(), _stackEvaluateHeader(),
SizedBox(height: ScreenUtil().setWidth(32)), SizedBox(height: 32.w),
_columnEvaluateContent(), _columnEvaluateContent(),
], ],
), ),

@ -16,7 +16,7 @@ class ProductService extends StatelessWidget {
color: Color(0xff999999), color: Color(0xff999999),
), ),
), ),
SizedBox(width: ScreenUtil().setWidth(59)), SizedBox(width: 59.w),
Row( Row(
children: [ children: [
Icon( Icon(
@ -25,7 +25,7 @@ class ProductService extends StatelessWidget {
color: Color(0xff666666), color: Color(0xff666666),
), ),
SizedBox( SizedBox(
width: ScreenUtil().setWidth(9), width: 9.w,
), ),
Text( Text(
'浙江杭州', '浙江杭州',
@ -36,7 +36,7 @@ class ProductService extends StatelessWidget {
), ),
], ],
), ),
SizedBox(width: ScreenUtil().setWidth(38)), SizedBox(width: 38.w),
Row( Row(
children: [ children: [
Text( Text(
@ -47,7 +47,7 @@ class ProductService extends StatelessWidget {
), ),
), ),
SizedBox( SizedBox(
width: ScreenUtil().setWidth(9), width: 9.w,
), ),
Text( Text(
'全国包邮', '全国包邮',
@ -72,7 +72,7 @@ class ProductService extends StatelessWidget {
color: Color(0xff999999), color: Color(0xff999999),
), ),
), ),
SizedBox(width: ScreenUtil().setWidth(59)), SizedBox(width: 59.w),
Text( Text(
'品质保证', '品质保证',
style: TextStyle( style: TextStyle(
@ -80,15 +80,15 @@ class ProductService extends StatelessWidget {
color: Color(0xff333333), color: Color(0xff333333),
), ),
), ),
SizedBox(width: ScreenUtil().setWidth(16)), SizedBox(width: 16.w),
SizedBox( SizedBox(
width: 1, width: 1,
height: ScreenUtil().setWidth(24), height: 24.w,
child: DecoratedBox( child: DecoratedBox(
decoration: BoxDecoration(color: Color(0xffd8d8d8)), decoration: BoxDecoration(color: Color(0xffd8d8d8)),
), ),
), ),
SizedBox(width: ScreenUtil().setWidth(16)), SizedBox(width: 16.w),
Text( Text(
'售后无忧', '售后无忧',
style: TextStyle( style: TextStyle(
@ -104,15 +104,15 @@ class ProductService extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
color: Color(0xffffffff), color: Color(0xffffffff),
margin: EdgeInsets.only(top: ScreenUtil().setWidth(30)), margin: EdgeInsets.only(top: 30.w),
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
vertical: ScreenUtil().setWidth(20), vertical: 20.w,
horizontal: ScreenUtil().setWidth(60), horizontal: 60.w,
), ),
child: Column( child: Column(
children: [ children: [
_rowDelivergoods(), _rowDelivergoods(),
SizedBox(height: ScreenUtil().setWidth(39)), SizedBox(height: 39.w),
_rowService(), _rowService(),
], ],
), ),

@ -3,6 +3,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter_icons/flutter_icons.dart'; import 'package:flutter_icons/flutter_icons.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:akuCommunity/widget/goods_specs_sheet.dart'; import 'package:akuCommunity/widget/goods_specs_sheet.dart';
class ProductSpecs extends StatefulWidget { class ProductSpecs extends StatefulWidget {
ProductSpecs({Key key}) : super(key: key); ProductSpecs({Key key}) : super(key: key);
@ -28,11 +29,11 @@ class _ProductSpecsState extends State<ProductSpecs> {
onTap: _showModelBotoomSheet, onTap: _showModelBotoomSheet,
child: Container( child: Container(
color: Color(0xffffffff), color: Color(0xffffffff),
margin: EdgeInsets.only(top: ScreenUtil().setWidth(30)), margin: EdgeInsets.only(top: 30.w),
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: ScreenUtil().setWidth(60), left: 60.w,
top: ScreenUtil().setWidth(20), top: 20.w,
bottom: ScreenUtil().setWidth(20), bottom: 20.w,
), ),
child: Stack( child: Stack(
children: [ children: [
@ -45,7 +46,7 @@ class _ProductSpecsState extends State<ProductSpecs> {
color: Color(0xff999999), color: Color(0xff999999),
), ),
), ),
SizedBox(width: ScreenUtil().setWidth(59)), SizedBox(width: 59.w),
Text( Text(
'请选择规格', '请选择规格',
style: TextStyle( style: TextStyle(
@ -56,7 +57,7 @@ class _ProductSpecsState extends State<ProductSpecs> {
], ],
), ),
Positioned( Positioned(
right: ScreenUtil().setWidth(32), right: 32.w,
child: Icon( child: Icon(
AntDesign.right, AntDesign.right,
size: ScreenUtil().setSp(34), size: ScreenUtil().setSp(34),

@ -27,7 +27,7 @@ class ProductSwiper extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
height: ScreenUtil().setWidth(500), height: 500.w,
child: Swiper( child: Swiper(
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return AspectRatio( return AspectRatio(
@ -63,9 +63,9 @@ class ProductSwiper extends StatelessWidget {
builder: DotSwiperPaginationBuilder( builder: DotSwiperPaginationBuilder(
activeColor: Color(0xffFEC200), activeColor: Color(0xffFEC200),
color: Colors.white, color: Colors.white,
size: ScreenUtil().setWidth(15), size: 15.w,
activeSize: ScreenUtil().setWidth(25), activeSize: 25.w,
space: ScreenUtil().setWidth(10), space: 10.w,
), ),
), ),
autoplayDelay: 5000, autoplayDelay: 5000,

@ -89,8 +89,7 @@ class _MarketDetailsAppBarState extends State<MarketDetailsAppBar> {
crossAxisCount: 3, crossAxisCount: 3,
mainAxisSpacing: 20.w, mainAxisSpacing: 20.w,
crossAxisSpacing: 30.w, crossAxisSpacing: 30.w,
childAspectRatio: childAspectRatio: 192.w / 58.w),
192.w / 58.w),
), ),
), ),
), ),
@ -143,8 +142,7 @@ class _MarketDetailsAppBarState extends State<MarketDetailsAppBar> {
children: [ children: [
Text( Text(
widget.title, widget.title,
style: TextStyle( style: TextStyle(fontSize: 32.sp, color: Color(0xff333333)),
fontSize: 32.sp, color: Color(0xff333333)),
), ),
SizedBox(width: 10.w), SizedBox(width: 10.w),
Container( Container(
@ -171,7 +169,7 @@ class _MarketDetailsAppBarState extends State<MarketDetailsAppBar> {
], ],
// bottom: TabBar( // bottom: TabBar(
// controller: _controller, // controller: _controller,
// labelPadding: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(15)), // labelPadding: EdgeInsets.symmetric(horizontal: 15.w),
// indicator: BoxDecoration(), // indicator: BoxDecoration(),
// isScrollable: true, // isScrollable: true,
// unselectedLabelStyle: TextStyle( // unselectedLabelStyle: TextStyle(
@ -186,16 +184,16 @@ class _MarketDetailsAppBarState extends State<MarketDetailsAppBar> {
// tabs: List.generate( // tabs: List.generate(
// treeList.length, // treeList.length,
// (index) => Container( // (index) => Container(
// padding: EdgeInsets.symmetric(vertical:ScreenUtil().setWidth(32)), // padding: EdgeInsets.symmetric(vertical:32.w),
// child: Column( // child: Column(
// children: <Widget>[ // children: <Widget>[
// Image.asset( // Image.asset(
// treeList[index]['imagePath'], // treeList[index]['imagePath'],
// height: ScreenUtil().setWidth(110), // height: 110.w,
// width: ScreenUtil().setWidth(110), // width: 110.w,
// fit: BoxFit.fill, // fit: BoxFit.fill,
// ), // ),
// SizedBox(height: ScreenUtil().setWidth(14)), // SizedBox(height: 14.w),
// Text(treeList[index]['name']) // Text(treeList[index]['name'])
// ], // ],
// ), // ),

@ -64,7 +64,7 @@ class _MarketPageState extends State<MarketPage>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
// double _appBarHeight = ScreenUtil().setHeight(506); // double _appBarHeight = 506.w;
super.build(context); super.build(context);
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
@ -72,8 +72,8 @@ class _MarketPageState extends State<MarketPage>
backgroundColor: Color(0xfff9f9f9), backgroundColor: Color(0xfff9f9f9),
title: Container( title: Container(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(24), horizontal: 24.w,
vertical: ScreenUtil().setHeight(12), vertical: 12.w,
), ),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,

@ -5,18 +5,19 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
class ContainerComment extends StatelessWidget { class ContainerComment extends StatelessWidget {
final Widget customWidget; final Widget customWidget;
final double radius; final double radius;
ContainerComment({Key key, this.customWidget,this.radius = 0}) : super(key: key); ContainerComment({Key key, this.customWidget, this.radius = 0})
: super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
margin: EdgeInsets.symmetric( margin: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(32), horizontal: 32.w,
vertical: ScreenUtil().setHeight(17), vertical: 17.w,
), ),
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(24), horizontal: 24.w,
vertical: ScreenUtil().setHeight(16), vertical: 16.w,
), ),
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
@ -26,7 +27,8 @@ class ContainerComment extends StatelessWidget {
BoxShadow( BoxShadow(
color: Colors.grey.withOpacity(0.2), color: Colors.grey.withOpacity(0.2),
offset: Offset(1.1, 1.1), offset: Offset(1.1, 1.1),
blurRadius: 10.0), blurRadius: 10.0,
),
], ],
), ),
child: customWidget, child: customWidget,

@ -10,10 +10,10 @@ class SingleAdSpace extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
height: ScreenUtil().setHeight(160), height: 160.w,
margin: EdgeInsets.symmetric( margin: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(32), horizontal: 32.w,
vertical: ScreenUtil().setHeight(17), vertical: 17.w,
), ),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(radius)), borderRadius: BorderRadius.all(Radius.circular(radius)),
@ -29,7 +29,7 @@ class SingleAdSpace extends StatelessWidget {
child: Container( child: Container(
child: Image.asset( child: Image.asset(
imagePath, imagePath,
height: ScreenUtil().setHeight(160), height: 160.w,
fit: BoxFit.fill, fit: BoxFit.fill,
), ),
), ),

Loading…
Cancel
Save