Comments (2)
search works fine. try this code:
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
final List<String> list = ['1112', '11122', '11123','11133','11143'];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
title: Text(widget.title),
),
body: Center(
child: DropdownSearch<String>(
onChanged: (value) {
print(value);
},
items: list,
compareFn: (i, s) => i == s,
dropdownButtonProps: const DropdownButtonProps(
padding: EdgeInsets.zero,
),
dropdownDecoratorProps: const DropDownDecoratorProps(
textAlign: TextAlign.left,
textAlignVertical: TextAlignVertical.center,
dropdownSearchDecoration: InputDecoration(
hintText: 'Comune',
contentPadding: EdgeInsets.zero,
border: InputBorder.none,
),
),
popupProps: PopupPropsMultiSelection.modalBottomSheet(
showSelectedItems: true,
showSearchBox: true,
itemBuilder: (
BuildContext context,
String? value,
bool isSelected,
) =>
Text(value!),
),
),
),
);
}
}
from searchable_dropdown.
@rvwoens you have just use showSearchBox: true,
.
please don't hesitate to take a look to examples page for more examples.
from searchable_dropdown.
Related Issues (20)
- Padding not working when i use PopupProps.modalBottomSheet HOT 1
- PopupProps.modalBottomSheet hides when keyboard opens up HOT 3
- Can someone provide a code example of Future<bool?> Function(dynamic, dynamic)? onBeforeChange
- asyncItems bug HOT 2
- List Items are Duplicating while using DropDownSearch.multiSelection with custom ItemBuilder
- How to use additionalPopupWidth?
- DropdownSearch rebuild my widget infinite times when I pass selectedItem(initial value) in it
- hint text is not showing
- For Disabled item check box is showing as disabled, but i want checkbox to hide if it is disabled
- How to change the text color in dropdown items HOT 1
- InkWell hover shape don't follow TextField border shape HOT 1
- [Question] How to align popup to end of Search field
- i have fixed the example to work on flutter 3.22.2 and tested on android 34, ios and web
- Update multi selection in real time HOT 1
- Is there a way to hide/customise the ok button? HOT 1
- Dropdown items do not update on scroll, with pagination
- onChange called while selecting the same option
- Multiselection triggers didChange due to different reference to widget.selectedItems
- Set the height of dropdown search HOT 1
- Remove DropDown Icon
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from searchable_dropdown.