From befbe8f43145b76a2a0d8937a7442901b62217ff Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 5 Oct 2023 11:32:43 +0300 Subject: [PATCH] Null safety --- lib/ui/app/tables/entity_list.dart | 2 +- lib/ui/client/view/client_view_overview.dart | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ui/app/tables/entity_list.dart b/lib/ui/app/tables/entity_list.dart index fef25458a..986f7fe2c 100644 --- a/lib/ui/app/tables/entity_list.dart +++ b/lib/ui/app/tables/entity_list.dart @@ -100,7 +100,7 @@ class _EntityListState extends State { if (selectedIndex >= 0) { _firstRowIndex = (selectedIndex / rowsPerPage).floor() * rowsPerPage; } - } else { + } else if (state.historyList.isNotEmpty) { final history = state.historyList.first; if (history.page != null) { _firstRowIndex = history.page! * rowsPerPage; diff --git a/lib/ui/client/view/client_view_overview.dart b/lib/ui/client/view/client_view_overview.dart index 955db863e..3bcc2a556 100644 --- a/lib/ui/client/view/client_view_overview.dart +++ b/lib/ui/client/view/client_view_overview.dart @@ -169,9 +169,9 @@ class ClientOverview extends StatelessWidget { IconMessage(client.privateNotes, iconData: Icons.lock), ListDivider() ], - if (client.hasGroup) + if (client.hasGroup && group != null) EntityListTile( - entity: group!, + entity: group, isFilter: isFilter, ), for (var customerReference in tokenMap.keys) ...[