Mark user as required and assert to not null

This commit is contained in:
krawieck 2021-01-10 01:49:21 +01:00
parent 75b55e02e8
commit 586f26c277
1 changed files with 3 additions and 1 deletions

View File

@ -36,7 +36,9 @@ class UsersListPage extends StatelessWidget {
class UsersListItem extends StatelessWidget { class UsersListItem extends StatelessWidget {
final UserView user; final UserView user;
const UsersListItem({Key key, this.user}) : super(key: key); const UsersListItem({Key key, @required this.user})
: assert(user != null),
super(key: key);
@override @override
Widget build(BuildContext context) => ListTile( Widget build(BuildContext context) => ListTile(