Skip to content

Commit

Permalink
Don't split tasks to columns when there is only one task
Browse files Browse the repository at this point in the history
  • Loading branch information
eshfield committed Jul 19, 2024
1 parent 843d9c6 commit e17be48
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/presentation/screens/home_screen/widgets/tasks_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit e17be48

Please sign in to comment.