Estou com este erro na criação do projeto byteBank do curso de flutter perssistencia em BD
Segue o código completo:
import 'package:bytebank/screens/contact_form.dart';
import 'package:flutter/material.dart';
import '../models/contact.dart';
class ContactsList extends StatelessWidget {
const ContactsList({Key? key}) : super(key: key);
final List<Contact> contacts = List();
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Contatos'),
),
body: ListView.builder(
itemBuilder: (context, index){
final Contact contact = contacts[index];
return _ContactItem(contact);
},
itemCount: contacts.length,
),
floatingActionButton: FloatingActionButton(
onPressed: () {
Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => ContactForm(),
),
).then((newContact) => debugPrint(newContact.toString()));
},
child: Icon(Icons.add),
),
);
}
}
class _ContactItem extends StatelessWidget {
final Contact contact;
_ContactItem(this.contact);
@override
Widget build(BuildContext context) {
return Card(
child: ListTile(
title: Text(
contact.nome,
style: TextStyle(fontSize: 24.0),
),
subtitle: Text(
contact.numeroConta,
style: TextStyle(fontSize: 16.0),
),
),
);
}
}