11import 'package:auto_route/auto_route.dart' ;
22import 'package:flutter/material.dart' ;
3+ import 'package:flutter/services.dart' ;
34import 'package:gap/gap.dart' ;
45import 'package:sizzle_starter/src/core/route/app_route.gr.dart' ;
56import 'package:sizzle_starter/src/core/utils/extensions/context_extension.dart' ;
@@ -24,40 +25,48 @@ class EAppBar extends StatelessWidget implements PreferredSizeWidget {
2425 final isInDashboard = isBackButtonVisible != null
2526 ? ! isBackButtonVisible!
2627 : context.router.current.name == DashboardRoute .name;
27- return ColoredBox (
28- color: Colors .white,
29- child: SafeArea (
30- child: Row (
31- mainAxisAlignment: MainAxisAlignment .spaceBetween,
32- children: [
33- if (! isInDashboard)
34- IconButton (
35- padding: const EdgeInsets .all (16.0 ),
36- onPressed: context.maybePop,
37- icon: const Icon (EcommerceIcons .arrow),
38- ),
39- Row (
40- mainAxisSize: MainAxisSize .min,
41- children: [
42- if (isInDashboard) const Gap (24.0 ),
43- Text (
44- title,
45- style: titleStyle ?? context.h2,
46- ),
47- ],
48- ),
49- Row (
50- children: [
28+ return AnnotatedRegion <SystemUiOverlayStyle >(
29+ value: SystemUiOverlayStyle .light.copyWith (
30+ statusBarColor: Colors .white,
31+ statusBarIconBrightness: Brightness .dark,
32+ statusBarBrightness: Brightness .light,
33+ systemNavigationBarColor: Colors .white,
34+ ),
35+ child: ColoredBox (
36+ color: Colors .white,
37+ child: SafeArea (
38+ child: Row (
39+ mainAxisAlignment: MainAxisAlignment .spaceBetween,
40+ children: [
41+ if (! isInDashboard)
5142 IconButton (
52- padding: const EdgeInsets .all (14 ),
53- onPressed: onNotificationTap ??
54- () => context.pushRoute (const NotificationsRoute ()),
55- icon: const Icon (EcommerceIcons .bell),
43+ padding: const EdgeInsets .all (16.0 ),
44+ onPressed: context.maybePop,
45+ icon: const Icon (EcommerceIcons .arrow),
5646 ),
57- const Gap (24.0 ),
58- ],
59- ),
60- ],
47+ Row (
48+ mainAxisSize: MainAxisSize .min,
49+ children: [
50+ if (isInDashboard) const Gap (24.0 ),
51+ Text (
52+ title,
53+ style: titleStyle ?? context.h2,
54+ ),
55+ ],
56+ ),
57+ Row (
58+ children: [
59+ IconButton (
60+ padding: const EdgeInsets .all (14 ),
61+ onPressed:
62+ onNotificationTap ?? () => context.pushRoute (const NotificationsRoute ()),
63+ icon: const Icon (EcommerceIcons .bell),
64+ ),
65+ const Gap (24.0 ),
66+ ],
67+ ),
68+ ],
69+ ),
6170 ),
6271 ),
6372 );
0 commit comments