fix: Patching Screen draw-behind Navigation Bar (#1945)

Co-authored-by: surya-technovert <surya.m@technovert.com>
This commit is contained in:
Snehith 2024-07-29 23:28:40 +05:30 committed by GitHub
parent 96a21a5564
commit f1b25d09da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 101 additions and 105 deletions

View File

@ -25,9 +25,6 @@ class InstallerView extends StatelessWidget {
model.onPopAttempt(context);
}
},
child: SafeArea(
top: false,
bottom: model.isPatching,
child: Scaffold(
floatingActionButton: Visibility(
visible:
@ -77,9 +74,8 @@ class InstallerView extends StatelessWidget {
),
body: NotificationListener<ScrollNotification>(
onNotification: model.handleAutoScrollNotification,
child: Stack(
children: [
CustomScrollView(
child: Scaffold(
body: CustomScrollView(
key: model.logCustomScrollKey,
controller: model.scrollController,
slivers: <Widget>[
@ -87,8 +83,7 @@ class InstallerView extends StatelessWidget {
title: Text(
model.headerLogs,
style: GoogleFonts.inter(
color:
Theme.of(context).textTheme.titleLarge!.color,
color: Theme.of(context).textTheme.titleLarge!.color,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
@ -102,7 +97,12 @@ class InstallerView extends StatelessWidget {
),
),
SliverPadding(
padding: const EdgeInsets.all(20.0),
padding: EdgeInsets.only(
left: 20,
right: 20,
top: 20,
bottom: MediaQuery.paddingOf(context).bottom,
),
sliver: SliverList(
delegate: SliverChildListDelegate.fixed(
<Widget>[
@ -121,18 +121,18 @@ class InstallerView extends StatelessWidget {
),
],
),
Visibility(
floatingActionButtonLocation:
FloatingActionButtonLocation.endDocked,
floatingActionButton: Visibility(
visible: model.showAutoScrollButton,
child: Align(
alignment: const Alignment(0.9, 0.97),
alignment: const Alignment(1, 0.85),
child: FloatingActionButton(
onPressed: model.scrollToBottom,
child: const Icon(Icons.arrow_downward_rounded),
),
),
),
],
),
),
),
),

View File

@ -49,12 +49,8 @@ class NavigationViewModel extends IndexTrackingViewModel {
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
SystemChrome.setSystemUIOverlayStyle(
SystemUiOverlayStyle(
const SystemUiOverlayStyle(
systemNavigationBarColor: Colors.transparent,
systemNavigationBarIconBrightness:
DynamicTheme.of(context)!.theme.brightness == Brightness.light
? Brightness.dark
: Brightness.light,
),
);
}