| 
									
										
										
										
											2020-03-02 17:20:06 +01:00
										 |  |  | import 'package:aidedejeu_flutter/localization.dart'; | 
					
						
							| 
									
										
										
										
											2020-02-29 01:40:05 +01:00
										 |  |  | import 'package:aidedejeu_flutter/widgets/library.dart'; | 
					
						
							| 
									
										
										
										
											2020-02-29 02:36:15 +01:00
										 |  |  | import 'package:aidedejeu_flutter/widgets/pceditor.dart'; | 
					
						
							| 
									
										
										
										
											2020-02-27 17:24:45 +01:00
										 |  |  | import 'package:flutter/material.dart'; | 
					
						
							|  |  |  | import 'package:flutter_svg/flutter_svg.dart'; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-29 01:40:05 +01:00
										 |  |  | class HomePage extends StatelessWidget { | 
					
						
							|  |  |  |   HomePage({Key key}) : super(key: key); | 
					
						
							| 
									
										
										
										
											2020-02-27 17:24:45 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |   @override | 
					
						
							|  |  |  |   Widget build(BuildContext context) { | 
					
						
							|  |  |  |     return Scaffold( | 
					
						
							| 
									
										
										
										
											2020-03-02 17:20:06 +01:00
										 |  |  |         appBar: AppBar( | 
					
						
							|  |  |  |           title: Text( | 
					
						
							| 
									
										
										
										
											2020-03-03 16:03:31 +01:00
										 |  |  |             AppLocalizations.of(context).appTitle, | 
					
						
							| 
									
										
										
										
											2020-02-29 01:40:05 +01:00
										 |  |  |           ), | 
					
						
							|  |  |  |         ), | 
					
						
							| 
									
										
										
										
											2020-03-02 17:20:06 +01:00
										 |  |  |         body: Column( | 
					
						
							|  |  |  |           children: <Widget>[ | 
					
						
							|  |  |  |             FlatButton.icon( | 
					
						
							| 
									
										
										
										
											2020-03-02 17:46:30 +01:00
										 |  |  |               label: Text( | 
					
						
							| 
									
										
										
										
											2020-03-03 16:03:31 +01:00
										 |  |  |                 AppLocalizations.of(context).libraryTitle, | 
					
						
							| 
									
										
										
										
											2020-03-05 16:50:31 +01:00
										 |  |  |                   style: Theme.of(context).textTheme.headline, | 
					
						
							| 
									
										
										
										
											2020-03-02 17:46:30 +01:00
										 |  |  |               ), | 
					
						
							| 
									
										
										
										
											2020-03-02 17:20:06 +01:00
										 |  |  |               icon: SvgPicture.asset( | 
					
						
							|  |  |  |                 "assets/spell-book.svg", | 
					
						
							|  |  |  |                 height: 100.0, | 
					
						
							|  |  |  |                 width: 100.0, | 
					
						
							|  |  |  |                 allowDrawingOutsideViewBox: true, | 
					
						
							|  |  |  |               ), | 
					
						
							|  |  |  |               onPressed: () => Navigator.push( | 
					
						
							|  |  |  |                 context, | 
					
						
							|  |  |  |                 MaterialPageRoute( | 
					
						
							|  |  |  |                   builder: (context) => LibraryPage( | 
					
						
							|  |  |  |                     id: 'index.md', | 
					
						
							|  |  |  |                   ), | 
					
						
							|  |  |  |                 ), | 
					
						
							|  |  |  |               ), | 
					
						
							|  |  |  |             ), | 
					
						
							|  |  |  |             FlatButton.icon( | 
					
						
							|  |  |  |               label: Text( | 
					
						
							| 
									
										
										
										
											2020-03-03 16:03:31 +01:00
										 |  |  |                 AppLocalizations.of(context).pceditorTitle, | 
					
						
							| 
									
										
										
										
											2020-03-05 16:50:31 +01:00
										 |  |  |                 style: Theme.of(context).textTheme.headline, | 
					
						
							| 
									
										
										
										
											2020-03-02 17:20:06 +01:00
										 |  |  |               ), | 
					
						
							|  |  |  |               icon: SvgPicture.asset( | 
					
						
							|  |  |  |                 "assets/swordman.svg", | 
					
						
							|  |  |  |                 height: 100.0, | 
					
						
							|  |  |  |                 width: 100.0, | 
					
						
							|  |  |  |                 allowDrawingOutsideViewBox: true, | 
					
						
							|  |  |  |               ), | 
					
						
							|  |  |  |               onPressed: () => Navigator.push( | 
					
						
							|  |  |  |                 context, | 
					
						
							|  |  |  |                 MaterialPageRoute( | 
					
						
							|  |  |  |                   builder: (context) => PCEditorPage(), | 
					
						
							|  |  |  |                 ), | 
					
						
							|  |  |  |               ), | 
					
						
							|  |  |  |             ), | 
					
						
							|  |  |  |             FlatButton.icon( | 
					
						
							|  |  |  |               label: Text( | 
					
						
							| 
									
										
										
										
											2020-03-03 16:03:31 +01:00
										 |  |  |                 AppLocalizations.of(context).aboutTitle, | 
					
						
							| 
									
										
										
										
											2020-03-05 16:50:31 +01:00
										 |  |  |                   style: Theme.of(context).textTheme.headline, | 
					
						
							| 
									
										
										
										
											2020-03-02 17:20:06 +01:00
										 |  |  |               ), | 
					
						
							|  |  |  |               icon: SvgPicture.asset( | 
					
						
							|  |  |  |                 "assets/wooden-sign.svg", | 
					
						
							|  |  |  |                 height: 100.0, | 
					
						
							|  |  |  |                 width: 100.0, | 
					
						
							|  |  |  |                 allowDrawingOutsideViewBox: true, | 
					
						
							|  |  |  |               ), | 
					
						
							|  |  |  |               onPressed: () => Navigator.push( | 
					
						
							|  |  |  |                 context, | 
					
						
							|  |  |  |                 MaterialPageRoute( | 
					
						
							|  |  |  |                   builder: (context) => LibraryPage( | 
					
						
							|  |  |  |                     id: 'index.md', | 
					
						
							|  |  |  |                   ), | 
					
						
							|  |  |  |                 ), | 
					
						
							|  |  |  |               ), | 
					
						
							|  |  |  |             ), | 
					
						
							|  |  |  |           ], | 
					
						
							|  |  |  |         )); | 
					
						
							| 
									
										
										
										
											2020-02-27 17:24:45 +01:00
										 |  |  |   } | 
					
						
							|  |  |  | } |