added url_launcher to link to code repository
This commit is contained in:
@@ -3,6 +3,7 @@ import 'package:resume/services/breakpoints.dart';
|
||||
import 'package:resume/services/content_provider.dart';
|
||||
import 'package:resume/widgets/content_widget.dart';
|
||||
import 'package:resume/widgets/profile.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
class LandingPage extends StatefulWidget {
|
||||
const LandingPage({super.key});
|
||||
@@ -41,8 +42,8 @@ class _LandingPageState extends State<LandingPage> {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Landing'),
|
||||
actions: [
|
||||
TextButton(onPressed: () {}, child: const Text('Source Code')),
|
||||
actions: const [
|
||||
TextButton(onPressed: _launchURL, child: Text('Source Code')),
|
||||
],
|
||||
),
|
||||
body: !loadingDone
|
||||
@@ -119,3 +120,10 @@ class _LandingPageState extends State<LandingPage> {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
_launchURL() async {
|
||||
final Uri url = Uri.parse('https://git.skup.in/marco/resume');
|
||||
if (await launchUrl(url)) {
|
||||
throw Exception('Could not launch $url');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,17 +53,17 @@ class ContentListTile extends StatelessWidget {
|
||||
}
|
||||
|
||||
static const months = [
|
||||
'January',
|
||||
'February',
|
||||
'March',
|
||||
'Januar',
|
||||
'Februar',
|
||||
'März',
|
||||
'April',
|
||||
'May',
|
||||
'June',
|
||||
'Mai',
|
||||
'Juni',
|
||||
'July',
|
||||
'August',
|
||||
'September',
|
||||
'October',
|
||||
'Oktober',
|
||||
'November',
|
||||
'December'
|
||||
'Dezember'
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user