toggleEvents static method

Future<void> toggleEvents({
  1. required bool location,
  2. bool? geofence,
  3. bool? trips,
  4. bool? movingGeofence,
  5. required RoamUserCallBack callBack,
})

Toggle User Events Accepts Boolean values for Geofence, Trips, Moving Geofence & Location Returns Roam User

Implementation

static Future<void> toggleEvents({required bool location,
  bool? geofence,
  bool? trips,
  bool? movingGeofence,
  required RoamUserCallBack callBack}) async {
  final Map<String, dynamic> params = <String, dynamic>{
    'geofence': geofence,
    'location': location,
    'trips': trips,
    'movingGeofence': movingGeofence
  };
  final String? result =
  await _channel.invokeMethod(METHOD_TOGGLE_EVENTS, params);
  callBack(user: result);
}