i'm makin a ecommerce app in flutter, and when I want to do de providers it show me an error in the future builder. Ok, the fist error was this: type 'AsyncSnapshot' is not a subtype of type 'List', and the way I solved it was adding (context, AsyncSnapshot<List>), but now a new error it appear in the futurebuilder, the code is this:
return FutureBuilder(
// ignore: deprecated_member_use
future: Firestore.instance
.collection("category")
// ignore: deprecated_member_use
.document("4ton5n1tQBHMnJ5jmJ4l")
.collection("alarmas")
// ignore: deprecated_member_use
.getDocuments(),
builder:
(context, AsyncSnapshot<List<Product>> alarmasSnapshot) {
if (alarmasSnapshot.connectionState ==
ConnectionState.waiting) {
return Center(
child: CircularProgressIndicator(),
);
}
Any idea? the error is this: Couldn't interfer type parameter 'T'