yeet 0.1.0 copy "yeet: ^0.1.0" to clipboard
yeet: ^0.1.0 copied to clipboard

discontinued
outdated

a dank way to navigate. no boilerplate. no code generation. no classes. just yeet it.

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.1.0
  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 way to navigate. no boilerplate. no code generation. no classes. just yeet it.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, path_to_regexp

More

Packages that depend on yeet