ModelLess class
The ModelLess class is a dynamic, flexible data structure designed to handle nested data structures and perform common operations such as accessing, setting, and manipulating data within the structure. This class is particularly useful in scenarios where you need to work with JSON-like data structures that may contain nested maps or lists. Below is a detailed breakdown of the key features and methods in the ModelLess class.
Constructors
-
ModelLess({Map<
String, dynamic> ? fields, dynamic onGet(dynamic value)?}) - ModelLess.fromDynamic(dynamic val)
-
factory
- ModelLess.fromJson(String jsonString)
-
making a new model from a json string
factory
- ModelLess.fromMap(Map map)
-
making a new model from a map
factory
Properties
Methods
-
get<
T> (String key, {T? def}) → T -
getByPath<
T> (List path, {dynamic def}) → T - the path is a array of path nodes
-
getByPathString<
T> (String path, {dynamic def}) → T - the path is a String path fot access to a node. for example "posts/news/1/title"
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
String key) → void -
set(
String key, dynamic value) → void - add or set a new node to the model
-
toMap(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
String key) → Object? -
operator []=(
String key, dynamic value) → void