138 lines
4.5 KiB
Dart
138 lines
4.5 KiB
Dart
import 'dart:ui';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter/widgets.dart';
|
|
import 'package:rive/rive.dart';
|
|
|
|
import 'components/animated_btn.dart';
|
|
import 'components/sign_in_dialog.dart';
|
|
|
|
class OnbodingScreen extends StatefulWidget {
|
|
const OnbodingScreen({super.key});
|
|
|
|
@override
|
|
State<OnbodingScreen> createState() => _OnbodingScreenState();
|
|
}
|
|
|
|
class _OnbodingScreenState extends State<OnbodingScreen> {
|
|
late RiveAnimationController _btnAnimationController;
|
|
|
|
bool isShowSignInDialog = false;
|
|
|
|
@override
|
|
void initState() {
|
|
_btnAnimationController = OneShotAnimation(
|
|
"active",
|
|
autoplay: false,
|
|
);
|
|
super.initState();
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: Stack(
|
|
children: [
|
|
Positioned(
|
|
width: MediaQuery.of(context).size.width * 1.7,
|
|
left: 100,
|
|
bottom: 100,
|
|
child: Image.asset(
|
|
"assets/Backgrounds/Spline.png",
|
|
),
|
|
),
|
|
Positioned.fill(
|
|
child: BackdropFilter(
|
|
filter: ImageFilter.blur(sigmaX: 20, sigmaY: 20),
|
|
child: const SizedBox(),
|
|
),
|
|
),
|
|
const RiveAnimation.asset(
|
|
"assets/RiveAssets/shapes.riv",
|
|
),
|
|
Positioned.fill(
|
|
child: BackdropFilter(
|
|
filter: ImageFilter.blur(sigmaX: 30, sigmaY: 30),
|
|
child: const SizedBox(),
|
|
),
|
|
),
|
|
AnimatedPositioned(
|
|
top: isShowSignInDialog ? -50 : 0,
|
|
height: MediaQuery.of(context).size.height,
|
|
width: MediaQuery.of(context).size.width,
|
|
duration: const Duration(milliseconds: 260),
|
|
child: SafeArea(
|
|
child: Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 32),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
const Spacer(),
|
|
const SizedBox(
|
|
width: 260,
|
|
child: Column(
|
|
children: [
|
|
Text(
|
|
"Benvenuti nel traduttore Mottolese",
|
|
style: TextStyle(
|
|
fontSize: 45,
|
|
fontWeight: FontWeight.w700,
|
|
fontFamily: "Poppins",
|
|
height: 1.2,
|
|
),
|
|
),
|
|
SizedBox(height: 16),
|
|
Image(
|
|
image: AssetImage('assets/Logo/Logo.png'),
|
|
),
|
|
Text(
|
|
"Ideato e creato da: Kagir, Ken ",
|
|
),
|
|
],
|
|
),
|
|
),
|
|
const Spacer(flex: 2),
|
|
AnimatedBtn(
|
|
btnAnimationController: _btnAnimationController,
|
|
press: () {
|
|
_btnAnimationController.isActive = true;
|
|
|
|
Future.delayed(
|
|
const Duration(milliseconds: 800),
|
|
() {
|
|
setState(() {
|
|
isShowSignInDialog = true;
|
|
});
|
|
showCustomDialog(
|
|
context,
|
|
onValue: (_) {},
|
|
);
|
|
// showCustomDialog(
|
|
// context,
|
|
// onValue: (_) {
|
|
// setState(() {
|
|
// isShowSignInDialog = false;
|
|
// });
|
|
// },
|
|
// );
|
|
},
|
|
);
|
|
},
|
|
),
|
|
const Padding(
|
|
padding: EdgeInsets.symmetric(vertical: 24),
|
|
child: Text(
|
|
"Per maggiori informazioni contattare Marco all'indirizzo email: marco@esempio.com. Tell: +39 111 2233 444"),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|