fix:修改弹窗搜索框边距属性
This commit is contained in:
@@ -386,6 +386,7 @@ class CountryCodePickerState extends State<CountryCodePicker> {
|
||||
hideSearch: widget.hideSearch,
|
||||
closeIcon: widget.closeIcon,
|
||||
flagDecoration: widget.flagDecoration,
|
||||
searchPadding: widget.searchPadding,
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
@@ -28,6 +28,8 @@ class SelectionBottomSheet extends StatefulWidget {
|
||||
/// elements passed as favorite
|
||||
final List<CountryCode> favoriteElements;
|
||||
|
||||
final EdgeInsetsGeometry searchPadding;
|
||||
|
||||
SelectionBottomSheet(
|
||||
this.elements,
|
||||
this.favoriteElements, {
|
||||
@@ -46,6 +48,7 @@ class SelectionBottomSheet extends StatefulWidget {
|
||||
this.barrierColor,
|
||||
this.hideSearch = false,
|
||||
this.closeIcon,
|
||||
this.searchPadding = const EdgeInsets.symmetric(horizontal: 24),
|
||||
}) : searchDecoration = searchDecoration.prefixIcon == null
|
||||
? searchDecoration.copyWith(prefixIcon: const Icon(Icons.search))
|
||||
: searchDecoration,
|
||||
@@ -93,7 +96,7 @@ class _SelectionBottomSheetState extends State<SelectionBottomSheet> {
|
||||
),
|
||||
if (!widget.hideSearch)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||||
padding: widget.searchPadding,
|
||||
child: TextField(
|
||||
style: widget.searchStyle,
|
||||
decoration: widget.searchDecoration,
|
||||
|
||||
Reference in New Issue
Block a user