Skip to content

Commit 9737b79

Browse files
committed
⬇️ add hiveback in Basic app bar
1 parent 626615f commit 9737b79

File tree

1 file changed

+24
-20
lines changed

1 file changed

+24
-20
lines changed

lib/common/widgets/appbar/app_bar.dart

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ import 'package:spotify_with_flutter/core/configs/theme/app_color.dart';
44

55
class BasicAppBar extends StatelessWidget implements PreferredSizeWidget {
66
final Widget title;
7+
final bool hiveBack;
78

89
const BasicAppBar({
910
super.key,
11+
this.hiveBack = false,
1012
this.title = const Text(''),
1113
});
1214

@@ -17,26 +19,28 @@ class BasicAppBar extends StatelessWidget implements PreferredSizeWidget {
1719
centerTitle: true,
1820
backgroundColor: Colors.transparent,
1921
elevation: 0,
20-
leading: IconButton(
21-
onPressed: () {
22-
Navigator.pop(context);
23-
},
24-
icon: Container(
25-
height: 50,
26-
width: 50,
27-
decoration: BoxDecoration(
28-
color: context.isDarkMode
29-
? AppColors.white.withOpacity(0.03)
30-
: AppColors.dark.withOpacity(0.04),
31-
shape: BoxShape.circle,
32-
),
33-
child: Icon(
34-
Icons.arrow_back_ios_new,
35-
size: 20,
36-
color: context.isDarkMode ? AppColors.white : AppColors.dark,
37-
),
38-
),
39-
),
22+
leading: hiveBack
23+
? null
24+
: IconButton(
25+
onPressed: () {
26+
Navigator.pop(context);
27+
},
28+
icon: Container(
29+
height: 50,
30+
width: 50,
31+
decoration: BoxDecoration(
32+
color: context.isDarkMode
33+
? AppColors.white.withOpacity(0.03)
34+
: AppColors.dark.withOpacity(0.04),
35+
shape: BoxShape.circle,
36+
),
37+
child: Icon(
38+
Icons.arrow_back_ios_new,
39+
size: 20,
40+
color: context.isDarkMode ? AppColors.white : AppColors.dark,
41+
),
42+
),
43+
),
4044
);
4145
}
4246

0 commit comments

Comments
 (0)