figma_string_extension 0.2.0  figma_string_extension: ^0.2.0 copied to clipboard
figma_string_extension: ^0.2.0 copied to clipboard
Convert Figma String to Flutter Widget
example/main.dart
import 'package:figma_string_extension/figma_string_extension.dart';
import 'package:flutter/material.dart';
main() {
  FigmaStringConfig.setColorResolver((p) {
    // if you have custom color
    switch (p) {
      case 'Card Color':
        return const Color(0xffFFF0FE);
      default:
        throw 'unknown color [$p]';
    }
  });
  runApp(MaterialApp(
    home: Scaffold(
      body: Center(
        child: Container(
          width: 50,
          height: 50,
          decoration: BoxDecoration(
            color: '#D8F0FEF1'.asColor,
            boxShadow: 'box-shadow: 0px 3px 3px 0px #0000001F;'.asBoxShadows,
          ),
          child: const Text("hello"),
        ),
      ),
    ),
  ));
}