binding_router 1.0.4 copy "binding_router: ^1.0.4" to clipboard
binding_router: ^1.0.4 copied to clipboard

Binding router is a router that extends from go_router and getx used for binding dependancies.

Binding Router Plugin #

Make implementation with go router and get x binding efficiency.

Examples #

Here are small examples that show you how to use binding router.

Coding #

BindingShellRouter with BindingRouter #

final router = GoRouter(initialLocation: "/", routes: [
  BindingShellRouter<BottomNavController>(
      binding: BottomNavBinding(),
      shellBuilder: (context, state, child) => BottomNav(child: child),
      routes: [
        BindingRouter<HomeCon>(
          binding: HomeBinding(),
          path: '/',
          builderPage: (context, state) =>
              const NoTransitionPage(child: HomeScreen()),
          routes: [
            BindingRouter<DetailCon>(
              binding: DetailBinding(),
              path: 'detail',
              builderPage: (context, state) => CustomTransitionPage<void>(
                key: state.pageKey,
                transitionDuration: const Duration(milliseconds: 500),
                child: const DetailPage(),
                transitionsBuilder:
                    (context, animation, secondaryAnimation, child) =>
                        FadeTransition(opacity: animation, child: child),
              ),
            ),
          ],
        ),
        BindingRouter<SettingCon>(
          binding: SettingBinding(),
          path: '/settings',
          builderPage: (context, state) =>
              const NoTransitionPage(child: SettingScreen()),
        ),
      ]),
]);

Developer #

Made by Um Kithya Senior Flutter Developer with ❤️

2
likes
130
pub points
0%
popularity

Publisher

unverified uploader

Binding router is a router that extends from go_router and getx used for binding dependancies.

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (LICENSE)

Dependencies

flutter, get, go_router

More

Packages that depend on binding_router