How do I translate Figma CSS styles into Flutter widgets?

I’m designing in Figma and need help converting specific CSS styling to Flutter code. I have a button design that uses these CSS properties:

background-color: #FF8C42;
box-shadow: inset 8px -6px 15px rgba(0, 0, 0, 0.3);
border-radius: 50px;

I’m not sure how to implement the inset shadow effect and rounded corners in Flutter. What’s the best approach to recreate this exact styling using Flutter’s decoration system? Should I use Container with BoxDecoration or is there a better widget for this kind of button styling?

Hit this same problem last month converting a Figma prototype. Container works, but ElevatedButton.styleFrom() gives you way better control over button behavior while letting you add custom styling. For inset shadows, I use a Stack with two containers - bottom one’s your main color, top one’s a LinearGradient from top-left with black at 0.25 opacity. Just match the gradient direction to your Figma shadow angle.

ElevatedButton(
  style: ElevatedButton.styleFrom(
    backgroundColor: Color(0xFFFF8C42),
    shape: RoundedRectangleBorder(
      borderRadius: BorderRadius.circular(50),
    ),
    elevation: 0,
  ),
)

Wrap that in your Stack setup for the shadow overlay. More code, but taps actually work unlike pure Container solutions.

Use a Container with BoxDecoration for that styling. Flutter doesn’t have native inset shadows like CSS, but you can fake it by layering two Containers. The outer one gets your main background color, and the inner one uses a gradient to create the inset shadow look.

Here’s some sample code:

Container(
  decoration: BoxDecoration(
    color: Color(0xFFFF8C42),
    borderRadius: BorderRadius.circular(50),
    gradient: RadialGradient(
      colors: [
        Colors.black.withOpacity(0.3),
        Colors.transparent,
      ],
      stops: [0.0, 0.7],
    ),
  ),
)

Want something easier? Check out the neumorphism package - it handles inset shadows really well, though you’ll be adding another dependency.

Manual conversion gets old fast, especially with multiple design iterations. I wasted too many hours translating Figma styles by hand before realizing automation could handle this whole thing.

For your case, try:

Container(
  decoration: BoxDecoration(
    color: Color(0xFFFF8C42),
    borderRadius: BorderRadius.circular(50),
    boxShadow: [
      BoxShadow(
        color: Colors.black.withOpacity(0.3),
        offset: Offset(8, -6),
        blurRadius: 15,
        inset: true, // Note: Flutter doesn't support this directly
      ),
    ],
  ),
)

Flutter doesn’t do true inset shadows, so you’ll need the layering approach others mentioned.

But here’s what really changed everything - skip the manual conversion entirely. Automate the whole Figma to Flutter pipeline. Pull design tokens from Figma’s API, process the CSS properties, and generate Flutter widgets automatically.

I built something like this for our design system. Saves hours every sprint. When designers update components in Figma, the Flutter code updates automatically - no manual work.

Latenode makes this automation pretty easy with its visual workflow builder and API integrations.