Skip to content

Commit

Permalink
Fixes #34 : Made Login Page responsive (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
yashLadha authored and aashutoshrathi committed Dec 28, 2018
1 parent c474c20 commit a6f9c04
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions lib/screens/login.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,26 @@ class _LoginPageState extends State<LoginPage> {

@override
Widget build(BuildContext context) {
Orientation currentOrientation = MediaQuery.of(context).orientation;
var iconHeight, _verticalPadding;
if (currentOrientation == Orientation.portrait) {
iconHeight = 150.0;
_verticalPadding = 110.0;
} else {
iconHeight = 120.0;
_verticalPadding = 80.0;
}
return Stack(
children: <Widget>[
Container(
padding: EdgeInsets.symmetric(
vertical: 120.0,
vertical: _verticalPadding,
horizontal: 50.0,
),
alignment: Alignment.topCenter,
child: Image(
image: AssetImage('assets/images/fest-logo.png'),
height: 150,
height: iconHeight,
),
),
Center(
Expand All @@ -42,7 +51,8 @@ class _LoginPageState extends State<LoginPage> {
OutlineButton(
borderSide: BorderSide(color: Colors.deepOrange),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20.0)),
borderRadius: BorderRadius.circular(20.0),
),
child: Text('Login with Google'),
onPressed: () => _handleSignIn(),
),
Expand All @@ -52,5 +62,4 @@ class _LoginPageState extends State<LoginPage> {
],
);
}

}

0 comments on commit a6f9c04

Please sign in to comment.