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,15 @@ class UpdateUserIndexParams {
int appVersion;
String deviceInfo;
UpdateUserIndexParams({
required this.user,
required this.username,
required this.device,
required this.appVersion,
required this.deviceInfo
required this.deviceInfo,
});
factory UpdateUserIndexParams.fromJson(Map<String, dynamic> json) => _$UpdateUserIndexParamsFromJson(json);
factory UpdateUserIndexParams.fromJson(Map<String, dynamic> json) =>
_$UpdateUserIndexParamsFromJson(json);
Map<String, dynamic> toJson() => _$UpdateUserIndexParamsToJson(this);
}
@@ -1,4 +1,3 @@
import 'dart:async';
import 'dart:convert';
import 'dart:developer';
@@ -26,14 +25,18 @@ class UpdateUserIndex extends MhslApi<void> {
}
static Future<void> index() async {
unawaited(UpdateUserIndex(
UpdateUserIndexParams(
username: AccountData().getUsername(),
user: AccountData().getUserSecret(),
device: await AccountData().getDeviceId(),
appVersion: int.parse((await PackageInfo.fromPlatform()).buildNumber),
deviceInfo: jsonEncode((await DeviceInfoPlugin().deviceInfo).data).toString(),
),
).run());
unawaited(
UpdateUserIndex(
UpdateUserIndexParams(
username: AccountData().getUsername(),
user: AccountData().getUserSecret(),
device: await AccountData().getDeviceId(),
appVersion: int.parse((await PackageInfo.fromPlatform()).buildNumber),
deviceInfo: jsonEncode(
(await DeviceInfoPlugin().deviceInfo).data,
).toString(),
),
).run(),
);
}
}