Last active
October 14, 2018 08:29
-
-
Save felangel/099a7b07a3d112f2435dd6eb416dbbad to your computer and use it in GitHub Desktop.
[bloc_package] simple bloc example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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