Beacon class

This file is part of the Plant Care app. It defines the Beacon class which represents a beacon with various properties and methods for JSON serialization.

Constructors

Beacon({required String uuid, required String name, required int major, required int minor, required double rssi, int? deviceId, String? mac, int? txPower, double? distance, int? battery, bool? isRange, bool? connectable})
Beacon.fromJson(Map json)
Creates a Beacon instance from a JSON map.
factory

Properties

battery int?
final
connectable bool?
final
deviceId int?
final
distance double?
final
hashCode int
The hash code for this object.
no setterinherited
isRange bool?
final
mac String?
final
major int
final
minor int
final
name String
final
rssi double
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
txPower int?
final
uuid String
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts the Beacon instance to a JSON map.
toString() String
A string representation of this object.
inherited

Operators

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