Skip to content

Instantly share code, notes, and snippets.

@felangel
Last active October 14, 2018 08:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felangel/099a7b07a3d112f2435dd6eb416dbbad to your computer and use it in GitHub Desktop.
Save felangel/099a7b07a3d112f2435dd6eb416dbbad to your computer and use it in GitHub Desktop.
[bloc_package] simple bloc example
import 'dart:async';
import 'package:bloc/bloc.dart';
class SimpleBloc extends Bloc<dynamic, String> {
@override
Stream<String> mapEventToState(String state, dynamic event) async* {
yield 'state';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment