dart format
This commit is contained in:
@@ -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(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user