mark fetcher props as required

This commit is contained in:
krawieck 2020-09-29 21:08:02 +02:00
parent caed03fb68
commit 487a2aab1d
1 changed files with 2 additions and 2 deletions

View File

@ -52,7 +52,7 @@ class InfinitePostList extends StatelessWidget {
final Future<List<PostView>> Function(
int page, int batchSize, SortType sortType) fetcher;
InfinitePostList({this.fetcher});
InfinitePostList({@required this.fetcher}) : assert(fetcher != null);
Widget build(BuildContext context) => SortableInfiniteList<PostView>(
onStyleChange: () {},
@ -70,7 +70,7 @@ class InfiniteCommentList extends StatelessWidget {
final Future<List<CommentView>> Function(
int page, int batchSize, SortType sortType) fetcher;
InfiniteCommentList({this.fetcher});
InfiniteCommentList({@required this.fetcher}) : assert(fetcher != null);
Widget build(BuildContext context) => SortableInfiniteList<CommentView>(
builder: (comment) => Comment(