device_info_plus_ohos

pub package GitHub stars GitHub forks GitHub license GitHub issues flutter-candies

Get current device information from within the Flutter application.

The OpenHarmony implementation of device_info_plus.

这个 Flutter 插件提供了一个用于查询应用设备信息的 API。

device_info_plus 在 OpenHarmony 平台的实现。

Usage

dependencies:
  device_info_plus: any
  device_info_plus_ohos: any

Example:

import 'package:device_info_plus_ohos/device_info_plus_ohos.dart';
 
final DeviceInfoOhosPlugin deviceInfoOhosPlugin = DeviceInfoOhosPlugin();

OhosDeviceInfo deviceInfo = await deviceInfoOhosPlugin.ohosDeviceInfo;

// Requires permission: ohos.permission.sec.ACCESS_UDID (System permission, only open to system apps).
OhosAccessUDIDInfo accessUDIDInfo = await deviceInfoOhosPlugin.ohosAccessUDIDInfo;