Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: v5.0.0 #1302

Merged
merged 56 commits into from
Jul 2, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
9066ccd
feat!: bloc to extend cubit instead of stream
felangel Jun 13, 2020
ae504c4
remove duplicated state
felangel Jun 14, 2020
f85023d
bloc v5.0.0-dev
felangel Jun 14, 2020
0c99cf0
restrict emit API from bloc
felangel Jun 14, 2020
4eb3385
test coverage
felangel Jun 14, 2020
3d8a903
adjust emit override
felangel Jun 15, 2020
527f3b5
cubit v0.0.4
felangel Jun 15, 2020
f383ea9
allow null initialState
felangel Jun 16, 2020
0070149
remove test
felangel Jun 16, 2020
c0c93c2
update to cubit v0.0.7
felangel Jun 21, 2020
9bfdc32
bloc v5.0.0-dev.1
felangel Jun 21, 2020
c2a7d6f
update to cubit v0.0.8
felangel Jun 22, 2020
660443b
feat(flutter_bloc)!: v5.0.0 (#1325)
felangel Jun 23, 2020
177397b
update assets
felangel Jun 23, 2020
6383f4e
bloc v5.0.0-dev.3
felangel Jun 23, 2020
368a11d
flutter_bloc v5.0.0-dev.1
felangel Jun 23, 2020
17d2a8d
bloc v5.0.0-dev.4
felangel Jun 24, 2020
00e2abf
bloc_test v6.0.0-dev.1
felangel Jun 24, 2020
63347f5
bloc v5.0.0-dev.5
felangel Jun 24, 2020
7314582
docs(bloc): additional documentation updates
felangel Jun 24, 2020
4880399
flutter_bloc v5.0.0-dev.2
felangel Jun 24, 2020
01316f3
bloc_test documentation updates
felangel Jun 24, 2020
33beaec
bloc_test use bloc ^5.0.0-dev.6
felangel Jun 24, 2020
5eba67f
angular_bloc v6.0.0-dev.1
felangel Jun 24, 2020
2cfefb8
update angular_counter example
felangel Jun 24, 2020
c636cb8
feat(bloc): ignore newly added events after bloc is closed
felangel Jun 24, 2020
e68b9e2
bloc minor documentation updates
felangel Jun 24, 2020
85dfe02
flutter_bloc: upgrade to bloc ^5.0.0-dev.7
felangel Jun 24, 2020
6dee534
angular_bloc: upgrade to bloc ^5.0.0-dev.7
felangel Jun 24, 2020
1b68db8
bloc_test: upgrade to bloc ^5.0.0-dev.7
felangel Jun 24, 2020
3c6b215
adjust supporters section in main README to be consistent
felangel Jun 24, 2020
755c6df
adjust asset units in READMEs
felangel Jun 26, 2020
8aff88d
feat!: remove BlocSupervisor and rename BlocDelegate to BlocObserver
felangel Jun 28, 2020
25dec51
docs: minor update to bloc readme
felangel Jun 28, 2020
65bed00
docs: minor bloc readme updates
felangel Jun 28, 2020
aec1ab0
update examples/angular_counter
felangel Jun 28, 2020
e1d6066
bloc_test v6.0.0-dev.3
felangel Jun 28, 2020
445cd2d
update flutter_bloc to bloc v5.0.0-dev.10
felangel Jun 28, 2020
2d16b07
update angular_bloc to use bloc v5.0.0-dev.10
felangel Jun 28, 2020
0bb189d
minor update to bloc README
felangel Jun 28, 2020
aa7b7d9
minor update to bloc_test README
felangel Jun 28, 2020
b637d9d
feat(bloc): addError (#1360)
felangel Jun 30, 2020
42d6c9d
upgrade bloc_test to bloc 5.0.0-dev.11
felangel Jun 30, 2020
3bb78c7
upgrade angular_bloc to bloc 5.0.0-dev.11
felangel Jun 30, 2020
d99b1e8
minor updates to READMEs
felangel Jun 30, 2020
cb7840b
upgrade flutter_bloc to bloc 5.0.0-dev.11
felangel Jun 30, 2020
d7ee6d7
Merge branch 'master' into feat/bloc-extends-cubit
felangel Jun 30, 2020
f998366
asset updates
felangel Jul 1, 2020
052c894
bloc: 5.0.0-rc
felangel Jul 2, 2020
b9185c4
minor asset updates
felangel Jul 2, 2020
2466893
docs(bloc): minor documentation enhancements
felangel Jul 2, 2020
13a8a12
update asset refs
felangel Jul 2, 2020
dd6f292
bloc_test 6.0.0-rc
felangel Jul 2, 2020
6da6080
angular_bloc 6.0.0-dev.5
felangel Jul 2, 2020
7855bb7
flutter_bloc v5.0.0-rc
felangel Jul 2, 2020
34803fa
update asset refs
felangel Jul 2, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs(bloc): minor documentation enhancements
  • Loading branch information
felangel committed Jul 2, 2020
commit 2466893275b986637db9c02d37d94d6aaf5fd94e
1 change: 1 addition & 0 deletions packages/bloc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- feat: ignore newly added events after bloc is closed ([#1236](https://github.com/felangel/bloc/issues/1236)).
- feat: add `addError` to conform to `EventSink` interface.
- feat: mark `onError`, `onTransition`, `onEvent` as `protected`.
- docs: documentation improvements
- docs: logo updates

# 5.0.0-dev.11
Expand Down
4 changes: 2 additions & 2 deletions packages/bloc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ At this point, all `Bloc` `Exceptions` will also be reported to the `SimpleBlocO

**add** is a method that takes an `event` and triggers `mapEventToState`. If `close` has already been called, any subsequent calls to `add` will be ignored and will not result in any subsequent state changes.

**addError** is a method that takes an `error` and `stackTrace` and triggers `onError`.
**addError** is a method that notifies the `bloc` of an `error` and triggers `onError`.

**transformEvents** is a method that transforms the `Stream<Event>` along with a transition function, `transitionFn`, into a `Stream<Transition>`. Events that should be processed by `mapEventToState` need to be passed to `transitionFn`. **By default `asyncExpand` is used to ensure all events are processed in the order in which they are received**. You can override `transformEvents` for advanced usage in order to manipulate the frequency and specificity with which `mapEventToState` is called as well as which events are processed.

Expand All @@ -184,7 +184,7 @@ At this point, all `Bloc` `Exceptions` will also be reported to the `SimpleBlocO

**onError** is a method that can be overridden to handle whenever an `Exception` is thrown. By default all exceptions will be ignored and `Bloc` functionality will be unaffected. **It is a great place to add bloc-specific error handling**.

**close** is a method that closes the `event` and `state` streams. `close` should be called when a `Bloc` is no longer needed. Once `close` is called, `events` that are `added` will not be processed and will result in an error being passed to `onError`. In addition, if `close` is called while `events` are still being processed the `bloc` will continue to process the pending `events` to completion.
**close** is a method that closes the `event` and `state` streams. `close` should be called when a `Bloc` is no longer needed. Once `close` is called, `events` that are `added` will not be processed. In addition, if `close` is called while `events` are still being processed the `bloc` will finish processing the pending `events`.

## BlocObserver Interface

Expand Down
6 changes: 3 additions & 3 deletions packages/bloc/lib/src/bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ abstract class Bloc<Event, State> extends CubitStream<State>
}
}

/// Notifies the [bloc] of an [error] which triggers [onError].
@override
void addError(Object error, [StackTrace stackTrace]) {
onError(error, stackTrace);
Expand All @@ -147,10 +148,9 @@ abstract class Bloc<Event, State> extends CubitStream<State>
/// Closes the `event` and `state` `Streams`.
/// This method should be called when a [bloc] is no longer needed.
/// Once [close] is called, `events` that are [add]ed will not be
/// processed and will result in an error being passed to [onError].
/// processed.
/// In addition, if [close] is called while `events` are still being
/// processed,
/// the [bloc] will continue to process the pending `events` to completion.
/// processed, the [bloc] will finish processing the pending `events`.
@override
@mustCallSuper
Future<void> close() async {
Expand Down