device_info 0.3.0

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 100

device_info

Get current device information from within the Flutter application.

Usage

Import package:device_info/device_info.dart, instantiate DeviceInfoPlugin and use the Android and iOS getters to get platform-specific device information.

Example:

import 'package:device_info/device_info.dart';

DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
AndroidDeviceInfo androidInfo = await deviceInfo.androidInfo;
print('Running on ${androidInfo.model}');  // e.g. "Moto G (4)"

IosDeviceInfo iosInfo = await deviceInfo.iosInfo;
print('Running on ${iosInfo.utsname.machine}');  // e.g. "iPod7,1"

You will find links to the API docs on the pub page.

Getting Started

For help getting started with Flutter, view our online documentation.

For help on editing plugin code, view the documentation.

0.3.0

  • Added ability to get Android ID for Android devices

0.2.1

  • Updated Gradle tooling to match Android Studio 3.1.2.

0.2.0

  • Breaking change. Set SDK constraints to match the Flutter beta release.

0.1.2

  • Fixed Dart 2 type errors.

0.1.1

  • Simplified and upgraded Android project template to Android SDK 27.
  • Updated package description.

0.1.0

  • Breaking change. Upgraded to Gradle 4.1 and Android Studio Gradle plugin 3.0.1. Older Flutter projects need to upgrade their Gradle setup as well in order to use this version of the plugin. Instructions can be found here.

0.0.5

  • Added FLT prefix to iOS types

0.0.4

  • Fixed Java/Dart communication error with empty lists

0.0.3

  • Added support for utsname

0.0.2

  • Fixed broken type comparison
  • Added "isPhysicalDevice" field, detecting emulators/simulators

0.0.1

  • Implements platform-specific device/OS properties

example/README.md

device_info_example

Demonstrates how to use the device_info plugin.

Getting Started

For help getting started with Flutter, view our online documentation.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  device_info: ^0.3.0

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

Alternatively, your editor might support flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:device_info/device_info.dart';
  
Version Uploaded Documentation Archive
0.3.0 Nov 15, 2018 Go to the documentation of device_info 0.3.0 Download device_info 0.3.0 archive
0.2.1 Jun 1, 2018 Go to the documentation of device_info 0.2.1 Download device_info 0.2.1 archive
0.2.0 Mar 9, 2018 Go to the documentation of device_info 0.2.0 Download device_info 0.2.0 archive
0.1.2 Feb 28, 2018 Go to the documentation of device_info 0.1.2 Download device_info 0.1.2 archive
0.1.1 Jan 12, 2018 Go to the documentation of device_info 0.1.1 Download device_info 0.1.1 archive
0.1.0 Dec 20, 2017 Go to the documentation of device_info 0.1.0 Download device_info 0.1.0 archive
0.0.5 Dec 3, 2017 Go to the documentation of device_info 0.0.5 Download device_info 0.0.5 archive
0.0.4 Nov 13, 2017 Go to the documentation of device_info 0.0.4 Download device_info 0.0.4 archive
0.0.3 Oct 26, 2017 Go to the documentation of device_info 0.0.3 Download device_info 0.0.3 archive
0.0.2 Oct 20, 2017 Go to the documentation of device_info 0.0.2 Download device_info 0.0.2 archive

All 11 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
99
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
100
Learn more about scoring.

We analyzed this package on Dec 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7
  • Flutter: 1.0.0

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8