Comments (7)
Hi @blue492 ,
Here is the example without changing anything:
Here is the example generated with the code below:
SearchChoices.single(
items: items,
value: selectedValueSingleDialog,
hint: "Select one",
searchHint: "Select one",
onChanged: (value) {
setState(() {
selectedValueSingleDialog = value;
});
},
isExpanded: true,
displayItem: (item, selected) {
return (
Expanded(
child: item,
)
);
},
buildDropDownDialog: (
Widget titleBar,
Widget searchBar,
Widget list,
Widget closeButton,
BuildContext dropDownContext,
) {
return (AnimatedContainer(
padding: MediaQuery.of(dropDownContext).viewInsets,
duration: const Duration(milliseconds: 100),
child: Card(
margin: EdgeInsets.symmetric(vertical: 0, horizontal: 0),
child: Container(
padding: EdgeInsets.symmetric(vertical: 0, horizontal: 0),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
titleBar,
searchBar,
list,
closeButton,
],
),
),
),
));
},
)
I hope this is a good starting point to achieve what you are trying to do.
from search_choices.
@lcuis do you have any suggestions, thanks
from search_choices.
Hello @blue492 .
Sorry for the delay. I am on holiday without access to my coding hardware. Maybe some past closed issues contain the solution to your issue?
Otherwise, I'll try to get back to you as soon as I can.
from search_choices.
@lcuis Thanks for reply, I want that the modal be like [image 2] (https://github.com/lcuis/search_choices/assets/66443263/fd1a346f-d4d4-466b-a644-f1550f8068fd)
Your solution is full size in the screen with no margin, and dropdownbutton is not designed as I want.
Thanks for help
from search_choices.
Thanks for your reply @blue492 .
I agree, my example is not exactly as your image2. However, I believe that the code I shared with you is a good starting point. With a few adaptations, you can certainly reach a situation much closer to the desired outcome. If something is not possible because the plugin lacks flexibility, please let me know.
from search_choices.
@lcuis thanks for your buildDropDownDialog solution, I could design my items by displayItem function.
I hope you continue upgrade SearchChoices
from search_choices.
Hi @blue492 , I also hope I will keep upgrading SearchChoices. Thanks for your message!
from search_choices.
Related Issues (20)
- futureSearchFn delays requests instead of debounce them HOT 9
- build failed after flutter upgrade HOT 9
- Customize future search order and filter icons HOT 10
- selectedValueWidgetFn creates an error. HOT 11
- [FEATURE REQUEST] - Wrap items of SearchChoices.multiple() widget HOT 11
- When using futureSearchFn type 'String' is not a subtype of type 'DropdownMenuItem<String>' HOT 2
- searchFn seems to have issues with custom classes in release mode HOT 5
- searchFn works on iPhone Simulator, but not iPhone (14 Pro Max) HOT 8
- [Improves] New style HOT 7
- Android fails with gradle 8 HOT 2
- Selected value in SearchChoice.single not working in Mobile but works fine in Web HOT 5
- RTL support - dropdown button has to be on the left side when RTL locale selected in app HOT 7
- Problems for install search_choices version 2.2.7
- Update value from outside the plugin doesn't work
- How delete value selected from a buttom
- Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found HOT 2
- futureSearchFn does not work with Custom Object HOT 6
- Clear button is always disabled HOT 3
- Upgrade to latest gradle version
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 search_choices.