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

Expose ImmutableProvider and ImmutableProviderTree #364

Merged
merged 1 commit into from
Jun 23, 2019

Conversation

felangel
Copy link
Owner

@felangel felangel commented Jun 21, 2019

Status

READY

Breaking Changes

NO

Description

Allow developers to provide immutable values, such as repositories, throughout the widget tree (#354).

Expose

  • ImmutableProvider
  • ImmutableProviderTree

Refactor

  • BlocProvider
  • BlocProviderTree
  • BlocListener
  • BlocListenerTree

Todos

  • Tests
  • Documentation
  • Examples

Impact to Remaining Code Base

None

@felangel felangel requested a review from jorgecoca June 21, 2019 03:27
@felangel felangel self-assigned this Jun 21, 2019
@felangel felangel added this to In progress in bloc Jun 21, 2019
@codecov
Copy link

codecov bot commented Jun 21, 2019

Codecov Report

Merging #364 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #364   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           9     12    +3     
  Lines         181    188    +7     
=====================================
+ Hits          181    188    +7
Impacted Files Coverage Δ
...kages/flutter_bloc/lib/src/immutable_provider.dart 100% <100%> (ø)
.../flutter_bloc/lib/src/immutable_provider_tree.dart 100% <100%> (ø)
...kages/flutter_bloc/lib/src/bloc_provider_tree.dart 100% <100%> (ø) ⬆️
packages/flutter_bloc/lib/src/tree_buildable.dart 100% <100%> (ø)
packages/flutter_bloc/lib/src/bloc_listener.dart 100% <100%> (ø) ⬆️
packages/flutter_bloc/lib/src/bloc_provider.dart 100% <100%> (ø) ⬆️
...kages/flutter_bloc/lib/src/bloc_listener_tree.dart 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6eeb358...5e4e947. Read the comment docs.

@felangel felangel force-pushed the feature/immutable-provider branch 2 times, most recently from 54d4959 to 70611f2 Compare June 21, 2019 04:01
Copy link
Collaborator

@jorgecoca jorgecoca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I honestly think you have the best documented library that I have ever seen ;)

if (provider == null) {
throw FlutterError(
"""
ImmutableProvider.of() called with a context that does not contain a value of type $T.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job on this error message. This will help a lot to troubleshoot issues ;)

@felangel felangel merged commit a202465 into master Jun 23, 2019
@felangel felangel deleted the feature/immutable-provider branch June 23, 2019 18:00
@felangel felangel moved this from In progress to Done in bloc Jun 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
bloc
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants