A type-safe framework for writing Firebase Cloud Functions using Dart. Deploy with confidence using our modern CLI tools.
@OnDocumentCreated('todos/{todoId}')
Future<void> oncreatetodo(DocumentSnapshot snapshot, RequestContext context,
{required String todoId}) async {
context.logger.debug('todoId: ${todoId}');
final data = snapshot.data();
final title = data?['title'] as String?;
await snapshot.ref.update({'title': '$title from server!'});
}
@Http()
Future<Response> updateTodo(Todo todo) async {
firestore.collection('todos').doc(todo.id).update(todo.toJson());
return Response.ok('Todo updated: ${todo.id}');
}
Build with confidence using Dart's strong type system. Catch errors at compile time and get excellent IDE support for a robust development experience.
Seamlessly connect with Firebase services. Native Firebase integration with type-safe APIs and built-in best practices.
Already know Flutter? You'll feel right at home. Use the same language, tools, and patterns you love from Flutter development.
Use your favorite Dart packages and libraries. The entire pub.dev ecosystem is at your fingertips for maximum productivity.
Share models, logic, and utilities between your Flutter app and backend. Write once, use everywhere with perfect type safety.
Automate your workflow with our intuitive CLI. Quick project setup, easy deployment, and development tools at your command.
dartblaze new project_name
dartblaze init -e "[email protected]" -p project_id
dart run build_runner build -d
dartblaze deploy