platform/packages/merge_map
thomashii@dukefirehawk.com 31e52b6ad3 Added AUTHORS.md
2021-05-02 12:12:43 +08:00
..
example Added merge_map and mock_request packages 2021-03-19 07:10:19 +08:00
lib Added merge_map and mock_request packages 2021-03-19 07:10:19 +08:00
test Added merge_map and mock_request packages 2021-03-19 07:10:19 +08:00
.gitignore Added merge_map and mock_request packages 2021-03-19 07:10:19 +08:00
AUTHORS.md Added AUTHORS.md 2021-05-02 12:12:43 +08:00
CHANGELOG.md Added AUTHORS.md 2021-05-02 12:12:43 +08:00
LICENSE Added merge_map and mock_request packages 2021-03-19 07:10:19 +08:00
pubspec.yaml Added AUTHORS.md 2021-05-02 12:12:43 +08:00
README.md Added merge_map and mock_request packages 2021-03-19 07:10:19 +08:00

merge_map

Combine multiple Maps into one. Equivalent to Object.assign in JS.

Example

import "package:merge_map/merge_map.dart";

main() {
    Map map1 = {'hello': 'world'};
    Map map2 = {'foo': {'bar': 'baz', 'this': 'will be overwritten'}};
    Map map3 = {'foo': {'john': 'doe', 'this': 'overrides previous maps'}};
    Map merged = mergeMap(map1, map2, map3);

    // {hello: world, foo: {bar: baz, john: doe, this: overrides previous maps}}
}