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

Commit

Permalink
refactor: Make the page scrollable
Browse files Browse the repository at this point in the history
  • Loading branch information
reasje committed Sep 5, 2024
1 parent 573f190 commit 30f779a
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,30 @@ abstract class RecoveryPhraseBasePage extends HookConsumerWidget {

Widget? buildAccept(BuildContext context, WidgetRef ref) => null;

Widget? buildEmailInput(BuildContext context, WidgetRef ref) => null;

@override
Widget build(BuildContext context, WidgetRef ref) {
final acceptComponent = buildAccept(context, ref);

return MxcPage(
layout: LayoutType.column,
layout: LayoutType.scrollable,
useSplashBackground: true,
childrenPadding: const EdgeInsets.symmetric(horizontal: 24),
presenter: ref.watch(presenter),
appBar: buildAppBar(context, ref),
footer: buildFooter(context, ref),
resizeToAvoidBottomInset: true,
children: [
buildAppLogo(context),
const Spacer(),
const SizedBox(height: 120),
buildAlert(context),
const Spacer(),
if (buildEmailInput(context, ref) != null) ...[
const SizedBox(height: 18),
buildEmailInput(context, ref)!,
],
if (acceptComponent != null) ...[
const SizedBox(height: 130),
acceptComponent,
const SizedBox(height: 16),
]
Expand Down

0 comments on commit 30f779a

Please sign in to comment.