From cd382461fb9644f09ddb73db8b06263fcc0030f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marvin=20Ma=CC=88rz?= Date: Thu, 21 Sep 2023 17:04:35 +0200 Subject: [PATCH] fix: added background color --- lib/src/survey_kit.dart | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/src/survey_kit.dart b/lib/src/survey_kit.dart index 9e1387db..daaa532e 100644 --- a/lib/src/survey_kit.dart +++ b/lib/src/survey_kit.dart @@ -41,7 +41,7 @@ class SurveyKit extends StatefulWidget { /// Widget which is shown while the survey is loading (isLoading = true) final Widget? loadingState; - final bool keepLastStateAlive; + final Color? backgroundColor; const SurveyKit({ super.key, @@ -54,7 +54,7 @@ class SurveyKit extends StatefulWidget { this.stepShell, this.decoration, this.loadingState, - this.keepLastStateAlive = false, + this.backgroundColor, }); @override @@ -116,9 +116,9 @@ class _SurveyKitState extends State { navigatorKey: _navigatorKey, decoration: widget.decoration, loadingState: widget.loadingState, - keepLastStateAlive: widget.keepLastStateAlive, step: widget.task.steps.first, surveyStateProvider: surveyStateProvide, + backgroundColor: widget.backgroundColor, ); }, ), @@ -133,9 +133,9 @@ class SurveyPage extends StatefulWidget { final GlobalKey navigatorKey; final BoxDecoration? decoration; final Widget? loadingState; - final bool keepLastStateAlive; final Step step; final SurveyStateProvider surveyStateProvider; + final Color? backgroundColor; const SurveyPage({ super.key, @@ -147,7 +147,7 @@ class SurveyPage extends StatefulWidget { this.appBar, this.decoration, this.loadingState, - this.keepLastStateAlive = false, + this.backgroundColor, }); @override @@ -171,6 +171,7 @@ class _SurveyPageState extends State { @override Widget build(BuildContext context) { return Scaffold( + backgroundColor: widget.backgroundColor, appBar: widget.appBar ?? const SurveyAppBar(), body: Navigator( key: widget.navigatorKey,