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
Alex 274fba1bd2
Implement CI/CD for Android (#48)
* Implement CI/CD for Android with Fastlane
2022-03-13 22:10:07 -05:00

19 lines
464 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
String deviceId = await FlutterUdid.consistentUdid;
String deviceType = "";
if (Platform.isAndroid) {
deviceType = "ANDROID";
} else if (Platform.isIOS) {
deviceType = "IOS";
}
return {"deviceId": deviceId, "deviceType": deviceType};
}
}