yyy_route_annotation 0.0.4 copy "yyy_route_annotation: ^0.0.4" to clipboard
yyy_route_annotation: ^0.0.4 copied to clipboard

Provide a route generator to create route map quickly by annotations.

yyy_route_annotation #

Provide a route generator to create route map quickly by annotations.

When you receive a notification or deep link, you can use url to jump to each page.

Usage #

Add packages to dependencies #

Add the package to dependencies in your project/packages's pubspec.yaml

  • null-safety
environment:
  sdk: '>=2.12.0 <3.0.0'
dependencies:
  yyy_route_annotation: ^0.0.2
dev_dependencies:
  build_runner: ^2.0.0

Download with flutter packages get

Add annotation #

import 'package:yyy_route_annotation/route_serializable.dart';
@RoutePage()
class TestPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container();
  }
}

@RouteMain()
void main() {
  runApp(MyApp());
}

flutter packages pub run build_runner build
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      routes: allRoutes,
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

Push #

RouteManager.push(context,"yyy://page/one_page?param_one=xx&two=xx");

url params use '_' and dart class params use 'Camel Case'.

0
likes
120
pub points
0%
popularity

Publisher

unverified uploader

Provide a route generator to create route map quickly by annotations.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

analyzer, build, flutter, source_gen

More

Packages that depend on yyy_route_annotation