Refactor mobile to use OpenApi generated SDK (#336)

This commit is contained in:
Alex
2022-07-13 07:23:48 -05:00
committed by GitHub
parent d69470e207
commit ae7e582ec8
276 changed files with 14513 additions and 3003 deletions

View File

@@ -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};