theming!!!
This commit is contained in:
		
							parent
							
								
									839bb0bbde
								
							
						
					
					
						commit
						c63f062640
					
				
					 12 changed files with 118 additions and 63 deletions
				
			
		
							
								
								
									
										24
									
								
								lib/themes/dracula.dart
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								lib/themes/dracula.dart
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,24 @@ | |||
| import 'package:flutter/material.dart'; | ||||
| import 'themes.dart' as themes; | ||||
| 
 | ||||
| themes.CustomColors theme = themes.CustomColors( | ||||
|     "Dracula", | ||||
|     const Color.fromARGB( | ||||
|       255, | ||||
|       98, | ||||
|       114, | ||||
|       164, | ||||
|     ), | ||||
|     const ColorScheme( | ||||
|       brightness: Brightness.dark, | ||||
|       primary: Color.fromARGB(255, 255, 121, 198), | ||||
|       onPrimary: Color.fromARGB(255, 40, 42, 54), | ||||
|       secondary: Color.fromARGB(255, 80, 250, 123), | ||||
|       onSecondary: Color.fromARGB(255, 40, 42, 54), | ||||
|       error: Color.fromARGB(255, 255, 85, 85), | ||||
|       onError: Color.fromARGB(255, 40, 42, 54), | ||||
|       background: Color.fromARGB(255, 40, 42, 54), | ||||
|       onBackground: Color.fromARGB(255, 248, 248, 242), | ||||
|       surface: Color.fromARGB(255, 68, 71, 90), | ||||
|       onSurface: Color.fromARGB(255, 248, 248, 242), | ||||
|     )); | ||||
|  | @ -1,15 +1,32 @@ | |||
| import 'package:flutter/material.dart'; | ||||
| import 'dracula.dart' as color_dracula; | ||||
| 
 | ||||
| final defaultThemeDark = ThemeData( | ||||
|     colorScheme: const ColorScheme( | ||||
|         brightness: Brightness.dark, | ||||
|         primary: Colors.white, | ||||
|         onPrimary: Colors.black, | ||||
|         secondary: Colors.lime, | ||||
|         onSecondary: Colors.black, | ||||
|         error: Colors.red, | ||||
|         onError: Colors.white, | ||||
|         background: Colors.black, | ||||
|         onBackground: Colors.white, | ||||
|         surface: Colors.deepPurple, | ||||
|         onSurface: Colors.white)); | ||||
| final available = [color_dracula.theme]; | ||||
| ThemeData getTheme(CustomColors colors) { | ||||
|   return ThemeData( | ||||
|     scaffoldBackgroundColor: colors.colorScheme.background, | ||||
|     bottomAppBarColor: colors.colorScheme.background, | ||||
|     hintColor: colors.hintColor, | ||||
|     colorScheme: colors.colorScheme, | ||||
|     errorColor: colors.colorScheme.error, | ||||
|     bottomAppBarTheme: BottomAppBarTheme( | ||||
|       color: colors.colorScheme.surface, | ||||
|       shape: const CircularNotchedRectangle(), | ||||
|       elevation: 0, | ||||
|     ), | ||||
|     navigationBarTheme: const NavigationBarThemeData( | ||||
|       backgroundColor: Colors.transparent, | ||||
|       labelBehavior: NavigationDestinationLabelBehavior.onlyShowSelected, | ||||
|       indicatorColor: Colors.transparent, | ||||
|       elevation: 0, | ||||
|       height: 64, | ||||
|     ), | ||||
|   ); | ||||
| } | ||||
| 
 | ||||
| class CustomColors { | ||||
|   late String name; | ||||
|   late Color hintColor; | ||||
|   late ColorScheme colorScheme; | ||||
|   CustomColors(this.name, this.hintColor, this.colorScheme); | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue