You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
894 B
Dart
25 lines
894 B
Dart
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
|
import 'package:diplomaticquarterapp/core/model/pharmacies/ListUserAgreement.dart';
|
|
import 'package:diplomaticquarterapp/core/service/parmacyModule/terms-condition-service.dart';
|
|
import 'dart:async';
|
|
|
|
import '../../../locator.dart';
|
|
import '../base_view_model.dart';
|
|
|
|
class TermsConditionViewModel extends BaseViewModel {
|
|
TermsConditionService _termsConditionService = locator<TermsConditionService>();
|
|
|
|
ListUserAgreement get listUserAgreement => _termsConditionService.listUserAgreement;
|
|
|
|
Future getUserTermsAndConditionsForEPharmcy() async {
|
|
setState(ViewState.Busy);
|
|
await _termsConditionService.getUserTermsAndConditionsForEPharmcy();
|
|
if (_termsConditionService.hasError) {
|
|
error = _termsConditionService.error;
|
|
setState(ViewState.Error);
|
|
} else {
|
|
setState(ViewState.Idle);
|
|
}
|
|
}
|
|
}
|