Redesign about us page

This commit is contained in:
Moe Poi ~ 2022-05-28 23:19:54 +07:00
parent ce5d1ad36e
commit 8ed0b837c1

View file

@ -1,3 +1,5 @@
import 'package:url_launcher/url_launcher.dart';
import 'package:video_player/video_player.dart';
import 'package:flutter/material.dart';
class AboutUsBody extends StatefulWidget {
@ -8,113 +10,82 @@ class AboutUsBody extends StatefulWidget {
}
class _AboutUsBodyState extends State<AboutUsBody> {
late VideoPlayerController _controller;
@override
void initState() {
super.initState();
_controller = VideoPlayerController.network(
'https://nekoya.moe.team/img/AboutUs.mp4')
..initialize().then((_) {
setState(() {
_controller.play();
_controller.setLooping(true);
});
});
}
@override
Widget build(BuildContext context) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Container(
margin: const EdgeInsets.all(10),
alignment: Alignment.center,
child: Stack(
children: [
Center(
child: ClipRRect(
borderRadius: BorderRadius.circular(10),
child: Image.asset(
'assets/images/AboutUs.gif',
),
),
),
Center(
child: ClipRRect(
borderRadius: BorderRadius.circular(10),
child: Container(
height: MediaQuery.of(context).size.height / 3.85,
color:
const Color.fromARGB(255, 18, 18, 19).withOpacity(0.4),
),
),
),
Center(
child: ClipRRect(
borderRadius: BorderRadius.circular(10),
child: SizedBox(
height: MediaQuery.of(context).size.height / 3.85,
child: Flexible(
child: Column(
children: const [
SizedBox(
height: 15,
),
Center(
child: Flexible(
child: Text(
'About Us',
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 30,
),
),
),
),
SizedBox(
height: 10,
),
Center(
child: Flexible(
child: Text(
"Nekoya is your place for getting shoes for the entire family from many name brands. You'll discover styles for ladies, men and children from brands like Nike, Converse, Vans, Skechers, ASICS and many more! Nekoya is a goal for the popular footwear brands you know and love.",
style: TextStyle(
color: Colors.white,
fontSize: 10,
),
textAlign: TextAlign.center,
),
),
),
SizedBox(
height: 25,
),
Center(
child: Flexible(
child: Text(
'Contact Us',
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 30,
),
),
),
),
SizedBox(
height: 5,
),
Center(
child: Flexible(
child: Text(
"moe@chocola.dev",
style: TextStyle(
color: Colors.white,
fontSize: 12.5,
),
textAlign: TextAlign.center,
),
),
),
],
),
),
),
),
),
],
return Container(
margin: const EdgeInsets.all(20.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
ClipRRect(
borderRadius: const BorderRadius.all(Radius.circular(10.0)),
child: _controller.value.isInitialized
? AspectRatio(
aspectRatio: _controller.value.aspectRatio,
child: VideoPlayer(_controller),
)
: const Image(image: AssetImage('assets/images/about_us_thumbnail.webp'),),
),
),
],
Card(
color: const Color(0xff212226),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
child: const Padding(
padding: EdgeInsets.all(16.0),
child: Text(
'Nekoya is your place for sneakers for the entire family from many name brands. Youll discover styles for ladies, men and children from brands like Nike, Converse, Vans, Sperry, Madden Girl, Skechers, ASICS and then some! Nekoya is a main family footwear goal for the popular brands you know and love.',
style: TextStyle(fontSize: 20.0, color: Colors.white, height: 1.5),
textAlign: TextAlign.justify,
),
),
),
Container(
margin: const EdgeInsets.only(bottom: 10.0),
child: ElevatedButton(
style: ButtonStyle(
padding: MaterialStateProperty.all(const EdgeInsets.all(15.0)),
foregroundColor:
MaterialStateProperty.all(const Color(0xff8B0000)),
backgroundColor:
MaterialStateProperty.all(const Color(0xff8B0000)),
shape: MaterialStateProperty.all<RoundedRectangleBorder>(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(18.0),
side: const BorderSide(color: Colors.black)))),
child: const Text(
'Contact Us',
style: TextStyle(color: Colors.white, fontSize: 20),
),
onPressed: () async {
if (!await launchUrl(Uri.parse('mailto:nekoya@chocola.dev'))) throw 'Could not launch';
},
),
),
GestureDetector(
onTap: () async {
if (!await launchUrl(Uri.parse('https://nekoya.moe.team'))) throw 'Could not launch';
},
child: const Text('© 2021-2022 Nekoya Co. Ltd.', style: TextStyle(color: Colors.white, fontSize: 15),)
),
],
),
);
}
}