Por favor poderia avaliar o que possa ser? Apresenta esse erro quando dou create no contato.
E/flutter ( 5541): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: type 'Contact' is not a subtype of type 'String?' E/flutter ( 5541): #0 ContactsList.build.. (package:bytebank/src/screens/contacts_list.dart:32:45) E/flutter ( 5541): #1 _rootRunUnary (dart:async/zone.dart:1436:47) E/flutter ( 5541): #2 _CustomZone.runUnary (dart:async/zone.dart:1335:19) E/flutter ( 5541): E/flutter ( 5541):
import 'package:flutter/material.dart';
import '../themes/colors.dart';
import 'contact_form.dart';
class ContactsList extends StatelessWidget {
const ContactsList({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: ThemeColors.primaryColor,
title: const Text('Contacts'),
),
body: ListView(
children: const <Widget>[
Card(
child: ListTile(
title: Text('Bruno', style: TextStyle(fontSize: 18.0),),
subtitle: Text('1000', style: TextStyle(fontSize: 16.0),),
),
)
],
),
floatingActionButtonLocation: FloatingActionButtonLocation.endDocked,
floatingActionButton: FloatingActionButton(
onPressed: () {
Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => const ContactForm(),
),
).then((newContact) => debugPrint(newContact),
);
},
child: const Icon(Icons.add),
backgroundColor: Colors.green,
),
bottomNavigationBar: BottomAppBar(
shape: const CircularNotchedRectangle(),
color: ThemeColors.primaryColor,
child: Container(height: 50)),
);
}
}