Skip to content

Commit

Permalink
use top nav for small portrait desktops
Browse files Browse the repository at this point in the history
  • Loading branch information
getBoolean committed Feb 18, 2024
1 parent f30ee87 commit 4b770e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/utils/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,11 @@ DeviceType get _deviceTypeByUserAgent {
}

NavigationType $resolveNavigationType(BuildContext context) {
final (_, form, orientation) = $deviceDetails(context);
final (type, form, orientation) = $deviceDetails(context);
return switch (orientation) {
Orientation.portrait => switch (form) {
DeviceForm.large => NavigationType.top,
DeviceForm.small when type.isDesktop => NavigationType.top,
DeviceForm.medium => NavigationType.sidebar,
DeviceForm.small => NavigationType.bottom,
},
Expand Down

0 comments on commit 4b770e3

Please sign in to comment.