diff --git a/dialer/lib/features/contacts/widgets/contact_modal.dart b/dialer/lib/features/contacts/widgets/contact_modal.dart index ea887d4..6514500 100644 --- a/dialer/lib/features/contacts/widgets/contact_modal.dart +++ b/dialer/lib/features/contacts/widgets/contact_modal.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_contacts/flutter_contacts.dart'; import 'package:url_launcher/url_launcher.dart'; import 'package:dialer/widgets/username_color_generator.dart'; +import 'package:flutter/material.dart'; class ContactModal extends StatelessWidget { final Contact contact; @@ -69,17 +70,64 @@ class ContactModal extends StatelessWidget { mainAxisSize: MainAxisSize.min, children: [ // Modal Handle - Padding( - padding: const EdgeInsets.symmetric(vertical: 10), - child: Container( - width: 50, - height: 5, - decoration: BoxDecoration( - color: Colors.grey.shade300, - borderRadius: BorderRadius.circular(5), + // Top Bar with Handle and Three-Dot Menu + Stack( + children: [ + Align( + alignment: Alignment.center, + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 10), + child: Container( + width: 50, + height: 5, + decoration: BoxDecoration( + color: Colors.grey.shade300, + borderRadius: BorderRadius.circular(5), + ), + ), + ), ), - ), + Align( + alignment: Alignment.topRight, + child: Padding( + padding: const EdgeInsets.only(top: 10, right: 10), + child: PopupMenuButton( + icon: Icon(Icons.more_vert, color: Colors.white), + onSelected: (String choice) { + print( + 'Selected: $choice'); // Placeholder for menu actions + }, + itemBuilder: (BuildContext context) { + return >[ + PopupMenuItem( + value: 'show_associated_contacts', + child: Text('Show associated contacts'), + ), + PopupMenuItem( + value: 'delete', + child: Text('Delete'), + ), + PopupMenuItem( + value: 'share', + child: Text('Share (via QR code)'), + ), + PopupMenuItem( + value: 'create_shortcut', + child: + Text('Create shortcut (to home screen)'), + ), + PopupMenuItem( + value: 'set_ringtone', + child: Text('Set ringtone'), + ), + ]; + }, + ), + ), + ), + ], ), + // Contact Profile Padding( padding: const EdgeInsets.all(16.0),