showTraffic method

Future<void> showTraffic(
  1. bool enable
)

显示路况信息

Implementation

Future<void> showTraffic(bool enable) async {
  await platform(
    android: (pool) async {
      final map = await androidController.getMap();
      await map.setTrafficEnabled(enable);

      pool..add(map);
    },
    ios: (pool) async {
      await iosController.set_showTraffic(enable);
    },
  );
}