figma2flutter 0.0.1-alpha.2 figma2flutter: ^0.0.1-alpha.2 copied to clipboard
This package converts Tokens Studio for Figma json exports into Flutter code.
Use this package as a library
Depend on it
Run this command:
With Dart:
$ dart pub add figma2flutter
This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get
):
dependencies:
figma2flutter: ^0.0.1-alpha.2
Alternatively, your editor might support dart pub get
. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:figma2flutter/config/args_parser.dart';
import 'package:figma2flutter/config/options.dart';
import 'package:figma2flutter/config/parser.dart';
import 'package:figma2flutter/extensions/string.dart';
import 'package:figma2flutter/generator.dart';
import 'package:figma2flutter/models/dimension_value.dart';
import 'package:figma2flutter/models/font_family_value.dart';
import 'package:figma2flutter/models/font_weight_value.dart';
import 'package:figma2flutter/models/spacing_value.dart';
import 'package:figma2flutter/models/token.dart';
import 'package:figma2flutter/token_parser.dart';
import 'package:figma2flutter/transformers/color_transformer.dart';
import 'package:figma2flutter/transformers/spacing_transformer.dart';
import 'package:figma2flutter/transformers/transformer.dart';
import 'package:figma2flutter/transformers/typography_transformer.dart';