Showing
3 changed files
with
155 additions
and
16 deletions
@@ -242,38 +242,95 @@ MaterialApp( | @@ -242,38 +242,95 @@ MaterialApp( | ||
242 | ``` | 242 | ``` |
243 | 243 | ||
244 | ```dart | 244 | ```dart |
245 | -Get.arguments // give the current args from currentScreen | 245 | +// give the current args from currentScreen |
246 | +Get.arguments | ||
246 | 247 | ||
247 | -Get.previousArguments // give arguments of previous route | 248 | +// give arguments of previous route |
249 | +Get.previousArguments | ||
248 | 250 | ||
249 | -Get.previousRoute // give name of previous route | 251 | +// give name of previous route |
252 | +Get.previousRoute | ||
250 | 253 | ||
251 | -Get.rawRoute // give the raw route to access for example, rawRoute.isFirst() | 254 | +// give the raw route to access for example, rawRoute.isFirst() |
255 | +Get.rawRoute | ||
252 | 256 | ||
253 | -Get.routing // give access to Rounting API from GetObserver | 257 | +// give access to Rounting API from GetObserver |
258 | +Get.routing | ||
254 | 259 | ||
255 | -Get.isSnackbarOpen // check if snackbar is open | 260 | +// check if snackbar is open |
261 | +Get.isSnackbarOpen | ||
256 | 262 | ||
257 | -Get.isDialogOpen // check if dialog is open | 263 | +// check if dialog is open |
264 | +Get.isDialogOpen | ||
258 | 265 | ||
259 | -Get.isBottomSheetOpen // check if bottomsheet is open | 266 | +// check if bottomsheet is open |
267 | +Get.isBottomSheetOpen | ||
260 | 268 | ||
261 | -Get.removeRoute() // remove one route. | 269 | +// remove one route. |
270 | +Get.removeRoute() | ||
262 | 271 | ||
263 | -Get.until() // back repeatedly until the predicate returns true. | 272 | +// back repeatedly until the predicate returns true. |
273 | +Get.until() | ||
264 | 274 | ||
265 | -Get.offUntil() // go to next route and remove all the previous routes until the predicate returns true. | 275 | +// go to next route and remove all the previous routes until the predicate returns true. |
276 | +Get.offUntil() | ||
266 | 277 | ||
267 | -Get.offNamedUntil() // go to next named route and remove all the previous routes until the predicate returns true. | 278 | +// go to next named route and remove all the previous routes until the predicate returns true. |
279 | +Get.offNamedUntil() | ||
268 | 280 | ||
269 | -GetPlatform.isAndroid/isIOS/isWeb... //(This method is completely compatible with FlutterWeb, unlike the framework. "Platform.isAndroid") | 281 | +//(This method is completely compatible with FlutterWeb, unlike the framework. "Platform.isAndroid") |
282 | +// Equivalent to the method: MediaQuery.of(context).size.height, but they are immutable. If you need a changeable height/width (like browser windows that can be scaled) you will need to use context.height and context.width | ||
283 | +GetPlatform.isAndroid/isIOS/isWeb... | ||
270 | 284 | ||
271 | -Get.height / Get.width // Equivalent to the method: MediaQuery.of(context).size.height, but they are immutable. If you need a changeable height/width (like browser windows that can be scaled) you will need to use context.height and context.width | 285 | +Get.height / Get.width |
272 | 286 | ||
273 | -Get.context // Gives the context of the screen in the foreground anywhere in your code. | 287 | +// Gives the context of the screen in the foreground anywhere in your code. |
288 | +Get.context | ||
274 | 289 | ||
275 | -Get.contextOverlay // Gives the context of the snackbar/dialog/bottomsheet in the foreground anywhere in your code. | 290 | +// Gives the context of the snackbar/dialog/bottomsheet in the foreground anywhere in your code. |
291 | +Get.contextOverlay | ||
276 | 292 | ||
293 | +/// similar to MediaQuery.of(this).padding | ||
294 | +Get.mediaQueryPadding() | ||
295 | + | ||
296 | +/// similar to MediaQuery.of(this).viewPadding | ||
297 | +Get.mediaQueryViewPadding() | ||
298 | + | ||
299 | +/// similar to MediaQuery.of(this).viewInsets; | ||
300 | +Get.mediaQueryViewInsets() | ||
301 | + | ||
302 | +/// similar to MediaQuery.of(this).orientation; | ||
303 | +Get.orientation() | ||
304 | + | ||
305 | +/// check if device is on landscape mode | ||
306 | +Get.isLandscape() | ||
307 | + | ||
308 | +/// check if device is on portrait mode | ||
309 | +Get.isPortrait() | ||
310 | + | ||
311 | +/// similar to MediaQuery.of(this).devicePixelRatio; | ||
312 | +Get.devicePixelRatio() | ||
313 | + | ||
314 | +/// similar to MediaQuery.of(this).textScaleFactor; | ||
315 | +Get.textScaleFactor() | ||
316 | + | ||
317 | +/// get the shortestSide from screen | ||
318 | +Get.mediaQueryShortestSide() | ||
319 | + | ||
320 | +/// True if width be larger than 800 | ||
321 | +Get.showNavbar() | ||
322 | + | ||
323 | +/// True if the shortestSide is smaller than 600p | ||
324 | +Get.isPhone() | ||
325 | + | ||
326 | +/// True if the shortestSide is largest than 600p | ||
327 | +Get.isSmallTablet() | ||
328 | + | ||
329 | +/// True if the shortestSide is largest than 720p | ||
330 | +Get.isLargeTablet() | ||
331 | + | ||
332 | +/// True if the current device is Tablet | ||
333 | +Get.isTablet() | ||
277 | ``` | 334 | ``` |
278 | 335 | ||
279 | ### Configuraciones globales opcionales | 336 | ### Configuraciones globales opcionales |
@@ -307,6 +307,47 @@ Get.context | @@ -307,6 +307,47 @@ Get.context | ||
307 | // Gives the context of the snackbar/dialog/bottomsheet in the foreground anywhere in your code. | 307 | // Gives the context of the snackbar/dialog/bottomsheet in the foreground anywhere in your code. |
308 | Get.contextOverlay | 308 | Get.contextOverlay |
309 | 309 | ||
310 | +/// similar to MediaQuery.of(this).padding | ||
311 | +Get.mediaQueryPadding() | ||
312 | + | ||
313 | +/// similar to MediaQuery.of(this).viewPadding | ||
314 | +Get.mediaQueryViewPadding() | ||
315 | + | ||
316 | +/// similar to MediaQuery.of(this).viewInsets; | ||
317 | +Get.mediaQueryViewInsets() | ||
318 | + | ||
319 | +/// similar to MediaQuery.of(this).orientation; | ||
320 | +Get.orientation() | ||
321 | + | ||
322 | +/// check if device is on landscape mode | ||
323 | +Get.isLandscape() | ||
324 | + | ||
325 | +/// check if device is on portrait mode | ||
326 | +Get.isPortrait() | ||
327 | + | ||
328 | +/// similar to MediaQuery.of(this).devicePixelRatio; | ||
329 | +Get.devicePixelRatio() | ||
330 | + | ||
331 | +/// similar to MediaQuery.of(this).textScaleFactor; | ||
332 | +Get.textScaleFactor() | ||
333 | + | ||
334 | +/// get the shortestSide from screen | ||
335 | +Get.mediaQueryShortestSide() | ||
336 | + | ||
337 | +/// True if width be larger than 800 | ||
338 | +Get.showNavbar() | ||
339 | + | ||
340 | +/// True if the shortestSide is smaller than 600p | ||
341 | +Get.isPhone() | ||
342 | + | ||
343 | +/// True if the shortestSide is largest than 600p | ||
344 | +Get.isSmallTablet() | ||
345 | + | ||
346 | +/// True if the shortestSide is largest than 720p | ||
347 | +Get.isLargeTablet() | ||
348 | + | ||
349 | +/// True if the current device is Tablet | ||
350 | +Get.isTablet() | ||
310 | ``` | 351 | ``` |
311 | 352 | ||
312 | ### Optional Global Settings and Manual configurations | 353 | ### Optional Global Settings and Manual configurations |
@@ -315,6 +315,47 @@ Get.context | @@ -315,6 +315,47 @@ Get.context | ||
315 | // fornece o context de snackbar/dialog/bottomsheet em qualquer lugar do seu código. | 315 | // fornece o context de snackbar/dialog/bottomsheet em qualquer lugar do seu código. |
316 | Get.contextOverlay | 316 | Get.contextOverlay |
317 | 317 | ||
318 | +/// similar to MediaQuery.of(this).padding | ||
319 | +Get.mediaQueryPadding() | ||
320 | + | ||
321 | +/// similar to MediaQuery.of(this).viewPadding | ||
322 | +Get.mediaQueryViewPadding() | ||
323 | + | ||
324 | +/// similar to MediaQuery.of(this).viewInsets; | ||
325 | +Get.mediaQueryViewInsets() | ||
326 | + | ||
327 | +/// similar to MediaQuery.of(this).orientation; | ||
328 | +Get.orientation() | ||
329 | + | ||
330 | +/// check if device is on landscape mode | ||
331 | +Get.isLandscape() | ||
332 | + | ||
333 | +/// check if device is on portrait mode | ||
334 | +Get.isPortrait() | ||
335 | + | ||
336 | +/// similar to MediaQuery.of(this).devicePixelRatio; | ||
337 | +Get.devicePixelRatio() | ||
338 | + | ||
339 | +/// similar to MediaQuery.of(this).textScaleFactor; | ||
340 | +Get.textScaleFactor() | ||
341 | + | ||
342 | +/// get the shortestSide from screen | ||
343 | +Get.mediaQueryShortestSide() | ||
344 | + | ||
345 | +/// True if width be larger than 800 | ||
346 | +Get.showNavbar() | ||
347 | + | ||
348 | +/// True if the shortestSide is smaller than 600p | ||
349 | +Get.isPhone() | ||
350 | + | ||
351 | +/// True if the shortestSide is largest than 600p | ||
352 | +Get.isSmallTablet() | ||
353 | + | ||
354 | +/// True if the shortestSide is largest than 720p | ||
355 | +Get.isLargeTablet() | ||
356 | + | ||
357 | +/// True if the current device is Tablet | ||
358 | +Get.isTablet() | ||
318 | ``` | 359 | ``` |
319 | 360 | ||
320 | ### Configurações Globais opcionais e configurações manuais | 361 | ### Configurações Globais opcionais e configurações manuais |
-
Please register or login to post a comment