decode static method

Drone decode(
  1. Object message
)

Implementation

static Drone decode(Object message) {
  final Map<Object?, Object?> pigeonMap = message as Map<Object?, Object?>;
  return Drone(
    status: pigeonMap['status'] as String?,
    error: pigeonMap['error'] as String?,
    batteryPercent: pigeonMap['batteryPercent'] as double?,
    altitude: pigeonMap['altitude'] as double?,
    latitude: pigeonMap['latitude'] as double?,
    longitude: pigeonMap['longitude'] as double?,
    speed: pigeonMap['speed'] as double?,
    roll: pigeonMap['roll'] as double?,
    pitch: pigeonMap['pitch'] as double?,
    yaw: pigeonMap['yaw'] as double?,
  );
}