94 lines
3.0 KiB
Dart
94 lines
3.0 KiB
Dart
import 'package:dialer/classes/contactClass.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
// display the calling page as if the call is already in progress
|
|
class _CallingPageState extends State<CallingPage> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final contact = widget.contact;
|
|
return Scaffold(
|
|
backgroundColor: Colors.black,
|
|
appBar: AppBar(
|
|
title: const Text('Appel en cours'),
|
|
backgroundColor: Colors.black,
|
|
),
|
|
body: Center(
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: <Widget>[
|
|
const CircleAvatar(
|
|
radius: 100.0,
|
|
backgroundImage:
|
|
NetworkImage('https://thispersondoesnotexist.com/'),
|
|
backgroundColor: Colors.transparent,
|
|
),
|
|
const SizedBox(height: 10.0),
|
|
// Add the contact name here
|
|
Text(contact.name, style: const TextStyle(fontSize: 40.0, color: Colors.white)),
|
|
// const SizedBox(height: 10.0),
|
|
const Text('99 : 59 : 59', style:
|
|
TextStyle(fontSize: 40.0, color:
|
|
Colors.white)),
|
|
const SizedBox(height: 50.0),
|
|
contact.isLocked
|
|
? const Text('Con. Health - 98% (excellent)',
|
|
style:
|
|
TextStyle(fontSize:
|
|
16.0,color:
|
|
Colors.green))
|
|
:
|
|
const Text('No Icing available',
|
|
style:
|
|
TextStyle(fontSize:
|
|
16.0,color:
|
|
Colors.white)),
|
|
const SizedBox(height:
|
|
50.0), // Adjust size box height as needed
|
|
const Row(
|
|
mainAxisAlignment:
|
|
MainAxisAlignment.spaceEvenly,
|
|
children:<Widget>[
|
|
Icon(Icons.mic_off,size:
|
|
30.0,color:
|
|
Colors.white),
|
|
Icon(Icons.dialpad,size:
|
|
30.0,color:
|
|
Colors.white),
|
|
Icon(Icons.more_vert,size:
|
|
30.0,color:
|
|
Colors.white),
|
|
Icon(Icons.volume_up,size:
|
|
30.0,color:
|
|
Colors.white),
|
|
],
|
|
),
|
|
const SizedBox(height:
|
|
50.0), // Adjust size box height as needed
|
|
const Row(
|
|
mainAxisAlignment:
|
|
MainAxisAlignment.spaceEvenly,
|
|
children:<Widget>[
|
|
Icon(Icons.pause,size:
|
|
60.0,color:
|
|
Colors.white),
|
|
Icon(Icons.call_end,size:
|
|
60.0,color:
|
|
Colors.red),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
class CallingPage extends StatefulWidget {
|
|
final Contact contact;
|
|
|
|
const CallingPage({super.key, required this.contact});
|
|
|
|
@override
|
|
_CallingPageState createState() => _CallingPageState();
|
|
}
|