fix: Installer buttons should be fixed to bottom

This commit is contained in:
Alberto Ponces 2022-09-12 11:14:54 +01:00
parent 7e8ccdff43
commit 38088d2f6a

View File

@ -66,7 +66,7 @@ class InstallerView extends StatelessWidget {
), ),
), ),
SliverPadding( SliverPadding(
padding: const EdgeInsets.all(20.0), padding: const EdgeInsets.all(20.0).copyWith(bottom: 20.0),
sliver: SliverList( sliver: SliverList(
delegate: SliverChildListDelegate.fixed( delegate: SliverChildListDelegate.fixed(
<Widget>[ <Widget>[
@ -79,15 +79,21 @@ class InstallerView extends StatelessWidget {
), ),
), ),
), ),
Padding( ],
padding: const EdgeInsets.symmetric(
vertical: 16,
horizontal: 0,
), ),
),
),
SliverFillRemaining(
hasScrollBody: false,
child: Align(
alignment: Alignment.bottomCenter,
child: Visibility( child: Visibility(
visible: !model.isPatching, visible: !model.isPatching,
child: Padding(
padding: const EdgeInsets.all(20.0).copyWith(top: 0.0),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Visibility( Visibility(
visible: model.isInstalled, visible: model.isInstalled,
@ -105,8 +111,8 @@ class InstallerView extends StatelessWidget {
visible: !model.isInstalled, visible: !model.isInstalled,
child: CustomMaterialButton( child: CustomMaterialButton(
isFilled: false, isFilled: false,
label: I18nText( label:
'installerView.installRootButton'), I18nText('installerView.installRootButton'),
isExpanded: true, isExpanded: true,
onPressed: () => model.installResult(true), onPressed: () => model.installResult(true),
), ),
@ -120,8 +126,7 @@ class InstallerView extends StatelessWidget {
Visibility( Visibility(
visible: !model.isInstalled, visible: !model.isInstalled,
child: CustomMaterialButton( child: CustomMaterialButton(
label: label: I18nText('installerView.installButton'),
I18nText('installerView.installButton'),
isExpanded: true, isExpanded: true,
onPressed: () => model.installResult(false), onPressed: () => model.installResult(false),
), ),
@ -130,8 +135,6 @@ class InstallerView extends StatelessWidget {
), ),
), ),
), ),
],
),
), ),
), ),
], ],