fallstrick_routing 0.0.2

fallstrick_routing #

language license

Usage #

A simple usage example:

import 'package:fallstrick_routing/fallstrick_routing.dart';

@RequestMapping(path: '/example')
class ExampleController {
  @RequestMapping(path: 'heollword', method: 'GET')
  String helloWorld() {
    return 'helloWorld';
  }

  @Post(path: 'heollword2')
  String helloWorld2() {
    return 'helloWorld2';
  }

  @Put(path: 'heollword')
  String helloWorld3() {
    return 'helloWorld3';
  }

  @Delete(path: 'heollword')
  String helloWorld4() {
    return 'helloWorld4';
  }
}

We should use this package with fallstrick_mvc

Features and bugs #

Please file feature requests and bugs at the issue tracker.

0.0.1 #

  • publish beta version

0.0.2 #

  • add responseHeaders to RequestMapping

example/fallstrick_routing_example.dart

import 'package:fallstrick_routing/fallstrick_routing.dart';

@RequestMapping(path: '/example')
class ExampleController {
  @RequestMapping(path: 'heollword', method: 'GET')
  String helloWorld() {
    return 'helloWorld';
  }

  @Post(path: 'heollword2')
  String helloWorld2() {
    return 'helloWorld2';
  }

  @Put(path: 'heollword')
  String helloWorld3() {
    return 'helloWorld3';
  }

  @Delete(path: 'heollword')
  String helloWorld4() {
    return 'helloWorld4';
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  fallstrick_routing: ^0.0.2

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or 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:fallstrick_routing/fallstrick_routing.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
9
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
49
Learn more about scoring.

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

  • Dart: 2.7.1
  • pana: 0.13.5

Health suggestions

Format lib/fallstrick_routing.dart.

Run dartfmt to format lib/fallstrick_routing.dart.

Format lib/src/annotation/delete.dart.

Run dartfmt to format lib/src/annotation/delete.dart.

Format lib/src/annotation/get.dart.

Run dartfmt to format lib/src/annotation/get.dart.

Fix additional 3 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/src/annotation/post.dart (Run dartfmt to format lib/src/annotation/post.dart.)
  • lib/src/annotation/put.dart (Run dartfmt to format lib/src/annotation/put.dart.)
  • lib/src/annotation/requesting_mapping.dart (Run dartfmt to format lib/src/annotation/requesting_mapping.dart.)

Maintenance suggestions

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
Dev dependencies
pedantic ^1.8.0
test ^1.6.0