Skip to content

Commit

Permalink
bump dropdown_search to v6 (#1743)
Browse files Browse the repository at this point in the history
* update dropdown search

* fmt and lint
  • Loading branch information
clangenb authored Jan 13, 2025
1 parent 591a77c commit 9fc1096
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
11 changes: 5 additions & 6 deletions app/lib/common/components/address_input_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class _AddressInputFieldState extends State<AddressInputField> {
);
}

Widget _listItemBuilder(BuildContext context, AccountData account, bool isSelected) {
Widget _listItemBuilder(BuildContext context, AccountData account, bool isDisabled, bool isSelected) {
final address =
AddressUtils.pubKeyHexToAddress(account.pubKey, prefix: widget.store.settings.currentNetwork.ss58());

Expand Down Expand Up @@ -110,7 +110,6 @@ class _AddressInputFieldState extends State<AddressInputField> {
child: DropdownSearch<AccountData>(
key: const Key(EWTestKeys.transferSelectAccount),
popupProps: PopupProps.modalBottomSheet(
isFilterOnline: true,
showSearchBox: true,
showSelectedItems: true,
itemBuilder: _listItemBuilder,
Expand All @@ -124,7 +123,7 @@ class _AddressInputFieldState extends State<AddressInputField> {
address: address,
pubKey: pubKey,
);
return _listItemBuilder(context, newAccount, false);
return _listItemBuilder(context, newAccount, false, false);
} else {
return Align(
alignment: Alignment.topCenter,
Expand All @@ -133,8 +132,8 @@ class _AddressInputFieldState extends State<AddressInputField> {
}
},
),
dropdownDecoratorProps: DropDownDecoratorProps(
dropdownSearchDecoration: InputDecoration(
decoratorProps: DropDownDecoratorProps(
decoration: InputDecoration(
labelText: widget.label,
labelStyle: context.bodyLarge.copyWith(color: context.colorScheme.primary),
contentPadding: const EdgeInsets.symmetric(vertical: 16, horizontal: 25),
Expand All @@ -146,7 +145,7 @@ class _AddressInputFieldState extends State<AddressInputField> {
selectedItem: widget.initialValue,
compareFn: (AccountData i, s) => i.pubKey == s.pubKey,
validator: (AccountData? u) => u == null ? l10n.errorUserNameIsRequired : null,
items: widget.store.settings.knownAccounts,
items: (_, __) => widget.store.settings.knownAccounts,
filterFn: filterByAddressOrName,
onChanged: (AccountData? data) {
if (widget.onChanged != null && data != null) {
Expand Down
4 changes: 2 additions & 2 deletions app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -413,10 +413,10 @@ packages:
dependency: "direct main"
description:
name: dropdown_search
sha256: "55106e8290acaa97ed15bea1fdad82c3cf0c248dd410e651f5a8ac6870f783ab"
sha256: "8c96aaf8d0c0d4307804b28da73866e5a0fc94fd8e6942eceab896450aaa4999"
url: "https://pub.dev"
source: hosted
version: "5.0.6"
version: "6.0.1"
ed25519_edwards:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ dependencies:
permission_handler: ^11.3.1
flutter_svg: ^2.0.17
url_launcher: ^6.3.1
dropdown_search: ^5.0.6
dropdown_search: ^6.0.1
provider: ^6.1.2
flutter_map_marker_popup: ^7.0.0
flutter_map: ^7.0.2
Expand Down

0 comments on commit 9fc1096

Please sign in to comment.