Skip to content

Commit 8d0bc6c

Browse files
committed
feat(intro_page): add option to adjust page margin
1 parent 2344502 commit 8d0bc6c

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

lib/src/model/page_decoration.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ class PageDecoration {
3939
/// @Default `EdgeInsets.all(16.0)`
4040
final EdgeInsets contentMargin;
4141

42+
/// Margin for page
43+
///
44+
/// @Default `EdgeInsets.only(bottom: 60.0)`
45+
final EdgeInsets? pageMargin;
46+
4247
/// Padding of title
4348
///
4449
/// @Default `EdgeInsets.only(top: 16.0, bottom: 24.0)`
@@ -89,6 +94,7 @@ class PageDecoration {
8994
this.footerFit = FlexFit.loose,
9095
this.imagePadding = const EdgeInsets.only(bottom: 24.0),
9196
this.contentMargin = const EdgeInsets.all(16.0),
97+
this.pageMargin = const EdgeInsets.only(bottom: 60.0),
9298
this.titlePadding = const EdgeInsets.only(top: 16.0, bottom: 24.0),
9399
this.bodyPadding,
94100
this.footerPadding = const EdgeInsets.symmetric(vertical: 24.0),
@@ -110,6 +116,7 @@ class PageDecoration {
110116
FlexFit? footerFit,
111117
EdgeInsets? imagePadding,
112118
EdgeInsets? contentMargin,
119+
EdgeInsets? pageMargin,
113120
EdgeInsets? titlePadding,
114121
EdgeInsets? descriptionPadding,
115122
EdgeInsets? footerPadding,
@@ -134,6 +141,7 @@ class PageDecoration {
134141
footerFit: footerFit ?? this.footerFit,
135142
imagePadding: imagePadding ?? this.imagePadding,
136143
contentMargin: contentMargin ?? this.contentMargin,
144+
pageMargin: pageMargin ?? this.pageMargin,
137145
titlePadding: titlePadding ?? this.titlePadding,
138146
bodyPadding: descriptionPadding ?? this.bodyPadding,
139147
footerPadding: footerPadding ?? this.footerPadding,

lib/src/ui/intro_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class _IntroPageState extends State<IntroPage>
7272
return Container(
7373
color: page.decoration.pageColor,
7474
decoration: page.decoration.boxDecoration,
75-
margin: const EdgeInsets.only(bottom: 60.0),
75+
margin: page.decoration.pageMargin,
7676
child: Flex(
7777
direction:
7878
page.useRowInLandscape && orientation == Orientation.landscape

0 commit comments

Comments
 (0)