added fonts, fixed alignment, and responsivness for the web

This commit is contained in:
ashrafzarkanisala
2024-08-27 01:55:11 +03:00
parent f3c5c2c489
commit f14320ea92
15 changed files with 178 additions and 94 deletions

View File

@ -45,6 +45,7 @@ class MyApp extends StatelessWidget {
),
theme: ThemeData(
fontFamily: 'Aftika',
textTheme: const TextTheme(
bodySmall: TextStyle(
fontSize: 13,
@ -61,7 +62,43 @@ class MyApp extends StatelessWidget {
),
),
colorScheme: ColorScheme.fromSeed(
seedColor: Colors.deepPurple), // Set up color scheme
seedColor: ColorsManager.blueColor,
primary: ColorsManager.blueColor, // Checked state color
onSurface: Colors.grey.shade400, // Unchecked state color
),
switchTheme: SwitchThemeData(
thumbColor: MaterialStateProperty.resolveWith((states) {
if (states.contains(MaterialState.selected)) {
return ColorsManager
.blueColor; // Color of the switch knob when selected
}
return ColorsManager
.whiteColors; // Color of the switch knob when not selected
}),
trackColor: MaterialStateProperty.resolveWith((states) {
if (states.contains(MaterialState.selected)) {
return ColorsManager.blueColor
.withOpacity(0.5); // Track color when selected
}
return ColorsManager
.whiteColors; // Track color when not selected
}),
),
checkboxTheme: CheckboxThemeData(
fillColor: MaterialStateProperty.resolveWith((states) {
if (states.contains(MaterialState.selected)) {
return ColorsManager.blueColor; // Checked state color
}
return Colors.grey.shade200; // Unchecked state color
}),
checkColor: MaterialStateProperty.all(
Colors.white), // The color of the checkmark
side:
BorderSide(color: ColorsManager.whiteColors), // Border color
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(4), // Border radius
),
),
useMaterial3: true, // Enable Material 3
),
home: isLoggedIn == 'Success' ? const HomePage() : const LoginPage(),