Comments (10)
make sure you implement these:
@OverRide
bool operator ==(Object other) =>
identical(this, other) ||
other is Person &&
runtimeType == other.runtimeType &&
name == other.name;
@OverRide
int get hashCode => name.hashCode;
from multi_select_flutter.
I have the same problem
from multi_select_flutter.
make sure you implement these:
@OverRide
bool operator ==(Object other) =>
identical(this, other) ||
other is Person &&
runtimeType == other.runtimeType &&
name == other.name;@OverRide
int get hashCode => name.hashCode;
i think it's happening because of reference type datas. Maybe if we compare fields of object, this problem can solve.
from multi_select_flutter.
Any solution. I have simple String ?
from multi_select_flutter.
I have the same problem, Any solution?
from multi_select_flutter.
Having the same issue when passing List<Map<String, dynamic>> type to the initial value.
from multi_select_flutter.
Hi all,
In my case, don't use in-line block code
items: categoriesAll .map((e) => MultiSelectItem(e, e.nameTr)) .toList()
Let try:
List<MultiSelectItem<T>> temp = []; <List<T> your-list>.forEach((element) { temp.add(MultiSelectItem<T>(element, element.nameTr)); });
and
items: temp
from multi_select_flutter.
also having same problem, any resolution?
from multi_select_flutter.
Still does not work.
from multi_select_flutter.
hi... im newbie in flutter
i had tried this solution issue#11, but no luck, or maybe I didn't implement in the right way.
so this is my dumb solution 😄 .
i add my own function to compare between initialValue with item list.
this is items list:
List<DropdownList> initval = [];
List<DropdownList> myItem = [
DropdownList(text: "User1", value: 1),
DropdownList(text: "User2", value: 2),
DropdownList(text: "User3", value: 3),
DropdownList(text: "User4", value: 4),
DropdownList(text: "User5", value: 5),
DropdownList(text: "User6", value: 6),
DropdownList(text: "User7", value: 7),
DropdownList(text: "User8", value: 8),
DropdownList(text: "User9", value: 9),
DropdownList(text: "User10", value: 10),
]
this is initial value :
List<DropdownList> initialValue = [
DropdownList(text: "User3", value: 3),
DropdownList(text: "User7", value: 7)
];
then i add new loop function to get the selected item.
if (initialValue != null || initialValue.isNotEmpty) {
for (var i in initialValue) {
final idx = myItem.indexWhere((element) => element.value == i.value);
initval.add(myItem[idx]);
}
}
and last
Container(
padding: const EdgeInsets.all(8),
child: MultiSelectChipField(
items: myItem
.map(
(item) => MultiSelectItem<DropdownList?>(item, item.text))
.toList(),
initialValue: initval,
scroll: false,
selectedChipColor: const Color(0xFF234875),
selectedTextStyle: const TextStyle(color: Colors.white),
headerColor: const Color(0xFFDBE2EF),
onTap: (values) {
_selectedValue = values;
},
),
),
from multi_select_flutter.
Related Issues (20)
- How to get value of input search, to consume api to search?
- onSelectionChanged value issue HOT 2
- Target kernel_snapshot failed: Exception After using this package
- Can't reduce the spacing between chips
- MultiSelectChipField - selectedTextStyle fontSize not respected
- Bug: trying to setState after dispose()
- Error: The argument type 'List<V>?' can't be assigned to the parameter type 'List<V>' HOT 4
- Select only single field HOT 1
- MultiSelectChipDisplay : custom icon doesn't replace default icon(Icons.checked). HOT 5
- Transform widget to be more modular
- Drag to order selected items
- Example: compiling and runtime errors HOT 2
- MultiSelectBottomSheetField runtime TypeError
- Error with MultiSelectChipField(), HOT 1
- Can't remove an item with using chipDisplay.
- items parameter ignores item order
- Can we mark items of checklist already checked at initially in MultiSelectDialogField?
- limit user selections
- Old data is common in onConfirm call back
- New fork / maintainer ? HOT 1
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 multi_select_flutter.