dart format

This commit is contained in:
2026-05-08 20:12:40 +02:00
parent 9e139b5704
commit 3b8da1d3d6
295 changed files with 6404 additions and 4161 deletions
@@ -10,15 +10,21 @@ import 'get_reactions_response.dart';
class GetReactions extends TalkApi<GetReactionsResponse> {
String chatToken;
int messageId;
GetReactions({required this.chatToken, required this.messageId}) : super('v1/reaction/$chatToken/$messageId', null);
GetReactions({required this.chatToken, required this.messageId})
: super('v1/reaction/$chatToken/$messageId', null);
@override
GetReactionsResponse assemble(String raw) {
final decoded = jsonDecode(raw) as Map<String, dynamic>;
return GetReactionsResponse.fromJson(decoded['ocs'] as Map<String, dynamic>);
return GetReactionsResponse.fromJson(
decoded['ocs'] as Map<String, dynamic>,
);
}
@override
Future<Response>? request(Uri uri, ApiParams? body, Map<String, String>? headers) => http.get(uri, headers: headers);
Future<Response>? request(
Uri uri,
ApiParams? body,
Map<String, String>? headers,
) => http.get(uri, headers: headers);
}
@@ -10,7 +10,8 @@ class GetReactionsResponse extends ApiResponse {
GetReactionsResponse(this.data);
factory GetReactionsResponse.fromJson(Map<String, dynamic> json) => _$GetReactionsResponseFromJson(json);
factory GetReactionsResponse.fromJson(Map<String, dynamic> json) =>
_$GetReactionsResponseFromJson(json);
Map<String, dynamic> toJson() => _$GetReactionsResponseToJson(this);
}
@@ -21,13 +22,21 @@ class GetReactionsResponseObject {
String actorDisplayName;
int timestamp;
GetReactionsResponseObject(this.actorType, this.actorId, this.actorDisplayName, this.timestamp);
GetReactionsResponseObject(
this.actorType,
this.actorId,
this.actorDisplayName,
this.timestamp,
);
factory GetReactionsResponseObject.fromJson(Map<String, dynamic> json) => _$GetReactionsResponseObjectFromJson(json);
factory GetReactionsResponseObject.fromJson(Map<String, dynamic> json) =>
_$GetReactionsResponseObjectFromJson(json);
Map<String, dynamic> toJson() => _$GetReactionsResponseObjectToJson(this);
}
enum GetReactionsResponseObjectActorType {
@JsonValue('guests') guests,
@JsonValue('users') users,
@JsonValue('guests')
guests,
@JsonValue('users')
users,
}