CreationBindings<T> class
Bindings for an object that the client can save locally without requiring the use of the server to generate an Id.
Only use very intentionally, as this task is typically best completed by a server.
Constructors
-
CreationBindings({required IdReader<
T> getId, required T fromJson(Json data), required Json toJson(T obj), required ApiUrl getDetailUrl(String id), required ApiUrl getListUrl(), required T save(T)}) - Bindings for an object that the client can save locally without requiring the use of the server to generate an Id.
Properties
- fromJson → T Function(Json data)
-
Json deserializer for this data type.
finalinherited
- getDetailUrl → ApiUrl Function(String id)
-
Builder for detail ApiUrl instances for this data type.
finalinherited
-
getId
→ IdReader<
T> -
Extracts the primary key from the object.
finalinherited
- getListUrl → ApiUrl Function()
-
Builder for list ApiUrl instances for this data type.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- save ↔ T Function(T)
-
Method which takes an unsaved child and locally determines its "id" value.
getter/setter pair
- toJson → Json Function(T obj)
-
Json deserializer for this data type.
finalinherited
Methods
-
getCreateUrl(
) → ApiUrl -
Overrideable method which returns the creation Url for this data type. By
default, this proxies to getListUrl.
inherited
-
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