Skip to content

Commit

Permalink
fix: added background color
Browse files Browse the repository at this point in the history
  • Loading branch information
Numoy committed Sep 21, 2023
1 parent 847c748 commit cd38246
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/src/survey_kit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -54,7 +54,7 @@ class SurveyKit extends StatefulWidget {
this.stepShell,
this.decoration,
this.loadingState,
this.keepLastStateAlive = false,
this.backgroundColor,
});

@override
Expand Down Expand Up @@ -116,9 +116,9 @@ class _SurveyKitState extends State<SurveyKit> {
navigatorKey: _navigatorKey,
decoration: widget.decoration,
loadingState: widget.loadingState,
keepLastStateAlive: widget.keepLastStateAlive,
step: widget.task.steps.first,
surveyStateProvider: surveyStateProvide,
backgroundColor: widget.backgroundColor,
);
},
),
Expand All @@ -133,9 +133,9 @@ class SurveyPage extends StatefulWidget {
final GlobalKey<NavigatorState> navigatorKey;
final BoxDecoration? decoration;
final Widget? loadingState;
final bool keepLastStateAlive;
final Step step;
final SurveyStateProvider surveyStateProvider;
final Color? backgroundColor;

const SurveyPage({
super.key,
Expand All @@ -147,7 +147,7 @@ class SurveyPage extends StatefulWidget {
this.appBar,
this.decoration,
this.loadingState,
this.keepLastStateAlive = false,
this.backgroundColor,
});

@override
Expand All @@ -171,6 +171,7 @@ class _SurveyPageState extends State<SurveyPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: widget.backgroundColor,
appBar: widget.appBar ?? const SurveyAppBar(),
body: Navigator(
key: widget.navigatorKey,
Expand Down

0 comments on commit cd38246

Please sign in to comment.