Showing
1 changed file
with
15 additions
and
8 deletions
| @@ -129,14 +129,21 @@ extension ContextExtensionss on BuildContext { | @@ -129,14 +129,21 @@ extension ContextExtensionss on BuildContext { | ||
| 129 | if (GetPlatform.isDesktop) { | 129 | if (GetPlatform.isDesktop) { |
| 130 | deviceWidth = mediaQuerySize.width; | 130 | deviceWidth = mediaQuerySize.width; |
| 131 | } | 131 | } |
| 132 | - if (deviceWidth >= 1200 && desktop != null) { | ||
| 133 | - return desktop; | ||
| 134 | - } else if (deviceWidth >= 600 && tablet != null) { | ||
| 135 | - return tablet; | ||
| 136 | - } else if (deviceWidth < 300 && watch != null) { | ||
| 137 | - return watch; | ||
| 138 | - } else { | ||
| 139 | - return mobile!; | 132 | + if (deviceWidth >= 1200) { |
| 133 | + if (desktop != null) { | ||
| 134 | + return desktop; | ||
| 135 | + } | ||
| 140 | } | 136 | } |
| 137 | + if (deviceWidth >= 600) { | ||
| 138 | + if (tablet != null) { | ||
| 139 | + return tablet; | ||
| 140 | + } | ||
| 141 | + } | ||
| 142 | + if (deviceWidth >= 300) { | ||
| 143 | + if (mobile != null) { | ||
| 144 | + return mobile; | ||
| 145 | + } | ||
| 146 | + } | ||
| 147 | + return watch!; | ||
| 141 | } | 148 | } |
| 142 | } | 149 | } |
-
Please register or login to post a comment