소스 정보
- 저장소
- xuelongqy/flutter_easy_refresh
- 최근 소스 활동
- 2026년 3월 19일 16:33
- 감지된 SKILL.md 언어
- 영어
- 스타
- 4,069
- 포크
- 654
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/xuelongqy/flutter_easy_refresh --skill flutter-theming명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
SOC 직업 분류 기준
| name | flutter-theming |
| description | How to customize your app's theme using Flutter's theming system |
| metadata | {"model":"models/gemini-3.1-pro-preview","last_modified":"Fri, 27 Feb 2026 00:26:31 GMT"} |
Updates and manages Flutter application styling by migrating legacy Material 2 implementations to Material 3, normalizing component themes, updating deprecated button classes, and adapting UI idioms for cross-platform consistency. Assumes a Flutter environment using Dart.
Analyze Current Theme State
Review the existing Flutter codebase to identify legacy Material 2 components, deprecated button classes (FlatButton, RaisedButton, OutlineButton), and outdated theme properties (e.g., accentColor, color in AppBarTheme).
STOP AND ASK THE USER: "What is the primary seed color for the new Material 3 ColorScheme, and which target platforms (iOS, Android, Windows, macOS, Linux, Web) should be prioritized for platform idioms?"
Decision Logic: Component Migration When encountering legacy widgets, use the following decision tree to determine the replacement:
BottomNavigationBar -> REPLACE WITH NavigationBar (uses NavigationDestination).Drawer -> REPLACE WITH NavigationDrawer (uses NavigationDrawerDestination).ToggleButtons -> REPLACE WITH SegmentedButton (uses ButtonSegment and Set for selection).FlatButton -> REPLACE WITH TextButton.RaisedButton -> REPLACE WITH ElevatedButton (or FilledButton for no elevation).OutlineButton -> REPLACE WITH OutlinedButton.Implement App-Wide Material 3 Theme
Define the global ThemeData using ColorScheme.fromSeed. Ensure useMaterial3 is implicitly or explicitly true. Remove all references to deprecated accent properties (accentColor, accentColorBrightness, accentTextTheme, accentIconTheme).
MaterialApp(
title: 'App Name',
theme: ThemeData(
useMaterial3: true,
colorScheme: ColorScheme.fromSeed(
seedColor: Colors.deepPurple,
brightness: Brightness.light,
),
// Use colorScheme.secondary instead of accentColor
),
darkTheme: ThemeData(
useMaterial3: true,
colorScheme: ColorScheme.fromSeed(
seedColor: Colors.deepPurple,
brightness: Brightness.dark,
),
),
home: const MyHomePage(),
);
Normalize Component Themes
Update all component theme definitions in ThemeData to use their *ThemeData equivalents. Do not use the base theme classes for configuration.
cardTheme -> CardThemeDatadialogTheme -> DialogThemeDatatabBarTheme -> TabBarThemeDataappBarTheme -> AppBarThemeData (Replace color with backgroundColor)bottomAppBarTheme -> BottomAppBarThemeDatainputDecorationTheme -> InputDecorationThemeDataThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.blue),
appBarTheme: const AppBarThemeData(
backgroundColor: Colors.blue, // Do not use 'color'
elevation: 4.0,
),
cardTheme: const CardThemeData(
elevation: 2.0,
),
);
Migrate Buttons and Button Styles
Replace legacy buttons. Use the styleFrom() static method for simple overrides, or ButtonStyle with MaterialStateProperty for state-dependent styling.
// Simple override using styleFrom
TextButton(
style: TextButton.styleFrom(
foregroundColor: Colors.blue,
disabledForegroundColor: Colors.red,
),
onPressed: () {},
child: const Text('TextButton'),
)
// State-dependent override using MaterialStateProperty
OutlinedButton(
style: ButtonStyle(
side: MaterialStateProperty.resolveWith<BorderSide>(
(Set<MaterialState> states) {
if (states.contains(MaterialState.pressed)) {
return const BorderSide(color: Colors.blue, width: 2);
}
return const BorderSide(color: Colors.grey, width: 1);
}
),
),
onPressed: () {},
child: const Text('OutlinedButton'),
)
Decision Logic: Platform Idioms Apply platform-specific adaptations based on the host OS to reduce cognitive load and build user trust.
thumbVisibility: true (or alwaysShown). IF mobile -> Use default auto-hiding behavior.SelectableText to allow mouse selection on Web/Desktop.// Platform-aware button ordering
TextDirection btnDirection = Platform.isWindows
? TextDirection.rtl
: TextDirection.ltr;
Row(
children: [
const Spacer(),
Row(
textDirection: btnDirection,
children: [
TextButton(
onPressed: () => Navigator.pop(context, false),
child: const Text('Cancel'),
),
ElevatedButton(
onPressed: () => Navigator.pop(context, true),
child: const Text('OK'),
),
],
),
],
)
Validate-and-Fix
Scan the generated code to verify that no FlatButton, RaisedButton, OutlineButton, or ButtonTheme classes remain. Verify that AppBarTheme does not use the color property. Fix any instances found.
ColorScheme (e.g., Theme.of(context).colorScheme.primary). Do not hardcode hex colors unless explicitly requested.FlatButton, RaisedButton, or OutlineButton.accentColor, accentColorBrightness, accentTextTheme, or accentIconTheme. Use colorScheme.secondary and colorScheme.onSecondary instead.Data to component themes when configuring ThemeData (e.g., CardThemeData, not CardTheme).color property in AppBarTheme or AppBarThemeData; strictly use backgroundColor.