mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
Refactor mobile to use OpenApi generated SDK (#336)
This commit is contained in:
@@ -2,6 +2,7 @@ import 'package:flutter_udid/flutter_udid.dart';
|
||||
import 'dart:io' show Platform;
|
||||
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
final deviceInfoServiceProvider = Provider((_) => DeviceInfoService());
|
||||
|
||||
@@ -9,12 +10,12 @@ class DeviceInfoService {
|
||||
Future<Map<String, dynamic>> getDeviceInfo() async {
|
||||
// Get device info
|
||||
var deviceId = await FlutterUdid.consistentUdid;
|
||||
var deviceType = "";
|
||||
var deviceType = DeviceTypeEnum.ANDROID;
|
||||
|
||||
if (Platform.isAndroid) {
|
||||
deviceType = "ANDROID";
|
||||
deviceType = DeviceTypeEnum.ANDROID;
|
||||
} else if (Platform.isIOS) {
|
||||
deviceType = "IOS";
|
||||
deviceType = DeviceTypeEnum.IOS;
|
||||
}
|
||||
|
||||
return {"deviceId": deviceId, "deviceType": deviceType};
|
||||
|
||||
Reference in New Issue
Block a user