Skip to content

Commit

Permalink
Fix status bar issue (#2842)
Browse files Browse the repository at this point in the history
## Description

Status bar was not adapting to it's background. See status bar on both
before and after screen recordings here:

#### Before


https://github.com/user-attachments/assets/dd899686-43f5-4ab4-ad2c-865bfba1e4d9


#### After



https://github.com/user-attachments/assets/5c0d3544-30ed-43ac-9e7d-5002c6b0add6
  • Loading branch information
vishnukvmd authored Aug 23, 2024
2 parents cdecf08 + 2d4225f commit ad6028d
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions mobile/lib/ui/tabs/home_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ class _HomeWidgetState extends State<HomeWidget> {
static final _settingsPage = SettingsPage(
emailNotifier: UserService.instance.emailValueNotifier,
);
static const _headerWidget = HeaderWidget();

final _logger = Logger("HomeWidgetState");
final _selectedFiles = SelectedFiles();
Expand Down Expand Up @@ -359,6 +358,15 @@ class _HomeWidgetState extends State<HomeWidget> {
},
),
),

///To fix the status bar not adapting it's color when switching
///screens the have different appbar colours.
appBar: PreferredSize(
preferredSize: const Size.fromHeight(0),
child: AppBar(
backgroundColor: getEnteColorScheme(context).backgroundBase,
),
),
resizeToAvoidBottomInset: false,
),
),
Expand Down Expand Up @@ -418,9 +426,9 @@ class _HomeWidgetState extends State<HomeWidget> {
physics: const BouncingScrollPhysics(),
children: [
_showShowBackupHook
? const StartBackupHookWidget(headerWidget: _headerWidget)
? const StartBackupHookWidget(headerWidget: HeaderWidget())
: HomeGalleryWidget(
header: _headerWidget,
header: const HeaderWidget(),
footer: const SizedBox(
height: 160,
),
Expand Down

0 comments on commit ad6028d

Please sign in to comment.