bokeh 0.1.1

  • Readme
  • Changelog
  • Installing
  • 50

Bloc Boilerplate generator #

Example Authentication Bloc

import 'dart:async';

import 'package:bloc/bloc.dart';
import 'package:bokeh/bokeh.dart';

part 'authentication_bloc.g.dart';

/// Events
abstract class _AuthenticationEvent {
  appStarted(int timestamp);
  credentialUpdated({String login, String password = "loremIpsum"});

/// States
abstract class _AuthenticationState {
  loading({int progress, String message});
  error(Exception e);

/// Bloc
@BlocOf(state: _AuthenticationState, event: _AuthenticationEvent)
class AuthenticationBloc
    extends Bloc<AuthenticationEvent, AuthenticationState> {
  AuthenticationState get initialState => AuthenticationState.idle();

  Stream<AuthenticationState> mapEventToState(
      AuthenticationEvent event) async* {
    yield* event.when(
      appStarted: (_) async* {
        final current = state as Loading;
        yield current.copyWith(progress: 20);
        await Future.delayed(Duration(seconds: 2));
        yield AuthenticationState.idle();
        yield AuthenticationState.loading();
        await Future.delayed(Duration(seconds: 4));
        yield AuthenticationState.loading(progress: 200);
        yield AuthenticationState.idle();
      credentialUpdated: (_) async* {
        await Future.delayed(Duration());

      loggedOut: () async* {
        yield AuthenticationState.idle();
      loggedIn: () async* {
        // skip

Changelog #

0.1.0 #

  • Initial version.

0.1.1 #

  • updates

Use this package as a library

1. Depend on it

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

  bokeh: ^0.1.1

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:bokeh/bokeh.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

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

  • Dart: 2.8.2
  • pana: 0.13.8-dev

Maintenance suggestions

Maintain an example.

None of the files in the package's example/ directory matches known example patterns.

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

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.6.0 <3.0.0
Dev dependencies
pedantic ^1.4.0
test ^1.0.0