startRehabilitation method

Future<void> startRehabilitation()

Implementation

Future<void> startRehabilitation() async {
  try {
    final rehabilitationId = await _startRehabilitation.exec();
    state = state.copyWith(rehabilitationId: rehabilitationId);
  } catch (e) {
    _logger.e(e);
    rethrow;
  }

  try {
    await _init();
    await moveToNextSection(state.currentSetSectionIndex);
    _eventController.add(const RehabilitationEvent.endInit());
  } catch (e) {
    _logger.e(e);
  }
}