skip to Main Content

Flutter – 'List<Comment>' can't be assigned to the parameter type 'List<Widget>'

posts.dart file return ListView( shrinkWrap: true, //for nested lists physics: const NeverScrollableScrollPhysics(), children: snapshot.data!.docs.map((doc) { //get the comment final commentData = doc.data() as Map<String, dynamic>; //return the comment return Comment( text: commentData["CommentText"], user: commentData["CommentedBy"], time: formatDate(commentData["CommentTime"]), ); }).toList(), ); comment.dart…

VIEW QUESTION

Flutter isar with freezed throws Unsupported type error while build runner

While using isar with freezed, getting Unsupported type error for copyWith getter method while build runner. Here is the model class for which the build_runner is failing. import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:isar/isar.dart'; part 'api_response_model.freezed.dart'; part 'api_response_model.g.dart'; @collection @freezed class ApiResponseModel with…

VIEW QUESTION
Back To Top
Search