app/lib/components/about_us_body.dart

116 lines
4.1 KiB
Dart
Raw Normal View History

2022-05-28 23:19:54 +07:00
import 'package:url_launcher/url_launcher.dart';
import 'package:video_player/video_player.dart';
2022-05-25 10:35:39 +00:00
import 'package:flutter/material.dart';
class AboutUsBody extends StatefulWidget {
const AboutUsBody({Key? key}) : super(key: key);
@override
State<AboutUsBody> createState() => _AboutUsBodyState();
}
class _AboutUsBodyState extends State<AboutUsBody> {
2022-05-28 23:19:54 +07:00
late VideoPlayerController _controller;
@override
void initState() {
super.initState();
_controller = VideoPlayerController.networkUrl(
Uri.parse('https://nekoya.moe.team/img/AboutUs.mp4'))
..initialize().then((_) {
setState(() {
_controller.play();
_controller.setLooping(true);
});
});
2022-05-28 23:19:54 +07:00
}
2022-05-25 10:35:39 +00:00
@override
Widget build(BuildContext context) {
2022-05-28 23:19:54 +07:00
return Container(
margin: const EdgeInsets.all(20.0),
2022-05-30 13:52:10 +07:00
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
2022-05-28 23:19:54 +07:00
children: [
2022-05-30 13:52:10 +07:00
Flexible(
flex: 2,
child: 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'),
),
),
),
Flexible(
flex: 3,
child: Card(
color: const Color(0xff212226),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
2022-05-25 10:35:39 +00:00
),
2022-05-30 13:52:10 +07:00
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,
2022-05-30 11:56:52 +07:00
),
2022-05-25 10:35:39 +00:00
),
2022-05-30 13:52:10 +07:00
),
),
Flexible(
flex: 1,
child: 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),
2022-05-30 11:56:52 +07:00
),
2022-05-30 13:52:10 +07:00
onPressed: () async {
if (!await launchUrl(
2022-05-30 13:52:41 +07:00
Uri.parse('mailto:nekoya@chocola.dev'))) {
2022-05-30 13:52:10 +07:00
throw 'Could not launch';
2022-05-30 13:52:41 +07:00
}
2022-05-30 13:52:10 +07:00
},
2022-05-30 11:56:52 +07:00
),
2022-05-30 13:52:10 +07:00
),
),
Flexible(
flex: 1,
child: GestureDetector(
onTap: () async {
2022-05-30 13:52:41 +07:00
if (!await launchUrl(Uri.parse('https://nekoya.moe.team'))) {
2022-05-30 13:52:10 +07:00
throw 'Could not launch';
2022-05-30 13:52:41 +07:00
}
2022-05-30 13:52:10 +07:00
},
child: const Text(
2023-09-22 14:58:53 +07:00
'© 2021-2023 Nekoya Co. Ltd.',
2022-05-30 13:52:10 +07:00
style: TextStyle(color: Colors.white, fontSize: 15),
)),
2022-05-25 10:35:39 +00:00
),
2022-05-28 23:19:54 +07:00
],
),
2022-05-25 10:35:39 +00:00
);
}
}