reflutter 0.2.2

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • new50

Reflutter

Status
CI BuildTravis
ReleaseTravis
PackagePub

Reflutter is a simple Dart library for automatically generating HTTP clients from simple metadata. It borrows heavily from the jaguar_http project and the Refit project for .NET.

Usage

See the example folder for a simple usage example.

Features and bugs

Please file bugs and feature requests on GitHub.

Changelog

0.2.2 - Initial release with a changelog.

example/example.dart

library reflutter.example;

import 'dart:async';
import 'package:http/http.dart';
import 'package:jaguar_serializer/jaguar_serializer.dart';
import 'package:reflutter/reflutter.dart';
import 'models/user.dart';

part 'example.api.dart';

/// definition
@ReflutterHttp(name: 'Api')
abstract class ApiDefinition {
  @Get('/users/:id')
  Future<ReflutterResponse<User>> getUserById(@Param() String id);

  @Post('/users')
  Future<ReflutterResponse<User>> postUser(@Body() User user);

  @Put('/users/:uid')
  Future<ReflutterResponse<User>> updateUser(
      @Param('uid') String userId, @Body() User user);

  @Delete('/users/:id')
  Future<ReflutterResponse> deleteUser(@Param() String id);

  @Get('/users')
  Future<ReflutterResponse<List<User>>> search(
      @QueryParam('n') String name, @QueryParam('e') String email);
}

Use this package as a library

1. Depend on it

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


dependencies:
  reflutter: "^0.2.2"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

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

3. Import it

Now in your Dart code, you can use:


      import 'package:reflutter/reflutter.dart';
  
Version Uploaded Documentation Archive
0.2.2 Jun 20, 2018 Go to the documentation of reflutter 0.2.2 Download reflutter 0.2.2 archive
0.2.1 Jun 20, 2018 Go to the documentation of reflutter 0.2.1 Download reflutter 0.2.1 archive
0.2.0+1 Jun 6, 2018 Go to the documentation of reflutter 0.2.0+1 Download reflutter 0.2.0+1 archive
0.2.0 Jun 6, 2018 Go to the documentation of reflutter 0.2.0 Download reflutter 0.2.0 archive
0.1.9 Jun 6, 2018 Go to the documentation of reflutter 0.1.9 Download reflutter 0.1.9 archive
0.1.8 May 31, 2018 Go to the documentation of reflutter 0.1.8 Download reflutter 0.1.8 archive
0.1.7 May 27, 2018 Go to the documentation of reflutter 0.1.7 Download reflutter 0.1.7 archive
0.1.6 May 27, 2018 Go to the documentation of reflutter 0.1.6 Download reflutter 0.1.6 archive
0.1.5 May 27, 2018 Go to the documentation of reflutter 0.1.5 Download reflutter 0.1.5 archive
0.1.4 May 27, 2018 Go to the documentation of reflutter 0.1.4 Download reflutter 0.1.4 archive

All 11 versions...

Analysis

We analyzed this package on Jun 20, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
0 / 100
Health:
Code health derived from static analysis. [more]
100 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
50
Learn more about scoring.

Platforms

Detected platforms: other

Primary library: package:reflutter/reflutter.dart with components: io, isolate, build, mirrors.

Suggestions

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.54 <2.0.0
analyzer ^0.31.1 0.31.2-alpha.2 0.32.1
build ^0.12.4 0.12.6
code_builder >2.3.0 <4.0.0 3.1.0
dart_style ^1.0.14 1.1.0
http ^0.11.3 0.11.3+16
jaguar_generator_config ^0.0.1 0.0.1
jaguar_serializer ^1.0.0-dev7 1.0.0-dev9 2.1.5
logging ^0.11.3 0.11.3+1
meta ^1.1.5 1.1.5
source_gen ^0.8.1 0.8.2
Transitive dependencies
args 1.4.3
async 2.0.7
built_collection 3.1.1
built_value 5.5.2
charcode 1.1.1
collection 1.14.10
convert 2.0.1
crypto 2.0.5
csslib 0.14.4
fixnum 0.10.7
front_end 0.1.0-alpha.12 0.1.1
glob 1.1.5
html 0.13.3+1
http_parser 3.1.2
kernel 0.3.0-alpha.12 0.3.1
matcher 0.12.3
package_config 1.0.3
path 1.6.1
plugin 0.2.0+2
quiver 0.29.0+1
source_span 1.4.0
stack_trace 1.9.2
string_scanner 1.0.2
typed_data 1.1.5
utf 0.9.0+4
watcher 0.9.7+8
yaml 2.1.14
Dev dependencies
build_config ^0.2.6
build_runner 0.8.8
jaguar_serializer_cli ^1.0.0-dev8
test ^0.12.38