diff --git a/lib/pages/TestPage.dart b/lib/pages/TestPage.dart index 9743e44..2538494 100644 --- a/lib/pages/TestPage.dart +++ b/lib/pages/TestPage.dart @@ -140,6 +140,7 @@ class TestPageState extends State { mainImageAsset: "assets/img/button_bg_art.png", logoImageAsset: "assets/img/logo_art_big.png", isScrollable: false, + isPaddingEnabled: false, content: ImageGallery(), ); } diff --git a/lib/pages/base/BaseInfoPage.dart b/lib/pages/base/BaseInfoPage.dart index 31410be..ba0efb1 100644 --- a/lib/pages/base/BaseInfoPage.dart +++ b/lib/pages/base/BaseInfoPage.dart @@ -7,6 +7,7 @@ class BaseInfoPage extends StatelessWidget { final String logoImageAsset; final Widget content; bool isScrollable; + bool isPaddingEnabled; BaseInfoPage( {super.key, @@ -14,7 +15,8 @@ class BaseInfoPage extends StatelessWidget { required this.mainImageAsset, required this.logoImageAsset, required this.content, - this.isScrollable = true}); + this.isScrollable = true, + this.isPaddingEnabled = true}); @override Widget build(BuildContext context) { @@ -62,16 +64,21 @@ class BaseInfoPage extends StatelessWidget { if (isScrollable) { return SingleChildScrollView( scrollDirection: Axis.vertical, - child: Padding( - padding: EdgeInsets.all(32.0), - child: content, - ) + child: _buildContentByPadding(content) ); } else { + return _buildContentByPadding(content); + } + } + + Widget _buildContentByPadding(Widget content) { + if (isPaddingEnabled) { return Padding( padding: EdgeInsets.all(32.0), child: content, ); + } else { + return content; } } } diff --git a/lib/widgets/base/ImageGallery.dart b/lib/widgets/base/ImageGallery.dart index fb046c8..ae10ad5 100644 --- a/lib/widgets/base/ImageGallery.dart +++ b/lib/widgets/base/ImageGallery.dart @@ -29,12 +29,7 @@ class SimpleGalleryState extends State { } return Container( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - TextTitle( - text: "W: ${constraints.maxWidth} H: ${constraints.maxHeight}"), - Row( + child: Row( children: [ InkWell( onTap: () {}, @@ -42,7 +37,7 @@ class SimpleGalleryState extends State { _updateWidths(isHovered, 0); }, child: AnimatedContainer( - height: constraints.maxHeight - 48, + height: constraints.maxHeight, width: widthsList[0], curve: Curves.fastOutSlowIn, duration: Durations.medium4, @@ -50,7 +45,7 @@ class SimpleGalleryState extends State { "assets/img/button_bg_bio.png", fit: BoxFit.cover, height: - constraints.maxHeight - 48, //48 - external padding + constraints.maxHeight, //48 - external padding ), ), ), @@ -60,7 +55,7 @@ class SimpleGalleryState extends State { _updateWidths(isHovered, 1); }, child: AnimatedContainer( - height: constraints.maxHeight - 48, + height: constraints.maxHeight, width: widthsList[1], curve: Curves.fastOutSlowIn, duration: Durations.medium4, @@ -68,7 +63,7 @@ class SimpleGalleryState extends State { "assets/img/button_bg_skills.png", fit: BoxFit.cover, height: - constraints.maxHeight - 48, //48 - external padding + constraints.maxHeight, //48 - external padding ), ), ), @@ -78,7 +73,7 @@ class SimpleGalleryState extends State { _updateWidths(isHovered, 2); }, child: AnimatedContainer( - height: constraints.maxHeight - 48, + height: constraints.maxHeight, width: widthsList[2], curve: Curves.fastOutSlowIn, duration: Durations.medium4, @@ -86,7 +81,7 @@ class SimpleGalleryState extends State { "assets/img/button_bg_contacts.png", fit: BoxFit.cover, height: - constraints.maxHeight - 48, //48 - external padding + constraints.maxHeight, //48 - external padding ), ), ), @@ -96,7 +91,7 @@ class SimpleGalleryState extends State { _updateWidths(isHovered, 3); }, child: AnimatedContainer( - height: constraints.maxHeight - 48, + height: constraints.maxHeight, width: widthsList[3], curve: Curves.fastOutSlowIn, duration: Durations.medium4, @@ -104,14 +99,12 @@ class SimpleGalleryState extends State { "assets/img/button_bg_art.png", fit: BoxFit.cover, height: - constraints.maxHeight - 48, //48 - external padding + constraints.maxHeight, //48 - external padding ), ), ), ], - ) - ], - ), + ), ); }); } diff --git a/pubspec.lock b/pubspec.lock index d1da8d4..926bd40 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -185,10 +185,10 @@ packages: dependency: "direct main" description: name: url_launcher - sha256: d25bb0ca00432a5e1ee40e69c36c85863addf7cc45e433769d61bed3fe81fd96 + sha256: c512655380d241a337521703af62d2c122bf7b77a46ff7dd750092aa9433499c url: "https://pub.dev" source: hosted - version: "6.2.3" + version: "6.2.4" url_launcher_android: dependency: transitive description: