bloc_generator 0.4.0

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

bloc_generator

Installation

dev_dependencies:
  build_runner: <latest_version>
  bloc_generator: <latest_version>

Output

bloc_generator outputs a .bloc.dart file in the same directory as the file using the annotations. This file is a part of file that needs to be a part of the original file. To generate the files use build_runners command line package to build out any annotations. E.g.

> flutter packages pub run build_runner build

or to watch for changes:

> flutter packages pub run build_runner watch

Example

An extensive example can be found in the root example/ directory.

0.4.4

  • Changed name from flutter_bloc_generator to bloc_generator

0.3.0

  • Removed AsyncMapperService
  • Made all mappers streams
  • Split out providers and disposer to flutter_bloc_provider package

0.2.6

  • Add MapperService, AsyncMapperService, RequireMapperService and RequireAsyncMapperService

0.2.5

  • Currect trigger types to Future from void
  • Make mappers optionally async

0.2.4

  • Add TriggeredService

0.2.3

  • Allow mappers to return null to not add anything to the output

0.2.2

  • Added paramaters that can be passed to the BLoC and are accessible to BLoC services

0.2.1

  • Make requiring a service require the service type
  • Add BLoCService service that takes an entire BLoC instead of a Stream or Sink

0.2.0

  • Make mappers async

0.1.9

  • Make template value the only current value stored

0.1.8

  • Moved value updater before calling mappers
  • Updating latest values on template

0.1.7

  • OutputService automatic listener
  • OutputService automatic subscription disposer

0.1.6

  • Remove current data from mappers

0.1.5

  • Made services public members

0.1.4

  • Changed Service to InputService and added OutputService

0.1.3

  • Format code
  • Add example

0.1.2

  • Fix latest value updater for initial data

0.1.1

  • Change analyzer dependency to ^0.33.0 for compatability

0.1.0

  • Initial public release

example/example.dart

/// An extensive example is available at https://github.com/CallumIddon/flutter_bloc_generator/example

Use this package as a library

1. Depend on it

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


dependencies:
  bloc_generator: ^0.4.0

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:bloc_generator/bloc_generator.dart';
  
Version Uploaded Documentation Archive
0.4.0 Jan 1, 2019 Go to the documentation of bloc_generator 0.4.0 Download bloc_generator 0.4.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
50
Learn more about scoring.

We analyzed this package on Jan 15, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.10

Platforms

Detected platforms: other

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

Health issues and suggestions

Document public APIs. (-1 points)

2 out of 2 API elements (library, class, field or method) have no adequate dartdoc content. Good documentation improves code readability and discoverability through search.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
analyzer ^0.33.0 0.33.6+1 0.34.1
bloc_annotations 0.4.0 0.4.0
build ^1.0.1 1.1.0
source_gen ^0.9.0 0.9.4
Transitive dependencies
args 1.5.1
async 2.0.8
charcode 1.1.2
collection 1.14.11
convert 2.1.1
crypto 2.0.6
csslib 0.14.6
dart_style 1.2.0 1.2.2
front_end 0.1.6+9 0.1.8
glob 1.1.7
html 0.13.3+3
kernel 0.3.6+9 0.3.8
logging 0.11.3+2
meta 1.1.7
package_config 1.0.5
path 1.6.2
plugin 0.2.0+3
pub_semver 1.4.2
source_span 1.5.1
string_scanner 1.0.4
term_glyph 1.1.0
typed_data 1.1.6
utf 0.9.0+5
watcher 0.9.7+10
yaml 2.1.15
Dev dependencies
build_runner ^1.1.0