Skip to content

Commit

Permalink
update readme (flutter#195)
Browse files Browse the repository at this point in the history
* update readme

* address comments
  • Loading branch information
yjbanov authored Aug 15, 2017
1 parent 9898011 commit 3d18a0f
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions packages/device_info/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
# device_info

This Flutter plugin provides an API for querying information about the device
on which a Flutter application is running.
Get current device information from within the Flutter application.

# Usage

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

Example:

```dart
import 'package:device_info';
import 'package:device_info/device_info.dart';
var androidOSBuild = await androidOSBuild;
DeviceInfoPlugin deviceInfo = new 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.model}'); // e.g. "iPhone 6"
```

You will find links to the API docs on the [pub page](https://pub.dartlang.org/packages/device_info).

## Getting Started

For help getting started with Flutter, view our online
Expand Down

0 comments on commit 3d18a0f

Please sign in to comment.