wip: desktop responsiveness

This commit is contained in:
DenserMeerkat
2024-06-09 18:51:13 +05:30
parent a49bcec641
commit b0c4f7145b
17 changed files with 299 additions and 257 deletions

View File

@ -2,9 +2,17 @@ import 'package:apidash/consts.dart';
import 'package:flutter/material.dart';
extension MediaQueryExtension on BuildContext {
bool get isLargeWidth =>
MediaQuery.of(this).size.width > kMinWindowSize.width;
bool get isCompactWindow =>
MediaQuery.of(this).size.width < kCompactWindowWidth;
bool get isMobile =>
kIsMobile && MediaQuery.of(this).size.width < kMinWindowSize.width;
bool get isMediumWindow =>
MediaQuery.of(this).size.width < kMediumWindowWidth;
bool get isExpandedWindow =>
MediaQuery.of(this).size.width < kExpandedWindowWidth;
bool get isLargeWindow => MediaQuery.of(this).size.width < kLargeWindowWidth;
bool get isExtraLargeWindow =>
MediaQuery.of(this).size.width > kLargeWindowWidth;
}