fluro_annotation_generator_fork 1.0.0

  • Readme
  • Changelog
  • Installing
  • 48

Fluro Annotation Generator #

Enable annotation support for fluro, which automatically generate fluro routes for you.

Usage #

  1. decorate route with @FRoute()
  2. decorate entry widget with @EnableFluroRouter()

Rule #

  1. all optional parameters are not required
  2. route should have a no-argument constructor or a single-argument constructor which accepts Map<String, List

Example #

// file: mail.dart
void main() => runApp(MyApp());

@EnableFluroRouter()
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,
      ),
      onGenerateRoute: createFluroRouter().generator,
      initialRoute: "/",
    );
  }
}

// file: page1.dart
@FRoute(
  "/", 
  // transitionType: TransitionType.native,
  // handlerType: HandlerType.route,
  // handlerFunc: (BuildContext ctx, Map<String, List<String>> parameters) => Page1(),
)
class Page1 extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Text("Page 1");
  }
}

Recipe #

1. Set default transition effect #

TBD

1.0.0 #

  • Tested ready for production, fixed bug from previous library

0.0.9 #

  • name update

0.0.8 #

  • logging

0.0.7 #

  • open

0.0.6 #

  • troubleshoot toFunctionValue

0.0.5 #

  • logging

0.0.4 #

  • logging

0.0.3 #

  • Updated build options

0.0.2 #

  • Updated library name

0.0.1 #

  • First version, forked to work with fluro_fork

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  fluro_annotation_generator_fork: ^1.0.0

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:fluro_annotation_generator_fork/fluro_annotation_generator_fork.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
1
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
48
Learn more about scoring.

We analyzed this package on Jul 11, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.14
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

Because:

  • fluro_annotation_generator_fork that is a package requiring null.

Health issues and suggestions

Document public APIs. (-1 points)

9 out of 9 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/src/annotation/f_route.dart. (-0.50 points)

Analysis of lib/src/annotation/f_route.dart reported 1 hint:

line 1 col 8: Don't import implementation files from another package.

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and fluro_annotation_generator_fork.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.4.0 <3.0.0
analyzer ^0.39.8 0.39.12
build ^1.2.2 1.3.0
build_config ^0.4.2 0.4.2
fluro_fork ^0.0.1 0.0.1
flutter 0.0.0
glob ^1.2.0 1.2.0
source_gen ^0.9.5 0.9.6
Transitive dependencies
_fe_analyzer_shared 5.0.0
args 1.6.0
async 2.4.2
charcode 1.1.3
checked_yaml 1.0.2
collection 1.14.12 1.14.13
convert 2.1.1
crypto 2.1.5
csslib 0.16.1
dart_style 1.3.6
html 0.14.0+3
js 0.6.2
json_annotation 3.0.1
logging 0.11.4
meta 1.1.8 1.2.2
node_interop 1.1.1
node_io 1.1.1
package_config 1.9.3
path 1.7.0
pub_semver 1.4.4
pubspec_parse 0.1.5
sky_engine 0.0.99
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
watcher 0.9.7+15
yaml 2.2.1
Dev dependencies
build_runner any
pedantic ^1.7.0 1.9.0 1.9.2
test ^1.6.0