DeviceInfo class

Returns basic device information, including model, manufacturer, version & platform`.

Example

DeviceInfo deviceInfo = await DeviceInfo.getInstance();
print('- DeviceInfo: Manufacturer: ${deviceInfo.manufacturer}, Model: ${deviceInfo.model}, Version: ${deviceInfo.version}, Platform: ${deviceInfo.platform}');

Constructors

DeviceInfo({required String model, required String manufacturer, required String version, required String platform, required String framework})

Properties

framework ↔ String
Framework Flutter|ReactNative|Cordova
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
manufacturer ↔ String
Device manufacturer
getter/setter pair
model ↔ String
Device model
getter/setter pair
platform ↔ String
Platform iOS | Android
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
version ↔ String
Device version
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() → Map<String, dynamic>
Return as Map
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

getInstance() → Future<DeviceInfo>
Retreive an singleton instance of DeviceInfo.