Skip to content

Latest commit

 

History

History
34 lines (21 loc) · 1.76 KB

README.md

File metadata and controls

34 lines (21 loc) · 1.76 KB

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;