mirror of
https://github.com/foss42/apidash.git
synced 2025-06-29 04:16:12 +08:00
wip: desktop responsiveness
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user