Posts

Showing posts with the label Auto Route

Flutter ZERO Boilerplate Routing With Auto Route

Navigation and Routing take too much code and effort to implement. Two-Three lines of code have to be written for routing from one screen to another and in the end, it is not maintainable at all and becomes robust. We somehow need a way to generate one file for navigation purposes that can be easily maintained and has less boilerplate in order to be readable. If you are going to implement a router yourself, there's still a lot of boilerplate. All of this changes with the package  auto_route  which works elegantly with code generation. This way you can reduce the boilerplate while still having the ability to customize the routes to your heart's content. What is AutoRoute? It's a flutter navigation package that allows for strongly-typed arguments passing, effortless deep-linking. It uses code generation to simplify routes setup i.e reduce the boilerplate code. It requires only a minimal amount of code to generate everything needed for navigation. Why AutoRoute? For clean Rout...