Methods
-
dangerousJsonReplace(Map<String, Map> newData)
→ void
-
Extremely dangerous function - replace the entire data file with freshJson.
Customize the new data using
newData - this expects a Map of form:
-
jsonWriteWrapper(Map fn(dynamic initialData))
→ void
-
A wrapper function that takes care of loading and writing JSON. Pass in a
function that takes in the existing data and returns your desired new data,
and the wrapper will take care of the rest.
Where possible, use writeDataToJson instead - it provides a safer and more
high-level API.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
pretLoadJson()
→ dynamic
-
-
toString()
→ String
-
A string representation of this object.
inherited
-
writeDataToJson(Map<String, PretDataclass> data, String fieldName)
→ void
-
Persist new data to a top-level field in the JSON data file, given data
and field name. Throws a ArgumentError if the field name is not found
in the JSON file.