Skip to content

Commit c16eb24

Browse files
authored
Merge pull request #25 from spidgorny/spidgorny-background-colors-transparent
background: Color.transparent
2 parents 60a8c1c + da43e3c commit c16eb24

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ You should then run `flutter packages get` in your terminal so as to get the pac
155155
| doneButtonPersist | Bool | Show done Button throughout pages | false |
156156
| columnMainAxisAlignment | MainAxisAlignment | Control [MainAxisAlignment] for column | MainAxisAlignment.spaceAround |
157157
| fullTransition | double | Adjust scroll distance for full transition | 300.0 |
158+
| background | Color | Set the background color to Colors.transparent if you have your own background image below | null |
158159

159160
For help on editing package code, view the [flutter documentation](https://flutter.io/developing-packages/).
160161

lib/intro_views_flutter.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ class IntroViewsFlutter extends StatefulWidget {
9191
///
9292
/// default to 300.0
9393
final double fullTransition;
94+
95+
final Color background;
9496

9597
IntroViewsFlutter(
9698
this.pages, {
@@ -113,6 +115,7 @@ class IntroViewsFlutter extends StatefulWidget {
113115
this.doneButtonPersist = false,
114116
this.columnMainAxisAlignment = MainAxisAlignment.spaceAround,
115117
this.fullTransition = FULL_TARNSITION_PX,
118+
this.background,
116119
}) : super(key: key);
117120

118121
@override
@@ -231,6 +234,7 @@ class _IntroViewsFlutterState extends State<IntroViewsFlutter>
231234
return Scaffold(
232235
//Stack is used to place components over one another.
233236
resizeToAvoidBottomPadding: false,
237+
backgroundColor: widget.background,
234238
body: Stack(
235239
children: <Widget>[
236240
Page(

0 commit comments

Comments
 (0)