mirror of
				https://github.com/johrpan/musicus_mobile.git
				synced 2025-10-26 18:57:25 +01:00 
			
		
		
		
	mobile: Add about screen
This commit is contained in:
		
							parent
							
								
									0ccebb2217
								
							
						
					
					
						commit
						a0310883fb
					
				
					 4 changed files with 81 additions and 0 deletions
				
			
		
							
								
								
									
										40
									
								
								mobile/lib/screens/about.dart
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								mobile/lib/screens/about.dart
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,40 @@ | |||
| import 'package:flutter/material.dart'; | ||||
| import 'package:flutter/services.dart'; | ||||
| import 'package:flutter_markdown/flutter_markdown.dart'; | ||||
| import 'package:url_launcher/url_launcher.dart' as url; | ||||
| 
 | ||||
| class AboutScreen extends StatelessWidget { | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     final theme = Theme.of(context); | ||||
|     final textTheme = theme.textTheme; | ||||
| 
 | ||||
|     return Scaffold( | ||||
|       appBar: AppBar( | ||||
|         title: Text('About'), | ||||
|       ), | ||||
|       body: FutureBuilder<String>( | ||||
|         future: rootBundle.loadString('assets/about.md'), | ||||
|         builder: (context, snapshot) { | ||||
|           if (snapshot.hasData) { | ||||
|             return Markdown( | ||||
|               data: snapshot.data, | ||||
|               styleSheet: MarkdownStyleSheet( | ||||
|                 h1: textTheme.headline6.copyWith( | ||||
|                   height: 2.0, | ||||
|                 ), | ||||
|                 a: textTheme.bodyText1.copyWith( | ||||
|                   color: theme.accentColor, | ||||
|                   decoration: TextDecoration.underline, | ||||
|                 ), | ||||
|               ), | ||||
|               onTapLink: (link) => url.launch(link), | ||||
|             ); | ||||
|           } else { | ||||
|             return Container(); | ||||
|           } | ||||
|         }, | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Elias Projahn
						Elias Projahn