Modul kontaktů
Veškeré zdrojové soubory se nachází v ./contacts
ContactsWidget
class ContactsWidget extends StatelessWidget {
final String url;
const ContactsWidget({super.key, required this.url});
| Parameter | Type | Description |
|---|---|---|
| url | String | Základní URL Rest API |
Metody
List<FItem> getItems(List<Contact> contacts)
Vytvoří seznam interaktivních kontaktů
Future<List<Contact>> fetchContacts()
Získá data kontaktu a uloží je do atributu contacts
Contact
class Contact {
final String name;
final String function;
final String phoneNumber;
Contact({
required this.name,
required this.function,
required this.phoneNumber,
});
| Parameter | Type | Description |
|---|---|---|
| name | String | Jméno osoby |
| function | String | Pozice osoby |
| phoneNumber | String | Telefoní číslo osoby |
Metody
Contact.fromJson(Map<String, dynamic> json)
Pojmenováný konstruktor pro načtení z JSONu