From e17be48f7f672969ac1861ae52da3346084fd988 Mon Sep 17 00:00:00 2001 From: Eshfield Date: Fri, 19 Jul 2024 15:07:11 +0300 Subject: [PATCH] Don't split tasks to columns when there is only one task --- lib/presentation/screens/home_screen/widgets/tasks_list.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/presentation/screens/home_screen/widgets/tasks_list.dart b/lib/presentation/screens/home_screen/widgets/tasks_list.dart index 27e406f..2d915bf 100644 --- a/lib/presentation/screens/home_screen/widgets/tasks_list.dart +++ b/lib/presentation/screens/home_screen/widgets/tasks_list.dart @@ -72,7 +72,8 @@ class _TasksList extends StatelessWidget { final orientation = MediaQuery.orientationOf(context); final deviceInfoService = HomeScreen.of(context).deviceInfoService; final splitListToColumns = - (orientation == Orientation.landscape) || deviceInfoService.isTablet; + (orientation == Orientation.landscape || deviceInfoService.isTablet) && + tasks.length > 1; if (splitListToColumns) { return SliverAnimatedSwitcher( duration: const Duration(milliseconds: 250),