leavePlan method

  1. @override
Future<void> leavePlan(
  1. String token
)
override

Leaves a shared plan of the user associated with the given token.

Implementation

@override
Future<void> leavePlan(String token) async {
  log('Leaving plan');

  try {
    await _apiService.callFunction(
      function: 'local_lbplanner_plan_leave_plan',
      token: token,
      body: {},
    );

    log('Successfully left plan');
  } catch (e, s) {
    log('Failed to leave plan', e, s);
    rethrow;
  }
}