Future<PolylineResult> getRouteBetweenCoordinates(
{required PolylineRequest request, String? googleApiKey}) async {
assert(
(request.proxy == null &&
googleApiKey != null &&
googleApiKey.isNotEmpty) ||
(request.proxy != null && googleApiKey == null),
"Google API Key cannot be empty if proxy isn't provided");
try {
var result = await NetworkUtil().getRouteBetweenCoordinates(
request: request, googleApiKey: googleApiKey);
return result.isNotEmpty
? result[0]
: PolylineResult(errorMessage: "No result found");
} catch (e) {
rethrow;
}
}
Modifying this function directly influences the use of the package, and if the flutter pub upgrade command is used, the package will be updated, causing implementation problems. This broken change is not documented in the README and it is also not possible to identify it through the version, something like 2.1.0, instead of 2.0.1 which does not indicate a change of this type.
I'm so sorry, that was an oversight on my part. I've retracted the version. I would release another version 2.1.0 with information about the breaking changes
In version 2.0.1, a break change was inserted, where the getRouteBetweenCoordinates function was previously used as follows.
Now it must be carried out as follows.
Modifying this function directly influences the use of the package, and if the flutter pub upgrade command is used, the package will be updated, causing implementation problems. This broken change is not documented in the README and it is also not possible to identify it through the version, something like 2.1.0, instead of 2.0.1 which does not indicate a change of this type.