yeet 0.3.1+1 copy "yeet: ^0.3.1+1" to clipboard
yeet: ^0.3.1+1 copied to clipboard

discontinued
outdated

A dank and easy way to navigate using Router API of Navigator 2.0 - No boilerplate. No code generation. No classes. Just yeet!

yeet 👌 #

yeet


A dank way to navigate.

Pub Version


Still experimental!

How to yeet? #

  1. Install latest version of yeet:
dependencies:
  flutter:
    sdk: flutter
  yeet: ^0.3.1
  1. Define your yeets:
final yeet = Yeet(
  children: [
    Yeet(
      path: '/',
      builder: (_, __) => HomeView(),
    ),
    Yeet(
      path: r'/user/:id(\d+)',
      builder: (params, _) => UserView(int.parse(params['id']!)),
      children: [
        Yeet(
          path: 'posts',
          builder: (params, _) => PostsView(int.parse(params['id']!)),
        )
      ],
    ),
    Yeet(
      path: ':_(.*)',
      builder: (_, __) => NotFoundView(),
    ),
  ],
);
  1. Turn your MaterialApp into MaterialApp.router and add the following arguments.
return MaterialApp.router(
  routeInformationParser: YeetInformationParser(),
  routerDelegate: YeeterDelegate(yeet: yeet),
);
  1. Set new paths.
context.yeet('/your/new/path');
context.yeet('can/be/relative');
  1. And pop.
context.yeet();
  1. Enjoy!

  2. Missing a feature? Have a suggestion? Found a bug? Open an issue. Thanks!

82
likes
0
pub points
0%
popularity

Publisher

verified publisheridenti.app

A dank and easy way to navigate using Router API of Navigator 2.0 - No boilerplate. No code generation. No classes. Just yeet!

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, path_to_regexp, universal_platform

More

Packages that depend on yeet