getFloorsForCurrentBuilding method

  1. @override
Future<List<JMapFloor>?> getFloorsForCurrentBuilding()

Implementation

@override
Future<List<JMapFloor>?> getFloorsForCurrentBuilding() async {
  Map<Object?, Object?>? json =
      await _channel.invokeMethod("utility#getFloorsForCurrentBuilding");
  if (json != null && json['floors'] != null) {
    List<JMapFloor> floors = (json['floors'] as List)
        .map((i) => JMapFloor.fromJson((i as Map?)?.cast<String, dynamic>())!)
        .toList();
    return floors;
  }
  return null;
}