Modified logo, added functionality to zoom in on user pic
All checks were successful
Build Flutter Web and Docker Image for Local Registry / Build Flutter Web App (push) Successful in 3m10s

This commit is contained in:
whysman 2024-11-10 22:40:05 -05:00
parent c5eef02ce1
commit 1413ba7263
2 changed files with 62 additions and 34 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 KiB

After

Width:  |  Height:  |  Size: 155 KiB

View File

@ -53,7 +53,6 @@ class StatusPageState extends State<StatusPage> with WidgetsBindingObserver {
@override @override
void didChangeAppLifecycleState(AppLifecycleState state) { void didChangeAppLifecycleState(AppLifecycleState state) {
if (state == AppLifecycleState.resumed) { if (state == AppLifecycleState.resumed) {
// Reestablish the WebSocket connection when the app returns to the foreground
_reconnectWebSocket(); _reconnectWebSocket();
} }
} }
@ -127,44 +126,73 @@ class StatusPageState extends State<StatusPage> with WidgetsBindingObserver {
} }
} }
void _showImageDialog(BuildContext context, ImageProvider imageProvider) {
showDialog(
context: context,
builder: (BuildContext context) {
return Dialog(
backgroundColor: Colors.transparent,
child: GestureDetector(
onTap: () => Navigator.of(context).pop(),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.black87,
),
padding: const EdgeInsets.all(8.0),
child: Image(image: imageProvider, fit: BoxFit.contain),
),
),
);
},
);
}
Widget _buildMessageItem(Map<String, dynamic> message) { Widget _buildMessageItem(Map<String, dynamic> message) {
final imageId = message['Id']; final imageId = message['Id'];
final imageProvider = _imageCache[imageId] ?? final imageProvider = _imageCache[imageId] ??
const AssetImage('assets/default_profile_image.png'); const AssetImage('assets/default_profile_image.png');
return Padding( return GestureDetector(
padding: const EdgeInsets.symmetric(vertical: 4.0), onTap: () {
child: Align( if (_imageCache.containsKey(imageId)) {
alignment: Alignment.centerLeft, _showImageDialog(context, imageProvider);
child: Container( }
padding: const EdgeInsets.all(10), },
decoration: BoxDecoration( child: Padding(
color: Colors.blue.shade50, padding: const EdgeInsets.symmetric(vertical: 4.0),
borderRadius: BorderRadius.circular(12), child: Align(
), alignment: Alignment.centerLeft,
child: Column( child: Container(
crossAxisAlignment: CrossAxisAlignment.start, padding: const EdgeInsets.all(10),
children: [ decoration: BoxDecoration(
Row( color: Colors.blue.shade50,
children: [ borderRadius: BorderRadius.circular(12),
CircleAvatar( ),
radius: 20, child: Column(
backgroundImage: imageProvider, crossAxisAlignment: CrossAxisAlignment.start,
), children: [
const SizedBox(width: 8), Row(
Text( children: [
"${message['Name']}", CircleAvatar(
style: const TextStyle( radius: 20,
fontSize: 16, fontWeight: FontWeight.bold), backgroundImage: imageProvider,
), ),
], const SizedBox(width: 8),
), Text(
const SizedBox(height: 4), "${message['Name']}",
Text( style: const TextStyle(
"Received at: ${message['Timestamp']}", fontSize: 16, fontWeight: FontWeight.bold),
style: const TextStyle(fontSize: 12, color: Colors.grey), ),
), ],
], ),
const SizedBox(height: 4),
Text(
"Received at: ${message['Timestamp']}",
style: const TextStyle(fontSize: 12, color: Colors.grey),
),
],
),
), ),
), ),
), ),