diff --git a/example/lib/main.dart b/example/lib/main.dart index 3da38d0..b74f24b 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -56,7 +56,7 @@ class _OnBoardingPageState extends State { const pageDecoration = const PageDecoration( titleTextStyle: TextStyle(fontSize: 28.0, fontWeight: FontWeight.w700), bodyTextStyle: bodyStyle, - descriptionPadding: EdgeInsets.fromLTRB(16.0, 0.0, 16.0, 16.0), + bodyPadding: EdgeInsets.fromLTRB(16.0, 0.0, 16.0, 16.0), pageColor: Colors.white, imagePadding: EdgeInsets.zero, ); diff --git a/lib/src/model/page_decoration.dart b/lib/src/model/page_decoration.dart index 98eece4..bd594cb 100644 --- a/lib/src/model/page_decoration.dart +++ b/lib/src/model/page_decoration.dart @@ -38,10 +38,8 @@ class PageDecoration { /// @Default `EdgeInsets.only(top: 16.0, bottom: 24.0)` final EdgeInsets titlePadding; - /// Padding of description - /// - /// @Default: `EdgeInsets.zero` - final EdgeInsets descriptionPadding; + /// Padding of body + final EdgeInsets? bodyPadding; /// Padding of footer /// @@ -79,7 +77,7 @@ class PageDecoration { this.imagePadding = const EdgeInsets.only(bottom: 24.0), this.contentMargin = const EdgeInsets.all(16.0), this.titlePadding = const EdgeInsets.only(top: 16.0, bottom: 24.0), - this.descriptionPadding = EdgeInsets.zero, + this.bodyPadding, this.footerPadding = const EdgeInsets.symmetric(vertical: 24.0), this.bodyAlignment = Alignment.topCenter, this.imageAlignment = Alignment.bottomCenter, @@ -118,7 +116,7 @@ class PageDecoration { imagePadding: imagePadding ?? this.imagePadding, contentMargin: contentMargin ?? this.contentMargin, titlePadding: titlePadding ?? this.titlePadding, - descriptionPadding: descriptionPadding ?? this.descriptionPadding, + bodyPadding: descriptionPadding ?? this.bodyPadding, footerPadding: footerPadding ?? this.footerPadding, bodyAlignment: bodyAlignment ?? this.bodyAlignment, imageAlignment: imageAlignment ?? this.imageAlignment, diff --git a/lib/src/ui/intro_content.dart b/lib/src/ui/intro_content.dart index f5cad28..1209358 100644 --- a/lib/src/ui/intro_content.dart +++ b/lib/src/ui/intro_content.dart @@ -33,8 +33,8 @@ class IntroContent extends StatelessWidget { page.decoration.titleTextStyle, ), ), - Padding( - padding: page.decoration.descriptionPadding, + Container( + padding: page.decoration.bodyPadding, child: _buildWidget( page.bodyWidget, page.body,