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

fields List<T>?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
no setter
isNotEmpty bool
no setter
length → dynamic
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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>?