반응형
문제 상황
flutter 앱 실행 중에 아래와 같은 에러메시지가 표시되고 빌드에 실패합니다.
How to fix the error "'WhereIterable<Products>' is not a subtype of type 'List<Products>'"
해결 방법
아래와 같이 리스트로 변환하여 복사합니다.
List<Products> filter(String title) {
return products.where((element) => element.category == title).toList();
}
Unhandled Exception: type 'WhereIterable<Store>' is not a subtype of type 'List - Google 검색
snapshot.data.documents.map ((document) { return new ListTile( title: new Text(document['name']), subtitle: new Text("Class"), ); }).toList()
www.google.com
반응형