Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
martijn00 committed Aug 14, 2024
1 parent 4877590 commit 757638c
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions packages/flutter_adaptive_scaffold/lib/src/breakpoints.dart
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,7 @@ class Breakpoint {
}

/// Returns the currently active [Breakpoint].
static Breakpoint activeBreakpointOf(
BuildContext context, {
bool andUp = false,
}) {
static Breakpoint activeBreakpointOf(BuildContext context) {
final SlotLayout? slotLayout =
context.findAncestorWidgetOfExactType<SlotLayout>();

Expand Down Expand Up @@ -256,22 +253,7 @@ class Breakpoint {
Breakpoints.extraLarge,
]) {
if (breakpoint.isActive(context)) {
if (andUp) {
switch (breakpoint) {
case Breakpoints.small:
return Breakpoints.smallAndUp;
case Breakpoints.medium:
return Breakpoints.mediumAndUp;
case Breakpoints.mediumLarge:
return Breakpoints.mediumLargeAndUp;
case Breakpoints.large:
return Breakpoints.largeAndUp;
case Breakpoints.extraLarge:
return Breakpoints.extraLarge;
default:
return Breakpoints.standard;
}
} else if (isDesktop) {
if (isDesktop) {
switch (breakpoint) {
case Breakpoints.small:
return Breakpoints.smallDesktop;
Expand Down

0 comments on commit 757638c

Please sign in to comment.