|
@@ -118,7 +118,7 @@ class __CustomQuickEntryContainerState extends State<_CustomQuickEntryContainer> |
|
|
// 图标的高度 |
|
|
// 图标的高度 |
|
|
double iconHeight = 40.0; |
|
|
double iconHeight = 40.0; |
|
|
// 标题的高度 |
|
|
// 标题的高度 |
|
|
double titleHeight = 20.0; |
|
|
|
|
|
|
|
|
double titleHeight = 21.0; |
|
|
|
|
|
|
|
|
// 子元素的高度 |
|
|
// 子元素的高度 |
|
|
double itemHeight = iconHeight; |
|
|
double itemHeight = iconHeight; |
|
@@ -412,7 +412,7 @@ class __CustomQuickEntryContainerState extends State<_CustomQuickEntryContainer> |
|
|
padding: const EdgeInsets.only(top: 5), |
|
|
padding: const EdgeInsets.only(top: 5), |
|
|
child: Text( |
|
|
child: Text( |
|
|
item?.title ?? '', |
|
|
item?.title ?? '', |
|
|
style: TextStyle(fontSize: 10, color: HexColor.fromHex(model?.titleColor)), |
|
|
|
|
|
|
|
|
style: TextStyle(fontSize: 12, color: HexColor.fromHex(model?.titleColor)), |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
@@ -514,83 +514,6 @@ class MyNetWorkImage extends StatelessWidget { |
|
|
child: CachedNetworkImage(width: width, imageUrl: imgUrl), |
|
|
child: CachedNetworkImage(width: width, imageUrl: imgUrl), |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Widget _getMainWidget(CustomQuickEntryModel model) { |
|
|
|
|
|
// // 数据总数 |
|
|
|
|
|
// int totalDataSize = model?.listStyle?.length ?? 0; |
|
|
|
|
|
// |
|
|
|
|
|
// // 展示的总行数 |
|
|
|
|
|
// int totalRowSize = 1;int.parse(model?.rowSize ?? '1'); |
|
|
|
|
|
// |
|
|
|
|
|
// // 展示的列数 |
|
|
|
|
|
// int columSize = 5;int.parse(model?.columnSize ?? '5'); |
|
|
|
|
|
// |
|
|
|
|
|
// // 图标的高度 |
|
|
|
|
|
// double iconHeight = 40.0; |
|
|
|
|
|
// // 标题的高度 |
|
|
|
|
|
// double titleHeight = 20.0; |
|
|
|
|
|
// |
|
|
|
|
|
// // 子元素的高度 |
|
|
|
|
|
// double itemHeight = iconHeight; |
|
|
|
|
|
// |
|
|
|
|
|
// // 如果有一级标题 |
|
|
|
|
|
// if (!EmptyUtil.isEmpty(model?.isShowTitle) && model.isShowTitle == '1') { |
|
|
|
|
|
// itemHeight = iconHeight + titleHeight; |
|
|
|
|
|
// } |
|
|
|
|
|
// |
|
|
|
|
|
// //如果有二级标题 |
|
|
|
|
|
// if (!EmptyUtil.isEmpty(model?.isShowSubTitle) && model.isShowSubTitle == '1') { |
|
|
|
|
|
// itemHeight = iconHeight + titleHeight * 2; |
|
|
|
|
|
// } |
|
|
|
|
|
// |
|
|
|
|
|
// // 进度条的边距 |
|
|
|
|
|
// double barMargin = 15.0; |
|
|
|
|
|
// // 总页数 |
|
|
|
|
|
// int totalPage = totalDataSize % (totalRowSize * columSize) == 0 ? totalDataSize ~/ (totalRowSize * columSize) : (totalDataSize ~/ (totalRowSize * columSize)) + 1; |
|
|
|
|
|
// |
|
|
|
|
|
// // 总体高度 = 行数 * (子元素高度 + 边距高度) + 进度条的高度 |
|
|
|
|
|
// double totalHeight = totalRowSize * (itemHeight + barMargin) + 4; |
|
|
|
|
|
// if (!EmptyUtil.isEmpty(model?.pagination) && model.pagination != 'type_null' /*model.pagination_open == '0'*/) { |
|
|
|
|
|
// totalHeight = totalRowSize * (itemHeight + barMargin); |
|
|
|
|
|
// } |
|
|
|
|
|
// |
|
|
|
|
|
// return Container( |
|
|
|
|
|
// color: HexColor.fromHex(widget?.model['bg_color']), |
|
|
|
|
|
// // color: Colors.yellow, |
|
|
|
|
|
// child: Container( |
|
|
|
|
|
// margin: EdgeInsets.only(top: 15, bottom: totalPage > 1 ? 15 : 0), |
|
|
|
|
|
// height: totalHeight, |
|
|
|
|
|
// // 总体高度 |
|
|
|
|
|
// width: double.infinity, |
|
|
|
|
|
// color: HexColor.fromHex(widget?.model['bg_color']), |
|
|
|
|
|
// child: Swiper( |
|
|
|
|
|
// controller: _controller, |
|
|
|
|
|
// itemCount: totalPage, |
|
|
|
|
|
// loop: false, |
|
|
|
|
|
// itemBuilder: (context, index) { |
|
|
|
|
|
// return Container( |
|
|
|
|
|
// height: double.infinity, |
|
|
|
|
|
// width: double.infinity, |
|
|
|
|
|
// padding: const EdgeInsets.symmetric(horizontal: 12.5), |
|
|
|
|
|
// 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), |
|
|
|
|
|
// ), |
|
|
|
|
|
// ), |
|
|
|
|
|
// ); |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
class CustomQuickCateEntry extends StatefulWidget { |
|
|
class CustomQuickCateEntry extends StatefulWidget { |
|
@@ -694,7 +617,7 @@ class _CustomQuickCateEntryState extends State<CustomQuickCateEntry> with Ticker |
|
|
// 图标的高度 |
|
|
// 图标的高度 |
|
|
double iconHeight = 40; |
|
|
double iconHeight = 40; |
|
|
// 标题的高度 |
|
|
// 标题的高度 |
|
|
double titleHeight = 20.0; |
|
|
|
|
|
|
|
|
double titleHeight = 21.0; |
|
|
|
|
|
|
|
|
// 子元素的高度 |
|
|
// 子元素的高度 |
|
|
double itemHeight = iconHeight; |
|
|
double itemHeight = iconHeight; |
|
@@ -997,7 +920,7 @@ class _CustomQuickCateEntryState extends State<CustomQuickCateEntry> with Ticker |
|
|
padding: const EdgeInsets.only(top: 5), |
|
|
padding: const EdgeInsets.only(top: 5), |
|
|
child: Text( |
|
|
child: Text( |
|
|
item?.title ?? '', |
|
|
item?.title ?? '', |
|
|
style: TextStyle(fontSize: 10, color: HexColor.fromHex(model?.titleColor)), |
|
|
|
|
|
|
|
|
style: TextStyle(fontSize: 12, color: HexColor.fromHex(model?.titleColor)), |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|