Heard about Get , a light weight Flutter framework for developing apps with a smart Navigation manager. So what’s make Get Special, Is Flutter has Navigator to do what you want to do ? Yeh. But Get is smart and fast and it is one of the top package on pub.dev
How to use Get
Go to pubspec.yaml file add it as dependecies and also add an import statement to the top of your .dart file.
dependencies: flutter: sdk: flutter get:
import 'package:get/get.dart';
Get can be used to move to another widget page/route or simply calling Get.to . A prerequisite for this is a small change in main, replace the MeterialApp constructor with GetMaterialApp
void main() async { runApp(new GetMaterialApp( home: new MyApp(), )); }
Suppose I have widget screens like ProductPage, I want to replace conventional flutter way of calling the push with Get.
Navigator.push(context, new MaterialPageRoute(builder: (context) => (Product())));
can replace with
Get.to(Product());
Get can be useful on various occasions, I save it for another post.