exec method
問診情報を取得する。
サーバーから問診情報を取得します。
Return: Future<SelfCheckModel> が返されます。このFutureは、操作が完了すると取得した問診情報を含むモデルを返します。
使用するリポジトリ:
- TakeFormItemsRepository : 問診情報に関するデータ操作を管理するリポジトリ 使用するAPI:
TakeFormItemApi.getTakeFormItems: 問診情報の取得を行うAPI
Implementation
Future<SelfCheckModel> exec() async {
try {
final selfCheckItems = await _takeFormItemsRepository.getSelfCheckItems(
fromType: FormType.preRehabilitation,
);
return selfCheckItems;
} on RepositoryException catch (error, stackTrace) {
throw _errorHandler.handleRepositoryError(error, stackTrace);
} catch (error, stackTrace) {
throw _errorHandler.handleUnknownError(error, stackTrace);
}
}