flutter2figma library
Convert a Flutter UI into an editable Figma design.
Most people use the command-line tool:
dart pub global activate flutter2figma
flutter2figma export path/to/app
Then import design.json with the Flutter2Figma Figma plugin.
This library is the same pipeline as a Dart API. exportProject runs
all of it; the stages are available separately in
package:flutter2figma/analyzer.dart, compiler.dart, ir.dart and
figma.dart.
Classes
- ExportResult
- Everything an export produces.
Constants
- packageVersion → const String
-
The package version. Kept equal to
pubspec.yamlbytest/version_test.dart; bump both (and CHANGELOG.md) together.
Functions
-
exportProject(
String path, {ThemeBrightness? brightness, bool designSystem = true, int minComponentUses = 2, double screenWidth = 390, double screenHeight = 844, bool runtime = false, List< String> ? flutterCommand, bool autoLayout = true}) → Future<ExportResult> -
Analyzes the Flutter project at
pathand renders it for Figma.