ResourceRecord class
One record from the panel.
Records are runtime-shaped — the schema is only known at runtime — so there
is no generated model per resource. This is the model: a typed wrapper over
the decoded map, so no screen ever touches a raw Map<String, dynamic>.
Constructors
-
ResourceRecord({required Object id, Map<
String, dynamic> attributes = const {}, Map<String, bool> permissions = const {}, List<RecordAction> actions = const []}) -
const
- ResourceRecord.fake(int seed)
-
Shape-only record for skeleton loading, pairing with
ResourceSchema.fake()'s card so the skeleton matches the real geometry.factory -
ResourceRecord.fromJson(Map<
String, dynamic> json, String recordKey, {Map<String, dynamic> ? permissions, List? actions}) -
factory
Properties
-
actions
→ List<
RecordAction> -
The actions the server published for THIS record, in its order.
Empty when the resource opted none in — never null.
final
-
attributes
→ Map<
String, dynamic> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → Object
-
final
-
permissions
→ Map<
String, bool> -
Per-record authorization, populated only by the record endpoint.
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true, thetoStringmethod will be overridden to output this instance'sprops.no setterinherited
Methods
-
can(
String ability) → bool -
Whether the user may perform
abilityon this specific record. Absent means denied — an unlisted ability is never assumed allowed. -
get<
T> (String path) → T? - Reads an attribute, resolving a dotted path into the nested objects the server builds from a card's relation field. A null anywhere along the path, or a type mismatch, yields null rather than throwing.
-
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