startNavi static method

Future<void> startNavi({
  1. String? title,
  2. String? subtext,
  3. required List<LatLng> points,
  4. int? strategy = 0,
  5. bool? emulator = false,
})

title:标题,仅android有效 subtext:标题,仅android有效 points:导航点 第一个为起点,最后一个终点,中间为途经点,长度不能小于2 strategy:规划策略 emulator:虚拟导航

Implementation

static Future<void> startNavi({String? title,String? subtext, required List<LatLng> points, int? strategy = 0, bool? emulator = false}) async {
  if(points.length<2) return ;
  await _channel.invokeMethod('startNavi', {
    "title": title,
    "subtext":subtext,
    "pointsJson": json.encode(points),
    "strategy": strategy,
    "emulator": emulator,
  });
}