callDirection method
Implementation
Future<DirectionResponse?> callDirection() async {
try {
String? result = await restApi.direction(toJson());
return result != null
? DirectionResponse.fromMap(json.decode(result))
: null;
} on PlatformException catch (e) {
return Future.error(e);
}
}