moepoi.dev/lib/screens/home.dart

230 lines
8.4 KiB
Dart
Raw Normal View History

2022-06-05 10:18:03 +07:00
import 'package:url_launcher/url_launcher.dart';
2022-06-06 14:14:14 +07:00
import 'package:flutter_svg/flutter_svg.dart';
2022-06-05 10:18:03 +07:00
import 'package:flutter/material.dart';
import 'package:moepoi_site/utils/utils.dart';
class Home extends StatefulWidget {
const Home({Key? key}) : super(key: key);
@override
State<Home> createState() => _HomeState();
}
class _HomeState extends State<Home> {
@override
Widget build(BuildContext context) {
return Title(
title: 'Moe Poi',
color: const Color.fromARGB(255, 80, 192, 144),
child: Scaffold(
2022-08-08 14:32:56 +07:00
body: Center(
child: ScrollConfiguration(
behavior: HideScrollGlow(),
child: ListView(shrinkWrap: true, children: [
const SizedBox(height: 20),
Center(
child: ClipRRect(
borderRadius: BorderRadius.circular(100),
child: Container(
width: 200,
height: 200,
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/home/profile.webp'),
fit: BoxFit.cover,
2022-06-05 10:18:03 +07:00
),
),
),
2022-08-08 14:32:56 +07:00
),
),
const SizedBox(height: 20),
const Text(
'Moe Poi',
style: TextStyle(
fontSize: 50,
fontWeight: FontWeight.w600,
),
textAlign: TextAlign.center,
),
const SizedBox(height: 20),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Flexible(
flex: 1,
child: InkWell(
splashFactory: NoSplash.splashFactory,
onTap: () async {
if (!await launchUrl(
Uri.parse('https://t.me/moepoi'))) {
throw 'Could not launch';
}
},
child: SvgPicture.asset(
'assets/images/home/telegram.svg',
height: 40,
width: 40,
fit: BoxFit.contain,
semanticsLabel: 'Telegram',
),
)),
const SizedBox(
width: 10.0,
2022-06-05 10:18:03 +07:00
),
2022-08-08 14:32:56 +07:00
Flexible(
flex: 1,
child: InkWell(
splashFactory: NoSplash.splashFactory,
onTap: () async {
if (!await launchUrl(
Uri.parse('https://github.com/moepoi'))) {
throw 'Could not launch';
}
},
child: SvgPicture.asset(
'assets/images/home/github.svg',
height: 40,
width: 40,
fit: BoxFit.contain,
semanticsLabel: 'GitHub',
),
)),
const SizedBox(
width: 10.0,
2022-06-05 10:18:03 +07:00
),
2022-08-08 14:32:56 +07:00
Flexible(
flex: 1,
child: InkWell(
splashFactory: NoSplash.splashFactory,
onTap: () async {
if (!await launchUrl(
Uri.parse('https://gitlab.com/moepoi'))) {
throw 'Could not launch';
}
},
child: SvgPicture.asset(
'assets/images/home/gitlab.svg',
height: 40,
width: 40,
fit: BoxFit.contain,
semanticsLabel: 'Gitlab',
2022-06-05 10:18:03 +07:00
),
2022-08-08 14:32:56 +07:00
)),
const SizedBox(
width: 10.0,
),
Flexible(
flex: 1,
child: InkWell(
splashFactory: NoSplash.splashFactory,
onTap: () async {
if (!await launchUrl(
Uri.parse('https://linkedin.com/in/moepoi'))) {
throw 'Could not launch';
}
},
child: SvgPicture.asset(
'assets/images/home/linkedin.svg',
height: 40,
width: 40,
fit: BoxFit.contain,
semanticsLabel: 'Linkedin',
2022-06-05 10:18:03 +07:00
),
2022-08-08 14:32:56 +07:00
)),
const SizedBox(
width: 10.0,
),
Flexible(
flex: 1,
child: InkWell(
splashFactory: NoSplash.splashFactory,
onTap: () async {
if (!await launchUrl(
Uri.parse('https://ipinfo.io/AS209310'))) {
throw 'Could not launch';
}
},
child: SvgPicture.asset(
'assets/images/home/ipinfo.svg',
height: 40,
width: 40,
fit: BoxFit.contain,
semanticsLabel: 'IpInfo',
2022-06-05 10:18:03 +07:00
),
2022-08-08 14:32:56 +07:00
))
],
),
const SizedBox(height: 20),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Flexible(
flex: 1,
child: ElevatedButton(
onPressed: () {
Navigator.pushNamed(context, '/resume');
},
style: ButtonStyle(
elevation: MaterialStateProperty.all(5.0),
padding:
MaterialStateProperty.all(const EdgeInsets.all(25.0)),
shape: MaterialStateProperty.all(RoundedRectangleBorder(
borderRadius: BorderRadius.circular(30.0),
)),
backgroundColor: MaterialStateProperty.all(
const Color.fromARGB(255, 80, 192, 144)),
),
child: const Text('Resume'),
),
),
const SizedBox(width: 20),
Flexible(
flex: 1,
child: ElevatedButton(
onPressed: () {
Navigator.pushNamed(context, '/skills');
},
style: ButtonStyle(
elevation: MaterialStateProperty.all(5.0),
padding:
MaterialStateProperty.all(const EdgeInsets.all(25.0)),
shape: MaterialStateProperty.all(RoundedRectangleBorder(
borderRadius: BorderRadius.circular(30.0),
)),
backgroundColor: MaterialStateProperty.all(
const Color.fromARGB(255, 80, 192, 144)),
),
child: const Text('Skills'),
),
),
const SizedBox(width: 20),
Flexible(
flex: 1,
child: ElevatedButton(
onPressed: () {
Navigator.pushNamed(context, '/projects');
},
style: ButtonStyle(
elevation: MaterialStateProperty.all(5.0),
padding:
MaterialStateProperty.all(const EdgeInsets.all(25.0)),
shape: MaterialStateProperty.all(RoundedRectangleBorder(
borderRadius: BorderRadius.circular(30.0),
)),
backgroundColor: MaterialStateProperty.all(
const Color.fromARGB(255, 80, 192, 144)),
2022-06-05 10:18:03 +07:00
),
2022-08-08 14:32:56 +07:00
child: const Text('Projects'),
),
2022-06-05 10:18:03 +07:00
),
2022-08-08 14:32:56 +07:00
],
2022-06-05 10:18:03 +07:00
),
2022-08-08 14:32:56 +07:00
const SizedBox(height: 20),
]),
),
)),
2022-06-05 10:18:03 +07:00
);
}
2022-08-08 14:32:56 +07:00
}