Showing
1 changed file
with
2 additions
and
0 deletions
| 1 | import 'package:flutter/widgets.dart'; | 1 | import 'package:flutter/widgets.dart'; |
| 2 | import 'package:get/src/instance/get_instance.dart'; | 2 | import 'package:get/src/instance/get_instance.dart'; |
| 3 | 3 | ||
| 4 | +/// GetView is a great way of quickly access your Controller | ||
| 5 | +/// without having call Get.find<Controller>() yourself. | ||
| 4 | abstract class GetView<T> extends StatelessWidget { | 6 | abstract class GetView<T> extends StatelessWidget { |
| 5 | const GetView({Key key}) : super(key: key); | 7 | const GetView({Key key}) : super(key: key); |
| 6 | T get controller => GetInstance().find<T>(); | 8 | T get controller => GetInstance().find<T>(); |
-
Please register or login to post a comment