I want to get a list of keys of a map in dart programming language.
I am familiar with dictionary in python and for the same objective in python there exists a direct method. I fail to find this in dart.
Is their any work around ?
I want to get a list of keys of a map in dart programming language.
I am familiar with dictionary in python and for the same objective in python there exists a direct method. I fail to find this in dart.
Is their any work around ?
void main() {
var details = {'Usrname':'tom','Password':'pass@123'};
print(details.keys); \\ Gives an Iterable<String>.
\\ And to return a true List:
List newList = details.keys.toList();
}
(Usrname, Password)