-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # lib/modules/survey_detail/components/content.dart
- Loading branch information
1 parent
4416d4c
commit 9031913
Showing
9 changed files
with
209 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,30 @@ | ||
part of 'survey_detail_module.dart'; | ||
|
||
abstract class SurveyDetailInteractorDelegate {} | ||
abstract class SurveyDetailInteractorDelegate { | ||
BehaviorSubject<DetailedSurveyInfo> get detailedSurveyDidFetch; | ||
|
||
abstract class SurveyDetailInteractor | ||
extends Interactor<SurveyDetailInteractorDelegate> {} | ||
BehaviorSubject<Exception> get detailedSurveyDidFailToFetch; | ||
} | ||
|
||
class SurveyDetailInteractorImpl extends SurveyDetailInteractor {} | ||
abstract class SurveyDetailInteractor extends ArgumentsInteractor< | ||
SurveyDetailInteractorDelegate, SurveyDetailArguments> { | ||
SurveyInfo get survey; | ||
|
||
void fetchDetailedSurvey(); | ||
} | ||
|
||
class SurveyDetailInteractorImpl extends SurveyDetailInteractor { | ||
final SurveyRepository _surveyRepository = locator.get(); | ||
|
||
@override | ||
SurveyInfo get survey => arguments!.survey; | ||
|
||
@override | ||
void fetchDetailedSurvey() { | ||
_surveyRepository | ||
.fetchDetailedSurvey(survey.id!) | ||
.then((value) => delegate?.detailedSurveyDidFetch.add(value)) | ||
.onError<Exception>((exception, _) => | ||
delegate?.detailedSurveyDidFailToFetch.add(exception)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
part of 'survey_detail_module.dart'; | ||
|
||
abstract class SurveyDetailRouter extends Router {} | ||
abstract class SurveyDetailRouter extends Router { | ||
void pushToSurveyQuestionsScreen(BuildContext context, | ||
{required DetailedSurveyInfo survey}); | ||
} | ||
|
||
class SurveyDetailRouterImpl extends SurveyDetailRouter {} | ||
class SurveyDetailRouterImpl extends SurveyDetailRouter { | ||
@override | ||
void pushToSurveyQuestionsScreen(BuildContext context, | ||
{required DetailedSurveyInfo survey}) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters