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

fix(cloud_firestore): Export enum LoadBundleTaskState from Platform Interface package. #8027

Merged
merged 2 commits into from
Feb 10, 2022

Conversation

jarrodonlo
Copy link
Contributor

@jarrodonlo jarrodonlo commented Feb 6, 2022

Description

FlutterFire's example at https://firebase.flutter.dev/docs/firestore/usage/#data-bundles uses the enum LoadBundleTaskState (snippet below).
However, the package currently does not export, requiring the developer to import from source.

// Use .stream API to expose a stream which listens for LoadBundleTaskSnapshot events.
task.stream.listen((taskStateProgress) {
  if(taskStateProgress.taskState == LoadBundleTaskState.success){
    //bundle is loaded into app cache!
  }
});

Related Issues

N/A

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).
This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (melos run analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

…d be exported

FlutterFire's example at https://firebase.flutter.dev/docs/firestore/usage/#data-bundles uses the enum LoadBundleTaskState (snippet below). 
However, the package currently does not export, requiring the developer to import from source. 

```dart
// Use .stream API to expose a stream which listens for LoadBundleTaskSnapshot events.
task.stream.listen((taskStateProgress) {
  if(taskStateProgress.taskState == LoadBundleTaskState.success){
    //bundle is loaded into app cache!
  }
});
```
@Salakar Salakar added blocked: do-not-merge PR blocked externally cla: no labels Feb 8, 2022
@Salakar Salakar changed the title [cloud_firestore_platform_interface] enum 'LoadBundleTaskState' shoul… fix(cloud_firestore): export enum 'LoadBundleTaskState' Feb 8, 2022
@russellwheatley russellwheatley changed the title fix(cloud_firestore): export enum 'LoadBundleTaskState' fix(cloud_firestore): Export enum LoadBundleTaskState from Platform Interface package. Feb 8, 2022
@russellwheatley
Copy link
Member

Hey @jarrodonlo, do you mind signing the CLA, please? Then we can get this merged in. Thanks.

@google-cla google-cla bot added cla: yes and removed cla: no labels Feb 10, 2022
@russellwheatley russellwheatley removed the blocked: do-not-merge PR blocked externally label Feb 10, 2022
Copy link
Member

@russellwheatley russellwheatley left a comment

Choose a reason for hiding this comment

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

LGTM

@russellwheatley russellwheatley merged commit 7fa461e into firebase:master Feb 10, 2022
@firebase firebase locked and limited conversation to collaborators Mar 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants