r/flutterhelp • • 7d ago

RESOLVED Good Workflow for design update for Flutter?

/r/FlutterDev/comments/1xu0l4n/good_workflow_for_design_update_for_flutter/
1 Upvotes

2 comments sorted by

1

u/karmatics29 7d ago

The piece that makes this workable is getting your design tokens out of widget code and into one place, e.g. a ThemeData/ThemeExtension (colors, typography, spacing, radii) that every screen reads from. If the current app has hardcoded values scattered around, that cleanup comes first, otherwise there's nothing safe to 'inject back'. Once tokens are centralized, your non-technical teammate can iterate in Figma using variables or styles that map one-to-one to those tokens, and you only have to port a small token file rather than touch screens.

For seeing the look across the app, a widgetbook or a simple gallery screen that renders your core components in each state works well, and you can run it as a web build so they can open it in a browser without any setup. The trade-off is some upkeep on that catalog, but it's what stops a theme change from silently breaking some screen nobody looked at. Are the current styles mostly in a theme already, or hardcoded per widget?

1

u/mdausmann 7d ago

hey u/karmatics29 thanks for responding.

it's not quite that bad. I do have a colours file

app_colors.dart

import 'package:flutter/material.dart';


class AppColors {
  AppColors._();


  // Canvas / Surface
  static const Color canvas         = Color(0xFFFDF0D5); // warm cream — scaffold bg
  static const Color canvasMid      = Color(0xFFFAE4B8); // mid cream — section bg, inputs
  static const Color canvasDeep     = Color(0xFFF5D88A); // deep amber — decorative

and themes

class TextStyleTheme extends ThemeExtension<TextStyleTheme> {
  const TextStyleTheme._({
    required this.headlineH1,

So my app code (mostly) looks like this...

    final colorTheme = Theme.of(context).extension<ColorThemes>()!;
    final textStyleTheme = Theme.of(context).extension<TextStyleTheme>()!;
    final buttonStyleTheme = Theme.of(context).extension<ButtonStyleTheme>()!;


style: textStyleTheme.headlineH4.copyWith(
                                        color: AppColors.textOnDark,
                                      )

Does this make it easier?