Write a dart progam that creates a histogram of a text file’s word counts.
Details
The program should:
read the text of a file into a string.
create a list of words in the file. Assume that words are any text that is separated by whitespace.
create a map between every word and the number of times it occurs in the file.
print the map.
The program should not use any loops. Instead, use iterable methods.
Example
If the a text file contains:
this is some text
it is not interesting text
yet text it is
The program would print something like:
{this: 1, is: 3, some: 1, text: 3, it: 2, not: 1, interesting: 1, yet: 1}