Skip to content

Add deploy Dart on Firebase Functions codelab sample#1277

Open
jhuleatt wants to merge 5 commits intodart-launchfrom
add-codelab-dart-functions-4853368971760704869
Open

Add deploy Dart on Firebase Functions codelab sample#1277
jhuleatt wants to merge 5 commits intodart-launchfrom
add-codelab-dart-functions-4853368971760704869

Conversation

@jhuleatt
Copy link
Copy Markdown
Collaborator

Adds a complete working implementation of the official "Deploy Dart on Firebase Functions" codelab inside the Dart repository under Dart/codelab-dart-functions. The setup avoids large auto-generated mobile project folders in the tree and features a cleanly abstracted data model package for true fullstack type safety with dart.


PR created automatically by Jules for task 4853368971760704869 started by @jhuleatt

This commit implements the Dart Firebase Functions codelab logic. It creates a Dart/codelab-dart-functions flutter application with an additional shared package for sharing the `IncrementResponse` object via json\_serializable between front-end and back-end logic. Additionally it implements the `incrementCallable` functionality via a new google\_cloud\_firestore and firebase\_functions dart application project that compiles and targets node correctly through firebase deploy.

Co-authored-by: jhuleatt <3759507+jhuleatt@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request implements a multiplayer counter application using Flutter and Dart-based Firebase Functions, supported by a shared package for data models. The review feedback identifies a critical type-casting error in the server's query parameter handling and a potential race condition where the returned counter value may be stale. Furthermore, the reviewer suggests improving error handling for unsupported HTTP methods and cleaning up unused boilerplate code and placeholder documentation in the shared package.

Comment thread Dart/codelab-dart-functions/functions/bin/server.dart
Comment thread Dart/codelab-dart-functions/functions/bin/server.dart
Comment thread Dart/codelab-dart-functions/functions/bin/server.dart
Comment on lines +1 to +6
// TODO: Put public facing types in this file.

/// Checks if you are awesome. Spoiler: you are.
class Awesome {
bool get isAwesome => true;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

This file appears to be boilerplate code from a package template and is not used in the project. It should be removed to maintain a clean codebase.

Comment on lines +14 to +39
TODO: Put a short description of the package here that helps potential users
know whether this package might be useful for them.

## Features

TODO: List what your package can do. Maybe include images, gifs, or videos.

## Getting started

TODO: List prerequisites and provide or point to information on how to
start using the package.

## Usage

TODO: Include short and useful examples for package users. Add longer examples
to `/example` folder.

```dart
const like = 'sample';
```

## Additional information

TODO: Tell users more about the package: where to find more information, how to
contribute to the package, how to file issues, what response they can expect
from the package authors, and more.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The README for the shared package contains numerous 'TODO' placeholders. These should be replaced with actual documentation describing the package's purpose and usage before the code is merged.

google-labs-jules bot and others added 2 commits April 17, 2026 15:44
This commit implements the Dart Firebase Functions codelab logic. It creates a Dart/codelab-dart-functions flutter application with an additional shared package for sharing the `IncrementResponse` object via json\_serializable between front-end and back-end logic. Additionally it implements the `incrementCallable` functionality via a new google\_cloud\_firestore and firebase\_functions dart application project that compiles and targets node correctly through firebase deploy.

Co-authored-by: jhuleatt <3759507+jhuleatt@users.noreply.github.com>
The dart setup action only configures `dart`, not `flutter`. Therefore when `dart pub get` is run in the root of the flutter app, it fails. We check the pubspec.yaml for the flutter sdk marker and skip those directories since flutter tests cannot run via just the dart SDK on CI.

Co-authored-by: jhuleatt <3759507+jhuleatt@users.noreply.github.com>
@jhuleatt jhuleatt requested a review from rodydavis April 17, 2026 16:39
@jhuleatt jhuleatt mentioned this pull request Apr 17, 2026
rodydavis and others added 2 commits April 17, 2026 12:03
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit implements the Dart Firebase Functions codelab logic. It creates a Dart/codelab-dart-functions flutter application with an additional shared package for sharing the `IncrementResponse` object via json\_serializable between front-end and back-end logic. Additionally it implements the `incrementCallable` functionality via a new google\_cloud\_firestore and firebase\_functions dart application project that compiles and targets node correctly through firebase deploy.

This also includes a fix for dart CI to not attempt to test flutter projects, as only dart sdk is available there.

Co-authored-by: jhuleatt <3759507+jhuleatt@users.noreply.github.com>
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