TF-1613 Implement handleSuccessViewState and handleFailureViewState for all controller
(cherry picked from commit 35e727e795bb3c44cc9c47e02542b5bdc3955fdd)
This commit is contained in:
@@ -75,17 +75,13 @@ class VacationController extends BaseController {
|
||||
}
|
||||
|
||||
@override
|
||||
void onDone() {
|
||||
viewState.value.fold(
|
||||
(failure) => null,
|
||||
(success) {
|
||||
if (success is GetAllVacationSuccess) {
|
||||
_handleGetAllVacationSuccess(success);
|
||||
} else if (success is UpdateVacationSuccess) {
|
||||
_handleUpdateVacationSuccess(success);
|
||||
}
|
||||
}
|
||||
);
|
||||
void handleSuccessViewState(Success success) {
|
||||
super.handleSuccessViewState(success);
|
||||
if (success is GetAllVacationSuccess) {
|
||||
_handleGetAllVacationSuccess(success);
|
||||
} else if (success is UpdateVacationSuccess) {
|
||||
_handleUpdateVacationSuccess(success);
|
||||
}
|
||||
}
|
||||
|
||||
void _initWorker() {
|
||||
|
||||
Reference in New Issue
Block a user