| 
									
										
										
										
											2020-05-21 20:25:25 +02:00
										 |  |  | import 'package:flutter/material.dart'; | 
					
						
							| 
									
										
										
										
											2020-05-23 10:58:06 +02:00
										 |  |  | import 'package:flutter_localizations/flutter_localizations.dart'; | 
					
						
							| 
									
										
										
										
											2020-05-21 20:25:25 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-05-23 10:58:06 +02:00
										 |  |  | import 'backend.dart'; | 
					
						
							| 
									
										
										
										
											2020-05-21 20:25:25 +02:00
										 |  |  | import 'home_screen.dart'; | 
					
						
							| 
									
										
										
										
											2020-05-23 10:58:06 +02:00
										 |  |  | import 'localizations.dart'; | 
					
						
							| 
									
										
										
										
											2020-05-21 20:25:25 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | /// A simple reminder app.
 | 
					
						
							|  |  |  | ///
 | 
					
						
							|  |  |  | /// This has to be wrapped by a MemorBackend widget.
 | 
					
						
							|  |  |  | class MemorApp extends StatelessWidget { | 
					
						
							|  |  |  |   @override | 
					
						
							|  |  |  |   Widget build(BuildContext context) { | 
					
						
							|  |  |  |     return MaterialApp( | 
					
						
							| 
									
										
										
										
											2020-05-23 10:58:06 +02:00
										 |  |  |       localizationsDelegates: const [ | 
					
						
							|  |  |  |         MemorLocalizations.delegate, | 
					
						
							|  |  |  |         GlobalMaterialLocalizations.delegate, | 
					
						
							|  |  |  |         GlobalWidgetsLocalizations.delegate, | 
					
						
							|  |  |  |       ], | 
					
						
							|  |  |  |       supportedLocales: const [ | 
					
						
							|  |  |  |         Locale('en'), | 
					
						
							|  |  |  |         Locale('de'), | 
					
						
							|  |  |  |       ], | 
					
						
							| 
									
										
										
										
											2020-05-21 20:25:25 +02:00
										 |  |  |       theme: ThemeData( | 
					
						
							|  |  |  |         primaryColor: Colors.black, | 
					
						
							|  |  |  |         accentColor: Colors.amber, | 
					
						
							|  |  |  |         textSelectionColor: Colors.amber, | 
					
						
							|  |  |  |         cursorColor: Colors.amber, | 
					
						
							|  |  |  |         textSelectionHandleColor: Colors.amber, | 
					
						
							|  |  |  |         colorScheme: ColorScheme.light( | 
					
						
							|  |  |  |           primary: Colors.black, | 
					
						
							|  |  |  |           secondary: Colors.amber, | 
					
						
							|  |  |  |         ), | 
					
						
							|  |  |  |         fontFamily: 'Libertinus Sans', | 
					
						
							|  |  |  |       ), | 
					
						
							| 
									
										
										
										
											2020-05-23 17:28:03 +02:00
										 |  |  |       title: 'Memor', | 
					
						
							| 
									
										
										
										
											2020-05-23 10:58:06 +02:00
										 |  |  |       builder: (context, child) => MemorBackend(child: child), | 
					
						
							| 
									
										
										
										
											2020-05-21 20:25:25 +02:00
										 |  |  |       home: HomeScreen(), | 
					
						
							|  |  |  |     ); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | } |