From e074eaf30afe1596d3170e068aebe53626fcf18c Mon Sep 17 00:00:00 2001 From: "23028876916@qq.com" Date: Thu, 25 Mar 2021 18:45:16 +0800 Subject: [PATCH] =?UTF-8?q?0325=20=20=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/pubspec.yaml | 2 +- lib/pages/main_page/main_page.dart | 8 +- .../custom/multi_nav/custom_quick_entry.dart | 213 ++++++++++++------ .../mine_header/mine_header_container.dart | 13 +- 4 files changed, 161 insertions(+), 75 deletions(-) diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 7eaacb0..c1d1019 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -40,7 +40,7 @@ dev_dependencies: zhiying_moments: #path: ../zhiying_moments git: - ref: 0.1.8 + ref: 0.2.2 url: http://192.168.0.138:3000/FnuoOS_ZhiYing/zhiying_moments.git #会员升级 zhiying_member_upgrade: diff --git a/lib/pages/main_page/main_page.dart b/lib/pages/main_page/main_page.dart index a904fe8..889c1e4 100644 --- a/lib/pages/main_page/main_page.dart +++ b/lib/pages/main_page/main_page.dart @@ -11,6 +11,7 @@ import 'package:zhiying_base_widget/pages/main_page/notifier/main_page_notifier. import 'package:zhiying_base_widget/widgets/home/home_auth/home_auth.dart'; import 'package:zhiying_base_widget/widgets/mine/mine_nav/mine_nav_bg.dart'; import 'package:zhiying_base_widget/widgets/others/mine_header_bg_widget.dart'; +import 'package:zhiying_base_widget/widgets/refresh/refresh_header/refresh_gif_header.dart'; import 'package:zhiying_base_widget/widgets/refresh/refresh_header/refresh_header.dart'; import 'package:zhiying_comm/util/base_bloc.dart'; import 'package:zhiying_comm/zhiying_comm.dart'; @@ -133,9 +134,10 @@ class _MainPageContainerState extends State<_MainPageContainer> { SmartRefresher( enablePullDown: true, enablePullUp: false, - header: RefreshHeader( - offsetY: top, - ), + header: RefreshGifHeader(), + // RefreshHeader( + // offsetY: top, + // ), controller: _refreshController, onLoading: _onLoading, onRefresh: _onRefresh, diff --git a/lib/widgets/custom/multi_nav/custom_quick_entry.dart b/lib/widgets/custom/multi_nav/custom_quick_entry.dart index fed64a0..8b7144c 100644 --- a/lib/widgets/custom/multi_nav/custom_quick_entry.dart +++ b/lib/widgets/custom/multi_nav/custom_quick_entry.dart @@ -22,7 +22,8 @@ class CustomQuickEntry extends StatelessWidget { Widget build(BuildContext context) { return BlocProvider( create: (_) { - return CustomQuickEntryBloc(repository: CustomQuickEntryRepository())..add(CustomQuickEntryInitEvent(model: model)); + return CustomQuickEntryBloc(repository: CustomQuickEntryRepository()) + ..add(CustomQuickEntryInitEvent(model: model)); }, child: _CustomQuickEntryContainer(model), ); @@ -38,7 +39,8 @@ class _CustomQuickEntryContainer extends StatefulWidget { __CustomQuickEntryContainerState createState() => __CustomQuickEntryContainerState(); } -class __CustomQuickEntryContainerState extends State<_CustomQuickEntryContainer> with TickerProviderStateMixin, AutomaticKeepAliveClientMixin { +class __CustomQuickEntryContainerState extends State<_CustomQuickEntryContainer> + with TickerProviderStateMixin, AutomaticKeepAliveClientMixin { /// Icon点击事件 void _itemIconClick(ListStyle model) { print("item type = ${model.skipIdentifier}"); @@ -136,12 +138,16 @@ class __CustomQuickEntryContainerState extends State<_CustomQuickEntryContainer> // 进度条的边距 double barMargin = 15.0; // 总页数 - int totalPage = totalDataSize % (totalRowSize * columSize) == 0 ? totalDataSize ~/ (totalRowSize * columSize) : (totalDataSize ~/ (totalRowSize * columSize)) + 1; + int totalPage = totalDataSize % (totalRowSize * columSize) == 0 + ? totalDataSize ~/ (totalRowSize * columSize) + : (totalDataSize ~/ (totalRowSize * columSize)) + 1; Logger.log('totalPage = ' + totalPage?.toString()); // 总体高度 = 行数 * (子元素高度 + 边距高度) + 进度条的高度 double totalHeight = totalRowSize * (itemHeight + barMargin); - if (totalPage > 1 && !EmptyUtil.isEmpty(model?.pagination) && model.pagination != 'type_null' /*model.pagination_open == '0'*/) { + if (totalPage > 1 && + !EmptyUtil.isEmpty(model?.pagination) && + model.pagination != 'type_null' /*model.pagination_open == '0'*/) { totalHeight = totalRowSize * (itemHeight + barMargin) + 8; } @@ -161,21 +167,28 @@ class __CustomQuickEntryContainerState extends State<_CustomQuickEntryContainer> totalHeight = totalHeight + moduleTitleHeight; } - double marginLeftRight = model?.isLeftRightMargin == "1" ? double.tryParse(model?.leftRightMargin ?? "0") : 0; - double marginTop = model?.isTopMargin == "1" ? double.tryParse(model?.topMargin ?? "0") : 0; + double marginLeftRight = model?.isLeftRightMargin == "1" + ? double.tryParse(model?.leftRightMargin ?? "0") + : 0; + double marginTop = + model?.isTopMargin == "1" ? double.tryParse(model?.topMargin ?? "0") : 0; return Container( - margin: EdgeInsets.only(top: marginTop, left: marginLeftRight, right: marginLeftRight), + margin: + EdgeInsets.only(top: marginTop, left: marginLeftRight, right: marginLeftRight), decoration: BoxDecoration( color: HexColor.fromHex(model?.bgColor ?? ''), //color: Colors.green, borderRadius: BorderRadius.only( topRight: Radius.circular(ParseUtil.stringParseDouble(model?.topRightRadius)), topLeft: Radius.circular(ParseUtil.stringParseDouble(model?.topLeftRadius)), - bottomLeft: Radius.circular(ParseUtil.stringParseDouble(model?.bottomLeftRadius)), - bottomRight: Radius.circular(ParseUtil.stringParseDouble(model?.bottomRightRadius)), + bottomLeft: + Radius.circular(ParseUtil.stringParseDouble(model?.bottomLeftRadius)), + bottomRight: + Radius.circular(ParseUtil.stringParseDouble(model?.bottomRightRadius)), )), child: Container( - margin: EdgeInsets.only(top: !hasCategory ? 15 : 0, bottom: totalPage > 1 ? 8 : 0), + margin: + EdgeInsets.only(top: !hasCategory ? 15 : 0, bottom: totalPage > 1 ? 8 : 0), height: totalHeight, // 总体高度 width: double.infinity, @@ -188,14 +201,20 @@ class __CustomQuickEntryContainerState extends State<_CustomQuickEntryContainer> visible: !EmptyUtil.isEmpty(model?.moduleTitleName), child: Padding( padding: const EdgeInsets.only(left: 12.5, bottom: 10), - child: Text(model?.moduleTitleName ?? '', style: TextStyle(color: HexColor.fromHex(model?.moduleTitleColor), fontWeight: FontWeight.bold, fontSize: 15))), + child: Text(model?.moduleTitleName ?? '', + style: TextStyle( + color: HexColor.fromHex(model?.moduleTitleColor), + fontWeight: FontWeight.bold, + fontSize: 15))), ), // icon Expanded( child: Container( width: double.infinity, - height: hasCategory ? totalHeight - categoryHeight - categoryBottomMargin : totalHeight, + height: hasCategory + ? totalHeight - categoryHeight - categoryBottomMargin + : totalHeight, child: Swiper( controller: _controller, itemCount: totalPage, @@ -218,7 +237,9 @@ class __CustomQuickEntryContainerState extends State<_CustomQuickEntryContainer> ), ); }, - pagination: totalPage <= 1 ? null : _getSwiperPaginationContorl(model, totalPage), + pagination: totalPage <= 1 + ? null + : _getSwiperPaginationContorl(model, totalPage), ), ), ) @@ -289,7 +310,15 @@ class __CustomQuickEntryContainerState extends State<_CustomQuickEntryContainer> /// 页的数据 Widget _getPageWidget( - {double titleHeight, double iconHeight, int totalPage, int currentPage, int columSize, int totalRowSize, int totalDataSize, CustomQuickEntryModel model, double itemHeight}) { + {double titleHeight, + double iconHeight, + int totalPage, + int currentPage, + int columSize, + int totalRowSize, + int totalDataSize, + CustomQuickEntryModel model, + double itemHeight}) { List rowList = []; for (int i = 0; i < totalRowSize; i++) { rowList.add(i); @@ -375,7 +404,8 @@ class __CustomQuickEntryContainerState extends State<_CustomQuickEntryContainer> // currentColum + currentRow * columSize; // 当前元素的下表 = 当前的列数 + 当前的行数 * 列数 + 当前的页数 * 当前的行数 + 当前的列数 - int currentIndex = currentColum + currentRow * columSize + currentPage * totalRowSize * columSize; + int currentIndex = + currentColum + currentRow * columSize + currentPage * totalRowSize * columSize; // print('current Index sss = $currentIndex'); @@ -410,19 +440,22 @@ class __CustomQuickEntryContainerState extends State<_CustomQuickEntryContainer> padding: const EdgeInsets.only(top: 5), child: Text( item?.title ?? '', - style: TextStyle(fontSize: 10, color: HexColor.fromHex(model?.titleColor)), + style: + TextStyle(fontSize: 10, color: HexColor.fromHex(model?.titleColor)), ), ), ), /// 二级标题 Visibility( - visible: !EmptyUtil.isEmpty(model?.isShowSubTitle) && model.isShowSubTitle == '1', + visible: !EmptyUtil.isEmpty(model?.isShowSubTitle) && + model.isShowSubTitle == '1', child: Padding( padding: const EdgeInsets.only(top: 5), child: Text( item?.subTitle ?? '', - style: TextStyle(fontSize: 10, color: HexColor.fromHex(model?.subTitleColor)), + style: TextStyle( + fontSize: 10, color: HexColor.fromHex(model?.subTitleColor)), ), ), ) @@ -434,7 +467,8 @@ class __CustomQuickEntryContainerState extends State<_CustomQuickEntryContainer> /// 进度条 SwiperPlugin _getSwiperPaginationContorl(CustomQuickEntryModel model, int pageCount) { - if (EmptyUtil.isEmpty(model?.pagination) || model.pagination == 'type_null' /*model.pagination_open == '0'*/) { + if (EmptyUtil.isEmpty(model?.pagination) || + model.pagination == 'type_null' /*model.pagination_open == '0'*/) { return null; } @@ -452,7 +486,10 @@ class __CustomQuickEntryContainerState extends State<_CustomQuickEntryContainer> return SwiperPagination( margin: const EdgeInsets.only(), builder: DotSwiperPaginationBuilder( - color: HexColor.fromHex(model?.paginationUnselectColor), activeColor: HexColor.fromHex(model?.paginationSelectColor), size: 8, activeSize: 8)); + color: HexColor.fromHex(model?.paginationUnselectColor), + activeColor: HexColor.fromHex(model?.paginationSelectColor), + size: 8, + activeSize: 8)); } // 自定义进度条 条形 @@ -462,7 +499,8 @@ class __CustomQuickEntryContainerState extends State<_CustomQuickEntryContainer> list.add(i); } - return SwiperCustomPagination(builder: (BuildContext context, SwiperPluginConfig config) { + return SwiperCustomPagination( + builder: (BuildContext context, SwiperPluginConfig config) { return Align( alignment: Alignment(0.0, 1), child: Row( @@ -471,10 +509,12 @@ class __CustomQuickEntryContainerState extends State<_CustomQuickEntryContainer> children: list.map((index) { var borderRadius; if (index == 0) { - borderRadius = BorderRadius.only(topLeft: Radius.circular(2), bottomLeft: Radius.circular(2)); + borderRadius = BorderRadius.only( + topLeft: Radius.circular(2), bottomLeft: Radius.circular(2)); } if (index == list.length - 1) { - borderRadius = BorderRadius.only(topRight: Radius.circular(2), bottomRight: Radius.circular(2)); + borderRadius = BorderRadius.only( + topRight: Radius.circular(2), bottomRight: Radius.circular(2)); } if (index == config.activeIndex) { @@ -484,7 +524,11 @@ class __CustomQuickEntryContainerState extends State<_CustomQuickEntryContainer> return Container( height: 4, width: 25, - decoration: BoxDecoration(borderRadius: borderRadius, color: index == config.activeIndex ? HexColor.fromHex('#FF4242') : HexColor.fromHex('#FFFFFF')), + decoration: BoxDecoration( + borderRadius: borderRadius, + color: index == config.activeIndex + ? HexColor.fromHex('#FF4242') + : HexColor.fromHex('#FFFFFF')), ); }).toList(), ), @@ -600,7 +644,8 @@ class CustomQuickCateEntry extends StatefulWidget { _CustomQuickCateEntryState createState() => _CustomQuickCateEntryState(); } -class _CustomQuickCateEntryState extends State with TickerProviderStateMixin, AutomaticKeepAliveClientMixin { +class _CustomQuickCateEntryState extends State + with TickerProviderStateMixin, AutomaticKeepAliveClientMixin { TabController tabController; PrimaryPageController primaryPageController; @@ -617,7 +662,8 @@ class _CustomQuickCateEntryState extends State with Ticker void initState() { // primaryPageController = PrimaryPageController(keepPage: true); if (widget?.model != null) { - tabController = TabController(length: widget?.model?.typeList?.length ?? 0, vsync: this); + tabController = + TabController(length: widget?.model?.typeList?.length ?? 0, vsync: this); tabController.addListener(() {}); } _controller = SwiperController(); @@ -697,7 +743,6 @@ class _CustomQuickCateEntryState extends State with Ticker } } - //计算实际显示行数 print("行数" + totalRowSize.toString()); @@ -722,12 +767,16 @@ class _CustomQuickCateEntryState extends State with Ticker // 进度条的边距 double barMargin = 10.0; // 总页数 - int totalPage = totalDataSize % (totalRowSize * columSize) == 0 ? totalDataSize ~/ (totalRowSize * columSize) : (totalDataSize ~/ (totalRowSize * columSize)) + 1; + int totalPage = totalDataSize % (totalRowSize * columSize) == 0 + ? totalDataSize ~/ (totalRowSize * columSize) + : (totalDataSize ~/ (totalRowSize * columSize)) + 1; Logger.log('totalPage = ' + totalPage?.toString()); // 总体高度 = 行数 * (子元素高度 + 边距高度) + 进度条的高度 double totalHeight = totalRowSize * (itemHeight + barMargin); - if (totalPage > 1 && !EmptyUtil.isEmpty(model?.pagination) && model.pagination != 'type_null' /*model.pagination_open == '0'*/) { + if (totalPage > 1 && + !EmptyUtil.isEmpty(model?.pagination) && + model.pagination != 'type_null' /*model.pagination_open == '0'*/) { totalHeight = totalRowSize * (itemHeight + barMargin) + 6; } @@ -747,8 +796,11 @@ class _CustomQuickCateEntryState extends State with Ticker totalHeight = totalHeight + moduleTitleHeight; } - double marginLeftRight = model?.isLeftRightMargin == "1" ? double.tryParse(model?.leftRightMargin ?? "0") : 0; - double marginTop = model?.isTopMargin == "1" ? double.tryParse(model?.topMargin ?? "0") : 0; + double marginLeftRight = model?.isLeftRightMargin == "1" + ? double.tryParse(model?.leftRightMargin ?? "0") + : 0; + double marginTop = + model?.isTopMargin == "1" ? double.tryParse(model?.topMargin ?? "0") : 0; int currentTypeIndex = 0; @@ -760,7 +812,9 @@ class _CustomQuickCateEntryState extends State with Ticker } if (item.listStyle.length > totalRowSize) { - for (int index = 0; index < (item.listStyle.length / (columSize * totalRowSize)).ceil(); index++) { + for (int index = 0; + index < (item.listStyle.length / (columSize * totalRowSize)).ceil(); + index++) { var list = List(); var startIndex = index * columSize * totalRowSize; for (var i = 0; i < columSize * totalRowSize; i++) { @@ -779,18 +833,21 @@ class _CustomQuickCateEntryState extends State with Ticker } return Container( - margin: EdgeInsets.only(top: marginTop, left: marginLeftRight, right: marginLeftRight), + margin: + EdgeInsets.only(top: marginTop, left: marginLeftRight, right: marginLeftRight), decoration: BoxDecoration( color: HexColor.fromHex(model?.bgColor ?? ''), //color: Colors.green, borderRadius: BorderRadius.only( topRight: Radius.circular(ParseUtil.stringParseDouble(model?.topRightRadius)), topLeft: Radius.circular(ParseUtil.stringParseDouble(model?.topLeftRadius)), - bottomLeft: Radius.circular(ParseUtil.stringParseDouble(model?.bottomLeftRadius)), - bottomRight: Radius.circular(ParseUtil.stringParseDouble(model?.bottomRightRadius)), + bottomLeft: + Radius.circular(ParseUtil.stringParseDouble(model?.bottomLeftRadius)), + bottomRight: + Radius.circular(ParseUtil.stringParseDouble(model?.bottomRightRadius)), )), child: Container( - height: totalHeight + (totalRowSize * 5) + 5+5, + height: totalHeight + (totalRowSize * 5) + 5 + 5, margin: EdgeInsets.only(bottom: model?.pagination == "type_null" ? 0 : 8), child: Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -820,12 +877,13 @@ class _CustomQuickCateEntryState extends State with Ticker labelColor: HexColor.fromHex("#FFFFFF"), unselectedLabelColor: HexColor.fromHex("#FF333333"), labelStyle: TextStyle(fontSize: 14), - tabs: _buildTab(model,columSize,marginLeftRight), - labelPadding: EdgeInsets.only(left: 16,right: 16), + tabs: _buildTab(model, columSize, marginLeftRight), + labelPadding: EdgeInsets.only(left: 16, right: 16), controller: tabController, indicatorSize: TabBarIndicatorSize.label, indicatorColor: Colors.transparent, - indicator: BubbleTabIndicator(indicatorColor: HexColor.fromHex("#FF4242")), + indicator: + BubbleTabIndicator(indicatorColor: HexColor.fromHex("#FF4242")), ), ) : Container(), @@ -860,7 +918,7 @@ class _CustomQuickCateEntryState extends State with Ticker ), ); }, - pagination: _getSwiperPaginationContorl(model, model?.typeList?.length ?? 0), + pagination: _getSwiperPaginationContorl(model, pageList?.length ?? 0), )), ], ), @@ -868,15 +926,17 @@ class _CustomQuickCateEntryState extends State with Ticker ); } - _buildTab(CustomQuickEntryModel model,int columSize,double marginLeft) { + _buildTab(CustomQuickEntryModel model, int columSize, double marginLeft) { List listWidget = List(); - var maxWidth = ((MediaQuery.of(context).size.width-marginLeft*2)-(32*columSize)) / columSize; - print("测试"+columSize.toString()); + var maxWidth = + ((MediaQuery.of(context).size.width - marginLeft * 2) - (32 * columSize)) / + columSize; + print("测试" + columSize.toString()); for (var item in model?.typeList) { listWidget.add(Tab( child: Container( width: maxWidth, - child: Center(child: Text(item.name??"")), + child: Center(child: Text(item.name ?? "")), ), )); } @@ -885,7 +945,15 @@ class _CustomQuickCateEntryState extends State with Ticker /// 获取有分类页 _getCategoryPageWidget( - {double titleHeight, double iconHeight, int totalPage, int currentPage, int columSize, int totalRowSize, int totalDataSize, CustomQuickEntryModel model, double itemHeight}) { + {double titleHeight, + double iconHeight, + int totalPage, + int currentPage, + int columSize, + int totalRowSize, + int totalDataSize, + CustomQuickEntryModel model, + double itemHeight}) { List rowList = []; for (int i = 0; i < totalRowSize; i++) { rowList.add(i); @@ -974,10 +1042,8 @@ class _CustomQuickCateEntryState extends State with Ticker // 当前元素的下表 = 当前的列数 + 当前的行数 * 列数 + 当前的页数 * 当前的行数 + 当前的列数 int currentIndex = currentColum + currentRow * columSize; print("当前页" + currentPage.toString() + "当前点" + currentIndex.toString()); - // print('current Index sss = $currentIndex'); - if (currentIndex >= totalDataSize) { return Container( height: itemHeight, @@ -992,34 +1058,40 @@ class _CustomQuickCateEntryState extends State with Ticker onTap: () => _itemIconClick(item), child: Container( height: itemHeight, - width:60, + width: 60, // color: Colors.red, child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ /// 图标 - MyNetWorkImage(item.img,width: 40,), + MyNetWorkImage( + item.img, + width: 40, + ), /// 一级标题 Visibility( visible: !EmptyUtil.isEmpty(model?.isShowTitle) && model.isShowTitle == '1', child: Padding( - padding: const EdgeInsets.only(top: 5), + padding: const EdgeInsets.only(top: 2), child: Text( item?.title ?? '', - style: TextStyle(fontSize: 10, color: HexColor.fromHex(model?.titleColor)), + style: + TextStyle(fontSize: 12, color: HexColor.fromHex(model?.titleColor)), ), ), ), /// 二级标题 Visibility( - visible: !EmptyUtil.isEmpty(model?.isShowSubTitle) && model.isShowSubTitle == '1', + visible: !EmptyUtil.isEmpty(model?.isShowSubTitle) && + model.isShowSubTitle == '1', child: Padding( - padding: const EdgeInsets.only(top: 5), + padding: const EdgeInsets.only(top: 0), child: Text( item?.subTitle ?? '', - style: TextStyle(fontSize: 10, color: HexColor.fromHex(model?.subTitleColor)), + style: TextStyle( + fontSize: 10, color: HexColor.fromHex(model?.subTitleColor)), ), ), ) @@ -1038,7 +1110,8 @@ class _CustomQuickCateEntryState extends State with Ticker /// 进度条 SwiperPlugin _getSwiperPaginationContorl(CustomQuickEntryModel model, int pageCount) { - if (EmptyUtil.isEmpty(model?.pagination) || model.pagination == 'type_null' /*model.pagination_open == '0'*/) { + if (EmptyUtil.isEmpty(model?.pagination) || + model.pagination == 'type_null' /*model.pagination_open == '0'*/) { return null; } @@ -1047,7 +1120,7 @@ class _CustomQuickCateEntryState extends State with Ticker return _swiperPaginationDot(model); } else { // 自定义进度条 - return _swiperCustomPagination(pageCount); + return _swiperCustomPagination(pageCount, model); } } @@ -1056,18 +1129,21 @@ class _CustomQuickCateEntryState extends State with Ticker return SwiperPagination( margin: const EdgeInsets.only(), builder: DotSwiperPaginationBuilder( - space: 2, - color: HexColor.fromHex(model?.paginationUnselectColor), activeColor: HexColor.fromHex(model?.paginationSelectColor), size: 6, activeSize: 7)); + space: 2, + color: HexColor.fromHex(model?.paginationUnselectColor), + activeColor: HexColor.fromHex(model?.paginationSelectColor), + size: 6, + activeSize: 7)); } // 自定义进度条 条形 - SwiperPlugin _swiperCustomPagination(int pageCount) { + SwiperPlugin _swiperCustomPagination(int pageCount, CustomQuickEntryModel model) { List list = []; for (int i = 0; i < pageCount; i++) { list.add(i); } - - return SwiperCustomPagination(builder: (BuildContext context, SwiperPluginConfig config) { + return SwiperCustomPagination( + builder: (BuildContext context, SwiperPluginConfig config) { return Align( alignment: Alignment(0.0, 1), child: Row( @@ -1076,10 +1152,12 @@ class _CustomQuickCateEntryState extends State with Ticker children: list.map((index) { var borderRadius; if (index == 0) { - borderRadius = BorderRadius.only(topLeft: Radius.circular(2), bottomLeft: Radius.circular(2)); + borderRadius = BorderRadius.only( + topLeft: Radius.circular(2), bottomLeft: Radius.circular(2)); } if (index == list.length - 1) { - borderRadius = BorderRadius.only(topRight: Radius.circular(2), bottomRight: Radius.circular(2)); + borderRadius = BorderRadius.only( + topRight: Radius.circular(2), bottomRight: Radius.circular(2)); } if (index == config.activeIndex) { @@ -1088,8 +1166,13 @@ class _CustomQuickCateEntryState extends State with Ticker return Container( height: 4, - width: 25, - decoration: BoxDecoration(borderRadius: borderRadius, color: index == config.activeIndex ? HexColor.fromHex('#FF4242') : HexColor.fromHex('#FFFFFF')), + width: 8, + + decoration: BoxDecoration( + borderRadius: borderRadius, + color: index == config.activeIndex + ? HexColor.fromHex(model.paginationSelectColor) + : HexColor.fromHex(model.paginationUnselectColor)), ); }).toList(), ), diff --git a/lib/widgets/mine/mine_header/mine_header_container.dart b/lib/widgets/mine/mine_header/mine_header_container.dart index b6a97bc..1d9dedb 100644 --- a/lib/widgets/mine/mine_header/mine_header_container.dart +++ b/lib/widgets/mine/mine_header/mine_header_container.dart @@ -105,9 +105,9 @@ class _MineHeaderContainerState extends State { Visibility( visible: (widget?.staticModel?.status??"1")=="1"?true:false, child: Container( - height: 18, + height: 24, margin: EdgeInsets.only(left: 6), - padding: EdgeInsets.only(left: 6, right: 6), + padding: EdgeInsets.only(left: 6, right: 6,top: 2,bottom: 3), decoration: boxDecoration, // BoxDecoration( // image: DecorationImage( @@ -122,9 +122,9 @@ class _MineHeaderContainerState extends State { child: Row( children: [ Container( - width: 12, - height: 12, - margin: EdgeInsets.only(right: 2), + width: 14, + height: 14, + margin: EdgeInsets.only(right: 2,top: 2), child: CachedNetworkImage( imageUrl: profile?.userLvIcon ?? '', fit: BoxFit.contain, @@ -133,7 +133,8 @@ class _MineHeaderContainerState extends State { Text( profile?.userLvName ?? '', style: TextStyle( - fontSize: 10, color: HexColor.fromHex(widget.staticModel.lvNameColor)), + fontSize: 12, color: HexColor.fromHex(widget.staticModel.lvNameColor) + ), ) ], ),