You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
2.1 KiB
81 lines
2.1 KiB
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<Color>( |
|
(Set<MaterialState> states) { |
|
if (states.contains(MaterialState.disabled)) { |
|
return AppColors.secondary.withOpacity(0.4); |
|
} else { |
|
return AppColors.secondary; |
|
} |
|
} |
|
), |
|
side: MaterialStateProperty.resolveWith<BorderSide>( |
|
(Set<MaterialState> 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.ubuntu( |
|
fontSize: 44, |
|
fontWeight: FontWeight.bold, |
|
), |
|
headlineMedium: GoogleFonts.ubuntu( |
|
fontSize: 36, |
|
fontWeight: FontWeight.bold, |
|
), |
|
headlineSmall: GoogleFonts.ubuntu( |
|
fontSize: 24, |
|
fontWeight: FontWeight.bold, |
|
), |
|
titleLarge: GoogleFonts.ubuntu( |
|
fontSize: 44, |
|
), |
|
titleMedium: GoogleFonts.ubuntu( |
|
fontSize: 36, |
|
), |
|
titleSmall: GoogleFonts.ubuntu( |
|
fontSize: 24, |
|
), |
|
bodyLarge: GoogleFonts.ubuntu( |
|
fontSize: 18, |
|
height: 1.5, |
|
), |
|
bodyMedium: GoogleFonts.ubuntu( |
|
fontSize: 16, |
|
height: 1.5, |
|
), |
|
bodySmall: GoogleFonts.ubuntu( |
|
fontSize: 12, |
|
height: 1.5, |
|
), |
|
), |
|
);
|
|
|