From a90e2711d7b27b3701c629dc3480693d1ed4fe50 Mon Sep 17 00:00:00 2001 From: evrenvural Date: Tue, 28 Jul 2020 13:03:24 +0300 Subject: [PATCH] valid added --- ios/Podfile.lock | 156 ++++++++++++++++++ ios/Runner.xcodeproj/project.pbxproj | 79 +++++++++ .../contents.xcworkspacedata | 3 + lib/views/signin/sign_in_page.dart | 19 ++- lib/views/signin/sign_up_page.dart | 23 ++- 5 files changed, 269 insertions(+), 11 deletions(-) create mode 100644 ios/Podfile.lock diff --git a/ios/Podfile.lock b/ios/Podfile.lock new file mode 100644 index 0000000..5c3d957 --- /dev/null +++ b/ios/Podfile.lock @@ -0,0 +1,156 @@ +PODS: + - Firebase/Auth (6.27.0): + - Firebase/CoreOnly + - FirebaseAuth (~> 6.6.0) + - Firebase/Core (6.27.0): + - Firebase/CoreOnly + - FirebaseAnalytics (= 6.6.1) + - Firebase/CoreOnly (6.27.0): + - FirebaseCore (= 6.8.0) + - Firebase/Database (6.27.0): + - Firebase/CoreOnly + - FirebaseDatabase (~> 6.3.0) + - firebase_auth (0.0.1): + - Firebase/Auth (~> 6.0) + - Firebase/Core + - Flutter + - firebase_core (0.0.1): + - Firebase/Core + - Flutter + - firebase_core_web (0.1.0): + - Flutter + - firebase_database (0.0.1): + - Firebase/Database + - Flutter + - FirebaseAnalytics (6.6.1): + - FirebaseCore (~> 6.8) + - FirebaseInstallations (~> 1.4) + - GoogleAppMeasurement (= 6.6.1) + - GoogleUtilities/AppDelegateSwizzler (~> 6.0) + - GoogleUtilities/MethodSwizzler (~> 6.0) + - GoogleUtilities/Network (~> 6.0) + - "GoogleUtilities/NSData+zlib (~> 6.0)" + - nanopb (~> 1.30905.0) + - FirebaseAuth (6.6.0): + - FirebaseCore (~> 6.8) + - GoogleUtilities/AppDelegateSwizzler (~> 6.5) + - GoogleUtilities/Environment (~> 6.5) + - GTMSessionFetcher/Core (~> 1.1) + - FirebaseCore (6.8.0): + - FirebaseCoreDiagnostics (~> 1.3) + - GoogleUtilities/Environment (~> 6.5) + - GoogleUtilities/Logger (~> 6.5) + - FirebaseCoreDiagnostics (1.4.0): + - GoogleDataTransportCCTSupport (~> 3.1) + - GoogleUtilities/Environment (~> 6.5) + - GoogleUtilities/Logger (~> 6.5) + - nanopb (~> 1.30905.0) + - FirebaseDatabase (6.3.0): + - FirebaseCore (~> 6.8) + - leveldb-library (~> 1.22) + - FirebaseInstallations (1.4.0): + - FirebaseCore (~> 6.8) + - GoogleUtilities/Environment (~> 6.6) + - GoogleUtilities/UserDefaults (~> 6.6) + - PromisesObjC (~> 1.2) + - Flutter (1.0.0) + - GoogleAppMeasurement (6.6.1): + - GoogleUtilities/AppDelegateSwizzler (~> 6.0) + - GoogleUtilities/MethodSwizzler (~> 6.0) + - GoogleUtilities/Network (~> 6.0) + - "GoogleUtilities/NSData+zlib (~> 6.0)" + - nanopb (~> 1.30905.0) + - GoogleDataTransport (6.2.1) + - GoogleDataTransportCCTSupport (3.2.0): + - GoogleDataTransport (~> 6.1) + - nanopb (~> 1.30905.0) + - GoogleUtilities/AppDelegateSwizzler (6.6.0): + - GoogleUtilities/Environment + - GoogleUtilities/Logger + - GoogleUtilities/Network + - GoogleUtilities/Environment (6.6.0): + - PromisesObjC (~> 1.2) + - GoogleUtilities/Logger (6.6.0): + - GoogleUtilities/Environment + - GoogleUtilities/MethodSwizzler (6.6.0): + - GoogleUtilities/Logger + - GoogleUtilities/Network (6.6.0): + - GoogleUtilities/Logger + - "GoogleUtilities/NSData+zlib" + - GoogleUtilities/Reachability + - "GoogleUtilities/NSData+zlib (6.6.0)" + - GoogleUtilities/Reachability (6.6.0): + - GoogleUtilities/Logger + - GoogleUtilities/UserDefaults (6.6.0): + - GoogleUtilities/Logger + - GTMSessionFetcher/Core (1.4.0) + - leveldb-library (1.22) + - nanopb (1.30905.0): + - nanopb/decode (= 1.30905.0) + - nanopb/encode (= 1.30905.0) + - nanopb/decode (1.30905.0) + - nanopb/encode (1.30905.0) + - PromisesObjC (1.2.9) + +DEPENDENCIES: + - firebase_auth (from `.symlinks/plugins/firebase_auth/ios`) + - firebase_core (from `.symlinks/plugins/firebase_core/ios`) + - firebase_core_web (from `.symlinks/plugins/firebase_core_web/ios`) + - firebase_database (from `.symlinks/plugins/firebase_database/ios`) + - Flutter (from `Flutter`) + +SPEC REPOS: + trunk: + - Firebase + - FirebaseAnalytics + - FirebaseAuth + - FirebaseCore + - FirebaseCoreDiagnostics + - FirebaseDatabase + - FirebaseInstallations + - GoogleAppMeasurement + - GoogleDataTransport + - GoogleDataTransportCCTSupport + - GoogleUtilities + - GTMSessionFetcher + - leveldb-library + - nanopb + - PromisesObjC + +EXTERNAL SOURCES: + firebase_auth: + :path: ".symlinks/plugins/firebase_auth/ios" + firebase_core: + :path: ".symlinks/plugins/firebase_core/ios" + firebase_core_web: + :path: ".symlinks/plugins/firebase_core_web/ios" + firebase_database: + :path: ".symlinks/plugins/firebase_database/ios" + Flutter: + :path: Flutter + +SPEC CHECKSUMS: + Firebase: fc4cbf6f1592636431821ef9a3c557e4dfd9f268 + firebase_auth: d99b993c1405096e66c58211b1cd956c23eed1c5 + firebase_core: 335c02abd48672b7c83c683df833d0488a72e73e + firebase_core_web: d501d8b946b60c8af265428ce483b0fff5ad52d1 + firebase_database: 88085c38a41ad0b5c3c611ede7205831a2ece844 + FirebaseAnalytics: 0ea640473474f036cabbc2576e20c2d63671c92f + FirebaseAuth: b85c064e0ac60f82486728d50a4803f235687302 + FirebaseCore: feda061cb1ee6d8ad4824f4a4a8ffbcfe284f595 + FirebaseCoreDiagnostics: 4505e4d4009b1d93f605088ee7d7764d5f0d1c84 + FirebaseDatabase: 3d02ffa794ec174853c086cf87cf2dc79bd6da49 + FirebaseInstallations: 293f567159b6d66d1c990f13bb868066096c94ec + Flutter: 0e3d915762c693b495b44d77113d4970485de6ec + GoogleAppMeasurement: 2fd5c5a56c069db635c8e7b92d4809a9591d0a69 + GoogleDataTransport: 9a8a16f79feffc7f42096743de2a7c4815e84020 + GoogleDataTransportCCTSupport: 489c1265d2c85b68187a83a911913d190012158d + GoogleUtilities: 39530bc0ad980530298e9c4af8549e991fd033b1 + GTMSessionFetcher: 6f5c8abbab8a9bce4bb3f057e317728ec6182b10 + leveldb-library: 55d93ee664b4007aac644a782d11da33fba316f7 + nanopb: c43f40fadfe79e8b8db116583945847910cbabc9 + PromisesObjC: b48e0338dbbac2207e611750777895f7a5811b75 + +PODFILE CHECKSUM: c34e2287a9ccaa606aeceab922830efb9a6ff69a + +COCOAPODS: 1.8.4 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index e987660..3122367 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -13,6 +13,7 @@ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; + F5D2B9E9ABDFD90E34EE1D2D /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9134B29B821B1D48ACF565FC /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -31,10 +32,14 @@ /* Begin PBXFileReference section */ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 2A19D931A4A6D16D5D14B8C7 /* 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 = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 814CBFDC8B51BAEF74502298 /* 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 = ""; }; + 8C010D451C752B981E0679AA /* 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 = ""; }; + 9134B29B821B1D48ACF565FC /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -49,12 +54,24 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + F5D2B9E9ABDFD90E34EE1D2D /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 21332AD3FAE823719ACD79D6 /* Pods */ = { + isa = PBXGroup; + children = ( + 2A19D931A4A6D16D5D14B8C7 /* Pods-Runner.debug.xcconfig */, + 814CBFDC8B51BAEF74502298 /* Pods-Runner.release.xcconfig */, + 8C010D451C752B981E0679AA /* Pods-Runner.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -72,6 +89,8 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, + 21332AD3FAE823719ACD79D6 /* Pods */, + D9FAAF91FD540596BFCC356C /* Frameworks */, ); sourceTree = ""; }; @@ -106,6 +125,14 @@ name = "Supporting Files"; sourceTree = ""; }; + D9FAAF91FD540596BFCC356C /* Frameworks */ = { + isa = PBXGroup; + children = ( + 9134B29B821B1D48ACF565FC /* Pods_Runner.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -113,12 +140,14 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( + 95B7B566977CC0D6C1E890EE /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + 5B520595F63DC7F3B47F85EB /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -191,6 +220,56 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; + 5B520595F63DC7F3B47F85EB /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", + "${PODS_ROOT}/../Flutter/Flutter.framework", + "${BUILT_PRODUCTS_DIR}/GTMSessionFetcher/GTMSessionFetcher.framework", + "${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework", + "${BUILT_PRODUCTS_DIR}/PromisesObjC/FBLPromises.framework", + "${BUILT_PRODUCTS_DIR}/leveldb-library/leveldb.framework", + "${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GTMSessionFetcher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBLPromises.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/leveldb.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 95B7B566977CC0D6C1E890EE /* [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; + }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; 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/views/signin/sign_in_page.dart b/lib/views/signin/sign_in_page.dart index ef2b699..ca3d055 100644 --- a/lib/views/signin/sign_in_page.dart +++ b/lib/views/signin/sign_in_page.dart @@ -4,6 +4,7 @@ import 'package:group_6/core/route_names.dart'; import 'package:group_6/service/myauth.dart'; import 'package:group_6/views/signin/sign_base.dart'; import 'package:group_6/views/signin/sign_up_page.dart'; +import 'package:group_6/core/my_colors.dart'; class SigninPage extends StatefulWidget { SigninPage({Key key}) : super(key: key); @@ -14,13 +15,18 @@ class SigninPage extends StatefulWidget { class _SigninPageState extends SignBase { String email = "", password = ""; + GlobalKey scaffold = GlobalKey(); void onSigninTap() async { - await MyAuth().signIn(email, password); - var user = await MyAuth().getCurrentUser(); - - if (user != null) { - Navigator.of(context).pushNamed(RouteNames.WELCOME); + try { + await MyAuth().signIn(email, password); + var user = await MyAuth().getCurrentUser(); + if (user != null) { + Navigator.of(context).pushNamed(RouteNames.WELCOME); + } + } catch (e) { + scaffold.currentState + .showSnackBar(SnackBar(content: Text("Hatalı Giriş"))); } } @@ -50,6 +56,7 @@ class _SigninPageState extends SignBase { Widget build(BuildContext context) { return SafeArea( child: Scaffold( + key: scaffold, body: Center( child: buildCard(buildFormContent()), ), @@ -78,7 +85,7 @@ class _SigninPageState extends SignBase { SizedBox(height: 20), buildBottomRow([ buildFlatButton("Sign up", onSignupTap), - buildButton("Sign in", Colors.orange, onSigninTap), + buildButton("Sign in", MyColors.PURPLE, onSigninTap), ]), ], ); diff --git a/lib/views/signin/sign_up_page.dart b/lib/views/signin/sign_up_page.dart index 3e3a7c0..da74503 100644 --- a/lib/views/signin/sign_up_page.dart +++ b/lib/views/signin/sign_up_page.dart @@ -5,6 +5,8 @@ import 'package:group_6/service/myauth.dart'; import 'package:group_6/views/signin/sign_base.dart'; import 'package:group_6/views/signin/sign_in_page.dart'; +import '../../core/my_colors.dart'; + class SignupPage extends StatefulWidget { SignupPage({Key key}) : super(key: key); @@ -14,14 +16,24 @@ class SignupPage extends StatefulWidget { class _SignupPageState extends SignBase { String email = "", password1 = "", password2 = ""; + GlobalKey scaffold = GlobalKey(); void onSignupTap() async { if (password1 == password2) { - var userId = await MyAuth().signUp(email, password1); - if (userId != null) { - Navigator.of(context).pushNamed(RouteNames.WELCOME); + try { + var userId = await MyAuth().signUp(email, password1); + if (userId != null) { + Navigator.of(context).pushNamed(RouteNames.WELCOME); + } + } catch (e) { + scaffold.currentState.showSnackBar(SnackBar( + content: + Text("Girdiğiniz email veya şifre kurallara uygun değil."))); } - } else {} + } else { + scaffold.currentState + .showSnackBar(SnackBar(content: Text("Hatalı Şifre"))); + } } void onSigninTap() { @@ -56,6 +68,7 @@ class _SignupPageState extends SignBase { Widget build(BuildContext context) { return SafeArea( child: Scaffold( + key: scaffold, body: Center( child: buildCard(buildFormContent()), ), @@ -91,7 +104,7 @@ class _SignupPageState extends SignBase { SizedBox(height: 20), buildBottomRow([ buildFlatButton("Sign in", onSigninTap), - buildButton("Sign up", Colors.orange, onSignupTap), + buildButton("Sign up", MyColors.BLUE, onSignupTap), ]), ], );