flutter_storyblok_code_generator 1.0.2 flutter_storyblok_code_generator: ^1.0.2 copied to clipboard
Code generator for flutter_storyblok, generating statically typed Dart code from your Storyblok blocks.
Flutter Storyblok Code Generator #
Uses Storybloks' Management API to generate Dart classes from Blocks, Datasources etc.
Getting Started #
-
Space ID: Obtained from from Storyblok under
Settings
>General
>Space
. -
Personal Access Token: Obtained from from Storyblok under
My Account
>Security
>Personal Access Token
.
Running the Generator #
Navigate to the project directory and run the following commands:
dart run flutter_storyblok_code_generator generate -s <space_id> -p <pat>
Usage #
Usage: flutter_storyblok_code_generator generate [arguments]
-h, --help Print this usage information.
-s, --space_id (mandatory) Your Storyblok Space ID
-p, --personal_access_token (mandatory) Your Personal Access Token, not your Space access token
-o, --output_path A directory path where the output file "bloks.generated.dart" will be created
(defaults to "lib")
This will call the Management API multiple times to fetch all Blocks under "Blocks Library", all Datasources and their entries, external datasources etc.
Rate limit set to 3/s.