set<T> method
Sets new data to the configs
Use path
to access to a specific key
and pass your new value to value
.
It will create new key if the path
doesn't exist.
Map<String, dynamic> map = { 'a': 1, 'b': {'c': 2}};
GlobalConfigs.loadFromMap(map);
GlobalConfigs().set('a', 3); // { 'a': 3, 'b': {'c': 2}}
GlobalConfigs().set('b.d', 4); // { 'a': 3, 'b': {'c': 2, 'd': 4}}
```dart
Implementation
void set<T>(String path, T value) =>
configs = gato.set<T>(configs, path, value);