Skip to content

feat: add the data bundle sample #36

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

Merged
merged 3 commits into from
Oct 9, 2024

Conversation

Lyokone
Copy link
Contributor

@Lyokone Lyokone commented Aug 2, 2024

Description of what this PR is changing or adding:
Data Bundle sample for Firestore

Issues fixed by this PR (if any):

Risk Level

  • No risk
  • Somewhat Risky
  • High risk

Pre-submit checklist

@Lyokone Lyokone changed the title chore: add the data bundle sample feat: add the data bundle sample Aug 14, 2024
Copy link
Member

@thatfiredev thatfiredev left a comment

Choose a reason for hiding this comment

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

Thanks for opening this PR, @Lyokone !

Just 2 minor comments

Comment on lines 112 to 113
String string = response.body;
final buffer = Uint8List.fromList(string.codeUnits);
Copy link
Member

Choose a reason for hiding this comment

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

nit: can we name this variable body instead? I think it's more descriptive than string.

Suggested change
String string = response.body;
final buffer = Uint8List.fromList(string.codeUnits);
String body = response.body;
final buffer = Uint8List.fromList(body.codeUnits);


// Use the cached named query
final results = await FirebaseFirestore.instance.namedQueryGet(
"example-query",
Copy link
Member

Choose a reason for hiding this comment

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

The Web, iOS and Android samples use latest-stories-query (see example) - let's use that for consistency across languages.

Suggested change
"example-query",
"latest-stories-query",

Copy link
Member

@thatfiredev thatfiredev left a comment

Choose a reason for hiding this comment

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

Thanks @Lyokone !

@thatfiredev
Copy link
Member

I'll update https://firebase.google.com/docs/firestore/bundles accordingly

@thatfiredev thatfiredev merged commit 36a9c52 into firebase:main Oct 9, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants