PathResolver class

PathResolver is a class to set a value deelpy.

PathResolvers store respective routes not to change their base ConfigFile instances' routes.

Inheritance

Constructors

PathResolver({required ConfigFile configFile, required List<String> route})

Properties

configFile ConfigFile
Base ConfigFile instance for this PathResolver
final
data Map<String, dynamic>
The config data.
getter/setter pairoverride
defaultValue Map<String, dynamic>
The default config data.
finalinherited
file File
The file that stores the config data.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
route List<String>
The JSON route to the current path.
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

delete({String? key}) ConfigFile
Delete key from JSON object.
inherited
exists() bool
Check if the current path exists.
inherited
get(List<String> keys) PathResolver
Get PathResolver instance of the path.
inherited
getObjectFromPath() Map
Get the JSON object at the current path.
inherited
getPreObjectFromPath() Map
Get the parent JSON object of the current path.
inherited
getValue([String? key]) → dynamic
Get value from JSON object. If key is not provided, return the value at current path.
inherited
has(String key) bool
Check if the key exists in the JSON object.
inherited
load() Future<ConfigFile>
Load the config data from the file.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resetData() ConfigFile
Reset the config data to the default value.
inherited
resetPath() ConfigFile
Clear the stored route. This means that you can get the root ConfigFile instance.
inherited
save({bool compact = false}) Future<ConfigFile>
Save the config data to the file.
inherited
set({String? key, dynamic value}) ConfigFile
Set value to JSON object.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited