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

Fix[study-wrapper]: Back button overlapping #522

Merged
merged 2 commits into from
Jun 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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