Skip to content

SmartphoneRegistration

A DeviceRegistration for a Smartphone specifying details of the phone.

Created by the SmartphoneDeviceManager (or Smartphone.createRegistration). Always marked as connected.

Takes inspiration from the device information available via the device_info_plus via the AndroidDeviceInfo and IosDeviceInfo classes.

Inheritance
Annotations

Constructors

SmartphoneRegistration.fromJson

SmartphoneRegistration.fromJson(
  1. Map<String, dynamic> json
)

SmartphoneRegistration

SmartphoneRegistration({
  1. String? deviceId,
  2. String? deviceDisplayName,
  3. DateTime? registrationCreatedOn,
  4. bool isConnected = true,
  5. BatteryChargingState batteryChargingState = BatteryChargingState.unknown,
  6. String? hardwareName,
  7. String? platform,
  8. String? deviceName,
  9. String? deviceManufacturer,
  10. String? deviceModel,
  11. String? operatingSystem,
  12. String? sdk,
  13. String? release,
})

Properties

deviceManufacturer

String? deviceManufacturer
getter/setter pair

Device manufacturer as specified by the OS.

deviceModel

String? deviceModel
getter/setter pair

Device model as specified by the OS.

deviceName

String? deviceName
getter/setter pair

Device name as specified by the OS.

fromJsonFunction

Function get fromJsonFunction
override

The function which can convert a JSON string to an object of this type.

hardware

String? hardware
getter/setter pair

The hardware type of this device (e.g. 'iPhone7,1' for iPhone 6 Plus).

Not set by the constructor or Smartphone.createRegistration, which use hardwareName instead.

operatingSystem

String? operatingSystem
getter/setter pair

Name of the operating system as specified by the OS.

platform

String? platform
getter/setter pair

The platform type of the device - Android or iOS.

release

String? release
getter/setter pair

The OS release (version).

sdk

String? sdk
getter/setter pair

The SDK version.

Methods

toJson

Map<String, dynamic> toJson()
override

Return a JSON encoding of this object.