LinkModel class

Link reference used in ResponseModel to indicate the relationship of resources.

LinkModel(
  method: HttpMethod.get,
  description: 'Read User Detail',
  reference: '/user/123');
Inheritance

Constructors

LinkModel.new({required HttpMethod method, String? description, required String reference})
Constructs a LinkModel with method, description and reference.
const

Properties

description String?
An optional description text to helps descripting what the reference link do.
final
hashCode int
The hash code for this object.
no setterinherited
method → HttpMethod
The method identifying the link model.
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setterinherited
reference String
Reference URL of this model.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
toJSON JSON
Convert this DModel to JSON.
getter/setter pairinherited-setteroverride-getter

Methods

copyWith({HttpMethod? method, String? description, String? reference}) LinkModel
Copy variables in this DModel and make a new one out of it.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

fromJSON(JSON value) LinkModel
Convert a JSON to this DModel.
override