GenerateModel class

Inheritance

Constructors

GenerateModel({String? className, Set? fields, bool? shouldInherit, String? inheritanceConstructor, String? keyStringCase})
const
GenerateModel.c2({String? className, Set? fields, bool? shouldInherit, String? inheritanceConstructor, String? keyStringCase})
const
GenerateModel.c3({String? className, Set? fields, bool? shouldInherit, String? inheritanceConstructor, String? keyStringCase})
factory
GenerateModel.from(BaseModel? other)
factory
GenerateModel.fromJson(Map<String, dynamic>? otherData)
factory
GenerateModel.fromJsonString(String source)
factory
GenerateModel.fromUri(Uri? uri)
factory
GenerateModel.of(GenerateModel other)
factory

Properties

$className String
The class name of the model as a string.
no setteroverride
className String?
final
classNameField String?
no setter
data Map<String, dynamic>
no setterinherited
fields Set?
final
fieldsField Set?
no setter
hashCode int
The hash code for this object.
no setterinherited
inheritanceConstructor String?
final
inheritanceConstructorField String?
no setter
keyStringCase String?
final
keyStringCaseField String?
no setter
ref DataRefModel?
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shouldInherit bool?
final
shouldInheritField bool?
no setter

Methods

copyWith(BaseModel? other) GenerateModel
Returns a new copy of the BaseModel with the fields updated from the other BaseModel.
override
equals(dynamic other) bool
Compares the BaseModel with another BaseModel using the DeepCollectionEquality and returns true if they are equal.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sortedJson({dynamic defaultValue, bool includeNulls = false}) Map<String, dynamic>
Returns a Json i.e. Map<String, dynamic> representation of the BaseModel, with the keys sorted alphabetically.
inherited
toJson({dynamic defaultValue, bool includeNulls = false}) Map<String, dynamic>
Returns a Json i.e. Map<String, dynamic> representation of the BaseModel.
override
toJsonString() String
Returns a JSON string representation of the BaseModel.
inherited
toString() String
A string representation of this object.
inherited
toUrl() Uri
Converts the current BaseModel to a Uri that can be used as a distinct identifier. The model must not be too large to avoid exceeding the maximum length of a URL.
inherited

Operators

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

Static Methods

fromJsonOrNull(Map<String, dynamic>? otherData) GenerateModel?
fromJsonStringOrNull(String? source) GenerateModel?
override
fromOrNull(BaseModel? other) GenerateModel?
fromUriOrNull(Uri? uri) GenerateModel?
ofOrNull(GenerateModel? other) GenerateModel?

Constants

CLASS_NAME → const String