1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-08 12:56:48 +01:00
immich/mobile/lib/shared/services/device_info.service.dart
xpwmaosldk ef097d15dd
Clean code of shared folder (#249)
* optimize android side gradle settings

* android minsdk back to 21

* remove unused package, update linter and fix lint error

* clean code of 'shared module' with offical dart style guide

* restore uploadProfileImage method in UserService
2022-06-22 23:14:14 -05:00

18 lines
458 B
Dart

import 'package:flutter_udid/flutter_udid.dart';
import 'dart:io' show Platform;
class DeviceInfoService {
Future<Map<String, dynamic>> getDeviceInfo() async {
// Get device info
var deviceId = await FlutterUdid.consistentUdid;
var deviceType = "";
if (Platform.isAndroid) {
deviceType = "ANDROID";
} else if (Platform.isIOS) {
deviceType = "IOS";
}
return {"deviceId": deviceId, "deviceType": deviceType};
}
}