Skip to content

rodydavis/pocketbase_dart_generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pocketbase Dart Generator

Generate json_serializable and hive_generator classes for use with PocketBase client and app caching.

Library Usage

Create an instance of the client:

final client = PocketBaseGenerator(
  'POCKETBASE_URL',
  authenticate: (client) => client.admins.authViaEmail(
    'ADMIN_USERNAME',
    'ADMIN_PASSWORD',
  ),
);

Then call the generate function to create files at the specified output directory:

await client.generate(hive: true);

CLI Usage

Clone the repo locally and run the following command:

dart bin/pocketbase_dart_generator.dart -u ADMIN_USERNAME -p ADMIN_PASSWORD -l POCKETBASE_URL

Known Limitations

  • Not all types supported
  • Enums not generated for options
  • Deletes not yet supported (Hive Client)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published