更新样式
This commit is contained in:
@@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
|
||||
import '../../common/util/MyUtils.dart';
|
||||
|
||||
class ListSearchWidget extends GetView {
|
||||
@@ -38,7 +39,8 @@ class ListSearchWidget extends GetView {
|
||||
children: [
|
||||
// 搜索框部分
|
||||
Padding(
|
||||
padding: padding ?? EdgeInsetsDirectional.fromSTEB(30.rpx, 0, 30.rpx, 0),
|
||||
padding:
|
||||
padding ?? EdgeInsetsDirectional.fromSTEB(30.rpx, 0, 30.rpx, 0),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
@@ -46,7 +48,7 @@ class ListSearchWidget extends GetView {
|
||||
borderRadius: BorderRadius.circular(16.rpx),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(35.rpx, 0, 35.rpx, 0),
|
||||
padding: EdgeInsetsDirectional.fromSTEB(35.rpx, 0, 0.rpx, 0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
@@ -139,7 +141,9 @@ class ListSearchWidget extends GetView {
|
||||
},
|
||||
onTap: () {
|
||||
// 点击输入框时显示结果列表(如果开启了显示功能且有搜索结果)
|
||||
if (showResultList && searchResults != null && searchResults!.isNotEmpty) {
|
||||
if (showResultList &&
|
||||
searchResults != null &&
|
||||
searchResults!.isNotEmpty) {
|
||||
_showResults.value = true;
|
||||
}
|
||||
},
|
||||
@@ -151,8 +155,12 @@ class ListSearchWidget extends GetView {
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(26.rpx, 0, 0, 0),
|
||||
child: InkWell(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(0.rpx, 0, 0, 0),
|
||||
child: ClickableContainer(
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor:
|
||||
themeController.currentColor.sc4.withOpacity(0.8),
|
||||
padding: EdgeInsets.fromLTRB(0, 0, 35.rpx, 0),
|
||||
onTap: () {
|
||||
findCallback?.call();
|
||||
// 点击搜索按钮后显示结果列表(如果开启了显示功能)
|
||||
@@ -192,7 +200,9 @@ class ListSearchWidget extends GetView {
|
||||
// 搜索结果列表(可选显示)
|
||||
if (showResultList) ...[
|
||||
Obx(() {
|
||||
if (!_showResults.value || searchResults == null || searchResults!.isEmpty) {
|
||||
if (!_showResults.value ||
|
||||
searchResults == null ||
|
||||
searchResults!.isEmpty) {
|
||||
return SizedBox.shrink();
|
||||
}
|
||||
|
||||
@@ -244,4 +254,4 @@ class ListSearchWidget extends GetView {
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user