dartblaze 0.0.2 copy "dartblaze: ^0.0.2" to clipboard
dartblaze: ^0.0.2 copied to clipboard

DartBlaze is a Dart library for building Firebase Cloud Functions.

Dartblaze #

Dartblaze allows you write Firebase Cloud Functions in pure Dart, bringing type safety, language, ecosystem and packages you already know and love from Flutter to the backend.

Installation #

See docs to install the CLI and get started.

Usage #

Write your cloud functions using the same syntax as in Node:

@OnDocumentCreated('todos/{todoId}')
Future<void> oncreatetodo(
  DocumentSnapshot snapshot,
  RequestContext context,
  {required String todoId}
) async {
  final data = snapshot.data();
  final title = data?['title'] as String?;
  await snapshot.ref.update({'title': '$title from server!'});
}

Then, run the generator dart run build_runner build --delete-conflicting-output to generate the neccesary code.

Finally, deploy using the CLI:

dartblaze deploy -f <function_name>

See docs for more info.

1
likes
120
points
195
downloads

Publisher

verified publisherdinkomarinac.dev

Weekly Downloads

DartBlaze is a Dart library for building Firebase Cloud Functions.

Homepage
Repository (GitHub)

Documentation

API reference

License

unknown (license)

Dependencies

dart_firebase_admin, fixnum, functions_framework, http, meta, openid_client, protobuf, shelf

More

Packages that depend on dartblaze