1
0
mirror of https://github.com/immich-app/immich.git synced 2024-12-21 01:39:59 +02:00
immich/mobile/lib/shared/services/device_info.service.dart

19 lines
464 B
Dart
Raw Normal View History

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