feat: CallPage UI, ReceivingCall UI, Default dialer app, can call/receive calls and hangup #45
@ -126,7 +126,9 @@ class _ContactModalState extends State<ContactModal> {
|
|||||||
|
|
||||||
// Show success message
|
// Show success message
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(content: Text('${_obfuscateService.obfuscateData(widget.contact.displayName)} deleted')),
|
SnackBar(
|
||||||
|
content: Text(
|
||||||
|
'${_obfuscateService.obfuscateData(widget.contact.displayName)} deleted')),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Close the modal
|
// Close the modal
|
||||||
@ -134,7 +136,9 @@ class _ContactModalState extends State<ContactModal> {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
// Handle errors and show a failure message
|
// Handle errors and show a failure message
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(content: Text('Failed to delete ${widget.contact.displayName}: $e')),
|
SnackBar(
|
||||||
|
content:
|
||||||
|
Text('Failed to delete ${widget.contact.displayName}: $e')),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -243,7 +247,8 @@ class _ContactModalState extends State<ContactModal> {
|
|||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
Text(
|
Text(
|
||||||
_obfuscateService.obfuscateData(widget.contact.displayName),
|
_obfuscateService
|
||||||
|
.obfuscateData(widget.contact.displayName),
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
@ -262,21 +267,10 @@ class _ContactModalState extends State<ContactModal> {
|
|||||||
),
|
),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
if (widget.contact.phones.isNotEmpty) {
|
if (widget.contact.phones.isNotEmpty) {
|
||||||
await _callService.makeGsmCall(context, phoneNumber: phoneNumber);
|
await _callService.makeGsmCall(context,
|
||||||
|
phoneNumber: phoneNumber);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLongPress: () {
|
|
||||||
// Navigate to the beautiful calling page demo
|
|
||||||
Navigator.push(
|
|
||||||
context,
|
|
||||||
MaterialPageRoute(
|
|
||||||
builder: (_) => CallPage(
|
|
||||||
displayName: widget.contact.displayName,
|
|
||||||
thumbnail: widget.contact.thumbnail,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: const Icon(Icons.message, color: Colors.blue),
|
leading: const Icon(Icons.message, color: Colors.blue),
|
||||||
@ -319,9 +313,8 @@ class _ContactModalState extends State<ContactModal> {
|
|||||||
icon: Icon(widget.isFavorite
|
icon: Icon(widget.isFavorite
|
||||||
? Icons.star
|
? Icons.star
|
||||||
: Icons.star_border),
|
: Icons.star_border),
|
||||||
label: Text(widget.isFavorite
|
label: Text(
|
||||||
? 'Unfavorite'
|
widget.isFavorite ? 'Unfavorite' : 'Favorite'),
|
||||||
: 'Favorite'),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
|
Loading…
Reference in New Issue
Block a user