Merge branch 'master_mohemm_flutter'

# Conflicts:
#	pubspec.yaml
master
haroon amjad 1 hour ago
commit 796e697dec

@ -3,6 +3,7 @@ import 'dart:convert';
import 'dart:developer';
import 'dart:io';
import 'package:android_id/android_id.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:http/http.dart' as http;
import 'package:device_info_plus/device_info_plus.dart';
@ -282,9 +283,12 @@ class DashboardApiClient {
String? deviceId = "";
// Generate a v4 (random) id
if (Platform.isAndroid) {
AndroidDeviceInfo androidInfo = await DeviceInfoPlugin().androidInfo;
deviceId = await androidInfo.id;
deviceId = stringToBase64.encode(deviceId);
const _androidIdPlugin = AndroidId();
deviceId = await _androidIdPlugin.getId() ?? "${(await DeviceInfoPlugin().androidInfo).id}${AppState().postParamsObject!.pUserName ?? ""}";
// AndroidDeviceInfo androidInfo = await DeviceInfoPlugin().androidInfo;
// deviceId = await androidInfo.id;
// deviceId = stringToBase64.encode(deviceId);
deviceId = deviceId.length >= 50 ? deviceId.substring(0, 48) : deviceId;
} else if (Platform.isIOS) {
IosDeviceInfo iosInfo = await DeviceInfoPlugin().iosInfo;

@ -59,6 +59,7 @@ dependencies:
# platform_device_id_plus: ^1.0.7
# mobile_device_identifier: ^0.0.3
device_info_plus: ^13.2.0
android_id: ^0.6.0
image_picker: ^1.1.2
file_picker: ^13.1.0
geolocator: ^14.1.1

Loading…
Cancel
Save