63 lines
2.0 KiB
Dart
63 lines
2.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:google_fonts/google_fonts.dart';
|
|
|
|
import 'app_colors.dart';
|
|
|
|
ThemeData buildFunyMeeTheme() {
|
|
final base = ThemeData(
|
|
useMaterial3: true,
|
|
brightness: Brightness.dark,
|
|
scaffoldBackgroundColor: AppColors.background,
|
|
colorScheme: const ColorScheme.dark(
|
|
primary: AppColors.primary,
|
|
onPrimary: AppColors.onPrimary,
|
|
secondary: AppColors.secondary,
|
|
surface: AppColors.surface,
|
|
error: AppColors.error,
|
|
onSurface: AppColors.onSurface,
|
|
),
|
|
);
|
|
|
|
return base.copyWith(
|
|
textTheme: GoogleFonts.interTextTheme(base.textTheme).apply(
|
|
bodyColor: AppColors.onBackground,
|
|
displayColor: AppColors.onBackground,
|
|
),
|
|
cardTheme: const CardThemeData(clipBehavior: Clip.antiAlias),
|
|
dialogTheme: const DialogThemeData(clipBehavior: Clip.antiAlias),
|
|
bottomSheetTheme: const BottomSheetThemeData(
|
|
clipBehavior: Clip.antiAlias,
|
|
),
|
|
appBarTheme: const AppBarTheme(
|
|
backgroundColor: Colors.transparent,
|
|
elevation: 0,
|
|
foregroundColor: AppColors.onBackground,
|
|
centerTitle: true,
|
|
),
|
|
navigationBarTheme: NavigationBarThemeData(
|
|
backgroundColor: AppColors.surface.withValues(alpha: 0.94),
|
|
indicatorColor: AppColors.primary.withValues(alpha: 0.25),
|
|
labelTextStyle: WidgetStateProperty.all(
|
|
GoogleFonts.inter(fontSize: 12, color: AppColors.onSurface),
|
|
),
|
|
iconTheme: WidgetStateProperty.all(
|
|
const IconThemeData(color: AppColors.onSurface),
|
|
),
|
|
),
|
|
elevatedButtonTheme: ElevatedButtonThemeData(
|
|
style: ElevatedButton.styleFrom(
|
|
backgroundColor: AppColors.primary,
|
|
foregroundColor: AppColors.onPrimary,
|
|
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 14),
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(12),
|
|
),
|
|
),
|
|
),
|
|
snackBarTheme: SnackBarThemeData(
|
|
backgroundColor: AppColors.surfaceVariant,
|
|
contentTextStyle: GoogleFonts.inter(color: AppColors.onSurface),
|
|
),
|
|
);
|
|
}
|