0 purchases
brick supabase generators
Brick Supabase Generators #
Code generator that provides (de)serializing functions for Brick adapters using SupabaseProvider. This package does not produce code. It can be imported into other Brick build domains.
This package should not be imported into an end application as it does not generate code.
Usage #
Apply the SupabaseSerdes in your own AnnotationSuperGenerator:
import 'package:brick_supabase_generators/supabase_serdes.dart';
class MyDomainGenerator extends AnnotationSuperGenerator<ConnectMyDomainWithSupabase> {
final String superAdapterName;
final String repositoryName;
const OfflineFirstGenerator({
this.superAdapterName = 'MyDomain',
this.repositoryName = 'MyDomainWithSupabase',
});
/// Given an [element] and an [annotation], scaffold generators
List<SerdesGenerator> buildGenerators(Element element, ConstantReader annotation) {
final supabase = SupabaseSerdes(element, annotation, repositoryName: repositoryName);
final otherProvider = OtherProviderSerdes(element, annotation, repositoryName: repositoryName);
final generators = <SerdesGenerator>[];
generators.addAll(supabase.generators);
generators.addAll(otherProvider.generators);
return generators;
}
}
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.