flutter_getuuid

一款flutter插件用于获取android和iOS的设备信息

引入

####注意 ios环境需要用xcode打开项目然后在

  1. 找到Podfile文件在 "target 'Runner' do" 下添加 pod 'SAMKeychain'
  2. 然后打开命令行工具进入项目执行pod install命令即可
  • 添加位置
target 'Runner' do
  pod 'SAMKeychain'
  Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
  referring to absolute paths on developers' machines.

在你的 pubspec.yaml 文件中添加如下依赖:

dependencies:
  flutter_getuuid: ^${latestVersion}

如果想用github上最新版本:

dependencies:
  flutter_getuuid:
    git:
      url: https://github.com/wozhizhizhi/flutter_getuuid.git

如何使用

static netFetch() async {
    /// 获取手机的UUID
    uuid = await FlutterGetuuid.platformUid;
    /// 获取手机的型号如“iPhone7”
    phoneMark = await FlutterGetuuid.platformDeviceModle;
    /// 获取项目的版本号
    version = await FlutterGetuuid.platformVersionCode;
    /// 获取系统SDK版本
    systemMark = await FlutterGetuuid.platformSystemMark;
}

Libraries

flutter_getuuid
i18n

Dart

VM

dart:ffi
Foreign Function Interface for interoperability with the C programming language. [...]

Web

dart:html
HTML elements and other resources for web-based applications that need to interact with the browser and the DOM (Document Object Model). [...]
dart:js
Low-level support for interoperating with JavaScript. [...]
dart:js_util
Utility methods to efficiently manipulate typed JSInterop objects in cases where the name to call is not known at runtime. You should only use these methods when the same effect cannot be achieved with @JS annotations. These methods would be extension methods on JSObject if Dart supported extension methods.