File tree 1 file changed +46
-0
lines changed
lib/services/connection/api_manager
1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -82,3 +82,49 @@ class IsolateResponse<T> {
82
82
@override
83
83
String toString () => 'ResponseEvent: [$eventId ]: $response ' ;
84
84
}
85
+
86
+ /// To communicate event and get the response for custom events that in addition
87
+ /// to get the BE JSON the deserialization of the JSON response to dart models
88
+ /// also happens inside the isolate.
89
+ abstract class CustomIsolateEvent <T > extends _IsolateEvent {
90
+ CustomIsolateEvent ({
91
+ required super .eventId,
92
+ required this .event,
93
+ required this .request,
94
+ this .data,
95
+ });
96
+
97
+ final CustomEvent event;
98
+
99
+ final Request request;
100
+
101
+ final T ? data;
102
+ }
103
+
104
+ enum CustomEvent {
105
+ ping,
106
+ activeSymbols,
107
+ assetIndex,
108
+ balance,
109
+ buy,
110
+ accountList,
111
+ accountClosure,
112
+ cancel,
113
+ cashierPayment,
114
+ changeEmail,
115
+ changePassword,
116
+ confirmEmail,
117
+ contractUpdateHistory,
118
+ contractUpdate,
119
+ contractsFor,
120
+ getAccountStatus,
121
+ getAccountTypes,
122
+ getAvailableAccounts,
123
+ getFinancialAssessment,
124
+ getLimits,
125
+ getSelfExclusion,
126
+ getSettings,
127
+ identityVerification,
128
+ jTokenCreate,
129
+ kycAuthStatus,
130
+ }
You can’t perform that action at this time.
0 commit comments