You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

196 lines
7.7 KiB

import 'package:camera/camera.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:teso/Classes/customTesoButton.dart';
import 'package:teso/Pages/PageWidgets/Settings/privacy.dart';
import 'package:teso/Pages/Sub_Pages/LandingPage/Login.dart';
import 'package:teso/Pages/PageWidgets/Login/bottomCurve.dart';
import 'package:teso/providers/pageAnimations.dart';
import 'package:teso/util/SizeConfig.dart';
import 'package:teso/util/consts.dart';
import 'PageWidgets/Settings/terms.dart';
class LandingPage extends StatefulWidget {
final List<CameraDescription> connectedCameras;
const LandingPage({Key key, this.connectedCameras}) : super(key: key);
@override
_LandingPageState createState() => _LandingPageState();
}
class _LandingPageState extends State<LandingPage> {
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
extendBody: true,
backgroundColor: Colors.white,
body: AnnotatedRegion<SystemUiOverlayStyle>(
value: SystemUiOverlayStyle.light,
child: GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
child: Container(
padding: EdgeInsets.only(bottom: 10),
child: Stack(
children: <Widget>[
// Transform.rotate(
// angle: 15.712,
// child:
Container(
height: double.infinity,
width: double.infinity,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
accentMain,
darkAccent,
],
),
),
child: CustomPaint(
painter: CurvePainter(),
),
),
Container(
margin: EdgeInsets.only(
top: MediaQuery.of(context).size.height * 0.10),
height: MediaQuery.of(context).size.height * 0.20,
width: double.infinity,
child: Align(
alignment: Alignment.topCenter,
child: Container(
padding: EdgeInsets.all(20),
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.white,
image: DecorationImage(
image: AssetImage(
"assets/images/tesoCouponInsignia.png",
),
fit: BoxFit.contain),
),
),
),
),
Container(
margin: EdgeInsets.only(
top: MediaQuery.of(context).size.height * 0.10),
height: MediaQuery.of(context).size.height * 0.35,
width: double.infinity,
child: Align(
alignment: Alignment.bottomCenter,
child: Text(
"TESO",
style: TextStyle(
fontSize: 55,
color: Colors.white,
fontFamily: "WickedGrit",
//foreground: Paint()..shader = linearGradient
//fontWeight: FontWeight.w900,
),
),
),
),
// ),
Align(
alignment: Alignment.bottomCenter,
child: Container(
margin: EdgeInsets.only(
bottom: 60,
left: SizeConfig.blockSizeHorizontal * 12,
right: SizeConfig.blockSizeHorizontal * 12,
),
child: RichText(
textAlign: TextAlign.center,
textWidthBasis: TextWidthBasis.longestLine,
text: TextSpan(
text: 'By using this application you agree to the',
style: TextStyle(
color: Colors.black,
fontSize: SizeConfig.blockSizeHorizontal * 3.9,
height: 1.8),
children: <TextSpan>[
TextSpan(
text: ' End User License Agreement',
style: TextStyle(
color: Colors.blueAccent,
fontSize: SizeConfig.blockSizeHorizontal * 4,
fontWeight: FontWeight.w600,
),
recognizer: TapGestureRecognizer()
..onTap = () => Navigator.push(
context,
PageTransition(
child: TermsUse(),
type:
PageTransitionType.leftToRight))),
TextSpan(
text: ' and the ',
style: TextStyle(
color: Colors.black,
fontSize: SizeConfig.blockSizeHorizontal * 3.9,
),
),
TextSpan(
text: 'Privacy Statement',
style: TextStyle(
color: Colors.blueAccent,
fontSize: SizeConfig.blockSizeHorizontal * 4,
fontWeight: FontWeight.w600,
),
recognizer: TapGestureRecognizer()
..onTap = () => Navigator.push(
context,
PageTransition(
child: Privacy(),
type:
PageTransitionType.leftToRight))),
]),
),
),
),
Align(
alignment: Alignment.bottomCenter,
child: RaisedGradientButton(
child: Text(
"Accept & Continue",
style: TextStyle(color: Colors.white, fontSize: 18),
),
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
// Colors.green[400],
// Colors.green[600],
accentMain,
tesoGold
],
),
onPressed: () => Navigator.pushAndRemoveUntil(
context,
PageTransition(
type: PageTransitionType.rightToLeft,
child: LoginPage(),
),
(Route<dynamic> route) => false),
width: 200,
height: 50,
),
)
],
),
),
),
),
);
}
}