From f4efb894670663f36d4a289cc66d3ec796483154 Mon Sep 17 00:00:00 2001 From: Sonu Sharma Date: Thu, 13 Feb 2020 22:00:42 +0530 Subject: [PATCH] Bottom overflowed with keyboard open issue fixed. --- ios/Podfile.lock | 22 +++++ ios/Runner.xcodeproj/project.pbxproj | 66 ++++++++++++++ .../contents.xcworkspacedata | 3 + lib/src/loginPage.dart | 91 ++++++++++--------- lib/src/signup.dart | 79 ++++++++-------- lib/src/welcomePage.dart | 6 +- 6 files changed, 183 insertions(+), 84 deletions(-) create mode 100644 ios/Podfile.lock diff --git a/ios/Podfile.lock b/ios/Podfile.lock new file mode 100644 index 0000000..af66ea0 --- /dev/null +++ b/ios/Podfile.lock @@ -0,0 +1,22 @@ +PODS: + - Flutter (1.0.0) + - path_provider (0.0.1): + - Flutter + +DEPENDENCIES: + - Flutter (from `Flutter`) + - path_provider (from `.symlinks/plugins/path_provider/ios`) + +EXTERNAL SOURCES: + Flutter: + :path: Flutter + path_provider: + :path: ".symlinks/plugins/path_provider/ios" + +SPEC CHECKSUMS: + Flutter: 0e3d915762c693b495b44d77113d4970485de6ec + path_provider: fb74bd0465e96b594bb3b5088ee4a4e7bb1f2a9d + +PODFILE CHECKSUM: 1b66dae606f75376c5f2135a8290850eeb09ae83 + +COCOAPODS: 1.8.4 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 6ef2738..70f6a4b 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 0B6EF0F0B7E3B9C0363FC787 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A8DC5FFF89E886E4624C3195 /* Pods_Runner.framework */; }; 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; @@ -50,6 +51,10 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + A8DC5FFF89E886E4624C3195 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + B1FA4C871298DE1762B303CD /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + CC3CFD90778936FFB10F0292 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + EC95A1C3242262F636FFF724 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -59,12 +64,32 @@ files = ( 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, + 0B6EF0F0B7E3B9C0363FC787 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 5799509AA5500C6742CC565D /* Pods */ = { + isa = PBXGroup; + children = ( + B1FA4C871298DE1762B303CD /* Pods-Runner.debug.xcconfig */, + EC95A1C3242262F636FFF724 /* Pods-Runner.release.xcconfig */, + CC3CFD90778936FFB10F0292 /* Pods-Runner.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; + 5C9F5D1F02FF1AFE8172A350 /* Frameworks */ = { + isa = PBXGroup; + children = ( + A8DC5FFF89E886E4624C3195 /* Pods_Runner.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -84,6 +109,8 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, + 5799509AA5500C6742CC565D /* Pods */, + 5C9F5D1F02FF1AFE8172A350 /* Frameworks */, ); sourceTree = ""; }; @@ -125,12 +152,14 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( + A637FECDCC2F89E6F8D44272 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + 06BD93E0728D7A7CF068D7E3 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -189,6 +218,21 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + 06BD93E0728D7A7CF068D7E3 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -217,6 +261,28 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; + A637FECDCC2F89E6F8D44272 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata index 1d526a1..21a3cc1 100644 --- a/ios/Runner.xcworkspace/contents.xcworkspacedata +++ b/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -4,4 +4,7 @@ + + diff --git a/lib/src/loginPage.dart b/lib/src/loginPage.dart index eb84110..8c90819 100644 --- a/lib/src/loginPage.dart +++ b/lib/src/loginPage.dart @@ -233,54 +233,59 @@ class _LoginPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - body: Stack( - children: [ - Container( - padding: EdgeInsets.symmetric(horizontal: 20), - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, + body: SingleChildScrollView( + child: Container( + height: MediaQuery.of(context).size.height, + child: Stack( children: [ - Expanded( - flex: 3, - child: SizedBox(), - ), - _title(), - SizedBox( - height: 50, - ), - _emailPasswordWidget(), - SizedBox( - height: 20, - ), - _submitButton(), Container( - padding: EdgeInsets.symmetric(vertical: 10), - alignment: Alignment.centerRight, - child: Text('Forgot Password ?', - style: - TextStyle(fontSize: 14, fontWeight: FontWeight.w500)), + padding: EdgeInsets.symmetric(horizontal: 20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Expanded( + flex: 3, + child: SizedBox(), + ), + _title(), + SizedBox( + height: 50, + ), + _emailPasswordWidget(), + SizedBox( + height: 20, + ), + _submitButton(), + Container( + padding: EdgeInsets.symmetric(vertical: 10), + alignment: Alignment.centerRight, + child: Text('Forgot Password ?', + style: + TextStyle(fontSize: 14, fontWeight: FontWeight.w500)), + ), + _divider(), + _facebookButton(), + Expanded( + flex: 2, + child: SizedBox(), + ), + ], + ), ), - _divider(), - _facebookButton(), - Expanded( - flex: 2, - child: SizedBox(), + Align( + alignment: Alignment.bottomCenter, + child: _createAccountLabel(), ), + Positioned(top: 40, left: 0, child: _backButton()), + Positioned( + top: -MediaQuery.of(context).size.height * .15, + right: -MediaQuery.of(context).size.width * .4, + child: BezierContainer()) ], ), - ), - Align( - alignment: Alignment.bottomCenter, - child: _createAccountLabel(), - ), - Positioned(top: 40, left: 0, child: _backButton()), - Positioned( - top: -MediaQuery.of(context).size.height * .15, - right: -MediaQuery.of(context).size.width * .4, - child: BezierContainer()) - ], - ), - ); + ) + ) + ); } } diff --git a/lib/src/signup.dart b/lib/src/signup.dart index 29b2389..8d04e2e 100644 --- a/lib/src/signup.dart +++ b/lib/src/signup.dart @@ -152,45 +152,50 @@ class _SignUpPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - body: Stack( - children: [ - Container( - padding: EdgeInsets.symmetric(horizontal: 20), - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - flex: 3, - child: SizedBox(), - ), - _title(), - SizedBox( - height: 50, + body: SingleChildScrollView( + child:Container( + height: MediaQuery.of(context).size.height, + child:Stack( + children: [ + Container( + padding: EdgeInsets.symmetric(horizontal: 20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Expanded( + flex: 3, + child: SizedBox(), + ), + _title(), + SizedBox( + height: 50, + ), + _emailPasswordWidget(), + SizedBox( + height: 20, + ), + _submitButton(), + Expanded( + flex: 2, + child: SizedBox(), + ) + ], ), - _emailPasswordWidget(), - SizedBox( - height: 20, - ), - _submitButton(), - Expanded( - flex: 2, - child: SizedBox(), - ) - ], - ), + ), + Align( + alignment: Alignment.bottomCenter, + child: _loginAccountLabel(), + ), + Positioned(top: 40, left: 0, child: _backButton()), + Positioned( + top: -MediaQuery.of(context).size.height * .15, + right: -MediaQuery.of(context).size.width * .4, + child: BezierContainer()) + ], ), - Align( - alignment: Alignment.bottomCenter, - child: _loginAccountLabel(), - ), - Positioned(top: 40, left: 0, child: _backButton()), - Positioned( - top: -MediaQuery.of(context).size.height * .15, - right: -MediaQuery.of(context).size.width * .4, - child: BezierContainer()) - ], - ), + ) + ) ); } } diff --git a/lib/src/welcomePage.dart b/lib/src/welcomePage.dart index a0dde3a..78b0960 100644 --- a/lib/src/welcomePage.dart +++ b/lib/src/welcomePage.dart @@ -118,9 +118,8 @@ class _WelcomePageState extends State { @override Widget build(BuildContext context) { return Scaffold( - body: Stack( - children: [ - Container( + body:SingleChildScrollView( + child:Container( padding: EdgeInsets.symmetric(horizontal: 20), height: MediaQuery.of(context).size.height, decoration: BoxDecoration( @@ -156,7 +155,6 @@ class _WelcomePageState extends State { ], ), ), - ], ), ); }