Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 12

import

'package:best_flutter_ui_templates/fitness_app/A
nimation/FadeAnimation.dart';
import
'package:flutter/material.dart';
import
'package:font_awesome_flutter/font_a
wesome_flutter.dart';

import '../../main.dart';
import '../fintness_app_theme.dart';
import
'../fitness_app_home_screen.dart';

class Login extends StatefulWidget {


@override
_LoginState createState() =>
_LoginState();
}

class _LoginState extends


State<Login> with
TickerProviderStateMixin {
bool _obscureText = true;
void _toggle() {
setState(() {
_obscureText = !_obscureText;
});
}

@override
Widget build(BuildContext context)
{
return Scaffold(
backgroundColor:
Colors.white,
body: SingleChildScrollView(
child: Container(
child: Column(
children: <Widget>[
Container(
height: 300,
decoration:
BoxDecoration(
image:
DecorationImage(
image:
AssetImage('assets/fitness_app/backg
round-1.png'),
fit:
BoxFit.fill,
)),
child: Stack(
children:
<Widget>[
Positioned(
left: 30,
width: 80,
height: 150,
child:
FadeAnimation(
1,

Container(

decoration: BoxDecoration(

image: DecorationImage(

image: AssetImage(

'assets/fitness_app/light-1.png'))),
)),
),
Positioned(
left: 140,
width: 80,
height: 120,
child:
FadeAnimation(
1.3,

Container(

decoration: BoxDecoration(

image: DecorationImage(
image: AssetImage(

'assets/fitness_app/light-2.png'))),
)),
),
Positioned(
right: 40,
width: 80,
height: 95,
child:
FadeAnimation(
1.5,

Container(

decoration: BoxDecoration(

image: DecorationImage(

image: AssetImage(

'assets/fitness_app/light-1.png'))),
)),
),
Positioned(
child:
FadeAnimation(
1.6,
Center(
child:
Container(

margin: EdgeInsets.only(top: 75),

child: Row(

mainAxisAlignment:
MainAxisAlignment.center,

children: [

Text(

"Mono",

style: TextStyle(
color: Colors.deepOrange,

fontSize: 37,

fontWeight: FontWeight.bold,

fontFamily: 'Aquire'),

),

Text(

"Express",

style: TextStyle(

color: Colors.white,

fontSize: 37,

fontWeight: FontWeight.bold,

fontFamily: 'Aquire'),

),
],
),
),
)),
)
],
),
),
Padding(
padding:
EdgeInsets.only(
right: 25,
left: 25,
bottom: 10,
top: 0,
),
child: Column(
children:
<Widget>[
FadeAnimation(
1.8,
Container(
padding:
EdgeInsets.all(5),

decoration: BoxDecoration(

color: Colors.white,

borderRadius:
BorderRadius.circular(10),

boxShadow: [

BoxShadow(

color: Colors.grey.withOpacity(0.7),

blurRadius: 2.0,

offset: Offset(1.1, 1.1))


]),
child:
Column(

children: <Widget>[

Container(

padding: EdgeInsets.all(8.0),

decoration: BoxDecoration(

border: Border(

bottom: BorderSide(

color: Colors.grey[100]))),

child: TextField(

cursorColor: Colors.indigo[500],

decoration: InputDecoration(

icon: new Icon(


Icons.email,

color:
FitnessAppTheme.nearlyDarkBlue,

//Color.fromRGBO(73, 79, 213,


0.9019607843137255),

),

border: InputBorder.none,

hintText: "Email",

hintStyle:

TextStyle(color: Colors.grey[400])),
),
),

Container(

padding: EdgeInsets.all(8.0),

child: TextField(

obscureText: _obscureText,

cursorColor: Colors.indigo[500],

decoration: InputDecoration(

icon: new Icon(

Icons.vpn_key,

color:
FitnessAppTheme.nearlyDarkBlue,

//Color.fromRGBO(73, 79, 213,


0.9019607843137255),

),

suffixIcon: InkWell(
onTap: _toggle,

child: Icon(

_obscureText

? FontAwesomeIcons.eye

: FontAwesomeIcons.eyeSlash,

size: 20.0,

color:

FitnessAppTheme.nearlyDarkBlue,

),

),

border: InputBorder.none,

hintText: "Mot de passe",

hintStyle:

TextStyle(color: Colors.grey[400])),
),
),
],
),
)),
SizedBox(
height: 20,
),
FadeAnimation(
2,
InkWell(
onTap:
() {

Navigator.push(

context,
MaterialPageRoute(

builder: (_) =>


FitnessAppHomeScreen(),
),
);
},
child:
Container(

height: 50,
width:
170,

decoration: BoxDecoration(

borderRadius:
BorderRadius.circular(10),

gradient: LinearGradient(colors: [

FitnessAppTheme.nearlyDarkBlue

.withOpacity(0.7),

FitnessAppTheme.nearlyDarkBlue

.withOpacity(0.8),

// Color.fromRGBO(115, 120, 194,


1.0),

// Color.fromRGBO(100, 109, 246,


0.9019607843137255),
])
),
child:
Center(

child: Text(

"Connexion",

style: TextStyle(

color: Colors.white,
fontWeight: FontWeight.bold,
),
),
),
),
)),
FadeAnimation(
2.5,
Container(
child:
Column(

children: <Widget>[
Stack(

overflow: Overflow.visible,

children: <Widget>[

Padding(

padding: const EdgeInsets.only(top:


16),

child: Container(

decoration: BoxDecoration(

color: HexColor("#f9d9e2"),

borderRadius: BorderRadius.only(

topLeft: Radius.circular(8.0),

bottomLeft: Radius.circular(8.0),

bottomRight: Radius.circular(8.0),

topRight: Radius.circular(8.0)),

boxShadow: <BoxShadow>[

BoxShadow(

color: FitnessAppTheme.grey
.withOpacity(0.7),

offset: Offset(1.1, 1.1),

blurRadius: 1.0),

],

),

child: Column(

children: <Widget>[

Padding(

padding: const EdgeInsets.only(

bottom: 12, top: 12),

child: Row(

mainAxisAlignment:

MainAxisAlignment.center,

children: [

Padding(

padding:

const EdgeInsets.only(

right: 8.0),

child: Icon(

Icons.warning,

color: HexColor("#ff3333"),

size: 30,

),
),

Text(

'Mot de passe ou Email incorrect',

textAlign: TextAlign.left,

style: TextStyle(

fontFamily: FitnessAppTheme

.fontName,

fontWeight: FontWeight.w500,

fontSize: 14,

letterSpacing: 0.0,

color: HexColor("#ff3333"),

//FitnessAppTheme.nearlyDarkBlue.wit
hOpacity(0.6),

),

),

],

),

),

],

),

),
),
],
),
],
),
),
),
],
),
)
],
),
),
));
}
}

You might also like