updated project linter-rules and enforced them

This commit is contained in:
2024-03-29 18:22:55 +01:00
parent 21e11b6c2a
commit 75846750f7
113 changed files with 553 additions and 554 deletions

View File

@ -11,7 +11,7 @@ class GetChat extends TalkApi<GetChatResponse> {
String chatToken;
GetChatParams params;
GetChat(this.chatToken, this.params) : super("v1/chat/$chatToken", null, getParameters: params.toJson());
GetChat(this.chatToken, this.params) : super('v1/chat/$chatToken', null, getParameters: params.toJson());
@override
assemble(String raw) {

View File

@ -9,7 +9,7 @@ class GetChatCache extends RequestCache<GetChatResponse> {
String chatToken;
GetChatCache({required onUpdate, required this.chatToken}) : super(RequestCache.cacheNothing, onUpdate) {
start("MarianumMobile", "nc-chat-$chatToken");
start('MarianumMobile', 'nc-chat-$chatToken');
}
@override

View File

@ -61,21 +61,21 @@ class GetChatResponseObject {
static GetChatResponseObject getDateDummy(int timestamp) {
DateTime elementDate = DateTime.fromMillisecondsSinceEpoch(timestamp * 1000);
return getTextDummy(Jiffy.parseFromDateTime(elementDate).format(pattern: "dd.MM.yyyy"));
return getTextDummy(Jiffy.parseFromDateTime(elementDate).format(pattern: 'dd.MM.yyyy'));
}
static GetChatResponseObject getTextDummy(String text) {
return GetChatResponseObject(
0,
"",
'',
GetRoomResponseObjectMessageActorType.user,
"",
"",
'',
'',
0,
"",
'',
GetRoomResponseObjectMessageType.system,
false,
"",
'',
text,
null,
null,
@ -113,10 +113,10 @@ class RichObjectString {
}
enum RichObjectStringObjectType {
@JsonValue("user") user,
@JsonValue("group") group,
@JsonValue("file") file,
@JsonValue("guest") guest,
@JsonValue("highlight") highlight,
@JsonValue("talk-poll") talkPoll,
@JsonValue('user') user,
@JsonValue('group') group,
@JsonValue('file') file,
@JsonValue('guest') guest,
@JsonValue('highlight') highlight,
@JsonValue('talk-poll') talkPoll,
}

View File

@ -6,7 +6,7 @@ class RichObjectStringProcessor {
if(data == null) return message;
data.forEach((key, value) {
message = message.replaceAll(RegExp("{$key}"), value.name);
message = message.replaceAll(RegExp('{$key}'), value.name);
});
return message;