import 'dart:io';

import 'package:device_info_plus/device_info_plus.dart';
import 'package:electronic_assistant/device/atmob_platform_info.dart';
import 'package:android_id/android_id.dart';

class PlatformAndroidInfo {
  static Future<void> init() async {
    if (Platform.isAndroid) {
      DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();
      AndroidDeviceInfo androidInfo = await deviceInfoPlugin.androidInfo;
      String? deviceId = await const AndroidId().getId();
      atmobPlatformInfo
          .setAndroidId(deviceId)
          .setBrand(androidInfo.brand)
          .setModel(androidInfo.model);
    }
  }
}
