Showing
1 changed file
with
0 additions
and
31 deletions
lib/src/routes.dart
deleted
100644 → 0
| 1 | -import 'package:flutter/widgets.dart'; | ||
| 2 | -import 'material.dart'; | ||
| 3 | - | ||
| 4 | -class Get { | ||
| 5 | - static to(BuildContext context, Widget page, {bool rebuildRoutes = false}) { | ||
| 6 | - return Navigator.push( | ||
| 7 | - context, | ||
| 8 | - GetRoute( | ||
| 9 | - opaque: rebuildRoutes, builder: (BuildContext context) => page)); | ||
| 10 | - } | ||
| 11 | - | ||
| 12 | - static back(BuildContext context) { | ||
| 13 | - return Navigator.pop(context); | ||
| 14 | - } | ||
| 15 | - | ||
| 16 | - static off(BuildContext context, Widget page, {bool rebuildRoutes = false}) { | ||
| 17 | - return Navigator.pushReplacement( | ||
| 18 | - context, | ||
| 19 | - GetRoute( | ||
| 20 | - opaque: rebuildRoutes, builder: (BuildContext context) => page)); | ||
| 21 | - } | ||
| 22 | - | ||
| 23 | - static offAll(BuildContext context, Widget page, RoutePredicate predicate, | ||
| 24 | - {bool rebuildRoutes = false}) { | ||
| 25 | - return Navigator.pushAndRemoveUntil( | ||
| 26 | - context, | ||
| 27 | - GetRoute( | ||
| 28 | - opaque: rebuildRoutes, builder: (BuildContext context) => page), | ||
| 29 | - predicate); | ||
| 30 | - } | ||
| 31 | -} |
-
Please register or login to post a comment