design_tokens_generator 1.0.5
design_tokens_generator: ^1.0.5 copied to clipboard
Convert JSON design tokens to Material 3 compatible Flutter themes and strongly-typed Dart classes with improved logging and camelCase naming.
Use this package as an executable
Install it
You can install the package from the command line:
dart pub global activate design_tokens_generator
Use it
The package has the following executables:
$ generate_tokens
Use this package as a library
Depend on it
Run this command:
With Flutter:
$ flutter pub add design_tokens_generator
This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get
):
dependencies:
design_tokens_generator: ^1.0.5
Alternatively, your editor might support flutter pub get
. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:design_tokens_generator/design_tokens_generator.dart';