mirror of
https://github.com/revanced/revanced-manager
synced 2024-05-14 13:56:57 +02:00
fix: nav overlapping install buttons.
This commit is contained in:
parent
9561153bfb
commit
32fabcfa3f
@ -18,130 +18,133 @@ class InstallerView extends StatelessWidget {
|
|||||||
onModelReady: (model) => model.initialize(context),
|
onModelReady: (model) => model.initialize(context),
|
||||||
viewModelBuilder: () => InstallerViewModel(),
|
viewModelBuilder: () => InstallerViewModel(),
|
||||||
builder: (context, model, child) => WillPopScope(
|
builder: (context, model, child) => WillPopScope(
|
||||||
child: Scaffold(
|
child: SafeArea(
|
||||||
body: CustomScrollView(
|
top: false,
|
||||||
controller: model.scrollController,
|
child: Scaffold(
|
||||||
slivers: <Widget>[
|
body: CustomScrollView(
|
||||||
CustomSliverAppBar(
|
controller: model.scrollController,
|
||||||
title: Text(
|
slivers: <Widget>[
|
||||||
model.headerLogs,
|
CustomSliverAppBar(
|
||||||
style: GoogleFonts.inter(
|
title: Text(
|
||||||
color: Theme.of(context).textTheme.headline6!.color,
|
model.headerLogs,
|
||||||
),
|
style: GoogleFonts.inter(
|
||||||
),
|
color: Theme.of(context).textTheme.headline6!.color,
|
||||||
onBackButtonPressed: () => model.onWillPop(context),
|
|
||||||
actions: <Widget>[
|
|
||||||
Visibility(
|
|
||||||
visible: !model.isPatching && !model.hasErrors,
|
|
||||||
child: CustomPopupMenu(
|
|
||||||
onSelected: (value) => model.onMenuSelection(value),
|
|
||||||
children: {
|
|
||||||
0: I18nText(
|
|
||||||
'installerView.shareApkMenuOption',
|
|
||||||
child: const Text(
|
|
||||||
'',
|
|
||||||
style: TextStyle(
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
1: I18nText(
|
|
||||||
'installerView.shareLogMenuOption',
|
|
||||||
child: const Text(
|
|
||||||
'',
|
|
||||||
style: TextStyle(
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
onBackButtonPressed: () => model.onWillPop(context),
|
||||||
bottom: PreferredSize(
|
actions: <Widget>[
|
||||||
preferredSize: const Size(double.infinity, 1.0),
|
Visibility(
|
||||||
child:
|
visible: !model.isPatching && !model.hasErrors,
|
||||||
GradientProgressIndicator(progress: model.progress!)),
|
child: CustomPopupMenu(
|
||||||
),
|
onSelected: (value) => model.onMenuSelection(value),
|
||||||
SliverPadding(
|
children: {
|
||||||
padding: const EdgeInsets.all(20.0),
|
0: I18nText(
|
||||||
sliver: SliverList(
|
'installerView.shareApkMenuOption',
|
||||||
delegate: SliverChildListDelegate.fixed(
|
child: const Text(
|
||||||
<Widget>[
|
'',
|
||||||
CustomCard(
|
style: TextStyle(
|
||||||
child: Text(
|
fontWeight: FontWeight.bold,
|
||||||
model.logs,
|
),
|
||||||
style: GoogleFonts.jetBrainsMono(
|
),
|
||||||
fontSize: 13,
|
),
|
||||||
height: 1.5,
|
1: I18nText(
|
||||||
|
'installerView.shareLogMenuOption',
|
||||||
|
child: const Text(
|
||||||
|
'',
|
||||||
|
style: TextStyle(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
bottom: PreferredSize(
|
||||||
|
preferredSize: const Size(double.infinity, 1.0),
|
||||||
|
child:
|
||||||
|
GradientProgressIndicator(progress: model.progress!)),
|
||||||
|
),
|
||||||
|
SliverPadding(
|
||||||
|
padding: const EdgeInsets.all(20.0),
|
||||||
|
sliver: SliverList(
|
||||||
|
delegate: SliverChildListDelegate.fixed(
|
||||||
|
<Widget>[
|
||||||
|
CustomCard(
|
||||||
|
child: Text(
|
||||||
|
model.logs,
|
||||||
|
style: GoogleFonts.jetBrainsMono(
|
||||||
|
fontSize: 13,
|
||||||
|
height: 1.5,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
SliverFillRemaining(
|
||||||
SliverFillRemaining(
|
hasScrollBody: false,
|
||||||
hasScrollBody: false,
|
child: Align(
|
||||||
child: Align(
|
alignment: Alignment.bottomCenter,
|
||||||
alignment: Alignment.bottomCenter,
|
child: Visibility(
|
||||||
child: Visibility(
|
visible: !model.isPatching && !model.hasErrors,
|
||||||
visible: !model.isPatching && !model.hasErrors,
|
child: Padding(
|
||||||
child: Padding(
|
padding: const EdgeInsets.all(20.0).copyWith(top: 0.0),
|
||||||
padding: const EdgeInsets.all(20.0).copyWith(top: 0.0),
|
child: Row(
|
||||||
child: Row(
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
children: <Widget>[
|
||||||
children: <Widget>[
|
Visibility(
|
||||||
Visibility(
|
visible: model.isInstalled,
|
||||||
visible: model.isInstalled,
|
child: CustomMaterialButton(
|
||||||
child: CustomMaterialButton(
|
label: I18nText('installerView.openButton'),
|
||||||
label: I18nText('installerView.openButton'),
|
isExpanded: true,
|
||||||
isExpanded: true,
|
onPressed: () {
|
||||||
onPressed: () {
|
model.openApp();
|
||||||
model.openApp();
|
model.cleanPatcher();
|
||||||
model.cleanPatcher();
|
Navigator.of(context).pop();
|
||||||
Navigator.of(context).pop();
|
},
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Visibility(
|
|
||||||
visible: !model.isInstalled && model.isRooted,
|
|
||||||
child: CustomMaterialButton(
|
|
||||||
isFilled: false,
|
|
||||||
label:
|
|
||||||
I18nText('installerView.installRootButton'),
|
|
||||||
isExpanded: true,
|
|
||||||
onPressed: () => model.installResult(
|
|
||||||
context,
|
|
||||||
true,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
Visibility(
|
||||||
Visibility(
|
visible: !model.isInstalled && model.isRooted,
|
||||||
visible: !model.isInstalled,
|
child: CustomMaterialButton(
|
||||||
child: const SizedBox(
|
isFilled: false,
|
||||||
width: 16,
|
label:
|
||||||
),
|
I18nText('installerView.installRootButton'),
|
||||||
),
|
isExpanded: true,
|
||||||
Visibility(
|
onPressed: () => model.installResult(
|
||||||
visible: !model.isInstalled,
|
context,
|
||||||
child: CustomMaterialButton(
|
true,
|
||||||
label: I18nText('installerView.installButton'),
|
),
|
||||||
isExpanded: true,
|
|
||||||
onPressed: () => model.installResult(
|
|
||||||
context,
|
|
||||||
false,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
Visibility(
|
||||||
],
|
visible: !model.isInstalled,
|
||||||
|
child: const SizedBox(
|
||||||
|
width: 16,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Visibility(
|
||||||
|
visible: !model.isInstalled,
|
||||||
|
child: CustomMaterialButton(
|
||||||
|
label: I18nText('installerView.installButton'),
|
||||||
|
isExpanded: true,
|
||||||
|
onPressed: () => model.installResult(
|
||||||
|
context,
|
||||||
|
false,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
onWillPop: () => model.onWillPop(context),
|
onWillPop: () => model.onWillPop(context),
|
||||||
|
Loading…
Reference in New Issue
Block a user