NearbyAndroidDevice constructor
NearbyAndroidDevice({
- required String deviceName,
- required String deviceAddress,
- bool isGroupOwner = false,
- bool isServiceDiscoveryCapable = false,
- String primaryDeviceType = kNearbyUnknown,
- bool wpsKeypadSupported = false,
- bool wpsPbcSupported = false,
- bool wpsDisplaySupported = false,
- String? secondaryDeviceType,
- NearbyDeviceStatus status = NearbyDeviceStatus.unavailable,
The class representing the Android class WifiP2pDevice.
Automatically generates the info field from the deviceName
and deviceAddress fields.
They are used because in a Wifi Direct environment the MAC address of the device is an identifier on the network.
Implementation
NearbyAndroidDevice({
required String deviceName,
required this.deviceAddress,
this.isGroupOwner = false,
this.isServiceDiscoveryCapable = false,
this.primaryDeviceType = kNearbyUnknown,
this.wpsKeypadSupported = false,
this.wpsPbcSupported = false,
this.wpsDisplaySupported = false,
this.secondaryDeviceType,
super.status = NearbyDeviceStatus.unavailable,
}) : super(
info: NearbyDeviceInfo(
displayName: deviceName,
id: deviceAddress,
),
);