ModelLessArray<T> class
The ModelLessArray class is a generic class that provides a structure for managing a collection of items, specifically designed to work with ModelLess objects. This class offers features such as accessing items by index, dynamically setting and getting values, parsing JSON into the array, and retrieving nested data using paths. Below is an explanation and breakdown of the key features:
Constructors
-
ModelLessArray({List<
T> ? fields})
Properties
Methods
-
addAll(
ModelLessArray< T> value) → void -
clear(
) → void -
forEach<
R> (T function(R val)) → void -
get<
T> (int index, {dynamic def}) → T -
getByPath<
R> (List path, {dynamic def}) → R -
getByPathString<
R> (String path, {dynamic def}) → R -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
set(
dynamic value) → void -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
int index) → dynamic -
operator []=(
int index, T value) → void
Static Methods
-
fromJson<
T> (String jsonString) → ModelLessArray< T> -
fromList(
List list) → ModelLessArray -
tryJson<
T> (String jsonString) → ModelLessArray< T> ?