瀏覽代碼

Merge branch '1.22.0_master' of http://192.168.0.138:3000/FnuoOS_ZhiYing/zhiying_base_widget into 1.22.0_master

tags/0.0.10
“yanghuaxuan” 3 年之前
父節點
當前提交
d24d53ebff
共有 7 個文件被更改,包括 34 次插入92 次删除
  1. +1
    -1
      lib/pages/security_page/security_bind_alipay/security_bind_alipay_page.dart
  2. +1
    -1
      lib/pages/security_page/security_mobile/security_mobile_unbind.dart
  3. +2
    -1
      lib/pages/security_page/security_password/security_password.dart
  4. +1
    -1
      lib/pages/security_page/security_unbind_alipay/security_unbin_alipay.dart
  5. +4
    -81
      lib/widgets/custom/multi_nav/custom_quick_entry.dart
  6. +18
    -2
      lib/widgets/custom/search/custom_search_widget.dart
  7. +7
    -5
      lib/widgets/restart_widget/restart_widget.dart

+ 1
- 1
lib/pages/security_page/security_bind_alipay/security_bind_alipay_page.dart 查看文件

@@ -80,7 +80,7 @@ class _SecurityBindAlipayContainerState
void _verifiy() {
bool canConfirm = _nameController.text.length > 0 &&
_accountController.text.length > 0 &&
_codeController.text.length == 6;
_codeController.text.length >= 4 && _codeController.text.length <= 4;
if (canConfirm != _canConfirm) {
setState(() {
_canConfirm = canConfirm;


+ 1
- 1
lib/pages/security_page/security_mobile/security_mobile_unbind.dart 查看文件

@@ -130,7 +130,7 @@ class _SecurityMobileUnbindState extends State<SecurityMobileUnbind> {
}

void _verifiy() {
bool canConfirm = _codeController.text.length == 6;
bool canConfirm = _codeController.text.length >= 4 && _codeController.text.length <= 6;
if (canConfirm != _canConfirm) {
setState(() {
_canConfirm = canConfirm;


+ 2
- 1
lib/pages/security_page/security_password/security_password.dart 查看文件

@@ -145,7 +145,8 @@ class _SecurityPasswordState extends State<SecurityPassword> {
}

void _verifiy() {
bool canConfirm = _passwordController.text.length >= 6 && _confirmController.text.length >= 6 && _codeController.text.length == 6;
bool canConfirm = _passwordController.text.length >= 6 && _confirmController.text.length >= 6 &&
_codeController.text.length >= 4 && _codeController.text.length <= 6;
if (canConfirm != _canConfirm) {
setState(() {
_canConfirm = canConfirm;


+ 1
- 1
lib/pages/security_page/security_unbind_alipay/security_unbin_alipay.dart 查看文件

@@ -36,7 +36,7 @@ class _SecurityUnbinAlipayState extends State<SecurityUnbinAlipay> {
}

void _verifiy() {
bool canConfirm = _codeController.text.length == 6;
bool canConfirm = _codeController.text.length >= 4 && _codeController.text.length <= 6;
if (canConfirm != _canConfirm) {
setState(() {
_canConfirm = canConfirm;


+ 4
- 81
lib/widgets/custom/multi_nav/custom_quick_entry.dart 查看文件

@@ -118,7 +118,7 @@ class __CustomQuickEntryContainerState extends State<_CustomQuickEntryContainer>
// 图标的高度
double iconHeight = 40.0;
// 标题的高度
double titleHeight = 20.0;
double titleHeight = 21.0;

// 子元素的高度
double itemHeight = iconHeight;
@@ -412,7 +412,7 @@ 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: 12, color: HexColor.fromHex(model?.titleColor)),
),
),
),
@@ -514,83 +514,6 @@ class MyNetWorkImage extends StatelessWidget {
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 {
@@ -694,7 +617,7 @@ class _CustomQuickCateEntryState extends State<CustomQuickCateEntry> with Ticker
// 图标的高度
double iconHeight = 40;
// 标题的高度
double titleHeight = 20.0;
double titleHeight = 21.0;

// 子元素的高度
double itemHeight = iconHeight;
@@ -997,7 +920,7 @@ class _CustomQuickCateEntryState extends State<CustomQuickCateEntry> with Ticker
padding: const EdgeInsets.only(top: 5),
child: Text(
item?.title ?? '',
style: TextStyle(fontSize: 10, color: HexColor.fromHex(model?.titleColor)),
style: TextStyle(fontSize: 12, color: HexColor.fromHex(model?.titleColor)),
),
),
),


+ 18
- 2
lib/widgets/custom/search/custom_search_widget.dart 查看文件

@@ -48,12 +48,18 @@ class CustomSearchWidget extends StatelessWidget {
if (EmptyUtil.isEmpty(model)) return Container();
Widget rlt;
switch (model.moduleType) {
case 'search_1':
case 'search_1': // 右1图标
rlt = _buildStyle1Widget(context);
break;
case 'search_2':
case 'search_2': // 无图标
rlt = _buildStyle2Widget(context);
break;
case 'search_3': // 左1右1图标
rlt = _buildStyle3Widget(context);
break;
case 'search_4': // 右按钮
rlt = _buildStyle4Widget(context);
break;
default:
rlt = Container();
break;
@@ -62,6 +68,16 @@ class CustomSearchWidget extends StatelessWidget {
return rlt;
}

/// 左1右1图标
Widget _buildStyle3Widget(BuildContext context) {
return Container();
}

/// 右按钮
Widget _buildStyle4Widget(BuildContext context) {
return Container();
}

/// 右1图标
Widget _buildStyle1Widget(BuildContext context) {
return Row(


+ 7
- 5
lib/widgets/restart_widget/restart_widget.dart 查看文件

@@ -68,11 +68,12 @@ class _RestartWidgetState extends State<RestartWidget> {

@override
Widget build(BuildContext context) {
const bool inProduction = const bool.fromEnvironment("dart.vm.product");
if (!inProduction) {
///debug阶段可重启
isFirst=true;
}
// const bool inProduction = const bool.fromEnvironment("dart.vm.product");
// if (!inProduction) {
// ///debug阶段可重启
// isFirst=true;
// }
isFirst = true;
return StreamBuilder(stream: outData,builder: (context,asyn){
if(asyn.data==null&&!isFirst){
return Scaffold(
@@ -82,6 +83,7 @@ class _RestartWidgetState extends State<RestartWidget> {
isFirst=false;
return widget?.child;
}
// return widget?.child;
});

}


Loading…
取消
儲存