refactor(ui): early return Offstage in case index is null.
Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
@@ -674,10 +674,9 @@ class _MessageListViewState extends State<MessageListView> {
|
|||||||
index = _getBottomElementIndex(values);
|
index = _getBottomElementIndex(values);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (index == null || index <= 2 || index >= itemCount - 3) {
|
if (index == null) return const Offstage();
|
||||||
if (index == null) {
|
|
||||||
return const Offstage();
|
if (index <= 2 || index >= itemCount - 3) {
|
||||||
}
|
|
||||||
if (widget.reverse) {
|
if (widget.reverse) {
|
||||||
index = itemCount - 4;
|
index = itemCount - 4;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user