Comments (10)
Hi @agustin-garcia ,
Thank you very much for your message!
I am not familiar with this icon. Is it possible that it doesn't come from the search_choices
plugin?
Here are the icons from the plugin:
search_choices/lib/src/search_choices.dart
Line 448 in a21e4f0
Icons.arrow_drop_down
search_choices/lib/src/search_choices.dart
Line 454 in a21e4f0
Icons.clear
search_choices/lib/src/search_choices.dart
Line 720 in a21e4f0
Icons.arrow_drop_down
search_choices/lib/src/search_choices.dart
Line 726 in a21e4f0
Icons.clear
search_choices/lib/src/search_choices.dart
Line 880 in a21e4f0
Icons.clear
Icons.close
Icons.search
Icons.search
Icons.close
Icons.check_box
Icons.check_box_outline_blank
Icons.chevron_right and Icons.chevron_left
Icons.chevron_right and Icons.chevron_left
Icons.repeat
Icons.filter, Icons.filter_1, Icons.filter_2, ..., Icons.filter_9, Icons.filter_9_plus_sharp
Icons.check
Icons.check
Icons.clear
Icons.sort
Icons.clear
Icons.arrow_upward and Icons.arrow_downward
Some of those icons can easily be customized while for some others, it would require some additional custom code.
However, this list doesn't seem to contain the icon in your screenshot. Sorry about that.
Do you have some code you can share with me so that I can try to find the reason for this icon to appear?
from search_choices.
Hi @Icuis,
Thanks much for the prompt response, this is the icon that whe pressed, by default calls the "futureSearchFn" function, hence I'd say is internally defined into SearchOptions
Thanks again
from search_choices.
Hi @agustin-garcia ,
Thanks for the clarification.
If this is the icon clicked to perform the search, the icon is Icons.search
as defined in either one of those lines depending on whether the language in use is RTL or not:
They can be changed with the help of the searchInputDecoration
parameter which by default takes the following form:
InputDecoration(
prefixIcon: Icon(
Icons.search,
size: 24,
),
contentPadding: EdgeInsets.symmetric(vertical: 12),
)
I hope this will solve your issue.
from search_choices.
Hi again,
Thanks again for you prompt response and sorry because I haven't been able to explain myself.
By following the "Single dialog paged future" example, what I'm trying to modify is the icon encircled in red.
I tried your suggestion, but it does insert an icon inside the actual TextField component.
I'm adding an extract of the code from your "Single dialog paged future" example:
SearchChoices.single( value: selectedValueSingleDialogPagedFuture, hint: kIsWeb ? "Example not for web" : "Select one capital", searchHint: "Search capitals", onChanged: kIsWeb ? null : (value) { setState(() { selectedValueSingleDialogPagedFuture = value; }); }, isExpanded: true, itemsPerPage: 10, currentPage: currentPage, selectedValueWidgetFn: (item) { return (...); }, futureSearchFn: (String? keyword, String? orderBy, bool? orderAsc, List<Tuple2<String, String>>? filters, int? pageNb) async { String filtersString = ""; int i = 1; filters?.forEach((element) { ... }); ... return (Tuple2<List<DropdownMenuItem>, int>(results, nbResults)); }, futureSearchOrderOptions: { .. }, futureSearchFilterOptions: { "continent": const { "icon": Text("Continent"), "exclusive": true, "values": [ ... ] }, "population": { "icon": Wrap(children: const [Icon(Icons.people), Text("Population")]), ... }, }, closeButton: (selectedItemsDone, doneContext) { return Row( ... ); }, )
from search_choices.
Oh, I see now. Sorry, I misunderstood earlier.
These are the future search filter buttons as defined here:
Sadly, those cannot easily be customized at the moment. Sorry about that.
Here are the options I see:
- Wait for someone (maybe me) to implement this flexibility.
- Propose a PR to implement this flexibility.
- Inherit and change this part of the code.
from search_choices.
Excellent, I'm glad we are aligned now.
I'll try to do it by myself.
I'm very grateful for your time and explanation.
I'll make sure to get a cup of coffee for you guys, for this wonderful job you've done here.
from search_choices.
Thanks a lot for your message and the coffee, that's very sweet of you!
Don't hesitate to reach for help here. I'll be more than happy to assist if I can.
from search_choices.
Hello @agustin-garcia ,
Release 2.2.3 of the plugin now contains an example use of the new buildFutureFilterOrOrderButton
parameter within example Single dialog paged future delayed
. This parameter allows the customization of the future filter and order icons. A simpler example can be found below:
buildFutureFilterOrOrderButton: ({
required BuildContext context,
required bool filter,
required Function onPressed,
int? nbFilters,
bool? orderAsc,
String? orderBy,
}) {
return (SizedBox(
height: 25,
width: 48,
child: (ElevatedButton(
child: Icon(
filter?Icons.filter_alt:Icons.sort_by_alpha
),
onPressed: () {
onPressed();
},
)),
));
},
Providing this result:
I hope you will find this useful.
from search_choices.
Hi @lcuis,
Sorry for the late response, I just tried and effectively I can select a different set of Icons which allows me to give more context to the user.
Thanks so much for the effort and the follow up.
Keep up with the good work :-)
from search_choices.
Hi @agustin-garcia ,
No worries for the delay.
Thank you very much for your confirmation and your message!
from search_choices.
Related Issues (20)
- futureSearchFn delays requests instead of debounce them HOT 9
- build failed after flutter upgrade HOT 9
- 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
- Remove the margin/padding in sides & redesign options buttons 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.