AppRequest class
Constructors
AppRequest ({String id = "" , String from = "" , String to = "" , int createdTime = 0 , int expiresAt = 0 , EventOffer ? newOffer , String message = "" , bool unread = true , String eventId = "" , String collectiveId = "" , String positionRequestedId = "" , Instrument ? instrument , double percentageCoverage = 0 , int distanceKm = 0 , RequestDecision requestDecision = RequestDecision.pending , GameRequestType ? gameRequestType , RequestType type = RequestType.collaboration , Map <String , dynamic > ? payload })
AppRequest.changeApproval ({required String from , required String to , required String targetType , required String targetId , required Map <String , dynamic > changes , String ? targetName , String ? module , String ? message , String ? action , })
Generic "change approval" request — gates sensitive edits behind review.
Reusable across the ecosystem (content edits by non-admin users) and the
ERP (approvals on sensitive financial/contact data).
factory
AppRequest.dawInvitation ({required String from , required String to , required String projectId , required String projectName , String role = 'musician' , String ? message })
Create a DAW project collaboration invitation.
factory
AppRequest.fromJSON (dynamic data )
AppRequest.gameInvitation ({required String from , required String to , required GameRequestType gameType , String ? message , int expirationMinutes = defaultGameExpirationMinutes })
Create a game invitation request
factory
AppRequest.releaseApproval ({required String from , required String to , required String releaseItemId , required String releaseName , String ? authorName , String ? message })
Create a release approval request (for books, songs, etc.)
from - profileId of the author submitting the release
to - app identifier (e.g., "EMXI", "Gigmeout") for admin review
releaseItemId - ID of the AppReleaseItem being submitted
releaseName - Name of the release for the message
factory
Properties
changeAction
→ String
Mutation kind for the change ('create', 'update', 'delete'); empty when
the request is a plain field-diff edit.
no setter
changeModule
→ String
Module that originated the change (e.g. 'neom_books', 'neom_erp') — lets
each domain load/approve only its own requests.
no setter
changes
→ Map <String , dynamic >
Map of field -> new value to apply when the change is approved.
no setter
changeTargetId
→ String
Id of the entity being changed (falls back to eventId).
no setter
changeTargetName
→ String
Human-readable name of the target for review display.
no setter
changeTargetType
→ String
What kind of entity the change targets (e.g. 'releaseItem', 'erpLead').
no setter
collectiveId
↔ String
getter/setter pair
createdTime
↔ int
getter/setter pair
distanceKm
↔ int
getter/setter pair
eventId
↔ String
getter/setter pair
expiresAt
↔ int
getter/setter pair
from
↔ String
getter/setter pair
gameRequestType
↔ GameRequestType ?
getter/setter pair
hashCode
→ int
The hash code for this object.
no setter inherited
id
↔ String
getter/setter pair
instrument
↔ Instrument ?
getter/setter pair
isChangeApprovalRequest
→ bool
Check if this is a generic change-approval request (content edits, ERP
sensitive-data changes, etc.).
no setter
isDawInvitation
→ bool
Check if this is a DAW collaboration invitation.
no setter
isExpired
→ bool
Check if request has expired (for game invitations)
no setter
isGameRequest
→ bool
Check if this is a game request.
no setter
isPending
→ bool
Check if request is still pending and not expired
no setter
isReleaseApprovalRequest
→ bool
Check if this is a release approval request.
no setter
message
↔ String
getter/setter pair
newOffer
↔ EventOffer ?
getter/setter pair
payload
↔ Map <String , dynamic >
Generic payload for approval-gated requests (content edits, ERP sensitive
changes, etc.). For change-approval requests it carries:
targetType, targetId, targetName, module, and changes (map of
field -> new value to apply on approval).
getter/setter pair
percentageCoverage
↔ double
getter/setter pair
positionRequestedId
↔ String
getter/setter pair
requestDecision
↔ RequestDecision
getter/setter pair
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
timeRemaining
→ Duration
Get time remaining until expiration
no setter
to
↔ String
getter/setter pair
type
↔ RequestType
Semantic kind of this request (release approval, change approval, game
invitation, DAW invitation, or general collaboration). Persisted so
consumers evaluate the enum directly instead of parsing the id.
getter/setter pair
unread
↔ bool
getter/setter pair
Methods
copyWith ({String ? id , String ? from , String ? to , String ? collectiveId , String ? eventId , String ? positionRequestedId , int ? createdTime , int ? expiresAt , EventOffer ? newOffer , String ? message , bool ? unread , Instrument ? instrument , double ? percentageCoverage , int ? distanceKm , RequestDecision ? requestDecision , GameRequestType ? gameRequestType , RequestType ? type , Map <String , dynamic > ? payload })
→ AppRequest
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJSON ()
→ Map <String , dynamic >
toString ()
→ String
A string representation of this object.
override