ModelProvider class abstract

A class that provides methods to convert a model to a Map<String, dynamic> and vice versa

Constructors

ModelProvider()

Properties

fromJsonModels Map<String, Function>
A map of models that can be converted from a Map<String, dynamic>
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
toJsonModels Map<String, Function>
A map of models that can be converted to a Map<String, dynamic>
no setter

Methods

from(String model, Map<String, dynamic> json) Object?
Converts a Map<String, dynamic> to a model of type T
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
to<T>(T model) Map<String, dynamic>
Converts a model of type T to a Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

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