Skip to content

Commit

Permalink
Changed BuildContext parameter to default parameter (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hamid313-coder authored Jan 18, 2024
1 parent d0a2c79 commit 71d407b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/src/controller/survey_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ class SurveyController {
);
}

void closeSurvey({
required BuildContext context,
void closeSurvey(
BuildContext context, {
QuestionResult Function()? resultFunction,
}) {
if (onCloseSurvey != null) {
Expand Down
4 changes: 1 addition & 3 deletions lib/src/views/widget/survey_app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ class SurveyAppBar extends StatelessWidget {
color: Theme.of(context).primaryColor,
),
),
onPressed: () => surveyController.closeSurvey(
context: context,
),
onPressed: () => surveyController.closeSurvey(context),
),
],
);
Expand Down

0 comments on commit 71d407b

Please sign in to comment.