merge
This commit is contained in:
commit
a908a5ef44
BIN
assets/logos/fcscDark.png
Normal file
BIN
assets/logos/fcscDark.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.3 KiB |
@ -1137,134 +1137,203 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: ListView(
|
child: ListView(
|
||||||
children: [
|
children: [
|
||||||
|
// DrawerHeader(
|
||||||
|
// child: Column(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
|
// crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
|
// children: [
|
||||||
|
// Row(
|
||||||
|
// children: [
|
||||||
|
// SizedBox(
|
||||||
|
// width: mywidth / 8,
|
||||||
|
// child: Image(
|
||||||
|
// image: AssetImage('assets/logos/fcsc.png'),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// Divider(thickness: 1, color: Colors.grey),
|
||||||
|
// InkWell(
|
||||||
|
// onTap: () {
|
||||||
|
// if (userId != 'guest') context.go('/editProfile');
|
||||||
|
// },
|
||||||
|
// child: Row(
|
||||||
|
// children: [
|
||||||
|
// SizedBox(
|
||||||
|
// width: mywidth / 8,
|
||||||
|
// height: mywidth / 8,
|
||||||
|
// child: ClipOval(
|
||||||
|
// child: _avatarUrl.isNotEmpty
|
||||||
|
// ? Image(
|
||||||
|
// image: NetworkImage(_avatarUrl),
|
||||||
|
// fit: BoxFit.cover,
|
||||||
|
// width: double.infinity,
|
||||||
|
// height: double.infinity,
|
||||||
|
// )
|
||||||
|
// : Image(
|
||||||
|
// image: AssetImage(
|
||||||
|
// 'assets/edit_profile/profile.jpg',
|
||||||
|
// ),
|
||||||
|
// fit: BoxFit.cover,
|
||||||
|
// width: double.infinity,
|
||||||
|
// height: double.infinity,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// //child: Image(image: AssetImage('assets/edit_profile/profile.png'))
|
||||||
|
// ),
|
||||||
|
// SizedBox(
|
||||||
|
// width: mywidth / 20,
|
||||||
|
// ),
|
||||||
|
// Expanded(
|
||||||
|
// child: Column(
|
||||||
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
// children: [
|
||||||
|
// if (userId == "guest") ...[
|
||||||
|
// Text(
|
||||||
|
// userName ?? 'Guest User',
|
||||||
|
// style: TextStyle(
|
||||||
|
// color: isDarkTheme
|
||||||
|
// ? Color(0xFFAAAAAA)
|
||||||
|
// : null,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ] else ...[
|
||||||
|
// Text(
|
||||||
|
// userName ?? 'Loading...',
|
||||||
|
// style: TextStyle(
|
||||||
|
// color: isDarkTheme
|
||||||
|
// ? Color(0xFFAAAAAA)
|
||||||
|
// : null,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// Tooltip(
|
||||||
|
// message: userEmail ??
|
||||||
|
// 'Loading...', // Shows full email on hover
|
||||||
|
// child: SizedBox(
|
||||||
|
// width: MediaQuery.of(context)
|
||||||
|
// .size
|
||||||
|
// .width *
|
||||||
|
// 0.6, // Adjust width as needed
|
||||||
|
// child: Text(
|
||||||
|
// userEmail ?? 'Loading...',
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontSize: 12,
|
||||||
|
// color: isDarkTheme
|
||||||
|
// ? Color(0xFFAAAAAA)
|
||||||
|
// : null,
|
||||||
|
// fontFamily: context.translate(
|
||||||
|
// 'Roboto',
|
||||||
|
// 'NotoKufi',
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// // softWrap: true,
|
||||||
|
// overflow: TextOverflow.ellipsis,
|
||||||
|
// maxLines: 1,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
DrawerHeader(
|
DrawerHeader(
|
||||||
child: Column(
|
child: LayoutBuilder(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
builder: (context, constraints) {
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
final width = constraints.maxWidth;
|
||||||
children: [
|
final avatarSize =
|
||||||
Row(
|
width < 600 ? 50.0 : 60.0; // adjust for iPad/tablet
|
||||||
|
final spacing = width < 600 ? 8.0 : 12.0;
|
||||||
|
|
||||||
|
return Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
Row(
|
||||||
width: mywidth / 8,
|
children: [
|
||||||
child: Image(
|
SizedBox(
|
||||||
image: AssetImage('assets/logos/fcsc.png'),
|
width:
|
||||||
|
avatarSize, // fixed size instead of mywidth / 8
|
||||||
|
child: isDarkTheme
|
||||||
|
? Image.asset('assets/logos/fcscDark.png')
|
||||||
|
: Image.asset('assets/logos/fcsc.png'),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Divider(thickness: 1, color: Colors.grey),
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
if (userId != 'guest')
|
||||||
|
context.go('/editProfile');
|
||||||
|
},
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
ClipOval(
|
||||||
|
child: _avatarUrl.isNotEmpty
|
||||||
|
? Image.network(
|
||||||
|
_avatarUrl,
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
width: avatarSize,
|
||||||
|
height: avatarSize,
|
||||||
|
)
|
||||||
|
: Image.asset(
|
||||||
|
'assets/edit_profile/profile.jpg',
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
width: avatarSize,
|
||||||
|
height: avatarSize,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: spacing),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
userName ??
|
||||||
|
(userId == "guest"
|
||||||
|
? 'Guest User'
|
||||||
|
: 'Loading...'),
|
||||||
|
style: TextStyle(
|
||||||
|
color: isDarkTheme
|
||||||
|
? Color(0xFFAAAAAA)
|
||||||
|
: null,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (userId != "guest")
|
||||||
|
Tooltip(
|
||||||
|
message: userEmail ?? 'Loading...',
|
||||||
|
child: Text(
|
||||||
|
userEmail ?? 'Loading...',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 12,
|
||||||
|
color: isDarkTheme
|
||||||
|
? Color(0xFFAAAAAA)
|
||||||
|
: null,
|
||||||
|
fontFamily: context.translate(
|
||||||
|
'Roboto', 'NotoKufi'),
|
||||||
|
),
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
maxLines: 1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
);
|
||||||
Divider(thickness: 1, color: Colors.grey),
|
},
|
||||||
InkWell(
|
|
||||||
onTap: () {
|
|
||||||
if (userId != 'guest') context.go('/editProfile');
|
|
||||||
},
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
SizedBox(
|
|
||||||
width: mywidth / 8,
|
|
||||||
height: mywidth / 8,
|
|
||||||
child: ClipOval(
|
|
||||||
child: _avatarUrl.isNotEmpty
|
|
||||||
? Image(
|
|
||||||
image: NetworkImage(_avatarUrl),
|
|
||||||
fit: BoxFit.cover,
|
|
||||||
width: double.infinity,
|
|
||||||
height: double.infinity,
|
|
||||||
)
|
|
||||||
: Image(
|
|
||||||
image: AssetImage(
|
|
||||||
'assets/edit_profile/profile.jpg',
|
|
||||||
),
|
|
||||||
fit: BoxFit.cover,
|
|
||||||
width: double.infinity,
|
|
||||||
height: double.infinity,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
//child: Image(image: AssetImage('assets/edit_profile/profile.png'))
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: mywidth / 20,
|
|
||||||
),
|
|
||||||
// Column(
|
|
||||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
// children: [
|
|
||||||
// // Text(userId ?? 'Loading user...'), // Display userId here
|
|
||||||
// // Text('Mohammad@fcsc.com')
|
|
||||||
// if (userId == "guest") ...[
|
|
||||||
// Text(userName ?? 'Guest User'),
|
|
||||||
// ] else ...[
|
|
||||||
// Text(userName ?? 'Loading...'),
|
|
||||||
// Tooltip(
|
|
||||||
// message: userEmail ?? 'Loading...',
|
|
||||||
// child: Text(
|
|
||||||
// userEmail ?? 'Loading...',
|
|
||||||
// style: TextStyle(fontSize: 12),
|
|
||||||
// softWrap: true,
|
|
||||||
// maxLines: 1,
|
|
||||||
// overflow: TextOverflow.ellipsis,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
//
|
|
||||||
// ]
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
Expanded(
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
if (userId == "guest") ...[
|
|
||||||
Text(
|
|
||||||
userName ?? 'Guest User',
|
|
||||||
style: TextStyle(
|
|
||||||
color: isDarkTheme
|
|
||||||
? Color(0xFFAAAAAA)
|
|
||||||
: null,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
] else ...[
|
|
||||||
Text(
|
|
||||||
userName ?? 'Loading...',
|
|
||||||
style: TextStyle(
|
|
||||||
color: isDarkTheme
|
|
||||||
? Color(0xFFAAAAAA)
|
|
||||||
: null,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Tooltip(
|
|
||||||
message: userEmail ??
|
|
||||||
'Loading...', // Shows full email on hover
|
|
||||||
child: SizedBox(
|
|
||||||
width: MediaQuery.of(context)
|
|
||||||
.size
|
|
||||||
.width *
|
|
||||||
0.6, // Adjust width as needed
|
|
||||||
child: Text(
|
|
||||||
userEmail ?? 'Loading...',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12,
|
|
||||||
color: isDarkTheme
|
|
||||||
? Color(0xFFAAAAAA)
|
|
||||||
: null,
|
|
||||||
fontFamily: context.translate(
|
|
||||||
'Roboto',
|
|
||||||
'NotoKufi',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
// softWrap: true,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
maxLines: 1,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
if (userId != 'guest')
|
if (userId != 'guest')
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: Icon(Icons.notifications_none,
|
leading: Icon(Icons.notifications_none,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user