forked from lohanidamodar/flutter_ui_challenges
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
388 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,183 @@ | ||
/** | ||
* Author: Aparna Dulal | ||
* profile: https://github.com/Ambikadulal | ||
*/ | ||
import 'package:flutter/material.dart'; | ||
import 'package:simple_animations/simple_animations.dart'; | ||
|
||
|
||
class LoginTwelvePage extends StatelessWidget { | ||
static final String path = "lib/src/pages/login/login12.dart"; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
body: Container( | ||
width: double.infinity, | ||
decoration: BoxDecoration( | ||
gradient: LinearGradient( | ||
begin: Alignment.topCenter, | ||
colors: [ | ||
Colors.orange[900], | ||
Colors.orange[800], | ||
Colors.orange[400] | ||
] | ||
) | ||
), | ||
child: Column( | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: <Widget>[ | ||
SizedBox(height: 80,), | ||
Padding( | ||
padding: EdgeInsets.all(20), | ||
child: Column( | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: <Widget>[ | ||
FadeAnimation(1, Text("Login", style: TextStyle(color: Colors.white, fontSize: 40),)), | ||
SizedBox(height: 10,), | ||
FadeAnimation(1.3, Text("Welcome Back", style: TextStyle(color: Colors.white, fontSize: 18),)), | ||
], | ||
), | ||
), | ||
SizedBox(height: 20), | ||
Expanded( | ||
child: Container( | ||
decoration: BoxDecoration( | ||
color: Colors.white, | ||
borderRadius: BorderRadius.only(topLeft: Radius.circular(60), topRight: Radius.circular(60)) | ||
), | ||
child: SingleChildScrollView( | ||
child: Padding( | ||
padding: EdgeInsets.all(30), | ||
child: Column( | ||
children: <Widget>[ | ||
SizedBox(height: 60,), | ||
FadeAnimation(1.4, Container( | ||
decoration: BoxDecoration( | ||
color: Colors.white, | ||
borderRadius: BorderRadius.circular(10), | ||
boxShadow: [BoxShadow( | ||
color: Color.fromRGBO(225, 95, 27, .3), | ||
blurRadius: 20, | ||
offset: Offset(0, 10) | ||
)] | ||
), | ||
child: Column( | ||
children: <Widget>[ | ||
Container( | ||
padding: EdgeInsets.all(10), | ||
decoration: BoxDecoration( | ||
border: Border(bottom: BorderSide(color: Colors.grey[200])) | ||
), | ||
child: TextField( | ||
decoration: InputDecoration( | ||
hintText: "Email or Phone number", | ||
hintStyle: TextStyle(color: Colors.grey), | ||
border: InputBorder.none | ||
), | ||
), | ||
), | ||
Container( | ||
padding: EdgeInsets.all(10), | ||
decoration: BoxDecoration( | ||
border: Border(bottom: BorderSide(color: Colors.grey[200])) | ||
), | ||
child: TextField( | ||
decoration: InputDecoration( | ||
hintText: "Password", | ||
hintStyle: TextStyle(color: Colors.grey), | ||
border: InputBorder.none | ||
), | ||
), | ||
), | ||
], | ||
), | ||
)), | ||
SizedBox(height: 40,), | ||
FadeAnimation(1.5, Text("Forgot Password?", style: TextStyle(color: Colors.grey),)), | ||
SizedBox(height: 20,), | ||
FadeAnimation(1.6, Container( | ||
height: 50, | ||
margin: EdgeInsets.symmetric(horizontal: 50), | ||
decoration: BoxDecoration( | ||
borderRadius: BorderRadius.circular(50), | ||
color: Colors.orange[900] | ||
), | ||
child: Center( | ||
child: Text("Login", style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold),), | ||
), | ||
)), | ||
SizedBox(height: 50,), | ||
FadeAnimation(1.7, Text("Continue with social media", style: TextStyle(color: Colors.grey),)), | ||
SizedBox(height: 30,), | ||
Row( | ||
children: <Widget>[ | ||
Expanded( | ||
child: FadeAnimation(1.8, Container( | ||
height: 50, | ||
decoration: BoxDecoration( | ||
borderRadius: BorderRadius.circular(50), | ||
color: Colors.blue | ||
), | ||
child: Center( | ||
child: Text("Facebook", style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold),), | ||
), | ||
)), | ||
), | ||
SizedBox(width: 30,), | ||
Expanded( | ||
child: FadeAnimation(1.9, Container( | ||
height: 50, | ||
decoration: BoxDecoration( | ||
borderRadius: BorderRadius.circular(50), | ||
color: Colors.black | ||
), | ||
child: Center( | ||
child: Text("Github", style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold),), | ||
), | ||
)), | ||
) | ||
], | ||
) | ||
], | ||
), | ||
), | ||
), | ||
), | ||
) | ||
], | ||
), | ||
), | ||
); | ||
} | ||
} | ||
class FadeAnimation extends StatelessWidget { | ||
final double delay; | ||
final Widget child; | ||
|
||
FadeAnimation(this.delay, this.child); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
final tween = MultiTrackTween([ | ||
Track("opacity").add(Duration(milliseconds: 500), Tween(begin: 0.0, end: 1.0)), | ||
Track("translateY").add( | ||
Duration(milliseconds: 500), Tween(begin: -30.0, end: 0.0), | ||
curve: Curves.easeOut) | ||
]); | ||
|
||
return ControlledAnimation( | ||
delay: Duration(milliseconds: (500 * delay).round()), | ||
duration: tween.duration, | ||
tween: tween, | ||
child: child, | ||
builderWithChild: (context, child, animation) => Opacity( | ||
opacity: animation["opacity"], | ||
child: Transform.translate( | ||
offset: Offset(0, animation["translateY"]), | ||
child: child | ||
), | ||
), | ||
); | ||
} | ||
} |
Oops, something went wrong.