typesafe_firebase_functions 0.0.3 copy "typesafe_firebase_functions: ^0.0.3" to clipboard
typesafe_firebase_functions: ^0.0.3 copied to clipboard

A flutter library providing a type safe wrapper on firebase.

A library to put wrapper arround firebase functions to access it in typesafe elegant way.

Usage #

Refer Github Repo for example usage.

@Model()
class UserProfile extends BaseModel {
  String uid = "";
}

class ExampleApiService extends FirebaseFunctionsService {
  ExampleApiService() : super(prefix: "userClient/user", region: "asia-south1");

  late final load = createFunction<StringData, UserProfile>("/load");
}


final apiService = ExampleApiService();
Future<UserProfile> getUserName(String userId) async {
  UserProfile profile = await apiService.load(StringData(userId));
  return profile ?? UserProfile();
}
1
likes
160
points
144
downloads

Publisher

unverified uploader

Weekly Downloads

A flutter library providing a type safe wrapper on firebase.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

cloud_functions, flutter, typesafe_firebase_core

More

Packages that depend on typesafe_firebase_functions