.values
Anonymous contributor
Published Jul 17, 2024
Contribute to Docs
In Dart, the .values
property is used to return an iterable object containing all the values in a specified Map
.
Syntax
newMap.values
newMap
: TheMap
to be iterated.
Example
The following example demonstrates the usage of the .values
property:
void main() {// Creating a Mapvar players = {'Cricket': 'Sam', 'Football': 'Chris', 'Tennis': 'Roger'};// Extracting all the values in the Mapprint(players.values);}
The above code produces the following output:
(Sam, Chris, Roger)
All contributors
- Anonymous contributor
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.