Wrong output examples in HashMap section of the Flutter documentation #11632
Labels
co.PRs-welcome
Contributors encouraged to file a PR
e1-hours
Effort: < 8 hrs
from.page-issue
Reported in a reader-filed concern
p2-medium
Necessary but not urgent concern. Resolve when possible.
Page URL
https://api.flutter.dev/flutter/dart-collection/HashMap-class.html#:~:text=A%20hash%2Dtable%20based%20implementation,();%20//%20Is%20a%20HashMap
Page source
Example code snippet is wrong
Describe the problem
I found two examples are shown in the HashMap section of the documentation.
1st
Adding data to
HashMap
withaddEntries()
method. ActuallyaddEntries()
method adds a pair of map values from the last ofMap
.But in example add from the first.
Error in documentation
2nd
In this code removing the key from
HashMap
is5
but in the example output, the value of the plants still contains a pair of5
.Error in documentation
Expected fix
Expected result for bug - 1
Expected result for bug - 2
Additional context
No response
I would like to fix this problem.
The text was updated successfully, but these errors were encountered: