device_info_plus 2.1.0
device_info_plus: ^2.1.0 copied to clipboard

Flutter plugin providing detailed information about the device (make, model, etc.), and Android or iOS version the app is running on.

device_info_plus #

Flutter Community: device_info_plus

pub package

Get current device information from within the Flutter application.

Platform Support #

AndroidiOSMacOSWebLinuxWindows
✔️✔️✔️✔️✔️✔️

Usage #

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

Example:

import 'package:device_info_plus/device_info_plus.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"

WebBrowserInfo webBrowserInfo = await deviceInfo.webBrowserInfo;
print('Running on ${webBrowserInfo.userAgent}');  // e.g. "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"

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

Check out our documentation website to learn more. Plus plugins documentation

Important: As of January 2021, the Flutter team is no longer accepting non-critical PRs for the original set of plugins in flutter/plugins, and instead they should be submitted in this project. You can read more about this announcement here. as well as in the Flutter 2 announcement blog post.

269
likes
130
pub points
98%
popularity

Publisher

fluttercommunity.dev

Flutter plugin providing detailed information about the device (make, model, etc.), and Android or iOS version the app is running on.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

device_info_plus_linux, device_info_plus_macos, device_info_plus_platform_interface, device_info_plus_web, device_info_plus_windows, flutter

More

Packages that depend on device_info_plus