Showing
1 changed file
with
23 additions
and
5 deletions
| @@ -101,13 +101,31 @@ extension ContextExtensionss on BuildContext { | @@ -101,13 +101,31 @@ extension ContextExtensionss on BuildContext { | ||
| 101 | bool get showNavbar => (width > 800); | 101 | bool get showNavbar => (width > 800); |
| 102 | 102 | ||
| 103 | /// True if the width is smaller than 600p | 103 | /// True if the width is smaller than 600p |
| 104 | - bool get isPhone => (width < 600); | 104 | + bool get isPhoneOrLess => width <= 600; |
| 105 | 105 | ||
| 106 | - /// True if the width is largest than 600p | ||
| 107 | - bool get isSmallTablet => (width >= 600); | 106 | + /// True if the width is higher than 600p |
| 107 | + bool get isPhoneOrWider => width >= 600; | ||
| 108 | 108 | ||
| 109 | - /// True if the width is largest than 720p | ||
| 110 | - bool get isLargeTablet => (width >= 720); | 109 | + /// same as [isPhoneOrLess] |
| 110 | + bool get isPhone => isPhoneOrLess; | ||
| 111 | + | ||
| 112 | + /// True if the width is smaller than 600p | ||
| 113 | + bool get isSmallTabletOrLess => width <= 600; | ||
| 114 | + | ||
| 115 | + /// True if the width is higher than 600p | ||
| 116 | + bool get isSmallTabletOrWider => width >= 600; | ||
| 117 | + | ||
| 118 | + /// same as [isSmallTabletOrLess] | ||
| 119 | + bool get isSmallTablet => isSmallTabletOrLess; | ||
| 120 | + | ||
| 121 | + /// True if the width is smaller than 720p | ||
| 122 | + bool get isLargeTabletOrLess => width <= 720; | ||
| 123 | + | ||
| 124 | + /// True if the width is higher than 720p | ||
| 125 | + bool get isLargeTabletOrWider => width >= 720; | ||
| 126 | + | ||
| 127 | + /// same as [isLargeTabletOrLess] | ||
| 128 | + bool get isLargeTablet => isLargeTabletOrLess; | ||
| 111 | 129 | ||
| 112 | /// True if the current device is Tablet | 130 | /// True if the current device is Tablet |
| 113 | bool get isTablet => isSmallTablet; | 131 | bool get isTablet => isSmallTablet; |
-
Please register or login to post a comment