-
-
Notifications
You must be signed in to change notification settings - Fork 504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replaced padding for screen dimensions with MediaQuery to make it compatible with all screen sizes. #12
Closed
Closed
Replaced padding for screen dimensions with MediaQuery to make it compatible with all screen sizes. #12
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
# This is a generated file; do not edit or check into version control. | ||
export "FLUTTER_ROOT=/home/shuchita/flutter" | ||
export "FLUTTER_APPLICATION_PATH=/home/shuchita/TheGorgeousLogin" | ||
export "FLUTTER_TARGET=lib/main.dart" | ||
export "FLUTTER_BUILD_DIR=build" | ||
export "SYMROOT=${SOURCE_ROOT}/../build/ios" | ||
export "FLUTTER_FRAMEWORK_DIR=/home/shuchita/flutter/bin/cache/artifacts/engine/ios" | ||
export "FLUTTER_BUILD_NAME=1.0.0" | ||
export "FLUTTER_BUILD_NUMBER=1" | ||
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter/material.dart' as prefix0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. to be removed |
||
import 'package:flutter/services.dart'; | ||
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; | ||
import 'package:the_gorgeous_login/style/theme.dart' as Theme; | ||
|
@@ -13,7 +14,6 @@ class LoginPage extends StatefulWidget { | |
|
||
class _LoginPageState extends State<LoginPage> | ||
with SingleTickerProviderStateMixin { | ||
|
||
final GlobalKey<ScaffoldState> _scaffoldKey = new GlobalKey<ScaffoldState>(); | ||
|
||
final FocusNode myFocusNodeEmailLogin = FocusNode(); | ||
|
@@ -43,77 +43,75 @@ class _LoginPageState extends State<LoginPage> | |
|
||
@override | ||
Widget build(BuildContext context) { | ||
print(MediaQuery.of(context).size.height); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. to be removed |
||
return new Scaffold( | ||
key: _scaffoldKey, | ||
body: NotificationListener<OverscrollIndicatorNotification>( | ||
onNotification: (overscroll) { | ||
overscroll.disallowGlow(); | ||
}, | ||
child: SingleChildScrollView( | ||
child: Container( | ||
width: MediaQuery.of(context).size.width, | ||
height: MediaQuery.of(context).size.height >= 775.0 | ||
? MediaQuery.of(context).size.height | ||
: 775.0, | ||
decoration: new BoxDecoration( | ||
gradient: new LinearGradient( | ||
colors: [ | ||
Theme.Colors.loginGradientStart, | ||
Theme.Colors.loginGradientEnd | ||
], | ||
begin: const FractionalOffset(0.0, 0.0), | ||
end: const FractionalOffset(1.0, 1.0), | ||
stops: [0.0, 1.0], | ||
tileMode: TileMode.clamp), | ||
), | ||
child: Column( | ||
mainAxisSize: MainAxisSize.max, | ||
child: Container( | ||
width: MediaQuery.of(context).size.width, | ||
height: MediaQuery.of(context).size.height, | ||
decoration: new BoxDecoration( | ||
gradient: new LinearGradient( | ||
colors: [ | ||
Theme.Colors.loginGradientStart, | ||
Theme.Colors.loginGradientEnd | ||
], | ||
begin: const FractionalOffset(0.0, 0.0), | ||
end: const FractionalOffset(1.0, 1.0), | ||
stops: [0.0, 1.0], | ||
tileMode: TileMode.clamp), | ||
), | ||
child: Column( | ||
mainAxisSize: MainAxisSize.max, | ||
children: <Widget>[ | ||
Padding( | ||
padding: EdgeInsets.only( | ||
top: MediaQuery.of(context).size.height * (60 / 730)), | ||
child: new Image( | ||
width: 250.0, | ||
height: 191.0, | ||
fit: BoxFit.fill, | ||
image: new AssetImage('assets/img/login_logo.png')), | ||
), | ||
Padding( | ||
padding: EdgeInsets.only(top: 20.0), | ||
child: _buildMenuBar(context), | ||
), | ||
Expanded( | ||
flex: 2, | ||
child: PageView( | ||
controller: _pageController, | ||
onPageChanged: (i) { | ||
if (i == 0) { | ||
setState(() { | ||
right = Colors.white; | ||
left = Colors.black; | ||
}); | ||
} else if (i == 1) { | ||
setState(() { | ||
right = Colors.black; | ||
left = Colors.white; | ||
}); | ||
} | ||
}, | ||
children: <Widget>[ | ||
Padding( | ||
padding: EdgeInsets.only(top: 75.0), | ||
child: new Image( | ||
width: 250.0, | ||
height: 191.0, | ||
fit: BoxFit.fill, | ||
image: new AssetImage('assets/img/login_logo.png')), | ||
new ConstrainedBox( | ||
constraints: const BoxConstraints.expand(), | ||
child: _buildSignIn(context), | ||
), | ||
Padding( | ||
padding: EdgeInsets.only(top: 20.0), | ||
child: _buildMenuBar(context), | ||
), | ||
Expanded( | ||
flex: 2, | ||
child: PageView( | ||
controller: _pageController, | ||
onPageChanged: (i) { | ||
if (i == 0) { | ||
setState(() { | ||
right = Colors.white; | ||
left = Colors.black; | ||
}); | ||
} else if (i == 1) { | ||
setState(() { | ||
right = Colors.black; | ||
left = Colors.white; | ||
}); | ||
} | ||
}, | ||
children: <Widget>[ | ||
new ConstrainedBox( | ||
constraints: const BoxConstraints.expand(), | ||
child: _buildSignIn(context), | ||
), | ||
new ConstrainedBox( | ||
constraints: const BoxConstraints.expand(), | ||
child: _buildSignUp(context), | ||
), | ||
], | ||
), | ||
new ConstrainedBox( | ||
constraints: const BoxConstraints.expand(), | ||
child: _buildSignUp(context), | ||
), | ||
], | ||
), | ||
), | ||
), | ||
], | ||
), | ||
), | ||
), | ||
); | ||
} | ||
|
@@ -332,8 +330,7 @@ class _LoginPageState extends State<LoginPage> | |
fontFamily: "WorkSansBold"), | ||
), | ||
), | ||
onPressed: () => | ||
showInSnackBar("Login button pressed")), | ||
onPressed: () => showInSnackBar("Login button pressed")), | ||
), | ||
], | ||
), | ||
|
@@ -634,8 +631,7 @@ class _LoginPageState extends State<LoginPage> | |
fontFamily: "WorkSansBold"), | ||
), | ||
), | ||
onPressed: () => | ||
showInSnackBar("SignUp button pressed")), | ||
onPressed: () => showInSnackBar("SignUp button pressed")), | ||
), | ||
], | ||
), | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not add this file in git