This commit is contained in:
parent
05e7f50269
commit
27e2b7adbd
@ -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<String>(
|
||||
icon: Icon(Icons.more_vert, color: Colors.white),
|
||||
onSelected: (String choice) {
|
||||
print(
|
||||
'Selected: $choice'); // Placeholder for menu actions
|
||||
},
|
||||
itemBuilder: (BuildContext context) {
|
||||
return <PopupMenuEntry<String>>[
|
||||
PopupMenuItem<String>(
|
||||
value: 'show_associated_contacts',
|
||||
child: Text('Show associated contacts'),
|
||||
),
|
||||
PopupMenuItem<String>(
|
||||
value: 'delete',
|
||||
child: Text('Delete'),
|
||||
),
|
||||
PopupMenuItem<String>(
|
||||
value: 'share',
|
||||
child: Text('Share (via QR code)'),
|
||||
),
|
||||
PopupMenuItem<String>(
|
||||
value: 'create_shortcut',
|
||||
child:
|
||||
Text('Create shortcut (to home screen)'),
|
||||
),
|
||||
PopupMenuItem<String>(
|
||||
value: 'set_ringtone',
|
||||
child: Text('Set ringtone'),
|
||||
),
|
||||
];
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
// Contact Profile
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
|
Loading…
Reference in New Issue
Block a user