truckRouteSearch static method
线路规划 truck
Implementation
static Future<void> truckRouteSearch({
required List<LatLng> wayPoints,
int? drivingMode,
TruckInfo? truckInfo,
int? showFields,//ShowFields.
bool onlyOne = true,
RouteResultBack? back,
}) async {
final String? jsonStr = await _channel.invokeMethod('truckRouteSearch', {
"wayPointsJson": json.encode(wayPoints),
"drivingMode": drivingMode,
"truckInfoJson": json.encode(truckInfo),
"showFields": showFields,
"onlyOne": onlyOne,
});
if (jsonStr != null) {
Map? map = json.decode(jsonStr);
if (map != null && back != null) {
back(map['code'] as int, RouteResult.fromJson(map["data"]));
}
}
}