Im use initialState because return data with database, but not show partial values only all value example:
static List _animals = [ // ALL VALUES
Animal(id: 1, name: "Lion"),
Animal(id: 2, name: "Flamingo"),
Animal(id: 3, name: "Hippo"),
Animal(id: 4, name: "Horse"),
Animal(id: 5, name: "Tiger"),
Animal(id: 6, name: "Penguin"),
Animal(id: 7, name: "Spider"),
@override
void initState() {
_selectedAnimals5 =_partialValues;// this not Working only working _selectedAnimals5 = _animals;/ beacause this all items using in widget
super.initState();
}`
I _animals = [ // ALL VALUES
Animal(id: 1, name: "Lion"),
Animal(id: 2, name: "Flamingo"),
Animal(id: 3, name: "Hippo"),
Animal(id: 4, name: "Horse"),
Animal(id: 5, name: "Tiger"),
Animal(id: 6, name: "Penguin"),
Animal(id: 7, name: "Spider"),
m use initialState because return data with database, but not show partial values only all value example:
static List]; static List _partialValues = [ //PARTIALS VALUES
Animal(id: 1, name: "Lion"),
Animal(id: 2, name: "Flamingo"),
];
@override void initState() { _selectedAnimals5 =_partialValues;// this not Working only working _selectedAnimals5 = _animals;/ beacause this all items using in widget super.initState(); }`