Browse Source

1、多眼导航如果每行小于等于4item宽度为75(6个汉字)

tags/0.0.15+8
PH2 3 years ago
parent
commit
89a20f0eac
1 changed files with 4 additions and 65 deletions
  1. +4
    -65
      lib/widgets/custom/multi_nav/custom_quick_entry.dart

+ 4
- 65
lib/widgets/custom/multi_nav/custom_quick_entry.dart View File

@@ -1,12 +1,9 @@
import 'dart:async'; import 'dart:async';
import 'dart:math';


import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_swiper/flutter_swiper.dart'; import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:tab_indicator_styler/tab_indicator_styler.dart';
import 'package:zhiying_base_widget/widgets/primary_page_view/primary_page_view.dart';
import 'package:zhiying_comm/zhiying_comm.dart'; import 'package:zhiying_comm/zhiying_comm.dart';
import 'package:cached_network_image/cached_network_image.dart'; import 'package:cached_network_image/cached_network_image.dart';
import 'custom_quick_entry_sk.dart'; import 'custom_quick_entry_sk.dart';
@@ -224,64 +221,6 @@ class __CustomQuickEntryContainerState extends State<_CustomQuickEntryContainer>
), ),
) )


// Container(
// margin: EdgeInsets.only(bottom: categoryBottomMargin),
// padding: const EdgeInsets.only(left: 12.5, right: 12.5),
// height: categoryHeight,
// width: double.infinity,
// child: TabBar(
// controller: tabController,
// labelColor: HexColor.fromHex('#FFFF4242'),
// unselectedLabelColor: HexColor.fromHex('#FF3C3C3C'),
// // indicatorColor: HexColor.fromHex('#FFFF4242'),
// indicator: MaterialIndicator(
// color: HexColor.fromHex('#FFFF4242'),
// height: 22,
// bottomRightRadius: 10,
// bottomLeftRadius: 10,
// topRightRadius: 10,
// topLeftRadius: 10,
// tabPosition: TabPosition.top,
// horizontalPadding: 8,
// // paintingStyle: PaintingStyle.stroke
// ),
// tabs: List.generate(5, (index) => Container(width: 50, child: Center(child: Text('热门', style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold))))),
// ),
// ),

// Expanded(
// child: TabBarView(
// controller: tabController,
// children: List.generate(5, (index) => Container(
// width: double.infinity,
// height: hasCategory ? totalHeight - categoryHeight - categoryBottomMargin : totalHeight ,
// child: Swiper(
// controller: _controller,
// itemCount: totalPage,
// loop: false,
// itemBuilder: (context, index) {
// return Container(
// height: double.infinity,
// width: double.infinity,
// padding: const EdgeInsets.symmetric(horizontal: 4),
// child: _getPageWidget(
// iconHeight: iconHeight,
// titleHeight: titleHeight,
// totalDataSize: totalDataSize,
// totalPage: totalPage,
// currentPage: index,
// totalRowSize: totalRowSize,
// columSize: columSize,
// model: model,
// itemHeight: itemHeight,
// ),
// );
// },
// pagination: totalPage <= 1 ? null : _getSwiperPaginationContorl(model, totalPage),
// ),
// )),
// ),
// )
], ],
), ),
), ),
@@ -383,7 +322,7 @@ class __CustomQuickEntryContainerState extends State<_CustomQuickEntryContainer>
if (currentIndex >= totalDataSize) { if (currentIndex >= totalDataSize) {
return Container( return Container(
height: itemHeight, height: itemHeight,
width: 60,
width: columSize <= 4 ? 75 : 60,
); );
} }


@@ -397,7 +336,7 @@ class __CustomQuickEntryContainerState extends State<_CustomQuickEntryContainer>
child: Container( child: Container(
padding: EdgeInsets.only(top: model?.isShowCornerIcon == '1' ? 3 : 0), padding: EdgeInsets.only(top: model?.isShowCornerIcon == '1' ? 3 : 0),
height: itemHeight, height: itemHeight,
width: 60,
width: columSize <= 4 ? 75 : 60,
// color: Colors.red, // color: Colors.red,
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
@@ -902,7 +841,7 @@ class _CustomQuickCateEntryState extends State<CustomQuickCateEntry> with Ticker
if (currentIndex >= totalDataSize) { if (currentIndex >= totalDataSize) {
return Container( return Container(
height: itemHeight, height: itemHeight,
width: 60,
width: columSize <= 4 ? 75 : 60,
); );
} }


@@ -914,7 +853,7 @@ class _CustomQuickCateEntryState extends State<CustomQuickCateEntry> with Ticker
child: Container( child: Container(
padding: EdgeInsets.only(top: model?.isShowCornerIcon == '1' ? 3 : 0), padding: EdgeInsets.only(top: model?.isShowCornerIcon == '1' ? 3 : 0),
height: itemHeight, height: itemHeight,
width: 60,
width: columSize <= 4 ? 75 : 60,
// color: Colors.red, // color: Colors.red,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,


Loading…
Cancel
Save