import 'package:flutter/material.dart'; import 'package:flutter_example_packages/theme/colors.dart'; import 'package:flutter_example_packages/theme/radius.dart'; import 'package:google_fonts/google_fonts.dart'; final appTheme = ThemeData( colorScheme: ThemeData().colorScheme.copyWith( primary: AppColors.primary, secondary: AppColors.secondary, ), cardTheme: CardTheme( clipBehavior: Clip.antiAlias, margin: const EdgeInsets.all(0), color: AppColors.primary.withOpacity(0.4), elevation: 0, shape: RoundedRectangleBorder( borderRadius: AppRadius.small, ), ), /// [OutlinedButton] outlinedButtonTheme: OutlinedButtonThemeData( style: ButtonStyle( foregroundColor: MaterialStateProperty.resolveWith( (Set states) { if (states.contains(MaterialState.disabled)) { return AppColors.secondary.withOpacity(0.4); } else { return AppColors.secondary; } } ), side: MaterialStateProperty.resolveWith( (Set states) { if (states.contains(MaterialState.disabled)) { return BorderSide(color: AppColors.secondary.withOpacity(0.4)); } else { return const BorderSide(color: AppColors.secondary); } } ), ), ), /// [Text] textTheme: TextTheme( headlineLarge: GoogleFonts.roboto( fontSize: 44, fontWeight: FontWeight.bold, ), headlineMedium: GoogleFonts.roboto( fontSize: 36, fontWeight: FontWeight.bold, ), headlineSmall: GoogleFonts.roboto( fontSize: 24, fontWeight: FontWeight.bold, ), titleLarge: GoogleFonts.roboto( fontSize: 44, ), titleMedium: GoogleFonts.roboto( fontSize: 36, ), titleSmall: GoogleFonts.roboto( fontSize: 24, ), bodyLarge: GoogleFonts.openSans( fontSize: 18, height: 1.3, ), bodyMedium: GoogleFonts.openSans( fontSize: 14, height: 1.3, ), bodySmall: GoogleFonts.openSans( fontSize: 12, height: 1.3, ), ), );