Showing
1 changed file
with
30 additions
and
20 deletions
@@ -301,53 +301,63 @@ GetPlatform.isWeb | @@ -301,53 +301,63 @@ GetPlatform.isWeb | ||
301 | Get.height | 301 | Get.height |
302 | Get.width | 302 | Get.width |
303 | 303 | ||
304 | +// gives you the power to define half the screen now, a third of it and so on. A dynamic width/heigth | ||
305 | +//Useful for responsive applications. | ||
306 | +// param dividedBy (double) optional - default: 1 | ||
307 | +// param reducedBy (double) optional - default: 0 | ||
308 | +Get.context.heightTransformer() | ||
309 | +Get.context.widthTransformer() | ||
310 | + | ||
304 | // Gives the context of the screen in the foreground anywhere in your code. | 311 | // Gives the context of the screen in the foreground anywhere in your code. |
305 | Get.context | 312 | Get.context |
306 | 313 | ||
307 | // Gives the context of the snackbar/dialog/bottomsheet in the foreground anywhere in your code. | 314 | // Gives the context of the snackbar/dialog/bottomsheet in the foreground anywhere in your code. |
308 | Get.contextOverlay | 315 | Get.contextOverlay |
309 | 316 | ||
310 | -/// similar to MediaQuery.of(this).padding | ||
311 | -Get.mediaQueryPadding() | 317 | +/// similar to MediaQuery.of(context).size |
318 | +Get.context.mediaQuerySize() | ||
319 | + | ||
320 | +/// similar to MediaQuery.of(context).padding | ||
321 | +Get.context.mediaQueryPadding() | ||
312 | 322 | ||
313 | -/// similar to MediaQuery.of(this).viewPadding | ||
314 | -Get.mediaQueryViewPadding() | 323 | +/// similar to MediaQuery.of(context).viewPadding |
324 | +Get.context.mediaQueryViewPadding() | ||
315 | 325 | ||
316 | -/// similar to MediaQuery.of(this).viewInsets; | ||
317 | -Get.mediaQueryViewInsets() | 326 | +/// similar to MediaQuery.of(context).viewInsets; |
327 | +Get.context.mediaQueryViewInsets() | ||
318 | 328 | ||
319 | -/// similar to MediaQuery.of(this).orientation; | ||
320 | -Get.orientation() | 329 | +/// similar to MediaQuery.of(context).orientation; |
330 | +Get.context.orientation() | ||
321 | 331 | ||
322 | /// check if device is on landscape mode | 332 | /// check if device is on landscape mode |
323 | -Get.isLandscape() | 333 | +Get.context.isLandscape() |
324 | 334 | ||
325 | /// check if device is on portrait mode | 335 | /// check if device is on portrait mode |
326 | -Get.isPortrait() | 336 | +Get.context.isPortrait() |
327 | 337 | ||
328 | -/// similar to MediaQuery.of(this).devicePixelRatio; | ||
329 | -Get.devicePixelRatio() | 338 | +/// similar to MediaQuery.of(context).devicePixelRatio; |
339 | +Get.context.devicePixelRatio() | ||
330 | 340 | ||
331 | -/// similar to MediaQuery.of(this).textScaleFactor; | ||
332 | -Get.textScaleFactor() | 341 | +/// similar to MediaQuery.of(context).textScaleFactor; |
342 | +Get.context.textScaleFactor() | ||
333 | 343 | ||
334 | /// get the shortestSide from screen | 344 | /// get the shortestSide from screen |
335 | -Get.mediaQueryShortestSide() | 345 | +Get.context.mediaQueryShortestSide() |
336 | 346 | ||
337 | /// True if width be larger than 800 | 347 | /// True if width be larger than 800 |
338 | -Get.showNavbar() | 348 | +Get.context.showNavbar() |
339 | 349 | ||
340 | /// True if the shortestSide is smaller than 600p | 350 | /// True if the shortestSide is smaller than 600p |
341 | -Get.isPhone() | 351 | +Get.context.isPhone() |
342 | 352 | ||
343 | /// True if the shortestSide is largest than 600p | 353 | /// True if the shortestSide is largest than 600p |
344 | -Get.isSmallTablet() | 354 | +Get.context.isSmallTablet() |
345 | 355 | ||
346 | /// True if the shortestSide is largest than 720p | 356 | /// True if the shortestSide is largest than 720p |
347 | -Get.isLargeTablet() | 357 | +Get.context.isLargeTablet() |
348 | 358 | ||
349 | /// True if the current device is Tablet | 359 | /// True if the current device is Tablet |
350 | -Get.isTablet() | 360 | +Get.context.isTablet() |
351 | ``` | 361 | ``` |
352 | 362 | ||
353 | ### Optional Global Settings and Manual configurations | 363 | ### Optional Global Settings and Manual configurations |
-
Please register or login to post a comment