I have a set of items. From this i want to delete all duplicate values. i tried this
finalList = [...{...users!}];
and this print(users.toSet().toList());
. But both are printing all the data in the list. It didn't removing duplicate values. Below is my list
List users = [
{
"userEmail":"tintu@gmail.com"
},
{
"userEmail":"john@gmail.com"
},
{
"userEmail":"tintu@gmail.com"
},
{
"userEmail":"rose@gmail.com"
},
{
"userEmail":"john@gmail.com"
},
];
Expected Output
List users = [
{
"userEmail":"tintu@gmail.com"
},
{
"userEmail":"john@gmail.com"
},
{
"userEmail":"rose@gmail.com"
},
];