mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-04-30 05:54:26 +02:00
fix: Patching Screen draw-behind Navigation Bar (#1945)
Co-authored-by: surya-technovert <surya.m@technovert.com>
This commit is contained in:
parent
96a21a5564
commit
f1b25d09da
@ -25,114 +25,114 @@ class InstallerView extends StatelessWidget {
|
|||||||
model.onPopAttempt(context);
|
model.onPopAttempt(context);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: SafeArea(
|
child: Scaffold(
|
||||||
top: false,
|
floatingActionButton: Visibility(
|
||||||
bottom: model.isPatching,
|
visible:
|
||||||
child: Scaffold(
|
!model.isPatching && !model.hasErrors && !model.isInstalling,
|
||||||
floatingActionButton: Visibility(
|
child: HapticFloatingActionButtonExtended(
|
||||||
visible:
|
label: Text(
|
||||||
!model.isPatching && !model.hasErrors && !model.isInstalling,
|
model.isInstalled
|
||||||
child: HapticFloatingActionButtonExtended(
|
? t.installerView.openButton
|
||||||
label: Text(
|
: t.installerView.installButton,
|
||||||
model.isInstalled
|
|
||||||
? t.installerView.openButton
|
|
||||||
: t.installerView.installButton,
|
|
||||||
),
|
|
||||||
icon: model.isInstalled
|
|
||||||
? const Icon(Icons.open_in_new)
|
|
||||||
: const Icon(Icons.file_download_outlined),
|
|
||||||
onPressed: model.isInstalled
|
|
||||||
? () => {
|
|
||||||
model.openApp(),
|
|
||||||
model.cleanPatcher(),
|
|
||||||
Navigator.of(context).pop(),
|
|
||||||
}
|
|
||||||
: () => model.installTypeDialog(context),
|
|
||||||
elevation: 0,
|
|
||||||
),
|
),
|
||||||
|
icon: model.isInstalled
|
||||||
|
? const Icon(Icons.open_in_new)
|
||||||
|
: const Icon(Icons.file_download_outlined),
|
||||||
|
onPressed: model.isInstalled
|
||||||
|
? () => {
|
||||||
|
model.openApp(),
|
||||||
|
model.cleanPatcher(),
|
||||||
|
Navigator.of(context).pop(),
|
||||||
|
}
|
||||||
|
: () => model.installTypeDialog(context),
|
||||||
|
elevation: 0,
|
||||||
),
|
),
|
||||||
floatingActionButtonLocation:
|
),
|
||||||
FloatingActionButtonLocation.endContained,
|
floatingActionButtonLocation:
|
||||||
bottomNavigationBar: Visibility(
|
FloatingActionButtonLocation.endContained,
|
||||||
visible: !model.isPatching,
|
bottomNavigationBar: Visibility(
|
||||||
child: BottomAppBar(
|
visible: !model.isPatching,
|
||||||
child: Row(
|
child: BottomAppBar(
|
||||||
children: <Widget>[
|
child: Row(
|
||||||
Visibility(
|
children: <Widget>[
|
||||||
visible: !model.hasErrors,
|
|
||||||
child: IconButton.filledTonal(
|
|
||||||
tooltip: t.installerView.exportApkButtonTooltip,
|
|
||||||
icon: const Icon(Icons.save),
|
|
||||||
onPressed: () => model.onButtonPressed(0),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
IconButton.filledTonal(
|
|
||||||
tooltip: t.installerView.exportLogButtonTooltip,
|
|
||||||
icon: const Icon(Icons.post_add),
|
|
||||||
onPressed: () => model.onButtonPressed(1),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
body: NotificationListener<ScrollNotification>(
|
|
||||||
onNotification: model.handleAutoScrollNotification,
|
|
||||||
child: Stack(
|
|
||||||
children: [
|
|
||||||
CustomScrollView(
|
|
||||||
key: model.logCustomScrollKey,
|
|
||||||
controller: model.scrollController,
|
|
||||||
slivers: <Widget>[
|
|
||||||
CustomSliverAppBar(
|
|
||||||
title: Text(
|
|
||||||
model.headerLogs,
|
|
||||||
style: GoogleFonts.inter(
|
|
||||||
color:
|
|
||||||
Theme.of(context).textTheme.titleLarge!.color,
|
|
||||||
),
|
|
||||||
maxLines: 1,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
),
|
|
||||||
onBackButtonPressed: () => Navigator.maybePop(context),
|
|
||||||
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,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: model.showAutoScrollButton,
|
visible: !model.hasErrors,
|
||||||
child: Align(
|
child: IconButton.filledTonal(
|
||||||
alignment: const Alignment(0.9, 0.97),
|
tooltip: t.installerView.exportApkButtonTooltip,
|
||||||
child: FloatingActionButton(
|
icon: const Icon(Icons.save),
|
||||||
onPressed: model.scrollToBottom,
|
onPressed: () => model.onButtonPressed(0),
|
||||||
child: const Icon(Icons.arrow_downward_rounded),
|
),
|
||||||
|
),
|
||||||
|
IconButton.filledTonal(
|
||||||
|
tooltip: t.installerView.exportLogButtonTooltip,
|
||||||
|
icon: const Icon(Icons.post_add),
|
||||||
|
onPressed: () => model.onButtonPressed(1),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
body: NotificationListener<ScrollNotification>(
|
||||||
|
onNotification: model.handleAutoScrollNotification,
|
||||||
|
child: Scaffold(
|
||||||
|
body: CustomScrollView(
|
||||||
|
key: model.logCustomScrollKey,
|
||||||
|
controller: model.scrollController,
|
||||||
|
slivers: <Widget>[
|
||||||
|
CustomSliverAppBar(
|
||||||
|
title: Text(
|
||||||
|
model.headerLogs,
|
||||||
|
style: GoogleFonts.inter(
|
||||||
|
color: Theme.of(context).textTheme.titleLarge!.color,
|
||||||
|
),
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
onBackButtonPressed: () => Navigator.maybePop(context),
|
||||||
|
bottom: PreferredSize(
|
||||||
|
preferredSize: const Size(double.infinity, 1.0),
|
||||||
|
child: GradientProgressIndicator(
|
||||||
|
progress: model.progress,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SliverPadding(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
left: 20,
|
||||||
|
right: 20,
|
||||||
|
top: 20,
|
||||||
|
bottom: MediaQuery.paddingOf(context).bottom,
|
||||||
|
),
|
||||||
|
sliver: SliverList(
|
||||||
|
delegate: SliverChildListDelegate.fixed(
|
||||||
|
<Widget>[
|
||||||
|
CustomCard(
|
||||||
|
child: Text(
|
||||||
|
model.logs,
|
||||||
|
style: GoogleFonts.jetBrainsMono(
|
||||||
|
fontSize: 13,
|
||||||
|
height: 1.5,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
floatingActionButtonLocation:
|
||||||
|
FloatingActionButtonLocation.endDocked,
|
||||||
|
floatingActionButton: Visibility(
|
||||||
|
visible: model.showAutoScrollButton,
|
||||||
|
child: Align(
|
||||||
|
alignment: const Alignment(1, 0.85),
|
||||||
|
child: FloatingActionButton(
|
||||||
|
onPressed: model.scrollToBottom,
|
||||||
|
child: const Icon(Icons.arrow_downward_rounded),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -49,12 +49,8 @@ class NavigationViewModel extends IndexTrackingViewModel {
|
|||||||
|
|
||||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
|
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
|
||||||
SystemChrome.setSystemUIOverlayStyle(
|
SystemChrome.setSystemUIOverlayStyle(
|
||||||
SystemUiOverlayStyle(
|
const SystemUiOverlayStyle(
|
||||||
systemNavigationBarColor: Colors.transparent,
|
systemNavigationBarColor: Colors.transparent,
|
||||||
systemNavigationBarIconBrightness:
|
|
||||||
DynamicTheme.of(context)!.theme.brightness == Brightness.light
|
|
||||||
? Brightness.dark
|
|
||||||
: Brightness.light,
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user