Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Commit

Permalink
fix(study-wrapper): back button padding (#522)
Browse files Browse the repository at this point in the history
Co-authored-by: Pierre-Louis <6655696+guidezpl@users.noreply.github.com>
  • Loading branch information
ayshiff and guidezpl authored Jun 22, 2021
1 parent 5c61196 commit e6a83f8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion lib/pages/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1126,9 +1126,11 @@ class StudyWrapper extends StatefulWidget {
Key key,
this.study,
this.alignment = AlignmentDirectional.bottomStart,
this.hasBottomNavBar = false,
}) : super(key: key);

final Widget study;
final bool hasBottomNavBar;
final AlignmentDirectional alignment;

@override
Expand All @@ -1154,7 +1156,11 @@ class _StudyWrapperState extends State<StudyWrapper> {
child: Align(
alignment: widget.alignment,
child: Padding(
padding: const EdgeInsets.all(16),
padding: EdgeInsets.symmetric(
horizontal: 16.0,
vertical: widget.hasBottomNavBar
? kBottomNavigationBarHeight + 16.0
: 16.0),
child: Semantics(
sortKey: const OrdinalSortKey(0),
label: GalleryLocalizations.of(context).backToGallery,
Expand Down
3 changes: 2 additions & 1 deletion lib/routes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ class RouteConfiguration {
Path(
r'^' + reply_routes.homeRoute,
// ignore: prefer_const_constructors
(context, match) => StudyWrapper(study: reply.ReplyApp())),
(context, match) =>
const StudyWrapper(study: reply.ReplyApp(), hasBottomNavBar: true)),
Path(
r'^' + starter_app_routes.defaultRoute,
(context, match) => const StudyWrapper(
Expand Down

0 comments on commit e6a83f8

Please sign in to comment.