G-EIP-700-TLS-7-1-eip-steph.../lib/pages/contact.dart

43 lines
1.3 KiB
Dart
Raw Normal View History

2024-09-16 15:07:04 +00:00
import 'package:flutter/material.dart';
import 'package:dialer/classes/contactClass.dart';
import 'package:dialer/classes/displayContact.dart';
class ContactPage extends StatefulWidget {
const ContactPage({super.key});
@override
_ContactPageState createState() => _ContactPageState();
}
class _ContactPageState extends State<ContactPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.black,
appBar: AppBar(
title: const Text('Contacts'),
),
body: ListView.builder(
itemCount: contacts.length,
itemBuilder: (context, index) {
return DisplayContact(contact: contacts[index]);
},
),
);
}
}
List<Contact> contacts = [
Contact('Axel NAVARRO BOUZEHRIR (arabe)', '0618859419'),
Contact('Fabrice Iguet', '0618958419'),
Contact('La Banque Axial', '0619358514'),
Contact('Maman', '0618955417', isFavorite: true, isLocked: true),
Contact('Micheline Verdet', '0618527419', isLocked: true),
Contact('Philippe Mogue', '0618955889', isFavorite: true),
Contact('Pizza Enrico Pucci', '0618951439', isLocked: true),
Contact('Quentin Aumas', '0610252019'),
Contact('Yohan HATOT', '0618102552', isFavorite: true, isLocked: true),
Contact('Zizou', '0618514479'),
];