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

discontinued
outdated

A sample command-line application.

ok_route #

Annotation route of flutter.

Usage #

import project #

dependencies:
  ok_route: ^0.1.0

Add Annotation to your widget #

import `package:ok_route:okroute.dart`;

@OKRoute("/home")
class HomePage extends StatelessWidget{
    // ...
}

Generate route class #

How to use pub global

Use pub global

Add pub/pub.bat to your $PATH.

Add cache/bin to your path like image

20190808104703.png

Get generator

$ pub global activate ok_route

or

$ pub.bat global activate ok_route

Use generator

$ ok_route $your_project

Use route in your project #

import 'package:ok_route_example/okroutes.dart'; // The dart file have the routes.

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
      routes: OKRouteMap.getRoutes(), // routes create by ok_route.
    );
  }
}

LICENSE #

MIT style

0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A sample command-line application.

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

yaml

More

Packages that depend on ok_route