Showing
1 changed file
with
10 additions
and
26 deletions
1 | -import 'dart:io'; | ||
2 | - | ||
3 | import 'package:flutter/material.dart'; | 1 | import 'package:flutter/material.dart'; |
4 | import 'package:flutter/scheduler.dart'; | 2 | import 'package:flutter/scheduler.dart'; |
5 | -import 'backdrop_blur.dart'; | ||
6 | -import 'bottomsheet.dart'; | ||
7 | -import 'dialog.dart'; | ||
8 | -import 'getroute_cupertino.dart'; | ||
9 | -import 'snack.dart'; | ||
10 | -import 'getroute.dart'; | ||
11 | -import 'transitions_type.dart'; | ||
12 | -import 'transparent_route.dart'; | 3 | +import 'package:get/src/dialog/dialog.dart'; |
4 | +import 'package:get/get.dart'; | ||
5 | +import 'routes/blur/backdrop_blur.dart'; | ||
6 | +import 'routes/blur/transparent_route.dart'; | ||
13 | 7 | ||
14 | class Get { | 8 | class Get { |
15 | static Get _get; | 9 | static Get _get; |
@@ -56,7 +50,7 @@ class Get { | @@ -56,7 +50,7 @@ class Get { | ||
56 | // if (key.currentState.mounted) // add this if appear problems on future with route navigate | 50 | // if (key.currentState.mounted) // add this if appear problems on future with route navigate |
57 | // when widget don't mounted | 51 | // when widget don't mounted |
58 | 52 | ||
59 | - return Platform.isIOS | 53 | + return GetPlatform.isIOS |
60 | ? key.currentState.push(GetCupertino( | 54 | ? key.currentState.push(GetCupertino( |
61 | opaque: rebuildRoutes ?? true, | 55 | opaque: rebuildRoutes ?? true, |
62 | page: page, | 56 | page: page, |
@@ -377,23 +371,13 @@ class Get { | @@ -377,23 +371,13 @@ class Get { | ||
377 | }); | 371 | }); |
378 | } | 372 | } |
379 | 373 | ||
380 | - static BuildContext context() { | ||
381 | - return key.currentContext; | ||
382 | - } | 374 | + static BuildContext get context => key.currentContext; |
383 | 375 | ||
384 | - static ThemeData theme() { | ||
385 | - return Theme.of(context()); | ||
386 | - } | 376 | + static ThemeData get theme => Theme.of(context); |
387 | 377 | ||
388 | - static Color iconColor() { | ||
389 | - return Theme.of(context()).iconTheme.color; | ||
390 | - } | 378 | + static Color get iconColor => Theme.of(context).iconTheme.color; |
391 | 379 | ||
392 | - static double height() { | ||
393 | - return MediaQuery.of(context()).size.height; | ||
394 | - } | 380 | + static double get height => MediaQuery.of(context).size.height; |
395 | 381 | ||
396 | - static double width() { | ||
397 | - return MediaQuery.of(context()).size.width; | ||
398 | - } | 382 | + static double get width => MediaQuery.of(context).size.width; |
399 | } | 383 | } |
-
Please register or login to post a comment