|
|
|
|
@ -7,45 +7,42 @@ import 'notification_icon.dart';
|
|
|
|
|
class HomeAppBar extends StatefulWidget implements PreferredSizeWidget {
|
|
|
|
|
final int notificationCount;
|
|
|
|
|
final String userImage;
|
|
|
|
|
const HomeAppBar({Key key, this.notificationCount, this.userImage}) : super(key: key);
|
|
|
|
|
GlobalKey<ScaffoldState> scaffoldKey;
|
|
|
|
|
HomeAppBar({Key key, this.notificationCount, this.userImage, this.scaffoldKey}) : super(key: key);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
State<HomeAppBar> createState() => _AppBarState();
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Size get preferredSize => const Size.fromHeight(150);
|
|
|
|
|
Size get preferredSize => const Size.fromHeight(60);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class _AppBarState extends State<HomeAppBar> {
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return Padding(
|
|
|
|
|
padding: const EdgeInsets.only(top: 30.0, right: 12, left: 12),
|
|
|
|
|
child: PreferredSize(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
UserImage(
|
|
|
|
|
return AppBar(
|
|
|
|
|
automaticallyImplyLeading: false,
|
|
|
|
|
elevation: 0,
|
|
|
|
|
title: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: (){
|
|
|
|
|
widget.scaffoldKey.currentState.openDrawer();
|
|
|
|
|
},
|
|
|
|
|
child: UserImage(
|
|
|
|
|
url: widget.userImage,
|
|
|
|
|
),
|
|
|
|
|
NotificationIcon(
|
|
|
|
|
notificationCount: 3,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
// SizedBox(height: 15),
|
|
|
|
|
// Column(
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
// children: [
|
|
|
|
|
// Text("welcome," , style: Theme.of(context).textTheme.titleLarge?.copyWith(fontWeight: FontWeight.w500, color: AppColor.neutral20)),
|
|
|
|
|
// Text("Engineer name" , style: Theme.of(context).textTheme.headlineMedium?.copyWith(fontWeight: FontWeight.w600)),
|
|
|
|
|
// ],
|
|
|
|
|
// )
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
NotificationIcon(
|
|
|
|
|
notificationCount: 3,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|