From ff10effd50a4c943f645a2b9e6870fa984d98344 Mon Sep 17 00:00:00 2001 From: nkhanh44 Date: Thu, 31 Aug 2023 15:37:56 +0700 Subject: [PATCH] [#72] Remove some code --- lib/l10n/app_en.arb | 2 +- lib/screens/survey/survey_detail_screen.dart | 2 +- lib/screens/survey/survey_screen.dart | 10 ++++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index 5441741..1ec18de 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -11,6 +11,6 @@ "loginFailAlertTitle": "Unable to log in", "today": "Today", "errorText": "Error", - "startSurveyButton": "Start Survey", + "startSurveyText": "Start Survey", "submitText": "Submit" } diff --git a/lib/screens/survey/survey_detail_screen.dart b/lib/screens/survey/survey_detail_screen.dart index 65708e5..de667d0 100644 --- a/lib/screens/survey/survey_detail_screen.dart +++ b/lib/screens/survey/survey_detail_screen.dart @@ -62,7 +62,7 @@ class SurveyDetailScreen extends StatelessWidget { hintTextStyle: context.textTheme.labelMedium, ), child: Text( - context.localizations.startSurveyButton, + context.localizations.startSurveyText, ), onPressed: () { // TODO: Pass survey question model diff --git a/lib/screens/survey/survey_screen.dart b/lib/screens/survey/survey_screen.dart index 2221fa7..0c1b456 100644 --- a/lib/screens/survey/survey_screen.dart +++ b/lib/screens/survey/survey_screen.dart @@ -38,13 +38,13 @@ class SurveyScreen extends StatelessWidget { PageView.builder( itemCount: _numberOfQuestions, controller: _pageController, - itemBuilder: (BuildContext context, int index) { + itemBuilder: (_, __) { return const SurveyQuestionWidget( displayOrder: _displayOrder, numberOfQuestions: _numberOfQuestions, ); }, - onPageChanged: (int index) { + onPageChanged: (_) { // TODO: handle in integrate }, ), @@ -77,8 +77,10 @@ class SurveyScreen extends StatelessWidget { ); } - Widget _buildBottomButtons( - {required bool isNext, required BuildContext context}) { + Widget _buildBottomButtons({ + required bool isNext, + required BuildContext context, + }) { return Align( alignment: Alignment.bottomRight, child: Padding(