Comments (3)
Hello SahSantoshh,
The setValue method calls the "update" method on the map. You can see this if you take a look at the code (line 76 ).
Here is a example how updating the value of a key in a map works in DART :
final Map<String, String> myMap = {
"key1": "value1"
};
myMap.update("key1", (String) => "value2");
Therefore in your case you have to call the setValue method in this way :
cfg.setValue("item", (int) => 1);
Did this help ?
Regards
from flutter-global-config.
It helped me. but I was not able to extract Map<String, int> type. I did it with type conversion. If you update this in your readme will be great.
from flutter-global-config.
An example was added to the README.md.
from flutter-global-config.
Related Issues (20)
- Cannot Update Null Value HOT 1
- Updating configuration file on update? HOT 3
- Use different configurations based on current build mode HOT 3
- Read nested values in a json HOT 1
- Is is possible to set/read the configuration in a top level function when app is killed? HOT 1
- cant add await GlobalConfiguration().loadFromUrl( ""); to splash screean HOT 1
- Unable to use configuration value as default for a constructor parameter HOT 1
- http ^0.13.0 Library upgrade required HOT 1
- errors compiling HOT 1
- doesn't support the latest http version 0.13. HOT 4
- GlobalConfiguration().loadFromMap(appSettings).loadFromMap(devSettings); HOT 1
- Pass in default value to be returned if value not found in Global Configuration
- why could not change the config file name
- Flutter http ^0.13.2 support HOT 1
- Having issue using this packages with other null safe packages.
- why sometimes return null collection
- Keep getting undefined when trying to use this repo HOT 1
- null safety HOT 3
- Resets Configuration on Restarting Application HOT 2
- Asset Loading does'nt seems to work on Web HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter-global-config.