mirror of
https://github.com/catppuccin/flutter.git
synced 2026-02-06 02:38:14 +08:00
36 lines
1.1 KiB
Dart
36 lines
1.1 KiB
Dart
import 'package:catppuccin_flutter/catppuccin_flutter.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
ThemeData catppuccinTheme(Flavor flavor) {
|
|
Color primaryColor = flavor.mauve;
|
|
Color secondaryColor = flavor.pink;
|
|
return ThemeData(
|
|
useMaterial3: true,
|
|
appBarTheme: AppBarTheme(
|
|
elevation: 0,
|
|
titleTextStyle: TextStyle(
|
|
color: flavor.text, fontSize: 20, fontWeight: FontWeight.bold),
|
|
backgroundColor: flavor.crust,
|
|
foregroundColor: flavor.mantle),
|
|
colorScheme: ColorScheme(
|
|
background: flavor.base,
|
|
brightness: Brightness.light,
|
|
error: flavor.surface2,
|
|
onBackground: flavor.text,
|
|
onError: flavor.red,
|
|
onPrimary: primaryColor,
|
|
onSecondary: secondaryColor,
|
|
onSurface: flavor.text,
|
|
primary: flavor.crust,
|
|
secondary: flavor.mantle,
|
|
surface: flavor.surface0,
|
|
),
|
|
textTheme: const TextTheme().apply(
|
|
bodyColor: flavor.text,
|
|
displayColor: primaryColor,
|
|
),
|
|
floatingActionButtonTheme: const FloatingActionButtonThemeData(
|
|
elevation: 0,
|
|
));
|
|
}
|