skills.vishalvoidskills/vishalvoid
Technical & DevelopmentAdvanced

flutter-theming-apps

Customize Flutter app appearance through the theming system

Developer Setup

Setup & Installation

bash
npx skills add https://github.com/flutter/skills --skill flutter-theming-apps

Overview

What This Skill Does

Customize Flutter app appearance through the theming system

Application

When to use this Skill

Documentation

Show Skills.md file

Implementing Flutter Theming and Adaptive Design

Contents

Core Theming Concepts

Flutter applies styling in a strict hierarchy: styles applied to the specific widget -> themes that override the immediate parent theme -> the main app theme.

  • Define app-wide themes using the theme property of MaterialApp with a ThemeData instance.
  • Override themes for specific widget subtrees by wrapping them in a Theme widget and using Theme.of(context).copyWith(...).
  • Do not use deprecated ThemeData properties:
    • Replace accentColor with colorScheme.secondary.
    • Replace accentTextTheme with textTheme (using colorScheme.onSecondary for contrast).
    • Replace AppBarTheme.color with AppBarTheme.backgroundColor.

Material 3 Guidelines

Material 3 is the default theme as of Flutter 3.16.

  • Colors: Generate color schemes using ColorScheme.fromSeed(seedColor: Colors.blue). This ensures accessible contrast ratios.
Lines 1 - 25 of 152

Recommendations

Explore other random skills

All skillsMy patterns