diff --git a/android/app/build.gradle b/android/app/build.gradle index 82abcb9..4f14a1f 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -59,8 +59,8 @@ android { // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. minSdkVersion 21 targetSdkVersion 31 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName + versionCode 2 + versionName "2.0" multiDexEnabled true } diff --git a/assets/account/bnk.png b/assets/account/bnk.png new file mode 100644 index 0000000..652d5e6 Binary files /dev/null and b/assets/account/bnk.png differ diff --git a/assets/account/dgb.png b/assets/account/dgb.png new file mode 100644 index 0000000..5cfa302 Binary files /dev/null and b/assets/account/dgb.png differ diff --git a/assets/account/hana_send.png b/assets/account/hana_send.png new file mode 100644 index 0000000..5deecbe Binary files /dev/null and b/assets/account/hana_send.png differ diff --git a/assets/account/ibk.png b/assets/account/ibk.png new file mode 100644 index 0000000..e28c8c8 Binary files /dev/null and b/assets/account/ibk.png differ diff --git a/assets/account/ibk_send.png b/assets/account/ibk_send.png new file mode 100644 index 0000000..b2956fc Binary files /dev/null and b/assets/account/ibk_send.png differ diff --git a/assets/account/kakaobank.png b/assets/account/kakaobank.png new file mode 100644 index 0000000..5b33993 Binary files /dev/null and b/assets/account/kakaobank.png differ diff --git a/assets/account/kakaopay.png b/assets/account/kakaopay.png new file mode 100644 index 0000000..37a7370 Binary files /dev/null and b/assets/account/kakaopay.png differ diff --git a/assets/account/kb.png b/assets/account/kb.png new file mode 100644 index 0000000..7562515 Binary files /dev/null and b/assets/account/kb.png differ diff --git a/assets/account/kbank.png b/assets/account/kbank.png new file mode 100644 index 0000000..50cbc92 Binary files /dev/null and b/assets/account/kbank.png differ diff --git a/assets/account/new.png b/assets/account/new.png new file mode 100644 index 0000000..bb6b1b1 Binary files /dev/null and b/assets/account/new.png differ diff --git a/assets/account/nh.png b/assets/account/nh.png new file mode 100644 index 0000000..e9251d6 Binary files /dev/null and b/assets/account/nh.png differ diff --git a/assets/account/point.png b/assets/account/point.png new file mode 100644 index 0000000..0e22709 Binary files /dev/null and b/assets/account/point.png differ diff --git a/assets/account/shinhan.png b/assets/account/shinhan.png new file mode 100644 index 0000000..8a064dc Binary files /dev/null and b/assets/account/shinhan.png differ diff --git a/assets/account/toss.png b/assets/account/toss.png new file mode 100644 index 0000000..1673505 Binary files /dev/null and b/assets/account/toss.png differ diff --git a/assets/account/tossbank.png b/assets/account/tossbank.png new file mode 100644 index 0000000..88b3f87 Binary files /dev/null and b/assets/account/tossbank.png differ diff --git a/assets/account/wori_send.png b/assets/account/wori_send.png new file mode 100644 index 0000000..0a2878a Binary files /dev/null and b/assets/account/wori_send.png differ diff --git a/assets/icons/bottombar/catchbox.png b/assets/icons/bottombar/catchbox.png new file mode 100644 index 0000000..4bef5a3 Binary files /dev/null and b/assets/icons/bottombar/catchbox.png differ diff --git a/assets/icons/bottombar/community.png b/assets/icons/bottombar/community.png new file mode 100644 index 0000000..31421a5 Binary files /dev/null and b/assets/icons/bottombar/community.png differ diff --git a/assets/icons/bottombar/mypage.png b/assets/icons/bottombar/mypage.png new file mode 100644 index 0000000..7cca6c7 Binary files /dev/null and b/assets/icons/bottombar/mypage.png differ diff --git a/assets/icons/bottombar/today_catch.png b/assets/icons/bottombar/today_catch.png new file mode 100644 index 0000000..33dc689 Binary files /dev/null and b/assets/icons/bottombar/today_catch.png differ diff --git a/assets/icons/greenCheck.png b/assets/icons/greenCheck.png new file mode 100644 index 0000000..1f4ef69 Binary files /dev/null and b/assets/icons/greenCheck.png differ diff --git a/assets/icons/mypage/MYcoin.png b/assets/icons/mypage/MYcoin.png new file mode 100644 index 0000000..cf9e2cc Binary files /dev/null and b/assets/icons/mypage/MYcoin.png differ diff --git a/assets/icons/mypage/Mycash_minus_coin.png b/assets/icons/mypage/Mycash_minus_coin.png new file mode 100644 index 0000000..cd47ac9 Binary files /dev/null and b/assets/icons/mypage/Mycash_minus_coin.png differ diff --git a/assets/icons/mypage/cash_warn.png b/assets/icons/mypage/cash_warn.png new file mode 100644 index 0000000..350f368 Binary files /dev/null and b/assets/icons/mypage/cash_warn.png differ diff --git a/assets/icons/mypage/mycash_add_coin.png b/assets/icons/mypage/mycash_add_coin.png new file mode 100644 index 0000000..bb6e486 Binary files /dev/null and b/assets/icons/mypage/mycash_add_coin.png differ diff --git a/assets/icons/trash_can.png b/assets/icons/trash_can.png new file mode 100644 index 0000000..0541160 Binary files /dev/null and b/assets/icons/trash_can.png differ diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index e0fbc15..3d13c72 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -329,6 +329,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -347,7 +348,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -366,12 +367,112 @@ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; DEVELOPMENT_TEAM = V4W88P43JP; ENABLE_BITCODE = NO; + GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp; INFOPLIST_FILE = Runner/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); + "OTHER_LDFLAGS[sdk=iphonesimulator*]" = ( + "$(inherited)", + "-ObjC", + "-all_load", + "-l\"c++\"", + "-l\"z\"", + "-framework", + "\"AppAuth\"", + "-framework", + "\"CoreGraphics\"", + "-framework", + "\"CoreText\"", + "-framework", + "\"FBLPromises\"", + "-framework", + "\"FirebaseAppCheckInterop\"", + "-framework", + "\"FirebaseAuth\"", + "-framework", + "\"FirebaseAuthInterop\"", + "-framework", + "\"FirebaseCore\"", + "-framework", + "\"FirebaseCoreExtension\"", + "-framework", + "\"FirebaseCoreInternal\"", + "-framework", + "\"FirebaseFirestore\"", + "-framework", + "\"FirebaseStorage\"", + "-framework", + "\"Foundation\"", + "-framework", + "\"GTMAppAuth\"", + "-framework", + "\"GTMSessionFetcher\"", + "-framework", + "\"GoogleSignIn\"", + "-framework", + "\"GoogleUtilities\"", + "-framework", + "\"LocalAuthentication\"", + "-framework", + "\"OrderedSet\"", + "-framework", + "\"SafariServices\"", + "-framework", + "\"Security\"", + "-framework", + "\"SystemConfiguration\"", + "-framework", + "\"TensorFlowLiteC\"", + "-framework", + "\"UIKit\"", + "-framework", + "\"absl\"", + "-framework", + "\"camera_avfoundation\"", + "-framework", + "\"cloud_firestore\"", + "-framework", + "\"firebase_auth\"", + "-framework", + "\"firebase_core\"", + "-framework", + "\"firebase_storage\"", + "-framework", + "\"flutter_inappwebview\"", + "-framework", + "\"flutter_isolate\"", + "-framework", + "\"geocoding\"", + "-framework", + "\"geolocator_apple\"", + "-framework", + "\"google_sign_in_ios\"", + "-framework", + "\"grpc\"", + "-framework", + "\"grpcpp\"", + "-framework", + "\"image_picker_ios\"", + "-framework", + "\"leveldb\"", + "-framework", + "\"nanopb\"", + "-framework", + "\"openssl_grpc\"", + "-framework", + "\"path_provider_ios\"", + "-framework", + "\"tflite\"", + "-framework", + "\"tflite_flutter\"", + "-framework", + "\"uv\"", + "-weak_framework", + "\"AuthenticationServices\"", + ); PRODUCT_BUNDLE_IDENTIFIER = com.catchroad.catch201; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTS_MACCATALYST = YES; @@ -404,6 +505,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -428,7 +530,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -459,6 +561,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -477,7 +580,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -498,12 +601,112 @@ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; DEVELOPMENT_TEAM = V4W88P43JP; ENABLE_BITCODE = NO; + GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp; INFOPLIST_FILE = Runner/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); + "OTHER_LDFLAGS[sdk=iphonesimulator*]" = ( + "$(inherited)", + "-ObjC", + "-all_load", + "-l\"c++\"", + "-l\"z\"", + "-framework", + "\"AppAuth\"", + "-framework", + "\"CoreGraphics\"", + "-framework", + "\"CoreText\"", + "-framework", + "\"FBLPromises\"", + "-framework", + "\"FirebaseAppCheckInterop\"", + "-framework", + "\"FirebaseAuth\"", + "-framework", + "\"FirebaseAuthInterop\"", + "-framework", + "\"FirebaseCore\"", + "-framework", + "\"FirebaseCoreExtension\"", + "-framework", + "\"FirebaseCoreInternal\"", + "-framework", + "\"FirebaseFirestore\"", + "-framework", + "\"FirebaseStorage\"", + "-framework", + "\"Foundation\"", + "-framework", + "\"GTMAppAuth\"", + "-framework", + "\"GTMSessionFetcher\"", + "-framework", + "\"GoogleSignIn\"", + "-framework", + "\"GoogleUtilities\"", + "-framework", + "\"LocalAuthentication\"", + "-framework", + "\"OrderedSet\"", + "-framework", + "\"SafariServices\"", + "-framework", + "\"Security\"", + "-framework", + "\"SystemConfiguration\"", + "-framework", + "\"TensorFlowLiteC\"", + "-framework", + "\"UIKit\"", + "-framework", + "\"absl\"", + "-framework", + "\"camera_avfoundation\"", + "-framework", + "\"cloud_firestore\"", + "-framework", + "\"firebase_auth\"", + "-framework", + "\"firebase_core\"", + "-framework", + "\"firebase_storage\"", + "-framework", + "\"flutter_inappwebview\"", + "-framework", + "\"flutter_isolate\"", + "-framework", + "\"geocoding\"", + "-framework", + "\"geolocator_apple\"", + "-framework", + "\"google_sign_in_ios\"", + "-framework", + "\"grpc\"", + "-framework", + "\"grpcpp\"", + "-framework", + "\"image_picker_ios\"", + "-framework", + "\"leveldb\"", + "-framework", + "\"nanopb\"", + "-framework", + "\"openssl_grpc\"", + "-framework", + "\"path_provider_ios\"", + "-framework", + "\"tflite\"", + "-framework", + "\"tflite_flutter\"", + "-framework", + "\"uv\"", + "-weak_framework", + "\"AuthenticationServices\"", + ); PRODUCT_BUNDLE_IDENTIFIER = com.catchroad.catch201; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTS_MACCATALYST = YES; @@ -521,16 +724,117 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-"; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = V4W88P43JP; + DEVELOPMENT_TEAM = 7R74GNC3VA; ENABLE_BITCODE = NO; + GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp; INFOPLIST_FILE = Runner/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.catchroad.catch201; + "OTHER_LDFLAGS[sdk=iphonesimulator*]" = ( + "$(inherited)", + "-ObjC", + "-all_load", + "-l\"c++\"", + "-l\"z\"", + "-framework", + "\"AppAuth\"", + "-framework", + "\"CoreGraphics\"", + "-framework", + "\"CoreText\"", + "-framework", + "\"FBLPromises\"", + "-framework", + "\"FirebaseAppCheckInterop\"", + "-framework", + "\"FirebaseAuth\"", + "-framework", + "\"FirebaseAuthInterop\"", + "-framework", + "\"FirebaseCore\"", + "-framework", + "\"FirebaseCoreExtension\"", + "-framework", + "\"FirebaseCoreInternal\"", + "-framework", + "\"FirebaseFirestore\"", + "-framework", + "\"FirebaseStorage\"", + "-framework", + "\"Foundation\"", + "-framework", + "\"GTMAppAuth\"", + "-framework", + "\"GTMSessionFetcher\"", + "-framework", + "\"GoogleSignIn\"", + "-framework", + "\"GoogleUtilities\"", + "-framework", + "\"LocalAuthentication\"", + "-framework", + "\"OrderedSet\"", + "-framework", + "\"SafariServices\"", + "-framework", + "\"Security\"", + "-framework", + "\"SystemConfiguration\"", + "-framework", + "\"TensorFlowLiteC\"", + "-framework", + "\"UIKit\"", + "-framework", + "\"absl\"", + "-framework", + "\"camera_avfoundation\"", + "-framework", + "\"cloud_firestore\"", + "-framework", + "\"firebase_auth\"", + "-framework", + "\"firebase_core\"", + "-framework", + "\"firebase_storage\"", + "-framework", + "\"flutter_inappwebview\"", + "-framework", + "\"flutter_isolate\"", + "-framework", + "\"geocoding\"", + "-framework", + "\"geolocator_apple\"", + "-framework", + "\"google_sign_in_ios\"", + "-framework", + "\"grpc\"", + "-framework", + "\"grpcpp\"", + "-framework", + "\"image_picker_ios\"", + "-framework", + "\"leveldb\"", + "-framework", + "\"nanopb\"", + "-framework", + "\"openssl_grpc\"", + "-framework", + "\"path_provider_ios\"", + "-framework", + "\"tflite\"", + "-framework", + "\"tflite_flutter\"", + "-framework", + "\"uv\"", + "-weak_framework", + "\"AuthenticationServices\"", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.catchroad.catch2-1"; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTS_MACCATALYST = YES; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; diff --git a/ios/Runner/Base.lproj/Main.storyboard b/ios/Runner/Base.lproj/Main.storyboard index f3c2851..19f83b6 100644 --- a/ios/Runner/Base.lproj/Main.storyboard +++ b/ios/Runner/Base.lproj/Main.storyboard @@ -1,8 +1,10 @@ - - + + + - + + @@ -14,13 +16,14 @@ - + - + + diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index ca384bf..123a52a 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -2,23 +2,12 @@ - CFBundleURLTypes - - - CFBundleTypeRole - Editor - CFBundleURLSchemes - - - - com.googleusercontent.apps.368970870839-kmqjuejcrgmmhfmp5gk2juesu7714j4b - - - + CADisableMinimumFrameDurationOnPhone + CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName - Catch2 0 1 + com.catchroad.catch2_1 CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -33,10 +22,23 @@ $(FLUTTER_BUILD_NAME) CFBundleSignature ???? + CFBundleURLTypes + + + CFBundleTypeRole + Editor + CFBundleURLSchemes + + com.googleusercontent.apps.368970870839-kmqjuejcrgmmhfmp5gk2juesu7714j4b + + + CFBundleVersion $(FLUTTER_BUILD_NUMBER) LSRequiresIPhoneOS + UIApplicationSupportsIndirectInputEvents + UILaunchStoryboardName LaunchScreen UIMainStoryboardFile @@ -56,9 +58,5 @@ UIViewControllerBasedStatusBarAppearance - CADisableMinimumFrameDurationOnPhone - - UIApplicationSupportsIndirectInputEvents - diff --git a/lib/Auth/auth_service.dart b/lib/Auth/auth_service.dart index 344da08..c831e7c 100644 --- a/lib/Auth/auth_service.dart +++ b/lib/Auth/auth_service.dart @@ -1,4 +1,9 @@ + + import 'package:catch2_0_1/Auth/user_information.dart'; +import 'package:catch2_0_1/join/joinPage.dart'; +import 'package:catch2_0_1/join/joinStep2.dart'; +import 'package:catch2_0_1/join/joinStep4.dart'; import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/cupertino.dart'; @@ -9,6 +14,8 @@ import 'package:google_sign_in/google_sign_in.dart'; import 'package:firebase_storage/firebase_storage.dart'; import '../LoginPage.dart'; +import '../join/joinStep3.dart'; +import '../join/joinStep6.dart'; import '../screen/mainHome.dart'; class AuthService { @@ -206,56 +213,84 @@ contentsUpdate(user, _photo, TitleController, contentsController, } } +LikeFunction(like, id, user) async { + // 좋아요 기능 + List _likes = like; + _likes.add(user); + var doc = FirebaseFirestore.instance.collection('Contents').doc(id); + doc.update({ + '_like': _likes, + }).whenComplete(() => print('좋아요 업데이트 성공')); +} - LikeFunction(like,id,user) async { // 좋아요 기능 - List _likes = like; - _likes.add(user); - var doc = FirebaseFirestore.instance.collection('Contents').doc(id); - doc.update({ - '_like' : _likes, - }).whenComplete(() => print('좋아요 업데이트 성공')); - } - +LikeCancelFunction(like, id, user) async { + // 좋아요 기능 + List _likes = like; + _likes.remove(user); + var doc = FirebaseFirestore.instance.collection('Contents').doc(id); + doc.update({ + '_like': _likes, + }).whenComplete(() => print('좋아요 업데이트 성공')); +} +Future signUpWithEmailAndPassword() async { + // 이메일 로그인 생성 + try { + UserCredential userCredential = await FirebaseAuth.instance + .createUserWithEmailAndPassword( + email: emailCode().email, password: passwordCode().password); - LikeCancelFunction(like,id,user) async { // 좋아요 기능 - List _likes = like; - _likes.remove(user); - var doc = FirebaseFirestore.instance.collection('Contents').doc(id); - doc.update({ - '_like' : _likes, - }).whenComplete(() => print('좋아요 업데이트 성공')); + FirebaseFirestore.instance + .collection('user') + .doc() + .set({ + 'name': informationCode().name, + 'password' : passwordCode().password, + 'email': emailCode().email, + 'birth': informationCode().year + '/' + informationCode().month + '/' + informationCode().day, + 'NickName': nicknameCode().nickname, + 'Bank': bankInformationCode().bankName, + 'Bank - Num': bankInformationCode().bankNum, + '수취인': bankInformationCode().nameForBank + }) + .then((value) => print('User Added')) + .catchError((error) => print('Failed to add user: $error')); + } on FirebaseAuthException catch (e) { + if (e.code == 'weak-password') { + print('The password provided is too weak.'); + } else if (e.code == 'email-already-in-use') { + print('The account already exists for that email.'); } + } catch (e) { + print(e); + } +} - -Future signUpWithEmailAndPassword() async { // 이메일 로그인 +Future loginWithIdandPassword(email,password) async { try { + print('로그인정보'); + print('이메일: ${email.text} / ${password.text}'); + // sign in with email and password using signInWithEmailAndPassword() UserCredential userCredential = await FirebaseAuth.instance - .createUserWithEmailAndPassword( - email: code().email, password: code().password); - - FirebaseFirestore.instance - .collection('user') - .doc() - .set({ - 'name': code().displayName, - 'email': code().email, - 'birth': code().year + '/' + code().month + '/' + code().day, - 'NickName': code().nickname, - 'Bank' : code().bank, - 'Bank - Num' : code().bankNum, - '수취인' : code().bankName - }) - .then((value) => print('User Added')) - .catchError((error) => print('Failed to add user: $error')); + .signInWithEmailAndPassword( + email: email.text, password: password.text); + + print('로그인'); + print(userCredential); + + // navigate to Homepage } on FirebaseAuthException catch (e) { - if (e.code == 'weak-password') { - print('The password provided is too weak.'); - } else if (e.code == 'email-already-in-use') { - print('The account already exists for that email.'); + if (e.code == 'user-not-found') { + + print('No user found for that email.'); + } else if (e.code == 'wrong-password') { + + print('Wrong password provided for that user.'); } - } catch (e) { - print(e); } - } + + + + + } \ No newline at end of file diff --git a/lib/LoginPage.dart b/lib/LoginPage.dart index 1c46f78..a425922 100644 --- a/lib/LoginPage.dart +++ b/lib/LoginPage.dart @@ -1,8 +1,10 @@ -import 'package:catch2_0_1/join/joinPage.dart'; import 'package:flutter/material.dart'; import 'Auth/auth_service.dart'; +import 'join/joinPage.dart'; +import 'join/joinStep6.dart'; import 'screen/Camera/camera_load.dart'; import 'screen/mainHome.dart'; +import 'utils/app_text_styles.dart'; class LoginPage extends StatefulWidget { const LoginPage({Key? key}) : super(key: key); @@ -11,6 +13,10 @@ class LoginPage extends StatefulWidget { _LoginPageState createState() => _LoginPageState(); } +bool maintain = false; + final _email = TextEditingController(); + final _password= TextEditingController(); + class _LoginPageState extends State { @override Widget build(BuildContext context) { @@ -24,7 +30,7 @@ class _LoginPageState extends State { children: [ Padding( padding: EdgeInsets.only(top: size.height * 0.25), - child: Image.asset('assets/logo.png', width: 170), + child: Image.asset('assets/logo.png', width: 144), ), // 아이디 또는 이메일 textfield Padding( @@ -34,35 +40,34 @@ class _LoginPageState extends State { right: size.width * 0.04), child: SizedBox( child: TextField( + controller: _email, style: TextStyle(fontSize: 13), decoration: InputDecoration( focusColor: Color.fromARGB(6, 61, 50, 50), contentPadding: EdgeInsets.only( top: size.height * 0.01, left: size.width * 0.04), hintText: '아이디 또는 이메일', - hintStyle: TextStyle( - fontWeight: FontWeight.w700, - color: Color.fromRGBO(0, 0, 0, 0.4)), + hintStyle: bodyMediumStyle(color: Color(0xff9FA5B2)), focusedBorder: OutlineInputBorder( borderRadius: - BorderRadius.all(Radius.circular(15.0)), + BorderRadius.all(Radius.circular(36.0)), borderSide: BorderSide( width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.4)), + color: Color.fromRGBO(0, 0, 0, 0.2)), ), enabledBorder: OutlineInputBorder( borderRadius: - BorderRadius.all(Radius.circular(15.0)), + BorderRadius.all(Radius.circular(36.0)), borderSide: BorderSide( width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.4)), + color: Color.fromRGBO(0, 0, 0, 0.2)), ), border: OutlineInputBorder( borderRadius: - BorderRadius.all(Radius.circular(15.0)), + BorderRadius.all(Radius.circular(36.0)), ), filled: true, - fillColor: Color.fromRGBO(0, 0, 0, 0.03)), + fillColor: Colors.white), keyboardType: TextInputType.emailAddress, ), )), @@ -72,36 +77,36 @@ class _LoginPageState extends State { top: size.height * 0.015, left: size.width * 0.04, right: size.width * 0.04), - child: const SizedBox( + child: SizedBox( child: TextField( + controller: _password, style: TextStyle(fontSize: 13), decoration: InputDecoration( focusColor: Color.fromRGBO(0, 0, 0, 0.03), contentPadding: EdgeInsets.only(top: 7, left: 15), hintText: '비밀번호', - hintStyle: TextStyle( - fontWeight: FontWeight.w700, - color: Color.fromRGBO(0, 0, 0, 0.4)), + hintStyle: bodyMediumStyle(color: Color(0xff9FA5B2)), + // hintStyle: bodyLargeStyle(color: Color(0xff9FA5B2)), focusedBorder: OutlineInputBorder( borderRadius: - BorderRadius.all(Radius.circular(15.0)), + BorderRadius.all(Radius.circular(36.0)), borderSide: BorderSide( width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.4)), + color: Color.fromRGBO(0, 0, 0, 0.2)), ), enabledBorder: OutlineInputBorder( borderRadius: - BorderRadius.all(Radius.circular(15.0)), + BorderRadius.all(Radius.circular(36.0)), borderSide: BorderSide( width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.4)), + color: Color.fromRGBO(0, 0, 0, 0.2)), ), border: OutlineInputBorder( borderRadius: - BorderRadius.all(Radius.circular(15.0)), + BorderRadius.all(Radius.circular(36.0)), ), filled: true, - fillColor: Color.fromRGBO(0, 0, 0, 0.03)), + fillColor: Colors.white), keyboardType: TextInputType.emailAddress, ), )), @@ -133,16 +138,24 @@ class _LoginPageState extends State { children: [ Padding( padding: EdgeInsets.only( - top: size.height * 0.0, left: size.width * 0.06 + top: size.height * 0.0, left: size.width * 0.02 // right: size.width * 0.8, ), - child: Image.asset('assets/passCheck.png', height: 23), + child: IconButton( + onPressed: () { + setState(() { + maintain = !maintain; + }); + }, + icon: maintain + ? Image.asset('assets/checkbox_on.png', height: 23) + : Image.asset('assets/checkbox_un.png', + height: 23)), ), ////text style 적용하기 Padding( - padding: EdgeInsets.only( - top: size.height * 0.0, left: size.width * 0.02), - child: Text("비밀번호 저장", + padding: EdgeInsets.only(top: size.height * 0.0), + child: Text("로그인 유지", style: TextStyle( fontSize: 12, color: Color.fromRGBO(0, 0, 0, 0.4), @@ -174,32 +187,16 @@ class _LoginPageState extends State { padding: EdgeInsets.only(top: size.height * 0.03), child: SizedBox( width: size.width * 0.92, - height: size.height * 0.05, + height: size.height * 0.06, child: OutlinedButton( style: OutlinedButton.styleFrom( shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(13.0), + borderRadius: BorderRadius.circular(20.0), ), - backgroundColor: Color(0xff2C63BB)), - onPressed: () - //MainHomePage - { - - signInWithGoogle(); - - Navigator.push(context, - MaterialPageRoute(builder: (context) { - return MainHomePage(); - })); + backgroundColor: Color.fromRGBO(58, 148, 238, 1)), + onPressed: () async { + loginWithIdandPassword(_email,_password); - // Navigator.push( - // context, - // PageRouteBuilder( - // pageBuilder: (_, __, ___) => MainHomePage(), - // transitionDuration: Duration(seconds: 0), - // transitionsBuilder: (_, a, __, c) => - // FadeTransition(opacity: a, child: c)), - // ); }, child: Text( "로그인", @@ -209,17 +206,43 @@ class _LoginPageState extends State { ), ), Padding( - padding: EdgeInsets.only(top: size.height * 0.05), - child: Image.asset( - 'assets/divider.png', - width: size.width * 0.9, + padding: EdgeInsets.only( + top: size.height * 0.05, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + ElevatedButton( + style: ElevatedButton.styleFrom( + primary: Colors.white, elevation: 0), + onPressed: () async{ + signInWithGoogle(); + await Future.delayed(Duration(seconds: 10)); + userstart(); + }, + child: Image.asset( + 'assets/icons/google.png', + width: 50, + )), + SizedBox( + width: size.width * 0.04, + ), + Image.asset( + 'assets/icons/apple.png', + width: 50, + ), + ], ), ), Padding( padding: EdgeInsets.only(top: size.height * 0.04), child: Text( "계정이 없으신가요?", - style: TextStyle(fontSize: 12), + style: TextStyle( + fontSize: 14, + color: Color.fromRGBO(0, 0, 0, 0.4), + fontWeight: FontWeight.bold), ), ), Padding( @@ -231,16 +254,17 @@ class _LoginPageState extends State { tapTargetSize: MaterialTapTargetSize.shrinkWrap, ), onPressed: () { + // joinPage Navigator.push(context, MaterialPageRoute(builder: (context) { - return joinPage(); - })); + return joinPage(); + })); }, child: Text("회원가입", style: TextStyle( - fontSize: 12, + fontSize: 14, color: Color(0xff2C63BB), - fontWeight: FontWeight.w700))), + fontWeight: FontWeight.w500))), ) ], ), @@ -352,7 +376,9 @@ class _forgotLoginState extends State { Padding( padding: EdgeInsets.only(top: size.height * 0.01), child: TextButton( - onPressed: () {}, + onPressed: () { + signInWithGoogle(); + }, child: Text("비밀번호를 잊으셨나요?", style: TextStyle( fontSize: 12, diff --git a/lib/join/joinPage.dart b/lib/join/joinPage.dart index 4b0f36f..f73ee01 100644 --- a/lib/join/joinPage.dart +++ b/lib/join/joinPage.dart @@ -3,6 +3,13 @@ import '../Auth/user_information.dart'; import '../utils/app_text_styles.dart'; import 'joinStep2.dart'; + +String _email = ''; +class emailCode extends ChangeNotifier { + String email = _email; + notifyListeners(); +} + class joinPage extends StatefulWidget { const joinPage({super.key}); @@ -10,11 +17,12 @@ class joinPage extends StatefulWidget { State createState() => _joinPageState(); } + class _joinPageState extends State { + final Emailcontroller = TextEditingController(); + final _formKey = GlobalKey(); @override Widget build(BuildContext context) { - final Emailcontroller = TextEditingController(); -final _formKey = GlobalKey(); final Size size = MediaQuery.of(context).size; return Scaffold( appBar: AppBar( @@ -36,104 +44,115 @@ final _formKey = GlobalKey(); ), elevation: 0, ), - body: Column( - children: [ - Row( - children: [ - Image.asset('assets/step1.png', width: size.width * 0.87), - SizedBox(width: 12), - Text("1/7", style: labelMediumStyle(color: Color(0xff9FA5B2))) - ], - ), - SizedBox(height: size.height * 0.07), - Text("이메일", style: titleLargeStyle(color: Color(0xff3174CD))), - SizedBox(height: size.height * 0.02), - Text("계정에 사용하실 이메일을 입력해주세요.\n이메일은 마에페이지에서 수정 가능합니다.", - textAlign: TextAlign.center, - style: labelMediumStyle(color: Color(0xff9FA5B2))), - Padding( - padding: EdgeInsets.only( - top: size.height * 0.07, - left: size.width * 0.06, - right: size.width * 0.06), - child: SizedBox( + body: SingleChildScrollView( + child: Column( + children: [ + Row( + children: [ + Image.asset('assets/step1.png', width: size.width * 0.87), + SizedBox(width: 12), + Text("1/7", style: labelMediumStyle(color: Color(0xff9FA5B2))) + ], + ), + SizedBox(height: size.height * 0.07), + Text("이메일", style: titleLargeStyle(color: Color(0xff3174CD))), + SizedBox(height: size.height * 0.02), + Text("계정에 사용하실 이메일을 입력해주세요.\n이메일은 마에페이지에서 수정 가능합니다.", + textAlign: TextAlign.center, + style: labelMediumStyle(color: Color(0xff9FA5B2))), + Padding( + padding: EdgeInsets.only( + top: size.height * 0.07, + left: size.width * 0.06, + right: size.width * 0.06), + child: SizedBox( + height: size.height * 0.08, + child: _Form() + )), + SizedBox(height: size.height * 0.1), + SizedBox( + width: size.width * 0.85, height: size.height * 0.08, - child: Form( - key: _formKey, - child: TextFormField( - validator: (val) { - if(val?.length == 0) { - return '이메일은 필수사항입니다.'; - } - if(!RegExp( - r'^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$') - .hasMatch(val!)){ - return '잘못된 이메일 형식입니다.'; - } + child: OutlinedButton( + style: OutlinedButton.styleFrom( + backgroundColor: Color(0xff3174CD), + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.all(Radius.circular(30)))), + onPressed: () async { + _email = Emailcontroller.text; + if (_formKey.currentState!.validate()) { + Navigator.push( + context, + PageRouteBuilder( + pageBuilder: (_, __, ___) => joinStep2(), + transitionDuration: Duration(seconds: 0), + transitionsBuilder: (_, a, __, c) => + FadeTransition(opacity: a, child: c)), + ); + print('입력한 이메일 주소는 : ${Emailcontroller.text}'); + print('이동된 주소 : ${emailCode().email}'); + } + }, + child: Text( + "이메일 입력하기", + style: titleMediumStyle(color: Color(0xffFAFBFB)), + ))) + ], + ), + ), + ); + } + + Widget _Form() { + return Form( + key: _formKey, + child: TextFormField( + validator: (val) { + if (val?.length == 0) { + return '이메일은 필수사항입니다.'; + } + if (!RegExp( + r'^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$') + .hasMatch(val!)) { + return '잘못된 이메일 형식입니다.'; + } + else { + print('통과'); + } + }, + controller: Emailcontroller, + style: TextStyle(fontSize: 13), + decoration: InputDecoration( + focusColor: Color.fromARGB(6, 61, 50, 50), + contentPadding: EdgeInsets.only( + top: 40, left: 40), + hintText: '이메일을 입력해주세요', + // errorText: '이메일 형식으로 작성해주세요', + errorStyle: labelSmallStyle(color: Colors.red), + focusedErrorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + hintStyle: bodyMediumStyle(color: Color(0xff9FA5B2)), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + border: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + ), + // filled: true, - return null; - }, - controller: Emailcontroller, - style: TextStyle(fontSize: 13), - decoration: InputDecoration( - focusColor: Color.fromARGB(6, 61, 50, 50), - contentPadding: EdgeInsets.only( - top: size.height * 0.01, left: size.width * 0.04), - hintText: '이메일을 입력해주세요', - // errorText: '이메일 형식으로 작성해주세요', - errorStyle: labelSmallStyle(color: Colors.red), - focusedErrorBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - hintStyle: bodyMediumStyle(color: Color(0xff9FA5B2)), - focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - border: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(36.0)), - ), - filled: true, - fillColor: Colors.white), - keyboardType: TextInputType.emailAddress, - ), - ), - )), - SizedBox(height: size.height * 0.1), - SizedBox( - width: size.width * 0.85, - height: size.height * 0.08, - child: OutlinedButton( - style: OutlinedButton.styleFrom( - backgroundColor: Color(0xff3174CD), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.all(Radius.circular(30)))), - onPressed: () async { - if (_formKey.currentState!.validate()) { - Navigator.push( - context, - PageRouteBuilder( - pageBuilder: (_, __, ___) => joinStep2(), - transitionDuration: Duration(seconds: 0), - transitionsBuilder: (_, a, __, c) => - FadeTransition(opacity: a, child: c)), - ); - code().email = Emailcontroller.text; - } - }, - child: Text( - "이메일 입력하기", - style: titleMediumStyle(color: Color(0xffFAFBFB)), - ))) - ], + fillColor: Colors.white), + autofocus: true, ), ); } diff --git a/lib/join/joinPage7.dart b/lib/join/joinPage7.dart new file mode 100644 index 0000000..ec9fae9 --- /dev/null +++ b/lib/join/joinPage7.dart @@ -0,0 +1,93 @@ +import 'package:catch2_0_1/Auth/auth_service.dart'; +import 'package:catch2_0_1/LoginPage.dart'; +import 'package:catch2_0_1/utils/app_colors.dart'; +import 'package:flutter/material.dart'; +import '../Auth/user_information.dart'; +import '../utils/app_text_styles.dart'; +import 'joinPage.dart'; +import 'joinStep2.dart'; + + +class joinPage7 extends StatefulWidget { + const joinPage7({super.key}); + + @override + State createState() => _joinPage7State(); +} + + +class _joinPage7State extends State { + final Emailcontroller = TextEditingController(); + final _formKey = GlobalKey(); + @override + Widget build(BuildContext context) { + final Size size = MediaQuery.of(context).size; + return Scaffold( + appBar: AppBar( + backgroundColor: Colors.white, + leading: IconButton( + onPressed: () { + Navigator.pop(context); + }, + icon: Icon( + Icons.arrow_back_ios_new, + size: 24, + color: Color(0xffCFD2D9), + )), + centerTitle: true, + title: Text( + "회원가입", + style: TextStyle( + color: Colors.black, fontWeight: FontWeight.w700, fontSize: 16), + ), + elevation: 0, + ), + body: SingleChildScrollView( + child: Column( + children: [ + Padding( + padding: EdgeInsets.only( + top: size.height * 0.19, + left: size.width * 0.06, + right: size.width * 0.06), + child: SizedBox( + // height: size.height * 0.08, + child: Center( + child:Image.asset('assets/icons/car.png', height: 110,width: 310,) + ) + )), + SizedBox(height: size.height * 0.1), + Text("${emailCode().email}님,", style: titleLargeStyle(color: Colors.black)), + Text("Catch에 오신 걸 환영합니다.", style: titleLargeStyle(color: Colors.black)), + SizedBox(height: size.height * 0.2), + SizedBox( + width: size.width * 0.85, + height: size.height * 0.08, + child: OutlinedButton( + style: OutlinedButton.styleFrom( + backgroundColor: Color(0xff3174CD), + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.all(Radius.circular(30)))), + onPressed: () async { + signUpWithEmailAndPassword(); + Navigator.push( + context, + PageRouteBuilder( + pageBuilder: (_, __, ___) => LoginPage(), + transitionDuration: Duration(seconds: 0), + transitionsBuilder: (_, a, __, c) => + FadeTransition(opacity: a, child: c)), + ); + }, + child: Text( + "다음", + style: titleMediumStyle(color: Color(0xffFAFBFB)), + ))) + ], + ), + ), + ); + } + +} diff --git a/lib/join/joinStep2.dart b/lib/join/joinStep2.dart index 6d4932b..df6470e 100644 --- a/lib/join/joinStep2.dart +++ b/lib/join/joinStep2.dart @@ -3,6 +3,12 @@ import '../Auth/user_information.dart'; import '../utils/app_text_styles.dart'; import 'joinStep3.dart'; +String _password = ''; +class passwordCode extends ChangeNotifier { + String password= _password; + notifyListeners(); +} + class joinStep2 extends StatefulWidget { const joinStep2({super.key}); @@ -11,12 +17,12 @@ class joinStep2 extends StatefulWidget { } bool isObscure = false; - + final passwordcontroller = TextEditingController(); + final _formKey = GlobalKey(); class _joinStep2State extends State { @override Widget build(BuildContext context) { - final passwordcontroller = TextEditingController(); -final _formKey = GlobalKey(); + final Size size = MediaQuery.of(context).size; return Scaffold( appBar: AppBar( @@ -38,118 +44,123 @@ final _formKey = GlobalKey(); ), elevation: 0, ), - body: Column( - children: [ - Row( - children: [ - Image.asset('assets/step2.png', width: size.width * 0.87), - SizedBox(width: 12), - Text("2/7", style: labelMediumStyle(color: Color(0xff9FA5B2))) - ], - ), - SizedBox(height: size.height * 0.07), - Text("비밀번호", style: titleLargeStyle(color: Color(0xff3174CD))), - SizedBox(height: size.height * 0.02), - Text("계정에 사용하실 비밀번호를 입력해주세요.\n숫자를 포함한 6~12자리를 작성해주세요.", - textAlign: TextAlign.center, - style: labelMediumStyle(color: Color(0xff9FA5B2))), - Padding( - padding: EdgeInsets.only( - top: size.height * 0.07, - left: size.width * 0.06, - right: size.width * 0.06), - child: SizedBox( + body: SingleChildScrollView( + child: Column( + children: [ + Row( + children: [ + Image.asset('assets/step2.png', width: size.width * 0.87), + SizedBox(width: 12), + Text("2/7", style: labelMediumStyle(color: Color(0xff9FA5B2))) + ], + ), + SizedBox(height: size.height * 0.07), + Text("비밀번호", style: titleLargeStyle(color: Color(0xff3174CD))), + SizedBox(height: size.height * 0.02), + Text("계정에 사용하실 비밀번호를 입력해주세요.\n숫자를 포함한 6~12자리를 작성해주세요.", + textAlign: TextAlign.center, + style: labelMediumStyle(color: Color(0xff9FA5B2))), + Padding( + padding: EdgeInsets.only( + top: size.height * 0.07, + left: size.width * 0.06, + right: size.width * 0.06), + child: SizedBox( + height: size.height * 0.08, + child: _FormPassword() + )), + SizedBox(height: size.height * 0.1), + SizedBox( + width: size.width * 0.85, height: size.height * 0.08, - child: Form( - key: _formKey, - child: TextFormField( - validator: (val) { - if(val!.length == 0) { - return '비밀번호는 필수사항입니다.'; - } - if(val!.length < 8 || val!.length > 13){ - return '6~12자리를 입력해주세요!'; - } - return null; - }, - controller: passwordcontroller, - obscureText: isObscure ? true : false, - style: TextStyle(fontSize: 13), - decoration: InputDecoration( - suffixIcon: IconButton( - onPressed: () { - isObscure = !isObscure; - }, - icon: isObscure - ? Image.asset('assets/icons/password_eye.png') - : Image.asset( - 'assets/icons/password_openeye.png')), - suffixIconConstraints: - BoxConstraints(minHeight: 6, minWidth: 16), - focusColor: Color.fromARGB(6, 61, 50, 50), - contentPadding: EdgeInsets.only( - top: size.height * 0.01, left: size.width * 0.04), - hintText: '', - errorText: '', - errorStyle: labelSmallStyle(color: Colors.red), - focusedErrorBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - errorBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - hintStyle: bodyMediumStyle(color: Color(0xff9FA5B2)), - focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - border: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(36.0)), - ), - filled: true, - fillColor: Colors.white), - keyboardType: TextInputType.emailAddress, - ), - ), - )), - SizedBox(height: size.height * 0.1), - SizedBox( - width: size.width * 0.85, - height: size.height * 0.08, - child: OutlinedButton( - style: OutlinedButton.styleFrom( - backgroundColor: Color(0xff3174CD), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.all(Radius.circular(30)))), - onPressed: () { - if (_formKey.currentState!.validate()) { + child: OutlinedButton( + style: OutlinedButton.styleFrom( + backgroundColor: Color(0xff3174CD), + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.all(Radius.circular(30)))), + onPressed: () { + if (_formKey.currentState!.validate()) { Navigator.push( - context, - PageRouteBuilder( - pageBuilder: (_, __, ___) => joinStep3(), - transitionDuration: Duration(seconds: 0), - transitionsBuilder: (_, a, __, c) => - FadeTransition(opacity: a, child: c)), - ); - code().password = passwordcontroller.text; - } - }, - child: Text( - "다음", - style: titleMediumStyle(color: Color(0xffFAFBFB)), - ))) - ], + context, + PageRouteBuilder( + pageBuilder: (_, __, ___) => joinStep3(), + transitionDuration: Duration(seconds: 0), + transitionsBuilder: (_, a, __, c) => + FadeTransition(opacity: a, child: c)), + ); + _password = passwordcontroller.text; + print('새로 지정된 비밀번호는 : ${passwordCode().password}'); + } + }, + child: Text( + "다음", + style: titleMediumStyle(color: Color(0xffFAFBFB)), + ))) + ], + ), ), ); } -} + + Widget _FormPassword() { + return Form( + key: _formKey, + child: TextFormField( + validator: (val) { + if (val!.length == 0) { + return '비밀번호는 필수사항입니다.'; + } + if (val.length < 8 || val.length > 13) { + return '8~12자리를 입력해주세요!'; + } + return null; + }, + controller: passwordcontroller, + obscureText: isObscure ? true : false, + style: TextStyle(fontSize: 13), + decoration: InputDecoration( + suffixIcon: IconButton( + onPressed: () { + isObscure = !isObscure; + }, + icon: isObscure + ? Image.asset('assets/icons/password_eye.png') + : Image.asset('assets/icons/password_openeye.png')), + suffixIconConstraints: BoxConstraints(minHeight: 6, minWidth: 16), + focusColor: Color.fromARGB(6, 61, 50, 50), + contentPadding: EdgeInsets.only( left: 30), + hintText: '', + errorText: '', + errorStyle: labelSmallStyle(color: Colors.red), + focusedErrorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + errorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + hintStyle: bodyMediumStyle(color: Color(0xff9FA5B2)), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + border: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + ), + filled: true, + fillColor: Colors.white), + keyboardType: TextInputType.emailAddress, + ), + ); + } + } diff --git a/lib/join/joinStep3.dart b/lib/join/joinStep3.dart index d990ae6..f043fea 100644 --- a/lib/join/joinStep3.dart +++ b/lib/join/joinStep3.dart @@ -3,6 +3,20 @@ import '../Auth/user_information.dart'; import '../utils/app_text_styles.dart'; import 'joinStep4.dart'; + +String _displayName = ''; +String _id = ''; +String _year = ''; +String _month = ''; +String _day = ''; + +class informationCode extends ChangeNotifier { + String name = _displayName; + String year = _year; + String month = _month; + String day = _day; + notifyListeners(); +} class joinStep3 extends StatefulWidget { const joinStep3({super.key}); @@ -11,20 +25,19 @@ class joinStep3 extends StatefulWidget { } bool isObscure = false; + final Namecontroller = TextEditingController(); + final Yearcontroller = TextEditingController(); + final Monthcontroller = TextEditingController(); + final Daycontroller = TextEditingController(); + final _formNameKey = GlobalKey(); + final _formyearKey = GlobalKey(); + final _formmonthKey = GlobalKey(); + final _formdatKey = GlobalKey(); + class _joinStep3State extends State { @override Widget build(BuildContext context) { - final Namecontroller = TextEditingController(); - final Yearcontroller = TextEditingController(); - final Monthcontroller = TextEditingController(); - final Daycontroller = TextEditingController(); -final _formNameKey = GlobalKey(); -final _formyearKey = GlobalKey(); -final _formmonthKey = GlobalKey(); -final _formdatKey = GlobalKey(); - - final Size size = MediaQuery.of(context).size; return Scaffold( @@ -48,367 +61,359 @@ final _formdatKey = GlobalKey(); ), elevation: 0, ), - body: Column( - children: [ - Row( - children: [ - Image.asset('assets/step3.png', width: size.width * 0.87), - SizedBox(width: 12), - Text("3/7", style: labelMediumStyle(color: Color(0xff9FA5B2))) - ], - ), - SizedBox(height: size.height * 0.07), - Text("사용자 정보 입력", style: titleLargeStyle(color: Color(0xff3174CD))), - SizedBox(height: size.height * 0.02), - Padding( - padding: EdgeInsets.only( - top: size.height * 0.07, - left: size.width * 0.06, - right: size.width * 0.06), - child: Column( - children: [ - Row( - children: [ - Text("이름", - style: titleSmallStyle(color: Color(0xff9FA5B2))), - Spacer() - ], - ), - SizedBox( - height: size.height * 0.01, - ), - SizedBox( - height: size.height * 0.08, - child: Form( - key: _formNameKey, - child: TextFormField( - validator: (val) { - if(val?.length == 0) { - return '이름은 필수사항입니다.'; - } - return null; - }, - controller: Namecontroller, - obscureText: isObscure ? true : false, - style: TextStyle(fontSize: 13), - decoration: InputDecoration( - focusColor: Color.fromARGB(6, 61, 50, 50), - contentPadding: EdgeInsets.only( - top: size.height * 0.01, left: size.width * 0.04), - hintText: '', - errorText: '', - errorStyle: labelSmallStyle(color: Colors.red), - focusedErrorBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - errorBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - hintStyle: bodyMediumStyle(color: Color(0xff9FA5B2)), - focusedBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - enabledBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - border: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - ), - filled: true, - fillColor: Colors.white), - keyboardType: TextInputType.emailAddress, - ), + body: SingleChildScrollView( + child: Column( + children: [ + Row( + children: [ + Image.asset('assets/step3.png', width: size.width * 0.87), + SizedBox(width: 12), + Text("3/7", style: labelMediumStyle(color: Color(0xff9FA5B2))) + ], + ), + SizedBox(height: size.height * 0.07), + Text("사용자 정보 입력", style: titleLargeStyle(color: Color(0xff3174CD))), + SizedBox(height: size.height * 0.02), + Padding( + padding: EdgeInsets.only( + top: size.height * 0.07, + left: size.width * 0.06, + right: size.width * 0.06), + child: Column( + children: [ + Row( + children: [ + Text("이름", + style: titleSmallStyle(color: Color(0xff9FA5B2))), + Spacer() + ], + ), + SizedBox( + height: size.height * 0.01, + ), + SizedBox( + height: size.height * 0.08, + child: _formName() ), - ), - SizedBox( - height: size.height * 0.015, - ), - Row( - children: [ - Text("생년월일", - style: titleSmallStyle(color: Color(0xff9FA5B2))), - Spacer() - ], - ), - SizedBox( - height: size.height * 0.01, - ), - Row( - children: [ - // 태어난 년도 - SizedBox( - width: size.width * 0.26, - child: Form( - key: _formyearKey, - child: TextFormField( - validator: (val) { - if (val?.length != 4) { - return '4자리를 입력해주세요.'; - } - return null; - }, - obscureText: isObscure ? true : false, - style: TextStyle(fontSize: 13), - decoration: InputDecoration( - focusColor: Color.fromARGB(6, 61, 50, 50), - contentPadding: EdgeInsets.only( - top: size.height * 0.01, - left: size.width * 0.04), - hintText: '', - errorText: '', - errorStyle: labelSmallStyle(color: Colors.red), - focusedErrorBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - errorBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - hintStyle: - bodyMediumStyle(color: Color(0xff9FA5B2)), - focusedBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - enabledBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - border: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - ), - filled: true, - fillColor: Colors.white), - keyboardType: TextInputType.number, + SizedBox( + height: size.height * 0.015, + ), + Row( + children: [ + Text("생년월일", + style: titleSmallStyle(color: Color(0xff9FA5B2))), + Spacer() + ], + ), + SizedBox( + height: size.height * 0.01, + ), + Row( + children: [ + // 태어난 년도 + SizedBox( + width: size.width * 0.26, + child: formYear() + ), + Padding( + padding: EdgeInsets.only( + left: size.width * 0.02, + right: size.width * 0.04, + bottom: size.height * 0.02), + child: Text( + "년", + style: bodyLargeStyle(color: Colors.black), ), ), - ), - Padding( - padding: EdgeInsets.only( - left: size.width * 0.02, - right: size.width * 0.04, - bottom: size.height * 0.02), - child: Text( - "년", - style: bodyLargeStyle(color: Colors.black), + // 태어난 월 + SizedBox( + width: size.width * 0.155, + child: formMonth() ), - ), - // 태어난 월 - SizedBox( - width: size.width * 0.155, - child: Form( - key : _formmonthKey, - child: TextFormField( - validator: (val) { - if (val?.length != 2) { - return '2자리를 입력해주세요..'; - } - return null; - }, - obscureText: isObscure ? true : false, - style: TextStyle(fontSize: 13), - decoration: InputDecoration( - focusColor: Color.fromARGB(6, 61, 50, 50), - contentPadding: EdgeInsets.only( - top: size.height * 0.01, - left: size.width * 0.04), - hintText: '', - errorText: '', - errorStyle: labelSmallStyle(color: Colors.red), - focusedErrorBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - errorBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - hintStyle: - bodyMediumStyle(color: Color(0xff9FA5B2)), - focusedBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - enabledBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - border: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - ), - filled: true, - fillColor: Colors.white), - keyboardType: TextInputType.number, + Padding( + padding: EdgeInsets.only( + left: size.width * 0.02, + right: size.width * 0.04, + bottom: size.height * 0.02), + child: Text( + "월", + style: bodyLargeStyle(color: Colors.black), ), ), - ), - Padding( - padding: EdgeInsets.only( - left: size.width * 0.02, - right: size.width * 0.04, - bottom: size.height * 0.02), - child: Text( - "월", - style: bodyLargeStyle(color: Colors.black), + //태어난 일 + SizedBox( + width: size.width * 0.155, + child: formDay() ), - ), - //태어난 일 - SizedBox( - width: size.width * 0.155, - child: Form( - key: _formdatKey, - child: TextFormField( - validator: (val) { - if (val?.length != 2) { - return '2자리를 입력해주세요..'; - } - return null; - }, - obscureText: isObscure ? true : false, - style: TextStyle(fontSize: 13), - decoration: InputDecoration( - focusColor: Color.fromARGB(6, 61, 50, 50), - contentPadding: EdgeInsets.only( - top: size.height * 0.01, - left: size.width * 0.04), - hintText: '', - errorText: '', - errorStyle: labelSmallStyle(color: Colors.red), - focusedErrorBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - errorBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - hintStyle: - bodyMediumStyle(color: Color(0xff9FA5B2)), - focusedBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - enabledBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - border: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - ), - filled: true, - fillColor: Colors.white), - keyboardType: TextInputType.number, + Padding( + padding: EdgeInsets.only( + left: size.width * 0.02, + right: size.width * 0.04, + bottom: size.height * 0.02), + child: Text( + "일", + style: bodyLargeStyle(color: Colors.black), ), ), - ), - Padding( - padding: EdgeInsets.only( - left: size.width * 0.02, - right: size.width * 0.04, - bottom: size.height * 0.02), - child: Text( - "일", - style: bodyLargeStyle(color: Colors.black), - ), - ), - ], - ), - ], - )), - SizedBox(height: size.height * 0.1), - SizedBox( - width: size.width * 0.85, - height: size.height * 0.08, - child: OutlinedButton( - style: OutlinedButton.styleFrom( - backgroundColor: Color(0xff3174CD), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.all(Radius.circular(30)))), - onPressed: () { - // if (_formNameKey.currentState!.validate()) { - // if (_formyearKey.currentState!.validate()) { - // if (_formmonthKey.currentState!.validate()) { - // if (_formdatKey.currentState!.validate()) { - Navigator.push( - context, - PageRouteBuilder( - pageBuilder: (_, __, ___) => joinStep4(), - transitionDuration: Duration(seconds: 0), - transitionsBuilder: (_, a, __, c) => - FadeTransition(opacity: a, child: c)), - ); - code().displayName = Namecontroller.text; - code().year = Yearcontroller.text; - code().month = Monthcontroller.text; - code().day = Daycontroller.text; - // } - // } - // } - // } - }, - child: Text( - "다음", - style: titleMediumStyle(color: Color(0xffFAFBFB)), - ))) - ], + ], + ), + ], + )), + SizedBox(height: size.height * 0.1), + SizedBox( + width: size.width * 0.85, + height: size.height * 0.08, + child: OutlinedButton( + style: OutlinedButton.styleFrom( + backgroundColor: Color(0xff3174CD), + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.all(Radius.circular(30)))), + onPressed: () { + if (_formNameKey.currentState!.validate()) { + if (_formyearKey.currentState!.validate()) { + if (_formmonthKey.currentState!.validate()) { + if (_formdatKey.currentState!.validate()) { + Navigator.push( + context, + PageRouteBuilder( + pageBuilder: (_, __, ___) => joinStep4(), + transitionDuration: Duration(seconds: 0), + transitionsBuilder: (_, a, __, c) => + FadeTransition(opacity: a, child: c)), + ); + _displayName = Namecontroller.text; + _year = Yearcontroller.text; + _month = Monthcontroller.text; + _day = Daycontroller.text; + print('이름은 : ${informationCode().name}'); + print('${informationCode().year}년생 ${informationCode().month}월 ${informationCode().day}일'); + } + } + } + } + }, + child: Text( + "다음", + style: titleMediumStyle(color: Color(0xffFAFBFB)), + ))) + ], + ), + ), + ); + } + + void nextEdit() { + do { + FocusScope.of(context).nextFocus(); + } while ( + FocusScope.of(context).focusedChild!.context!.widget is! EditableText); + } + + Widget _formName() { + return Form( + key: _formNameKey, + child: TextFormField( + onEditingComplete: () => nextEdit(), + validator: (val) { + if (val?.length == 0) { + return '이름은 필수사항입니다.'; + } + return null; + }, + controller: Namecontroller, + obscureText: isObscure ? true : false, + style: TextStyle(fontSize: 13), + decoration: InputDecoration( + focusColor: Color.fromARGB(6, 61, 50, 50), + contentPadding: EdgeInsets.only(top: 20, left: 20), + hintText: '홍길동', + errorText: '', + errorStyle: labelSmallStyle(color: Colors.red), + focusedErrorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + errorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + hintStyle: bodyMediumStyle(color: Color(0xff9FA5B2)), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + border: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + ), + filled: true, + fillColor: Colors.white), + ), + ); + } + + Widget formYear() { + return Form( + key: _formyearKey, + child: TextFormField( + controller: Yearcontroller, + onEditingComplete: () => nextEdit(), + validator: (val) { + if (val?.length != 4) { + return '4자리를 입력해주세요.'; + } + return null; + }, + // obscureText: isObscure ? true : false, + style: TextStyle(fontSize: 13), + decoration: InputDecoration( + focusColor: Color.fromARGB(6, 61, 50, 50), + contentPadding: EdgeInsets.only( + top: 20, left: 40), + hintText: '2023', + errorText: '', + errorStyle: labelSmallStyle(color: Colors.red), + focusedErrorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + errorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + hintStyle: bodyMediumStyle(color: Color(0xff9FA5B2)), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + border: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + ), + filled: true, + fillColor: Colors.white), + keyboardType: TextInputType.number, + ), + ); + } + + Widget formMonth() { + return Form( + key: _formmonthKey, + child: TextFormField( + controller: Monthcontroller, + onEditingComplete: () => nextEdit(), + validator: (val) { + if (val?.length != 2) { + return '2자리를 입력해주세요..'; + } + return null; + }, + obscureText: isObscure ? true : false, + style: TextStyle(fontSize: 13), + decoration: InputDecoration( + focusColor: Color.fromARGB(6, 61, 50, 50), + contentPadding: EdgeInsets.only( + top: 20, left: 25), + hintText: '01', + errorText: '', + errorStyle: labelSmallStyle(color: Colors.red), + focusedErrorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + errorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + hintStyle: bodyMediumStyle(color: Color(0xff9FA5B2)), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + border: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + ), + filled: true, + fillColor: Colors.white), + keyboardType: TextInputType.number, ), ); } + + Widget formDay() { + return Form( + key: _formdatKey, + child: TextFormField( + controller: Daycontroller, + onEditingComplete: () {}, + validator: (val) { + if (val?.length != 2) { + return '2자리를 입력해주세요.'; + } + return null; + }, + autofocus: true, + obscureText: isObscure ? true : false, + style: TextStyle(fontSize: 13), + decoration: InputDecoration( + focusColor: Color.fromARGB(6, 61, 50, 50), + contentPadding: EdgeInsets.only( + top: 20, left: 25), + hintText: '01', + errorText: '', + errorStyle: labelSmallStyle(color: Colors.red), + focusedErrorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + errorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + hintStyle: bodyMediumStyle(color: Color(0xff9FA5B2)), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + border: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + ), + filled: true, + fillColor: Colors.white), + keyboardType: TextInputType.number, + ), + ); + } } diff --git a/lib/join/joinStep4.dart b/lib/join/joinStep4.dart index 07c69ae..81375ca 100644 --- a/lib/join/joinStep4.dart +++ b/lib/join/joinStep4.dart @@ -1,8 +1,15 @@ import 'package:catch2_0_1/Auth/user_information.dart'; import 'package:flutter/material.dart'; import '../utils/app_text_styles.dart'; +import 'joinPage.dart'; import 'joinStep5.dart'; + +String _Nickname = ''; +class nicknameCode extends ChangeNotifier { + String nickname= _Nickname; + notifyListeners(); +} class joinStep4 extends StatefulWidget { const joinStep4({super.key}); @@ -71,55 +78,7 @@ class _joinStep4State extends State { ), SizedBox( height: size.height * 0.08, - child: Form( - child: TextFormField( - controller: Nicknamecontroller, - style: TextStyle(fontSize: 13), - decoration: InputDecoration( - focusColor: Color.fromARGB(6, 61, 50, 50), - contentPadding: EdgeInsets.only( - top: size.height * 0.01, left: size.width * 0.04), - hintText: 'Catcher', - errorText: '', - errorStyle: labelSmallStyle(color: Colors.red), - focusedErrorBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - errorBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - hintStyle: bodyMediumStyle(color: Color(0xff9FA5B2)), - focusedBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - enabledBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - border: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - ), - filled: true, - fillColor: Colors.white), - keyboardType: TextInputType.text, - ), - ), + child: _formNickname() ), ], )), @@ -141,11 +100,13 @@ class _joinStep4State extends State { transitionsBuilder: (_, a, __, c) => FadeTransition(opacity: a, child: c)), ); - if(Nicknamecontroller == '') { - code().nickname = code().email; + if (Nicknamecontroller == '') { + _Nickname = emailCode().email; } else { - code().nickname = Nicknamecontroller.text; + _Nickname = Nicknamecontroller.text; } + + print('닉네임은 : ${nicknameCode().nickname}'); }, child: Text( "다음", @@ -155,4 +116,45 @@ class _joinStep4State extends State { ), ); } + Widget _formNickname() { + return Form( + child: TextFormField( + controller: Nicknamecontroller, + style: TextStyle(fontSize: 13), + decoration: InputDecoration( + focusColor: Color.fromARGB(6, 61, 50, 50), + contentPadding: EdgeInsets.only(left: 30), + hintText: 'Catcher', + errorText: '', + errorStyle: labelSmallStyle(color: Colors.red), + focusedErrorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + errorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + hintStyle: bodyMediumStyle(color: Color(0xff9FA5B2)), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + border: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + ), + filled: true, + fillColor: Colors.white), + keyboardType: TextInputType.text, + ), + ); + } } diff --git a/lib/join/joinStep5.dart b/lib/join/joinStep5.dart index cfe1ecd..9ec4325 100644 --- a/lib/join/joinStep5.dart +++ b/lib/join/joinStep5.dart @@ -3,6 +3,12 @@ import 'package:catch2_0_1/join/joinStep6.dart'; import 'package:flutter/material.dart'; import '../utils/app_text_styles.dart'; + +String _PhoneNum = ''; +class phoneNumCode extends ChangeNotifier { + String phoneNum= _PhoneNum; + notifyListeners(); +} class joinStep5 extends StatefulWidget { const joinStep5({super.key}); @@ -70,55 +76,7 @@ class _joinStep5State extends State { ), SizedBox( height: size.height * 0.08, - child: Form( - child: TextField( - controller: PhoneNumcontroller, - style: TextStyle(fontSize: 13), - decoration: InputDecoration( - focusColor: Color.fromARGB(6, 61, 50, 50), - contentPadding: EdgeInsets.only( - top: size.height * 0.01, left: size.width * 0.04), - hintText: '', - errorText: '', - errorStyle: labelSmallStyle(color: Colors.red), - focusedErrorBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - errorBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - hintStyle: bodyMediumStyle(color: Color(0xff9FA5B2)), - focusedBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - enabledBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - border: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - ), - filled: true, - fillColor: Colors.white), - keyboardType: TextInputType.number, - ), - ), + child: _formPhone() ), ], )), @@ -140,7 +98,8 @@ class _joinStep5State extends State { transitionsBuilder: (_, a, __, c) => FadeTransition(opacity: a, child: c)), ); - code().phoneNum = PhoneNumcontroller.text; + _PhoneNum = PhoneNumcontroller.text; + print('전화번호 : ${phoneNumCode().phoneNum}'); }, child: Text( "다음", @@ -150,4 +109,46 @@ class _joinStep5State extends State { ), ); } + + Widget _formPhone() { + return Form( + child: TextField( + controller: PhoneNumcontroller, + style: TextStyle(fontSize: 13), + decoration: InputDecoration( + focusColor: Color.fromARGB(6, 61, 50, 50), + contentPadding: EdgeInsets.only( + left: 30), + hintText: '', + errorText: '', + errorStyle: labelSmallStyle(color: Colors.red), + focusedErrorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + errorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + hintStyle: bodyMediumStyle(color: Color(0xff9FA5B2)), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + border: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + ), + filled: true, + fillColor: Colors.white), + ), + ); + } } diff --git a/lib/join/joinStep6.dart b/lib/join/joinStep6.dart index 0041e83..fb4b5bb 100644 --- a/lib/join/joinStep6.dart +++ b/lib/join/joinStep6.dart @@ -1,9 +1,22 @@ import 'package:catch2_0_1/Auth/user_information.dart'; import 'package:catch2_0_1/LoginPage.dart'; +import 'package:catch2_0_1/join/joinPage7.dart'; import 'package:flutter/material.dart'; import '../Auth/auth_service.dart'; import '../utils/app_text_styles.dart'; + + +String _bankName = ''; +String _bankNum = ''; +String _nameForBank = ''; + +class bankInformationCode extends ChangeNotifier { + String bankName = _bankName; + String bankNum = _bankNum; + String nameForBank = _nameForBank; + notifyListeners(); +} class joinStep6 extends StatefulWidget { const joinStep6({super.key}); @@ -11,10 +24,10 @@ class joinStep6 extends StatefulWidget { State createState() => _joinStep6State(); } -class _joinStep6State extends State { - final Bankcontroller = TextEditingController(); - final BankNumcontroller = TextEditingController(); final BankNamecontroller = TextEditingController(); + final BankNumcontroller = TextEditingController(); + final nameforBankcontroller = TextEditingController(); +class _joinStep6State extends State { @override Widget build(BuildContext context) { final Size size = MediaQuery.of(context).size; @@ -73,75 +86,7 @@ class _joinStep6State extends State { ), SizedBox( height: size.height * 0.08, - child: TextField( - onTap: () { - // showModalBottomSheet( - // context: context, - // builder: (context) { - // return Column( - // mainAxisSize: MainAxisSize.min, - // children: [ - // // Text({_dateTime}), - // SizedBox( - // height: 20, - // ), - // TextButton( - // onPressed: () { - // // setState(() { - // // _dateTime - // // }); - // }, - // child: Text("확인")) - // ], - // ); - // }); - }, - controller: Bankcontroller, - style: TextStyle(fontSize: 13), - decoration: InputDecoration( - focusColor: Color.fromARGB(6, 61, 50, 50), - contentPadding: EdgeInsets.only( - top: size.height * 0.01, left: size.width * 0.04), - hintText: '', - errorText: '', - errorStyle: labelSmallStyle(color: Colors.red), - focusedErrorBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - errorBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - hintStyle: bodyMediumStyle(color: Color(0xff9FA5B2)), - focusedBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - enabledBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - border: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - ), - filled: true, - fillColor: Colors.white), - showCursor: false, - ), + child: _formBank() ), Row( children: [ @@ -155,53 +100,7 @@ class _joinStep6State extends State { ), SizedBox( height: size.height * 0.08, - child: TextField( - style: TextStyle(fontSize: 13), - controller: BankNumcontroller, - decoration: InputDecoration( - focusColor: Color.fromARGB(6, 61, 50, 50), - contentPadding: EdgeInsets.only( - top: size.height * 0.01, left: size.width * 0.04), - hintText: '', - errorText: '', - errorStyle: labelSmallStyle(color: Colors.red), - focusedErrorBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - errorBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - hintStyle: bodyMediumStyle(color: Color(0xff9FA5B2)), - focusedBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - enabledBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - border: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - ), - filled: true, - fillColor: Colors.white), - keyboardType: TextInputType.number, - ), + child: _formBankNum() ), Row( children: [ @@ -215,53 +114,7 @@ class _joinStep6State extends State { ), SizedBox( height: size.height * 0.08, - child: TextField( - controller: BankNamecontroller, - style: TextStyle(fontSize: 13), - decoration: InputDecoration( - focusColor: Color.fromARGB(6, 61, 50, 50), - contentPadding: EdgeInsets.only( - top: size.height * 0.01, left: size.width * 0.04), - hintText: '', - errorText: '', - errorStyle: labelSmallStyle(color: Colors.red), - focusedErrorBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - errorBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - hintStyle: bodyMediumStyle(color: Color(0xff9FA5B2)), - focusedBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - enabledBorder: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - borderSide: BorderSide( - width: 0.5, - color: Color.fromRGBO(0, 0, 0, 0.2)), - ), - border: OutlineInputBorder( - borderRadius: - BorderRadius.all(Radius.circular(36.0)), - ), - filled: true, - fillColor: Colors.white), - keyboardType: TextInputType.number, - ), + child: _formNameForBank() ), ], )), @@ -278,14 +131,14 @@ class _joinStep6State extends State { Navigator.push( context, PageRouteBuilder( - pageBuilder: (_, __, ___) => LoginPage(), + pageBuilder: (_, __, ___) => joinPage7(), transitionDuration: Duration(seconds: 0), transitionsBuilder: (_, a, __, c) => FadeTransition(opacity: a, child: c)), ); - code().bank = Bankcontroller.text; - code().bankName = BankNamecontroller.text; - code().bankNum = BankNumcontroller.text; + _bankName = BankNamecontroller.text; + _bankNum = BankNumcontroller.text; + _nameForBank = nameforBankcontroller.text; signUpWithEmailAndPassword(); }, child: Text( @@ -296,4 +149,134 @@ class _joinStep6State extends State { ), ); } + + Widget _formBank() { + return Form( + child: TextField( + onTap: () {}, + controller: BankNamecontroller, + style: TextStyle(fontSize: 13), + decoration: InputDecoration( + focusColor: Color.fromARGB(6, 61, 50, 50), + contentPadding: EdgeInsets.only( + left: 20), + hintText: 'EX) 포항은행', + errorText: '', + errorStyle: labelSmallStyle(color: Colors.red), + focusedErrorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + errorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + hintStyle: bodyMediumStyle(color: Color(0xff9FA5B2)), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + border: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + ), + filled: true, + fillColor: Colors.white), + showCursor: false, + ), + ); + } + + Widget _formBankNum() { + return Form( + child: TextField( + style: TextStyle(fontSize: 13), + controller: BankNumcontroller, + decoration: InputDecoration( + focusColor: Color.fromARGB(6, 61, 50, 50), + contentPadding: EdgeInsets.only( + left: 20), + hintText: '', + errorText: '', + errorStyle: labelSmallStyle(color: Colors.red), + focusedErrorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + errorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + hintStyle: bodyMediumStyle(color: Color(0xff9FA5B2)), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + border: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + ), + filled: true, + fillColor: Colors.white), + keyboardType: TextInputType.number, + ), + ); + } + + Widget _formNameForBank() { + return Form( + child: TextField( + controller: BankNamecontroller, + style: TextStyle(fontSize: 13), + decoration: InputDecoration( + focusColor: Color.fromARGB(6, 61, 50, 50), + contentPadding: EdgeInsets.only( + left: 20), + hintText: '', + errorText: '', + errorStyle: labelSmallStyle(color: Colors.red), + focusedErrorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + errorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + hintStyle: bodyMediumStyle(color: Color(0xff9FA5B2)), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: + BorderSide(width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + border: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + ), + filled: true, + fillColor: Colors.white), + keyboardType: TextInputType.number, + ), + ); + } } diff --git a/lib/main.dart b/lib/main.dart index 771002e..9f6b794 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,9 +1,10 @@ -import 'package:catch2_0_1/screen/Community/DetailPage.dart'; import 'package:firebase_core/firebase_core.dart'; import 'package:flutter/material.dart'; import 'Auth/auth_service.dart'; import 'firebase_options.dart'; +import 'screen/Community/DetailPage.dart'; +import 'screen/mainHome.dart'; void main() async { WidgetsFlutterBinding.ensureInitialized(); @@ -14,6 +15,8 @@ void main() async { } class MyApp extends StatelessWidget { + //const MyApp({super.key}); + // This widget is the root of your application. @override Widget build(BuildContext context) { return MaterialApp( @@ -28,6 +31,22 @@ class MyApp extends StatelessWidget { theme: ThemeData( primarySwatch: Colors.lightBlue, ), - home: AuthService().handleAuthState()); + // home: test()); + // home: MainHomePage()); + home: AuthService().handleAuthState()); + } +} + +class test extends StatefulWidget { + const test({super.key}); + + @override + State createState() => _testState(); +} + +class _testState extends State { + @override + Widget build(BuildContext context) { + return Container(); } } diff --git a/lib/screen/Camera/camera_page.dart b/lib/screen/Camera/camera_page.dart index 02390a9..303d878 100644 --- a/lib/screen/Camera/camera_page.dart +++ b/lib/screen/Camera/camera_page.dart @@ -42,7 +42,7 @@ class _CameraPageState extends State { } @override - Future takepicture() async { + Future noauto_takepicture() async { print('is saving1 : $issaving'); CameraImage image = cameraImage2; try { @@ -682,7 +682,8 @@ class _CameraPageState extends State { issaving = true; }); print('clicked!!'); - takepicture(); + noauto_takepicture(); + // takepicture(); await Future.delayed(Duration(seconds: 1)); setState(() { issaving = false; diff --git a/lib/screen/Camera/camera_viewer.dart b/lib/screen/Camera/camera_viewer.dart index e0c5735..e083d4c 100644 --- a/lib/screen/Camera/camera_viewer.dart +++ b/lib/screen/Camera/camera_viewer.dart @@ -64,6 +64,7 @@ class _CameraViewerState extends State { } + @override void initState() { super.initState(); @@ -141,10 +142,10 @@ class _CameraViewerState extends State { print('is sav'); print('is saving1 : $issaving'); - Coordinates cordi=await getCurrentLocation(); - var address=await Geocoder.local.findAddressesFromCoordinates(cordi); - var first=address.first; - print('주소 ${first.thoroughfare}');//동 받아옴 + // Coordinates cordi=await getCurrentLocation(); + // var address=await Geocoder.local.findAddressesFromCoordinates(cordi); + // var first=address.first; + // print('주소 ${first.thoroughfare}');//동 받아옴 CameraImage image = cameraImage2; try { @@ -176,7 +177,7 @@ class _CameraViewerState extends State { .add({ "url": url, "time":DateFormat('dd/MM/yyyy').format(DateTime.now()), - "location":first.thoroughfare, + "location":"흥해읍"//first.thoroughfare, //위치추가 }); await FirebaseFirestore.instance @@ -186,7 +187,7 @@ class _CameraViewerState extends State { .add({ "url": url, "time":DateFormat('dd/MM/yyyy').format(DateTime.now()), - "location":first.thoroughfare, + "location":"흥해읍"//first.thoroughfare, //위치추가 }); diff --git a/lib/screen/MyPage/MyCash.dart b/lib/screen/MyPage/MyCash.dart new file mode 100644 index 0000000..81c2a06 --- /dev/null +++ b/lib/screen/MyPage/MyCash.dart @@ -0,0 +1,328 @@ +import 'package:catch2_0_1/utils/app_text_styles.dart'; +import 'package:flutter/material.dart'; + +import '../../utils/widget.dart'; +import 'cashCahnge.dart'; +import 'makeAccount.dart'; + +class MyCash extends StatefulWidget { + const MyCash({super.key}); + + @override + State createState() => _MyCashState(); +} + +class _MyCashState extends State { + @override + Widget build(BuildContext context) { + final Size size = MediaQuery.of(context).size; + return Scaffold( + floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat, + floatingActionButton: SizedBox( + width: size.width * 0.8, + height: size.height * 0.08, + child: FloatingActionButton.extended( + onPressed: () { + // 계좌정보가 없는 경우 + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(30.0), + topRight: Radius.circular(30.0))), + insetPadding: EdgeInsets.only(top: size.height * 0.65), + content: Container( + height: size.height * 0.3, + width: size.width, + child: Column( + children: [ + Center( + child: Column( + children: [ + SizedBox( + height: size.height * 0.02, + ), + Text( + "계좌정보가 등록되어 있지 않습니다.", + style: bodyLargeStyle(color: Colors.black), + ), + SizedBox(height: size.height * 0.01), + Center( + child: Text("등록하시겠습니까?", + style: + bodyLargeStyle(color: Colors.black)), + ), + SizedBox( + height: size.height * 0.04, + ), + Padding( + padding: EdgeInsets.only( + left: size.width * 0.06, + right: size.width * 0.03), + child: Center( + child: Row( + children: [ + TextButton( + child: Text( + '취소', + style: TextStyle( + fontWeight: FontWeight.w500, + fontSize: 16, + color: Color(0xff9FA5B2)), + ), + onPressed: () { + Navigator.pop(context); + }, + style: TextButton.styleFrom( + padding: EdgeInsets.zero, + minimumSize: Size(50, 30), + tapTargetSize: + MaterialTapTargetSize + .shrinkWrap, + alignment: + Alignment.centerLeft)), + Spacer(), + TextButton( + child: Text( + '확인', + style: TextStyle( + fontWeight: FontWeight.w500, + fontSize: 16, + color: Color(0xff3A94EE)), + ), + onPressed: () { + Navigator.push( + context, + PageRouteBuilder( + pageBuilder: (_, __, ___) => + makeAccount(), + transitionDuration: + Duration(seconds: 0), + transitionsBuilder: + (_, a, __, c) => + FadeTransition( + opacity: a, + child: c)), + ); + }, + style: TextButton.styleFrom( + padding: EdgeInsets.zero, + minimumSize: Size(50, 30), + tapTargetSize: + MaterialTapTargetSize + .shrinkWrap, + alignment: + Alignment.centerLeft)), + ], + ), + ), + ) + ], + ), + ) + ], + )), + ); + }, + ); + + // 계좌정보가 있는 경우 + // Navigator.push( + // context, + // PageRouteBuilder( + // pageBuilder: (_, __, ___) => cashChange(), + // transitionDuration: Duration(seconds: 0), + // transitionsBuilder: (_, a, __, c) => + // FadeTransition(opacity: a, child: c)), + // ); + }, + backgroundColor: Color(0xff3A94EE), + label: + Text("캐시 현금화 하기", style: titleMediumStyle(color: Colors.white)), + ), + ), + backgroundColor: Color(0xff3A94EE), + appBar: AppBar( + elevation: 0.2, + backgroundColor: Colors.white, + title: Text( + "나의 캐시", + style: titleMediumStyle(color: Colors.black), + ), + centerTitle: true, + ), + body: Column( + children: [ + Row( + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only( + top: size.height * 0.04, + left: size.width * 0.08, + bottom: size.height * 0.01), + child: Column( + children: [ + Text("나의 캐시", + style: titleMediumStyle(color: Colors.white)), + ], + ), + ), + Padding( + padding: EdgeInsets.only(left: size.width * 0.08), + child: Text( + "10,000", + style: displaySmallStyle(color: Colors.white), + ), + ), + ], + ), + Spacer(), + Padding( + padding: EdgeInsets.only( + top: size.height * 0.03, right: size.width * 0.05), + child: Image.asset( + 'assets/icons/mypage/MYcoin.png', + width: 120, + ), + ) + ], + ), + SizedBox( + height: size.height * 0.03, + ), + SizedBox( + height: size.height * 0.670, + width: double.infinity, + child: Card( + margin: EdgeInsets.zero, + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(20), + topRight: Radius.circular(20), + bottomRight: Radius.circular(0), + bottomLeft: Radius.circular(0))), + child: Padding( + padding: EdgeInsets.only(left: size.width * 0.01), + child: SingleChildScrollView( + child: Column( + children: [ + SizedBox( + height: size.height * 0.02, + ), + _addListTile("자전거 사진 구합니다", "2022년 11월 31일", 300), + MyWidget().DivderLineMyCash(), + _subListTile('캐시 현금화', '2022년 11월 31일', 300), + MyWidget().DivderLineMyCash(), + _subListTile('캐시 현금화', '2022년 11월 31일', 300), + MyWidget().DivderLineMyCash(), + _addListTile("자전거 사진 구합니다", "2022년 11월 31일", 300), + MyWidget().DivderLineMyCash(), + _subListTile('캐시 현금화', '2022년 11월 31일', 300), + MyWidget().DivderLineMyCash(), + _subListTile('캐시 현금화', '2022년 11월 31일', 300), + MyWidget().DivderLineMyCash(), + _addListTile("자전거 사진 구합니다", "2022년 11월 31일", 300), + ], + ), + ), + ), + ), + ) + ], + ), + ); + } + + ListTile _addListTile(String title, String subtitle, int cash) { + final Size size = MediaQuery.of(context).size; + return ListTile( + title: Row( + children: [ + Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(top: size.height * 0.02), + child: Text( + title, + style: labelLargeStyle(color: Colors.black), + ), + ), + SizedBox( + height: size.height * 0.005, + ), + Padding( + padding: EdgeInsets.only(bottom: size.height * 0.02), + child: Text( + subtitle, + style: labelMediumStyle(color: Color(0xff9FA5B2)), + ), + ), + ], + ), + Spacer(), + Text("+ ", style: titleMediumStyle(color: Color(0xff00D796))), + Image.asset( + 'assets/icons/mypage/mycash_add_coin.png', + width: 20, + ), + Text( + cash.toString(), + style: titleMediumStyle(color: Color(0xff00D796)), + ) + ], + ), + ); + } + + ListTile _subListTile(String title, String subtitle, int cash) { + final Size size = MediaQuery.of(context).size; + return ListTile( + title: Row( + children: [ + Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(top: size.height * 0.02), + child: Text( + title, + style: labelLargeStyle(color: Colors.black), + ), + ), + SizedBox( + height: size.height * 0.005, + ), + Padding( + padding: EdgeInsets.only(bottom: size.height * 0.02), + child: Text( + subtitle, + style: labelMediumStyle(color: Color(0xff9FA5B2)), + ), + ), + ], + ), + Spacer(), + Text("- ", style: titleMediumStyle(color: Colors.red)), + Image.asset( + 'assets/icons/mypage/Mycash_minus_coin.png', + width: 20, + ), + Text( + cash.toString(), + style: titleMediumStyle(color: Colors.red), + ) + ], + ), + ); + } +} diff --git a/lib/screen/MyPage/MyPage.dart b/lib/screen/MyPage/MyPage.dart index 85263a2..74a6abf 100644 --- a/lib/screen/MyPage/MyPage.dart +++ b/lib/screen/MyPage/MyPage.dart @@ -1,3 +1,7 @@ +import 'package:catch2_0_1/Auth/auth_service.dart'; +import 'package:catch2_0_1/screen/MyPage/MyCash.dart'; +import 'package:catch2_0_1/screen/MyPage/makeAccount.dart'; +import 'package:catch2_0_1/screen/projectPage/part_pro.dart'; import 'package:catch2_0_1/utils/app_text_styles.dart'; import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/material.dart'; @@ -5,8 +9,6 @@ import 'package:flutter/material.dart'; import '../../utils/app_text_styles.dart'; import '../../utils/widget.dart'; import '../notFound.dart'; -import '../projectPage/part_pro.dart'; -import '../projectPage/progect_main.dart'; class MYPage extends StatefulWidget { const MYPage({super.key}); @@ -18,82 +20,251 @@ class MYPage extends StatefulWidget { class _MYPageState extends State { @override Widget build(BuildContext context) { + final Size size = MediaQuery.of(context).size; return Scaffold( appBar: AppBar( + elevation: 0.5, + centerTitle: true, leading: SizedBox(), backgroundColor: Color(0xffFAFBFB), - title: Text('마이 페이지',style: titleMediumStyle(color: Colors.black),), + title: Text( + '마이 페이지', + style: titleMediumStyle(color: Colors.black), + ), ), - body: Column(children: [ - Container( - margin: EdgeInsets.fromLTRB(0, 30, 0, 20), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Center( - child: ClipRRect( - borderRadius: BorderRadius.circular(100), // Image border - child: SizedBox.fromSize( - size: Size.fromRadius(48), // Image radius - child: Image.asset('assets/icons/laucher_icon.png', fit: BoxFit.cover),) - ), + body: SingleChildScrollView( + child: Padding( + padding: EdgeInsets.only( + left: size.width * 0.06, right: size.width * 0.06), + child: + Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Container( + margin: EdgeInsets.fromLTRB(0, 30, 0, 20), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + children: [ + Center( + child: ClipRRect( + borderRadius: + BorderRadius.circular(100), // Image border + child: SizedBox.fromSize( + size: Size.fromRadius(35), // Image radius + child: Image.asset('assets/icons/laucher_icon.png', + fit: BoxFit.cover), + )), + ), + Stack( + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: + EdgeInsets.only(left: size.width * 0.04), + child: Row( + children: [ + Text( + '1234@handong.ac.kr', + style: titleMediumStyle( + color: Colors.black), + ), + Text(" 님", + style: labelMediumStyle( + color: Colors.black)), + ], + ), + ), + ], + ), + Padding( + padding: EdgeInsets.only( + top: size.height * 0.035, + left: size.width * 0.04), + child: Text( + '1234@handong.ac.kr', + style: + labelSmallStyle(color: Color(0xff9FA5B2)), + ), + ), + Padding( + padding: EdgeInsets.only(left: size.width * 0.55), + child: IconButton( + onPressed: () {}, + icon: Icon( + Icons.arrow_forward_ios_rounded, + color: Color(0xffCFD2D9), + )), + ), + ], + ) + ], + ), + SizedBox( + height: size.height * 0.03, + ), + // Stack( + // children: [ + // // SizedBox( + // // height: size.height * 0.03, + // // ), + // Padding( + // padding: EdgeInsets.only(top: size.height * 0.1), + // child: Image.asset( + // 'assets/icons/mypage/coin.png', + // width: 100, + // ), + // ), + // ], + // ), + Stack( + children: [ + Card( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10), + //set border radius more than 50% of height and width to make circle + ), + child: Column( + children: [ + SizedBox( + height: size.height * 0.1, + child: ListTile( + onTap: () { + Navigator.push( + context, + PageRouteBuilder( + pageBuilder: (_, __, ___) => MyCash(), + transitionDuration: + Duration(seconds: 0), + transitionsBuilder: (_, a, __, c) => + FadeTransition( + opacity: a, child: c)), + ); + }, + title: Padding( + padding: EdgeInsets.only( + bottom: size.height * 0.005), + child: Text( + "나의 캐시", + style: + labelSmallStyle(color: Colors.white), + ), + ), + subtitle: Text("10,000", + style: + titleLargeStyle(color: Colors.white)), + textColor: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(10), + topRight: Radius.circular(10), + bottomRight: Radius.circular(0), + bottomLeft: Radius.circular(0))), + tileColor: Color(0xff3A94EE), + ), + ), + SizedBox( + height: size.height * 0.05, + child: ListTile( + onTap: () {}, + title: Padding( + padding: EdgeInsets.only( + bottom: size.height * 0.015), + child: Row( + children: [ + Spacer(), + Text("캐시 현금화 하기 ", + style: labelSmallStyle( + color: Colors.black)), + Icon( + Icons.arrow_forward_ios_rounded, + size: 14, + color: Colors.black, + ) + ], + ), + ), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(0), + topRight: Radius.circular(0), + bottomRight: Radius.circular(10), + bottomLeft: Radius.circular(10))), + tileColor: Color(0xffE7E8EC), + ), + ) + ], + ), + ), + Padding( + padding: EdgeInsets.only( + top: size.height * 0.0, left: size.width * 0.57), + child: Image.asset( + 'assets/icons/mypage/MYcoin.png', + width: 100, + ), + ), + ], + ), + ]), ), - SizedBox(height: 16), - Text('1234@handong.ac.kr 님',style: labelMediumStyle(color: Colors.black),), - SizedBox(height: 4), - Text('1234@handong.ac.kr',style: labelSmallStyle(color: Color(0xff9FA5B2)),), - SizedBox(height: 20), - MyWidget().DivderLine(), - SizedBox(height: 20), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - _buildButtonColumn('assets/icons/mypage/my_coin2.png','10000',Colors.black), - _buildButtonColumn('assets/icons/mypage/black_pencil.png','내가 쓴 글',Colors.black), - _buildButtonColumn('assets/icons/mypage/part_pro.png','참여 프로젝트',Colors.black) - ],), - MyWidget().DivderLine(), - _buildListTileButton('내 정보 수정'), - _buildListTileButton('결제 정보 수정'), - _buildListTileButton('계좌 정보 수정'), - MyWidget().DivderLine(), - SizedBox(height: 20), - _buildListTileButton('공지 사항'), - _buildListTileButton('약관 및 개인정보 처리'), + SizedBox(height: size.height * 0.005), + _buildListTileButton('내가 올린 프로젝트'), + _buildListTileButton('내가 작성한 커뮤니티 글'), + _buildListTileButton('참여중인 프로젝트'), + MyWidget().DivderLine(), + _buildListTileButton('결제 정보 수정'), + _buildListTileButton('계좌 정보 수정'), + MyWidget().DivderLine(), + _buildListTileButton('공지 사항'), + _buildListTileButton('약관 및 개인정보 처리'), + MyWidget().DivderLine(), + _buildListTileButton('로그아웃'), + Padding( + padding: EdgeInsets.only( + left: size.width * 0.015, bottom: size.height * 0.05), + child: TextButton( + style: TextButton.styleFrom( + padding: EdgeInsets.zero, + minimumSize: Size(0, 20), + tapTargetSize: MaterialTapTargetSize.shrinkWrap, + alignment: Alignment.topLeft), + onPressed: () {}, + child: Text( + "탈퇴하기", + style: bodySmallStyle(color: Color(0xff9FA5B2)), + )), + ) ]), - ) - ]), + ), + ), ); } - Container _buildButtonColumn( String image ,String label,Color color) { + + Container _buildButtonColumn(String image, String label, Color color) { return Container( margin: EdgeInsets.fromLTRB(30, 0, 25, 20), child: InkWell( - onTap: (){ + onTap: () { + + if(label=='') Navigator.push( context, - MaterialPageRoute( - builder: (BuildContext context){ - if(label=='참여 프로젝트'){ - - return partiprojectPage(); - }else{ - return notFound(); - } - } + MaterialPageRoute( + builder: (BuildContext context) => notFound(), )); - }, child: Column( mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.center, children: [ - Image.asset('${image}', height: 40,width: 40), + Image.asset('${image}', height: 40, width: 40), Container( margin: const EdgeInsets.only(top: 8), child: Text( - label, + label, style: TextStyle( fontSize: 12, fontWeight: FontWeight.w400, @@ -106,19 +277,43 @@ class _MYPageState extends State { ), ); } - ListTile _buildListTileButton(String word){ + + ListTile _buildListTileButton(String word) { + final Size size = MediaQuery.of(context).size; return ListTile( - onTap: (){ - Navigator.push( - context, - MaterialPageRoute( - builder: (BuildContext context) => - notFound(), - )); + contentPadding: EdgeInsets.only(left: size.width * 0.014), + onTap: () { + if(word=="참여중인 프로젝트"){ + Navigator.push( + context, + MaterialPageRoute( + builder: (BuildContext context) => partiprojectPage(), + )); + }else if(word=="계좌 정보 수정"){ + Navigator.push( + context, + MaterialPageRoute( + builder: (BuildContext context) => makeAccount(), + )); - }, - leading: Text(' ${word}',style: bodyLargeStyle()), - trailing: Icon(Icons.arrow_forward_ios), - ); + } else if(word=="로그아웃"){ + signOut(); + + } + else{ + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (BuildContext context) => notFound(), + // )); + + } + + }, + leading: Text('${word}', style: labelLargeStyle(color: Colors.black)), + trailing: Icon( + Icons.arrow_forward_ios_rounded, + color: Color(0xffCFD2D9), + )); } -} \ No newline at end of file +} diff --git a/lib/screen/MyPage/cashCahnge.dart b/lib/screen/MyPage/cashCahnge.dart new file mode 100644 index 0000000..3a23d24 --- /dev/null +++ b/lib/screen/MyPage/cashCahnge.dart @@ -0,0 +1,215 @@ +import 'package:catch2_0_1/screen/MyPage/MyPage.dart'; +import 'package:catch2_0_1/utils/app_text_styles.dart'; +import 'package:flutter/material.dart'; + +class cashChange extends StatefulWidget { + const cashChange({super.key}); + + @override + State createState() => _cashChangeState(); +} + +class _cashChangeState extends State { + @override + Widget build(BuildContext context) { + final Size size = MediaQuery.of(context).size; + return Scaffold( + appBar: AppBar( + backgroundColor: Colors.white, + elevation: 0.2, + centerTitle: true, + title: Text( + "캐시 현금화", + style: titleMediumStyle(color: Colors.black), + )), + body: Padding( + padding: EdgeInsets.only( + left: size.width * 0.06, + right: size.width * 0.06, + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: size.height * 0.05, + ), + Text( + "보유 캐시", + style: titleSmallStyle(color: Color(0xff9FA5B2)), + ), + Text( + "10,035", + style: bodyLargeStyle(color: Colors.black), + ), + SizedBox( + height: size.height * 0.04, + ), + Text( + '현금화 할 캐시', + style: titleSmallStyle(color: Color(0xff9FA5B2)), + ), + Padding( + padding: EdgeInsets.only( + top: size.height * 0.01, right: size.width * 0.06), + child: TextFormField( + style: TextStyle(fontSize: 13), + decoration: InputDecoration( + suffixIconConstraints: + BoxConstraints(minHeight: 6, minWidth: 16), + focusColor: Color.fromARGB(6, 61, 50, 50), + contentPadding: EdgeInsets.only( + top: size.height * 0.01, left: size.width * 0.04), + hintText: '', + errorText: '', + errorStyle: labelSmallStyle(color: Colors.red), + focusedErrorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: BorderSide( + width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + errorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: BorderSide( + width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + hintStyle: bodyMediumStyle(color: Color(0xff9FA5B2)), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: BorderSide( + width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: BorderSide( + width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + border: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + ), + filled: true, + fillColor: Colors.white), + keyboardType: TextInputType.number, + ), + ), + Row( + children: [ + SizedBox( + width: size.width * 0.02, + ), + Image.asset( + 'assets/icons/mypage/cash_warn.png', + width: 16, + ), + Text( + " 캐시 현금화는 1,000 캐시 단위로 가능합니다.", + style: labelMediumStyle(color: Colors.red), + ) + ], + ), + SizedBox( + height: size.height * 0.07, + ), + SizedBox( + width: double.infinity, + height: size.height * 0.06, + child: OutlinedButton( + style: OutlinedButton.styleFrom( + backgroundColor: Color(0xff3A94EE), + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.all(Radius.circular(30)))), + onPressed: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(30.0), + topRight: Radius.circular(30.0))), + insetPadding: + EdgeInsets.only(top: size.height * 0.4), + content: Container( + height: size.height * 0.7, + width: size.width, + child: Column( + children: [ + Center( + child: Column( + children: [ + SizedBox( + height: size.height * 0.2, + ), + Text( + "캐시가 현금화되었습니다.\n", + style: bodyLargeStyle( + color: Colors.black), + ), + Text( + "현금화는 영업일 기준으로", + style: bodyLargeStyle( + color: Colors.black), + ), + Text( + "최대 7일까지 소요될 수 있습니다.", + style: bodyLargeStyle( + color: Colors.black), + ), + ], + ), + ), + Padding( + padding: EdgeInsets.only( + top: size.height * 0.03, + bottom: size.height * 0.02), + child: SizedBox( + width: double.infinity, + height: size.height * 0.06, + child: OutlinedButton( + style: OutlinedButton.styleFrom( + backgroundColor: + Color(0xff3A94EE), + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.all( + Radius.circular( + 30)))), + onPressed: () { + Navigator.push( + context, + PageRouteBuilder( + pageBuilder: + (_, __, ___) => + MYPage(), + transitionDuration: + Duration( + seconds: 0), + transitionsBuilder: (_, + a, __, c) => + FadeTransition( + opacity: a, + child: c)), + ); + }, + child: Text( + "확인", + style: titleMediumStyle( + color: Colors.white), + ))), + ) + ], + )), + ); + }, + ); + }, + child: Text( + "현금화 하기", + style: titleMediumStyle(color: Colors.white), + ))) + ]), + ), + ); + } +} diff --git a/lib/screen/MyPage/makeAccount.dart b/lib/screen/MyPage/makeAccount.dart new file mode 100644 index 0000000..a481439 --- /dev/null +++ b/lib/screen/MyPage/makeAccount.dart @@ -0,0 +1,563 @@ +import 'package:flutter/material.dart'; + +import '../../utils/app_text_styles.dart'; +import 'MyCash.dart'; + +class makeAccount extends StatefulWidget { + const makeAccount({super.key}); + + @override + State createState() => _makeAccountState(); +} + +class _makeAccountState extends State { + @override + Widget build(BuildContext context) { + // final Size size = MediaQuery.of(context).size; + return Scaffold( + appBar: AppBar( + backgroundColor: Colors.white, + elevation: 0.2, + centerTitle: true, + title: + Text("계좌 정보 등록", style: titleMediumStyle(color: Colors.black))), + body: SingleChildScrollView( + child: Padding( + padding: EdgeInsets.only(left: 24, right: 24), + child: Column( + children: [ + SizedBox( + height: 30, + ), + _textfieldLabel('은행'), + SizedBox( + height: 6, + ), + TextFormField( + style: TextStyle(fontSize: 13), + decoration: InputDecoration( + suffixIcon: IconButton( + onPressed: () { + showDialog( + context: context, + builder: (BuildContext context) { + return _dialogGrid(); + }, + ); + }, + icon: Icon( + Icons.keyboard_arrow_down_outlined, + size: 35, + color: Color(0xffCFD2D9), + )), + suffixIconConstraints: + BoxConstraints(minHeight: 6, minWidth: 16), + focusColor: Color.fromARGB(6, 61, 50, 50), + contentPadding: EdgeInsets.only(top: 8, left: 24), + hintText: '', + errorText: '', + errorStyle: labelSmallStyle(color: Colors.red), + focusedErrorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: BorderSide( + width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + errorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: BorderSide( + width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + hintStyle: bodyMediumStyle(color: Color(0xff9FA5B2)), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: BorderSide( + width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: BorderSide( + width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + border: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + ), + filled: true, + fillColor: Colors.white), + keyboardType: TextInputType.emailAddress, + ), + _textfieldLabel('계좌번호'), + SizedBox( + height: 6, + ), + TextFormField( + style: TextStyle(fontSize: 13), + decoration: InputDecoration( + suffixIconConstraints: + BoxConstraints(minHeight: 6, minWidth: 16), + focusColor: Color.fromARGB(6, 61, 50, 50), + contentPadding: EdgeInsets.only(top: 8, left: 24), + hintText: '', + errorText: '', + errorStyle: labelSmallStyle(color: Colors.red), + focusedErrorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: BorderSide( + width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + errorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: BorderSide( + width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + hintStyle: bodyMediumStyle(color: Color(0xff9FA5B2)), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: BorderSide( + width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: BorderSide( + width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + border: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + ), + filled: true, + fillColor: Colors.white), + keyboardType: TextInputType.emailAddress, + ), + _textfieldLabel('수취인명'), + SizedBox( + height: 6, + ), + TextFormField( + style: TextStyle(fontSize: 13), + decoration: InputDecoration( + suffixIconConstraints: + BoxConstraints(minHeight: 6, minWidth: 16), + focusColor: Color.fromARGB(6, 61, 50, 50), + contentPadding: EdgeInsets.only(top: 2, left: 5), + hintText: '', + errorText: '', + errorStyle: labelSmallStyle(color: Colors.red), + focusedErrorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: BorderSide( + width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + errorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: BorderSide( + width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + hintStyle: bodyMediumStyle(color: Color(0xff9FA5B2)), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: BorderSide( + width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + borderSide: BorderSide( + width: 0.5, color: Color.fromRGBO(0, 0, 0, 0.2)), + ), + border: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(36.0)), + ), + filled: true, + fillColor: Colors.white), + keyboardType: TextInputType.emailAddress, + ), + SizedBox( + height: 20, + ), + SizedBox( + width: double.infinity, + height: 45, + child: OutlinedButton( + style: OutlinedButton.styleFrom( + backgroundColor: Color(0xffCFD2D9), + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.all(Radius.circular(30)))), + onPressed: () { + showModalBottomSheet( + context: context, + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.vertical( + top: Radius.circular(30), + ), + ), + builder: (BuildContext context) { + return StatefulBuilder(builder: + (BuildContext context, + StateSetter bottomState) { + return Container( + height: 380, + child: Column(children: [ + Container( + margin: + EdgeInsets.fromLTRB(100, 40, 100, 20), + child: Image.asset( + 'assets/checkToFinish.gif', + height: 160, + width: 160, + ), + ), + Container( + margin: EdgeInsets.fromLTRB(24, 0, 24, 24), + child: Text( + "계좌 정보가 등록 되었습니다.", + style: bodyLargeStyle(), + ), + ), + Container( + height: 40, + width: 312, + decoration: BoxDecoration( + borderRadius: + BorderRadius.circular(20), + color: Color(0XFF3A94EE)), + margin: + EdgeInsets.fromLTRB(46, 0, 46, 50), + child: TextButton( + onPressed: () { + Navigator.push( + context, + PageRouteBuilder( + pageBuilder: (_, __, ___) => + MyCash(), + transitionDuration: + Duration(seconds: 0), + transitionsBuilder: + (_, a, __, c) => + FadeTransition( + opacity: a, + child: c)), + ); + // setState(() async{ + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => HomePage()), + // ); + // print('데이터 전송 시작'); + // UploadFunction(_selectedFileList!); + // await Future.delayed(Duration(seconds: 25)); + // contentsFunction(FirebaseAuth.instance.currentUser!.displayName!,_road,_arrImageUrls,contentsController,roadAddress); + // _road == null; + // postCode = '-'; + // _arrImageUrls.clear(); + // contentsController.clear(); + // }); + }, + child: Text('확인', + style: titleMediumStyle( + color: Colors.white)))) + ]), + ); + }); + }); + + // showDialog( + // context: context, + // builder: (BuildContext context) { + // return AlertDialog( + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.only( + // topLeft: Radius.circular(30.0), + // topRight: Radius.circular(30.0))), + // insetPadding: EdgeInsets.only(top: 500), + // content: Container( + // margin: EdgeInsets.zero, + // height: 350, + // width: 320, + // child: Column( + // children: [ + // Center( + // child: Column( + // children: [ + // SizedBox( + // height: 90, + // ), + // Text( + // "계좌정보가 등록되었습니다.", + // style: bodyLargeStyle( + // color: Colors.black), + // ), + // ], + // ), + // ), + // Padding( + // padding: + // EdgeInsets.only(top: 20, bottom: 5), + // child: SizedBox( + // width: double.infinity, + // height: 50, + // child: OutlinedButton( + // style: OutlinedButton.styleFrom( + // backgroundColor: + // Color(0xff3A94EE), + // shape: RoundedRectangleBorder( + // borderRadius: + // BorderRadius.all( + // Radius.circular( + // 30)))), + // onPressed: () { + // Navigator.pop(context); + // }, + // child: Text( + // "확인", + // style: titleMediumStyle( + // color: Colors.white), + // ))), + // ) + // ], + // )), + // ); + // }, + // ); + }, + child: Text( + "등록하기", + style: titleMediumStyle(color: Color(0xff9FA5B2)), + ))) + ], + ), + )), + ); + } + + Row _textfieldLabel(String labels) { + return Row( + children: [ + Text( + labels, + style: titleSmallStyle(color: Color(0xff9FA5B2)), + ), + Spacer() + ], + ); + } + + AlertDialog _dialogMy() { + final Size size = MediaQuery.of(context).size; + return AlertDialog( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(30.0), topRight: Radius.circular(30.0))), + insetPadding: EdgeInsets.only(top: size.height * 0.6), + content: Container( + height: size.height * 0.3, + width: size.width, + child: Column( + children: [ + Center( + child: Column( + children: [ + SizedBox( + height: size.height * 0.1, + ), + Text( + "계좌정보가 등록되었습니다.", + style: bodyLargeStyle(color: Colors.black), + ), + ], + ), + ), + Padding( + padding: EdgeInsets.only( + top: size.height * 0.03, bottom: size.height * 0.01), + child: SizedBox( + width: double.infinity, + height: 30, + child: OutlinedButton( + style: OutlinedButton.styleFrom( + backgroundColor: Color(0xff3A94EE), + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.all(Radius.circular(30)))), + onPressed: () {}, + child: Text( + "확인", + style: titleMediumStyle(color: Colors.white), + ))), + ) + ], + )), + ); + } + + AlertDialog _dialogGrid() { + // final Size size = MediaQuery.of(context).size; + return AlertDialog( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(30.0), topRight: Radius.circular(30.0))), + insetPadding: EdgeInsets.only(top: 230), + content: + Container(height: 500, width: double.infinity, child: send_grid()), + ); + } +} + +class send_grid extends StatelessWidget { + List grids = [ + 'nh', + 'kb', // + 'kakaobank', + 'shinhan', + 'wori_send', + 'ibk_send', + 'hana_send', + 'new', + 'dgb', + 'bnk', + 'kbank' // + ]; + List names = [ + 'NH농협', + 'KB국민', + '카카오뱅크', + '신한', + '우리', + 'IBK기업', + '하나', + '새마을', + '대구', + '부산', + '케이뱅크' + ]; + send_grid({super.key}); + + @override + Widget build(BuildContext context) { + // final Size size = MediaQuery.of(context).size; + return SingleChildScrollView( + child: Column( + children: [ + Container( + height: 375, + width: 325, + child: SizedBox( + child: GridView.count( + physics: new NeverScrollableScrollPhysics(), + childAspectRatio: 1.24, + crossAxisCount: 3, + mainAxisSpacing: 9, + crossAxisSpacing: 8, + children: List.generate(11, (index) { + return Container( + height: 17, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + shape: BoxShape.rectangle, + color: Color(0xffFAFAFA)), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Align( + alignment: Alignment.topCenter, + child: Image.asset( + 'assets/account/${grids[index]}.png', + height: 36)), + Padding( + padding: + const EdgeInsets.only(bottom: 3.0, top: 2), + child: Text( + names[index], + style: SubTitleStyle(color: Colors.black), + ), + ), + ], + ), + ); + }))), + ), + SizedBox( + height: 10, + ), + SizedBox( + width: double.infinity, + height: 60, + child: OutlinedButton( + style: OutlinedButton.styleFrom( + backgroundColor: Color(0xff3A94EE), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(30)))), + onPressed: () { + Navigator.pop(context); + }, + child: Text( + "확인", + style: titleMediumStyle(color: Colors.white), + ))), + ], + ), + ); + } + + void _showEnroll(context) { + // 업로드 관련 스냅바 + showModalBottomSheet( + context: context, + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.vertical( + top: Radius.circular(30), + ), + ), + builder: (BuildContext context) { + return StatefulBuilder( + builder: (BuildContext context, StateSetter bottomState) { + return Container( + height: 380, + child: Column(children: [ + Container( + margin: EdgeInsets.fromLTRB(100, 40, 100, 20), + child: Image.asset( + 'assets/checkToFinish.gif', + height: 160, + width: 160, + ), + ), + Container( + margin: EdgeInsets.fromLTRB(24, 0, 24, 28), + child: Text( + "계좌 정보가 등록 되었습니다.", + style: labelSmallStyle(), + ), + ), + Container( + height: 40, + width: 312, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(20), + color: Color(0XFF3A94EE)), + margin: EdgeInsets.fromLTRB(46, 0, 46, 50), + child: TextButton( + onPressed: () { + // setState(() async{ + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => HomePage()), + // ); + // print('데이터 전송 시작'); + // UploadFunction(_selectedFileList!); + // await Future.delayed(Duration(seconds: 25)); + // contentsFunction(FirebaseAuth.instance.currentUser!.displayName!,_road,_arrImageUrls,contentsController,roadAddress); + // _road == null; + // postCode = '-'; + // _arrImageUrls.clear(); + // contentsController.clear(); + // }); + }, + child: Text('확인', + style: labelSmallStyle(color: Colors.white)))) + ]), + ); + }); + }); + } +} diff --git a/lib/screen/album/catchbox_detail.dart b/lib/screen/album/catchbox_detail.dart index 8cf32f4..c828298 100644 --- a/lib/screen/album/catchbox_detail.dart +++ b/lib/screen/album/catchbox_detail.dart @@ -7,6 +7,10 @@ import 'dart:math' as math; import '../../utils/app_text_styles.dart'; import '../mainHome.dart'; +int check_num=0; + +ListcolorList=[Color(0xffCFD2D9),Color(0xffCFD2D9),Color(0xffCFD2D9),Color(0xffCFD2D9)]; + class Catchbox_detail extends StatefulWidget { final QueryDocumentSnapshot query; @@ -74,8 +78,8 @@ class _Catchbox_detailState extends State { .collection('category') .doc('1234@handong.ac.kr') .collection(query['category']) - // .doc('place') - // .collection('place_url') + // .doc('place') + // .collection('place_url') .where('location', whereIn: place_list) .snapshots(); } @@ -103,6 +107,7 @@ class _Catchbox_detailState extends State { Color? bgColorBottomNavigationBar; Color? iconColor; + void _onSelectionChanged(DateRangePickerSelectionChangedArgs args) { setState(() { if (args.value is PickerDateRange) { @@ -117,9 +122,30 @@ class _Catchbox_detailState extends State { count = 0; for(int i = int.parse(_range1.substring(3,5)); i <= int.parse(_range2.substring(3,5)); i++){ - if(int.parse(_range2.substring(3,5)) == int.parse(_range1.substring(3,5))){ - if(count < 10) - for(int j = int.parse(_range1.substring(0,2)); j <= int.parse(_range2.substring(0,2)); j++){ + if(int.parse(_range2.substring(3,5)) == int.parse(_range1.substring(3,5))){ + if(count < 10) + for(int j = int.parse(_range1.substring(0,2)); j <= int.parse(_range2.substring(0,2)); j++){ + //format 맞추기 위해서 + if(j.toString().length == 1){ + _month_0 = '0' + j.toString(); + } + else _month_0 = j.toString(); + + if(j.toString().length == 1){ + _day_0 = '0' + i.toString(); + } + else _day_0 = i.toString(); + String temp = _month_0 + '/'+ _day_0 + '/' + _range1.substring(6,10); + num_list.add(temp); + count ++; + if(count == 10) break; + } + } + + else{ + if(count < 10){ + if(i == int.parse(_range1.substring(3,5))) + for(int j = int.parse(_range1.substring(0,2)); j <= days[i]; j++){ //format 맞추기 위해서 if(j.toString().length == 1){ _month_0 = '0' + j.toString(); @@ -135,48 +161,27 @@ class _Catchbox_detailState extends State { count ++; if(count == 10) break; } - } - - else{ - if(count < 10){ - if(i == int.parse(_range1.substring(3,5))) - for(int j = int.parse(_range1.substring(0,2)); j <= days[i]; j++){ - //format 맞추기 위해서 - if(j.toString().length == 1){ - _month_0 = '0' + j.toString(); - } - else _month_0 = j.toString(); - - if(j.toString().length == 1){ - _day_0 = '0' + i.toString(); - } - else _day_0 = i.toString(); - String temp = _month_0 + '/'+ _day_0 + '/' + _range1.substring(6,10); - num_list.add(temp); - count ++; - if(count == 10) break; + if(i == int.parse(_range2.substring(3,5))) + for(int j = 1; j <= int.parse(_range2.substring(0,2)); j++){ + //format 맞추기 위해서 + if(j.toString().length == 1){ + _month_0 = '0' + j.toString(); } - if(i == int.parse(_range2.substring(3,5))) - for(int j = 1; j <= int.parse(_range2.substring(0,2)); j++){ - //format 맞추기 위해서 - if(j.toString().length == 1){ - _month_0 = '0' + j.toString(); - } - else _month_0 = j.toString(); - - if(j.toString().length == 1){ - _day_0 = '0' + i.toString(); - } - else _day_0 = i.toString(); - String temp = _month_0 + '/'+ _day_0 + '/' + _range1.substring(6,10); - num_list.add(temp); - count ++; - if(count == 10) break; + else _month_0 = j.toString(); + + if(j.toString().length == 1){ + _day_0 = '0' + i.toString(); } - } + else _day_0 = i.toString(); + String temp = _month_0 + '/'+ _day_0 + '/' + _range1.substring(6,10); + num_list.add(temp); + count ++; + if(count == 10) break; + } } - print(i); } + print(i); + } //print(args.value.startDate - args.value.endDate); } else if (args.value is DateTime) { @@ -196,11 +201,14 @@ class _Catchbox_detailState extends State { _selectedIndex = index; print(_selectedIndex); selectedIndex0 = _selectedIndex; + main_colorList=[Color(0xffCFD2D9),Color(0xffCFD2D9),Color(0xffCFD2D9),Color(0xffCFD2D9)]; + main_colorList[index]=Color(0xff3A94EE); }); Navigator.push(context, MaterialPageRoute(builder: (context) { return MainHomePage(); })); } + print(_selectedIndex); } return Scaffold( @@ -260,374 +268,359 @@ class _Catchbox_detailState extends State { children: [ Expanded( child: Container( - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - //1. 날짜칩 - SizedBox(width: 20), - InkWell( - onTap: () { - if (_selectDateIcon) - setState(() { - num_list = []; - _selectPlace = '장소'; - _selectPlaceIcon = true; - _selectPlaceTextColor = Color(0xFF9FA5B2); - _selectPlaceColor = Color(0XFFF3F4F5); - _selectDateColor = Colors.blue; // primary[40]!; - _selectDateTextColor = Colors.white; - }); - if (_selectDateIcon) - // ignore: curly_braces_in_flow_control_structures - showModalBottomSheet( - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.only( - topLeft: Radius.circular(30.0), - topRight: Radius.circular(30.0))), - context: context, - builder: (BuildContext context) { - return SizedBox( - height: 1000, - child: Column( - children: [ - Padding( - padding: EdgeInsets.only( - top: 40.0, left: 40, right: 40), - child: SfDateRangePicker( - controller: _dataPickerController, - onSelectionChanged: - _onSelectionChanged, - selectionMode: DateRangePickerSelectionMode.range, - ), - ), - Padding( - padding: EdgeInsets.only( - left: 50.0, right: 30), - child: Container( - child: Row( - children: [ - TextButton( - child: Text( - '취소', - style: TextStyle( - color: Color.fromRGBO( - 159, 165, 178, 1)), - ), - onPressed: () { - Navigator.pop(context); - setState(() { - _selectDateColor = - Color(0XFFF3F4F5); - _selectDateTextColor = - Color(0xFF9FA5B2); - _range1 = ''; - //_range2 = ''; - _dataPickerController - .selectedRanges = null; - }); - }, - style: TextButton.styleFrom( - padding: EdgeInsets.zero, - minimumSize: Size(50, 30), - tapTargetSize: - MaterialTapTargetSize - .shrinkWrap, - alignment: - Alignment.centerLeft)), - Spacer(), - TextButton( - child: Text('확인'), - onPressed: () { - setState(() { - _selectDateColor = Colors.blue; // primary[40]!; - _selectDateTextColor = Colors.white; - _selectDate = _range1.substring(8, 10) + '.' + _range1.substring(3, 5) + - '.' + - _range1.substring(0, 2); - _selectDateSize = 80; - _selectDateIcon = false; - print("range $_range1"); - print("date:$_selectDate"); - }); - Navigator.pop(context); - }, - style: TextButton.styleFrom( - padding: EdgeInsets.zero, - minimumSize: Size(50, 30), - tapTargetSize: - MaterialTapTargetSize - .shrinkWrap, - alignment: - Alignment.centerLeft)) - ], - )), - ) - ], - ), - ); - }, - ); - else - setState(() { - _selectDateIcon = true; - _selectDate = '날짜'; - _selectDateColor = Color(0XFFF3F4F5); - _selectDateTextColor = Color(0xFF9FA5B2); - _selectDateSize = 67.2; - _range1 = ''; - //_range2 = ''; - }); - }, - //1-1 //날짜 칩 - child: Container( - width: _selectDateSize, - height: 30, - decoration: BoxDecoration( - color: _selectDateColor, - borderRadius: BorderRadius.circular(100.0)), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - _selectDate, - style: TextStyle( - color: _selectDateTextColor, - fontSize: 12), - ), - Icon( - _selectDateIcon - ? Icons.keyboard_arrow_down_outlined - : Icons.clear_outlined, - color: _selectDateTextColor), - ], - )), - ), - SizedBox(width: 10), - // 2. 장소칩 - InkWell( - onTap: () async { - setState(() { - //var respectsQuery = FirebaseFirestore.instance.collection('category').doc('user1').collection(query['category']).doc('place').collection('place'), - - //날짜 필터 초기화 - _selectDateIcon = true; - _selectDate = '날짜'; - _selectDateColor = Color(0XFFF3F4F5); - _selectDateTextColor = Color(0xFF9FA5B2); - _selectDateSize = 67.2; - _range1 = ''; - _range2 = ''; - num_list = []; - - //장소 필터 on - _selectPlaceColor = Colors.blue; // primary[40]!; - _selectPlaceTextColor = Colors.white; - place_list = []; - _selectPlaceIcon=true; - }); - - if (_selectPlaceIcon) - showDialog( - context: context, - builder:(BuildContext context) { - return AlertDialog( - shape: RoundedRectangleBorder( + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + //1. 날짜칩 + SizedBox(width: 20), + InkWell( + onTap: () { + if (_selectDateIcon) + setState(() { + num_list = []; + _selectPlace = '장소'; + _selectPlaceIcon = true; + _selectPlaceTextColor = Color(0xFF9FA5B2); + _selectPlaceColor = Color(0XFFF3F4F5); + _selectDateColor = Colors.blue; // primary[40]!; + _selectDateTextColor = Colors.white; + }); + if (_selectDateIcon) + // ignore: curly_braces_in_flow_control_structures + showModalBottomSheet( + shape: const RoundedRectangleBorder( borderRadius: BorderRadius.only( topLeft: Radius.circular(30.0), topRight: Radius.circular(30.0))), - insetPadding: EdgeInsets.only(top: 519), - content: Container( - height: 244, - width: 360, + context: context, + builder: (BuildContext context) { + return SizedBox( + height: 1000, child: Column( children: [ - Row( - children: [ - InkWell( - onTap:(){ - setState(() { - place_list.add("장량동"); - jangrangdong=!jangrangdong; - }); - }, - child: Container( - width: size.width*0.236, - height: size.height*0.0375, - decoration: BoxDecoration( - color: !jangrangdong?Color(0xffF3F4F5):_selectPlaceColor, - borderRadius: BorderRadius.circular(100.0)), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - '장량동', + Padding( + padding: EdgeInsets.only( + top: 40.0, left: 40, right: 40), + child: SfDateRangePicker( + controller: _dataPickerController, + onSelectionChanged: + _onSelectionChanged, + selectionMode: DateRangePickerSelectionMode.range, + ), + ), + Padding( + padding: EdgeInsets.only( + left: 50.0, right: 30), + child: Container( + child: Row( + children: [ + TextButton( + child: Text( + '취소', style: TextStyle( - fontSize: 12, - color: !jangrangdong?Color(0xff9FA5B2):_selectPlaceTextColor, - ), + color: Color.fromRGBO( + 159, 165, 178, 1)), ), + onPressed: () { + Navigator.pop(context); + setState(() { + _selectDateColor = + Color(0XFFF3F4F5); + _selectDateTextColor = + Color(0xFF9FA5B2); + _range1 = ''; + //_range2 = ''; + _dataPickerController + .selectedRanges = null; + }); + }, + style: TextButton.styleFrom( + padding: EdgeInsets.zero, + minimumSize: Size(50, 30), + tapTargetSize: + MaterialTapTargetSize + .shrinkWrap, + alignment: + Alignment.centerLeft)), + Spacer(), + TextButton( + child: Text('확인'), + onPressed: () { + setState(() { + _selectDateColor = Colors.blue; // primary[40]!; + _selectDateTextColor = Colors.white; + _selectDate = _range1.substring(8, 10) + '.' + _range1.substring(3, 5) + + '.' + + _range1.substring(0, 2); + _selectDateSize = 80; + _selectDateIcon = false; + print("range $_range1"); + print("date:$_selectDate"); + }); + Navigator.pop(context); + }, + style: TextButton.styleFrom( + padding: EdgeInsets.zero, + minimumSize: Size(50, 30), + tapTargetSize: + MaterialTapTargetSize + .shrinkWrap, + alignment: + Alignment.centerLeft)) + ], + )), + ) + ], + ), + ); + }, + ); + else + setState(() { + _selectDateIcon = true; + _selectDate = '날짜'; + _selectDateColor = Color(0XFFF3F4F5); + _selectDateTextColor = Color(0xFF9FA5B2); + _selectDateSize = 67.2; + _range1 = ''; + //_range2 = ''; + }); + }, + //1-1 //날짜 칩 + child: Container( + width: _selectDateSize, + height: 30, + decoration: BoxDecoration( + color: _selectDateColor, + borderRadius: BorderRadius.circular(100.0)), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + _selectDate, + style: TextStyle( + color: _selectDateTextColor, + fontSize: 12), + ), + Icon( + _selectDateIcon + ? Icons.keyboard_arrow_down_outlined + : Icons.clear_outlined, + color: _selectDateTextColor), + ], + )), + ), + SizedBox(width: 10), + // 2. 장소칩 + InkWell( + onTap: () async { + setState(() { + //var respectsQuery = FirebaseFirestore.instance.collection('category').doc('user1').collection(query['category']).doc('place').collection('place'), - ], - )), - ) - ], - ), - + //날짜 필터 초기화 + _selectDateIcon = true; + _selectDate = '날짜'; + _selectDateColor = Color(0XFFF3F4F5); + _selectDateTextColor = Color(0xFF9FA5B2); + _selectDateSize = 67.2; + _range1 = ''; + _range2 = ''; + num_list = []; + //장소 필터 on + _selectPlaceColor = Colors.blue; // primary[40]!; + _selectPlaceTextColor = Colors.white; + place_list = []; + _selectPlaceIcon=true; + }); - Container( - child: Row( - children: [ - SizedBox(width: 208), - TextButton( - child: Text('취소'), - onPressed: () { - Navigator.pop(context); - setState(() { - _selectPlaceColor = - Color(0XFFF3F4F5); - _selectPlaceTextColor = - Color(0xFF9FA5B2); - }); - }, - style: TextButton.styleFrom( - padding: EdgeInsets.zero, - minimumSize: Size(50, 30), - tapTargetSize: - MaterialTapTargetSize - .shrinkWrap, - alignment: Alignment - .centerLeft)), - SizedBox(width:25), - TextButton( - child: Text('확인'), - onPressed: () { - print("place_list------->"); - print(place_list); + if (_selectPlaceIcon) + showDialog( + context: context, + builder:(BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(30.0), + topRight: Radius.circular(30.0))), + insetPadding: EdgeInsets.only(top: 519), + content: Container( + height: 244, + width: 360, + child: Column( + children: [ + Row( + children: [ + InkWell( + onTap:(){ setState(() { - _selectPlaceIcon = false; - _selectPlaceColor = Colors - .blue; // primary[40]!; - _selectPlaceTextColor = - Colors.white; - if (place_list.isEmpty) { - _selectPlace = '장소'; - } else - _selectPlace = - place_list[0]; + place_list.add("흥해읍"); + jangrangdong=!jangrangdong; }); - Navigator.pop(context); }, - style: TextButton.styleFrom( - padding: EdgeInsets.zero, - minimumSize: Size(50, 30), - tapTargetSize: - MaterialTapTargetSize - .shrinkWrap, - alignment: - Alignment.centerLeft)) - ], - )) - ], - )), - ); - } + child: Container( + width: size.width*0.236, + height: size.height*0.0375, + decoration: BoxDecoration( + color: !jangrangdong?Color(0xffF3F4F5):_selectPlaceColor, + borderRadius: BorderRadius.circular(100.0)), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + '흥해읍', + style: TextStyle( + fontSize: 12, + color: !jangrangdong?Color(0xff9FA5B2):_selectPlaceTextColor, + ), + ), - ); - else - setState(() { - _selectPlaceIcon = true; - _selectPlace = '장소'; - _selectPlaceColor = Color(0XFFF3F4F5); - _selectPlaceTextColor = Color(0xFF9FA5B2); - }); - }, + ], + )), + ) + ], + ), - //// 장소 칩 - child: Container( - width: 70, - height: 30, - decoration: BoxDecoration( - color: _selectPlaceColor, - borderRadius: BorderRadius.circular(100.0)), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - _selectPlace,// _selectPlace, - style: TextStyle( - fontSize: 12, - color: _selectPlaceTextColor, - ), - ), - Icon( - _selectPlaceIcon - ? Icons.keyboard_arrow_down_outlined - : Icons.clear_outlined, - color: _selectPlaceTextColor), - ], - )), - ), - Spacer(), - // 임시 delete - if(pressed == true) - IconButton( - icon: Icon(Icons.delete), - color: Colors.lightBlue, - onPressed: (){ - for(int i = 0; i< 1000; i++){ - if(_checks_docs[i] != ''){ - FirebaseFirestore.instance.collection('category').doc('1234@handong.ac.kr').collection(query['category']).doc(_checks_docs[i]).delete(); - } - } - setState(() { - pressed = false; - _selectCheck = '선택'; - _checks.fillRange(0, _checks.length-1,false); - _checks_url.fillRange(0, _checks_url.length-1,''); - _checks_docs.fillRange(0, _checks_docs.length-1,''); - }); - }, - ), - //선택,취소버튼 - Container( - margin: EdgeInsets.zero, - width: (size.width - 170) / 3, - child: Align( - alignment: Alignment.centerLeft, - child: TextButton( - onPressed: () { - print(_checks); + + + Container( + child: Row( + children: [ + SizedBox(width: 208), + TextButton( + child: Text('취소'), + onPressed: () { + Navigator.pop(context); + setState(() { + _selectPlaceColor = + Color(0XFFF3F4F5); + _selectPlaceTextColor = + Color(0xFF9FA5B2); + }); + }, + style: TextButton.styleFrom( + padding: EdgeInsets.zero, + minimumSize: Size(50, 30), + tapTargetSize: + MaterialTapTargetSize + .shrinkWrap, + alignment: Alignment + .centerLeft)), + SizedBox(width:25), + TextButton( + child: Text('확인'), + onPressed: () { + print("place_list------->"); + print(place_list); + setState(() { + _selectPlaceIcon = false; + _selectPlaceColor = Colors + .blue; // primary[40]!; + _selectPlaceTextColor = + Colors.white; + if (place_list.isEmpty) { + _selectPlace = '장소'; + } else + _selectPlace = + place_list[0]; + }); + Navigator.pop(context); + }, + style: TextButton.styleFrom( + padding: EdgeInsets.zero, + minimumSize: Size(50, 30), + tapTargetSize: + MaterialTapTargetSize + .shrinkWrap, + alignment: + Alignment.centerLeft)) + ], + )) + ], + )), + ); + } + + ); + else setState(() { - if (_selectCheckIcon) { - pressed = true; - _selectCheck = '취소'; - _selectCheckColor = Colors.blue; // primary[40]!; - _selectCheckTextColor = Color(0XFFF3F4F5); - // _selectPlaceTextColor = Colors.red; - _selectCheckIcon = false; - } else { - pressed = false; - _selectCheckColor = Color(0XFFF3F4F5); - _selectCheck = '선택'; - _selectCheckTextColor = Color(0xFF9FA5B2); - _selectCheckIcon = true; - _checks.fillRange(0, _checks.length-1,false); - _checks_url.fillRange(0, _checks_url.length-1,''); - _checks_docs.fillRange(0, _checks_docs.length-1,''); - } + _selectPlaceIcon = true; + _selectPlace = '장소'; + _selectPlaceColor = Color(0XFFF3F4F5); + _selectPlaceTextColor = Color(0xFF9FA5B2); }); - }, - child: Text( - pressed ? "취소" : "선택", - style: TextStyle(fontSize: 12, color: Colors.grey), - ) + }, + + //// 장소 칩 + child: Container( + width: 70, + height: 30, + decoration: BoxDecoration( + color: _selectPlaceColor, + borderRadius: BorderRadius.circular(100.0)), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + _selectPlace,// _selectPlace, + style: TextStyle( + fontSize: 12, + color: _selectPlaceTextColor, + ), + ), + Icon( + _selectPlaceIcon + ? Icons.keyboard_arrow_down_outlined + : Icons.clear_outlined, + color: _selectPlaceTextColor), + ], + )), ), - ), + Spacer(), + // 임시 delete + + //선택,취소버튼 + Container( + margin: EdgeInsets.zero, + width: (size.width - 170) / 3, + child: Align( + alignment: Alignment.centerLeft, + child: TextButton( + onPressed: () { + + print(_checks); + setState(() { + if (_selectCheckIcon) { + check_num=0; + pressed = true; + _selectCheck = '취소'; + _selectCheckColor = Colors.blue; // primary[40]!; + _selectCheckTextColor = Color(0XFFF3F4F5); + // _selectPlaceTextColor = Colors.red; + _selectCheckIcon = false; + } else { + + pressed = false; + _selectCheckColor = Color(0XFFF3F4F5); + _selectCheck = '선택'; + _selectCheckTextColor = Color(0xFF9FA5B2); + _selectCheckIcon = true; + _checks.fillRange(0, _checks.length-1,false); + _checks_url.fillRange(0, _checks_url.length-1,''); + _checks_docs.fillRange(0, _checks_docs.length-1,''); + } + }); + }, + child: Text( + pressed ? "취소" : "선택", + style: TextStyle(fontSize: 12, color: Colors.grey), + ) + ), + ), + ), + ], ), - ], - ), - )), + )), ], ), ], @@ -671,162 +664,449 @@ class _Catchbox_detailState extends State { // ):Container(), // ], ), - bottomNavigationBar: Container( + bottomNavigationBar:pressed + ? Container( decoration: BoxDecoration( + color: Colors.white, borderRadius: BorderRadius.only( topRight: Radius.circular(30), topLeft: Radius.circular(30)), boxShadow: [ - BoxShadow(color: Colors.black38, spreadRadius: 0, blurRadius: 1), + BoxShadow(color: Colors.black, spreadRadius: 0, blurRadius: 0.5), ], ), - height: 70, + height: 100, child: ClipRRect( borderRadius: BorderRadius.only( topLeft: Radius.circular(30.0), topRight: Radius.circular(30.0), ), - child: BottomNavigationBar( - elevation: 10, - items: [ - BottomNavigationBarItem( - icon: Icon( - Icons.home, - color: iconColor, - ), - label: '오늘의 캐치', - ), - BottomNavigationBarItem( - icon: Icon( - Icons.bookmark, - color: iconColor, - ), - label: '커뮤니티', - ), - BottomNavigationBarItem( - icon: Icon( - Icons.image, - color: iconColor, - ), - label: '캐치박스', - ), - BottomNavigationBarItem( - icon: Icon( - Icons.account_circle_outlined, - color: iconColor, - ), - label: '마이페이지', + //// 선택 눌렀을 때 + child: Column( + children: [ + SizedBox( + height: size.height * 0.01, ), - ], + Row(children: [ + SizedBox(width: size.width * 0.4), + Text("$check_num 개의 사진이 선택됨", + style: labelMediumStyle( + color: Color.fromRGBO(26, 26, 26, 1))), + // Padding( + // padding: EdgeInsets.only(left: size.width * 0.15), + // child: pressed==true?TextButton( + // onPressed: () async { + // // for(int i = 0; i < 1000; i++){ + // // if(_checks[i]){ + // // try { + // // await FirebaseFirestore.instance + // // .collection("project_url") + // // .doc(query2['id']) + // // .collection(query2['id']) + // // .doc() + // // .set({ + // // "project": query2['id'], + // // "category": query['category'], + // // "url": _checks_url[i], + // // "user":"1234@handong.ac.kr",// FirebaseAuth.instance.currentUser!.email, + // // }); + // // } catch (e) { + // // print(e); + // // } + // // //_checks_url[i] + // // } + // // } + // + // Navigator.push(context, MaterialPageRoute(builder: (context) { + // return uploadCheck(); + // })); + // + // // await Future.delayed(Duration(seconds: 3)); + // // + // // Navigator.push(context, MaterialPageRoute(builder: (context) { + // // return MainHomePage(); + // // })); + // + // }, + // child: Text('올리기', style: labelMediumStyle( + // color: Color.fromRGBO(26, 26, 26, 1))), + // ):Container(), + // ), + SizedBox(width: size.width * 0.13), + //if(pressed == true) + IconButton( + + padding: EdgeInsets.all(0), + icon: Image.asset("assets/icons/trash_can.png", + + width:size.width*0.044, + ), + // Icon(Icons.delete), + //color: Colors.lightBlue, + + onPressed: (){ + showModalBottomSheet( + enableDrag: true, + isScrollControlled: true, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(30.0), + topRight: Radius.circular(30.0))), + context: context, + builder: (BuildContext context) { + return StatefulBuilder( + builder: (BuildContext context, StateSetter setState) { + return Container( + height: size.height * 0.266, + padding: EdgeInsets.fromLTRB(0, 20, 0, 0), + child: Column( + children: [ + SizedBox( + height: size.height * 0.05, + ), + + Text('사진을 삭제하시겠습니까?', + textAlign: TextAlign.center, + style: TextStyle( + + ), + ), + SizedBox( + height: size.height * 0.025, + ), + Text('삭제한 사진은 복구할 수 없습니다. ', + textAlign: TextAlign.center, + style: TextStyle( + + ), + ), + + SizedBox( + height: size.height * 0.025, + ), + Row( + children: [ + SizedBox( + width: size.width*0.055, + ), + TextButton(onPressed: (){ + Navigator.pop(context); + }, child: Text('취소', + style:TextStyle(color: Color(0xff9FA5B2)), + )), + SizedBox( + width: size.width*0.544, + ), + TextButton( + onPressed: (){ + for(int i = 0; i< 1000; i++){ + if(_checks_docs[i] != ''){ + FirebaseFirestore.instance.collection('category').doc('1234@handong.ac.kr').collection(query['category']).doc(_checks_docs[i]).delete(); + } + } + setState(() { + pressed = false; + _selectCheck = '선택'; + _checks.fillRange(0, _checks.length-1,false); + _checks_url.fillRange(0, _checks_url.length-1,''); + _checks_docs.fillRange(0, _checks_docs.length-1,''); + }); + + showModalBottomSheet( + enableDrag: true, + isScrollControlled: true, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(30.0), + topRight: Radius.circular(30.0))), + context: context, + builder: (BuildContext context) { + return StatefulBuilder( + builder: (BuildContext context, StateSetter setState) { + return Container( + height: size.height * 0.48, + padding: EdgeInsets.fromLTRB(0, 20, 0, 0), + child: Column( + children: [ + SizedBox( + height: size.height * 0.06, + ), + + SizedBox( + height:150, + child: Image.asset('assets/checkToFinish.gif')), + SizedBox( + height: size.height * 0.0475, + ), + Text('사진이 삭제되었습니다. '), + + SizedBox(height: size.height * 0.025), + + SizedBox( + height: 20, + ), + ElevatedButton( + style:ButtonStyle( + fixedSize: + MaterialStateProperty.all(Size(307, 50)), + backgroundColor: MaterialStateProperty.all( + Color(0xff3A94EE), + //_onTap3? primary[40] : onSecondaryColor, + ), + shape: MaterialStateProperty.all< + RoundedRectangleBorder>( + RoundedRectangleBorder( + borderRadius: BorderRadius.circular(30.0), + )), + ), + + child: Text('확인', + style: titleMediumStyle( + color: Color(0xffFAFBFB))), + onPressed: () { + print("here"); + Navigator.pop(context); + Navigator.pop(context); + + } + + ) + ], + ), + ); + }); + }, + ); + + }, child: Text('확인', + style: TextStyle( + color: Color(0xff3A94EE), + ), + )) + + ], + + ) - currentIndex: _selectedIndex, - //selectedLabelStyle: Theme.of(context).primaryTextTheme.caption, - showUnselectedLabels: true, - type: BottomNavigationBarType.fixed, - backgroundColor: bgColorBottomNavigationBar, - onTap: _onItemTapped, - selectedFontSize: 10, - unselectedFontSize: 10, + + // ElevatedButton( + // style:ButtonStyle( + // fixedSize: + // MaterialStateProperty.all(Size(307, 50)), + // backgroundColor: MaterialStateProperty.all( + // Color(0xff3A94EE), + // //_onTap3? primary[40] : onSecondaryColor, + // ), + // shape: MaterialStateProperty.all< + // RoundedRectangleBorder>( + // RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(30.0), + // )), + // ), + // + // child: Text('확인', + // style: titleMediumStyle( + // color: Color(0xffFAFBFB))), + // onPressed: () { + // for(int i = 0; i< 1000; i++){ + // if(_checks_docs[i] != ''){ + // FirebaseFirestore.instance.collection('category').doc('1234@handong.ac.kr').collection(query['category']).doc(_checks_docs[i]).delete(); + // } + // } + // setState(() { + // pressed = false; + // _selectCheck = '선택'; + // _checks.fillRange(0, _checks.length-1,false); + // _checks_url.fillRange(0, _checks_url.length-1,''); + // _checks_docs.fillRange(0, _checks_docs.length-1,''); + // }); + // Navigator.pop(context); + // + // } + // + // ) + ], + ), + ); + }); + }, + ); + + }, + ), + + ]), + ], ), ), + ): + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + topRight: Radius.circular(30), topLeft: Radius.circular(30)), + boxShadow: [ + BoxShadow(color: Colors.black38, spreadRadius: 0, blurRadius: 1), + ], + ), + height: 70, + child: ClipRRect( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(30.0), + topRight: Radius.circular(30.0), + ), + child: BottomNavigationBar( + elevation: 10, + items: [ + BottomNavigationBarItem( + icon: Image.asset( + 'assets/icons/bottombar/today_catch.png', + color:Color(0xffCFD2D9),// colorList[0], + width:size.width*0.055, + ), + label: '\n 오늘의 캐치', + ), + BottomNavigationBarItem( + icon: Image.asset( + 'assets/icons/bottombar/community.png', + color: Color(0xffCFD2D9),//colorList[1], + width:size.width*0.055, + ), + label: '\n 커뮤니티', + ), + // BottomNavigationBarItem( + // icon: Icon(Icons.add, color: Colors.transparent,), + // label: '카메라', + // ), + BottomNavigationBarItem( + icon:Image.asset( + 'assets/icons/bottombar/catchbox.png', + color: Color(0xff3A94EE),//colorList[2], + width:size.width*0.055, + ), + label: '\n 캐치박스', + ), + BottomNavigationBarItem( + icon: Image.asset( + 'assets/icons/bottombar/mypage.png', + color:Color(0xffCFD2D9),//colorList[3], + width:size.width*0.055, + ), + label: '\n 마이페이지', + ), + ], + selectedItemColor: Color(0xff3A94EE), + unselectedItemColor: Color(0xffCFD2D9), + currentIndex: selectedIndex0, + showUnselectedLabels: true, + type: BottomNavigationBarType.fixed, + backgroundColor: bgColorBottomNavigationBar, + selectedLabelStyle: labelSmallStyle(color:Color(0xff3A94EE)), + unselectedLabelStyle: labelSmallStyle(color:Color(0xffCFD2D9)), + onTap: _onItemTapped, + )), ), body: Container( - // child: Center( + // child: Center( child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Expanded( - child: Container( - margin: EdgeInsets.fromLTRB(10, 0, 10, 10), - child: Center( - child: StreamBuilder( - stream: stream_ordering(), - builder: (context, snapshot) { - if (snapshot.hasData) { - if (snapshot.data != null) { - print(snapshot.data!.docs.length); - return GridView.builder( - gridDelegate: - SliverGridDelegateWithFixedCrossAxisCount( - crossAxisCount: 3), - itemCount: snapshot.data!.docs.length, - padding: EdgeInsets.all(2.0), - itemBuilder: (BuildContext context, int index) { - QueryDocumentSnapshot x = - snapshot.data!.docs[index]; - return InkWell( - onLongPress: () { - setState(() { - pressed = true; - }); - }, - child: Stack( - children: [ - SizedBox( - height: 119.04, - width: 118.08, - child: Card( - // shape: RoundedRectangleBorder( - // borderRadius: BorderRadius.circular(15.0), - // ), - margin: - EdgeInsets.fromLTRB(5, 5, 5, 5), - clipBehavior: Clip.antiAlias, - child: Transform.rotate( - angle: (query['category'] == + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Expanded( + child: Container( + margin: EdgeInsets.fromLTRB(10, 0, 10, 10), + child: Center( + child: StreamBuilder( + stream: stream_ordering(), + builder: (context, snapshot) { + if (snapshot.hasData) { + if (snapshot.data != null) { + print(snapshot.data!.docs.length); + return GridView.builder( + gridDelegate: + SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 3), + itemCount: snapshot.data!.docs.length, + padding: EdgeInsets.all(2.0), + itemBuilder: (BuildContext context, int index) { + QueryDocumentSnapshot x = + snapshot.data!.docs[index]; + return InkWell( + onLongPress: () { + setState(() { + pressed = true; + }); + }, + child: Stack( + children: [ + SizedBox( + height: 119.04, + width: 118.08, + child: Card( + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(15.0), + // ), + margin: + EdgeInsets.fromLTRB(5, 5, 5, 5), + clipBehavior: Clip.antiAlias, + child: Transform.rotate( + angle: (query['category'] == 'kickboard' || - query['category'] == - 'traffic light') - ? 0 - : 90 * math.pi / 180, - child: Image.network( - x['url'], - fit: BoxFit.cover, + query['category'] == + 'traffic light') + ? 0 + : 90 * math.pi / 180, + child: Image.network( + x['url'], + fit: BoxFit.cover, + ), + )), ), - )), - ), - //Image.network(x['url'], fit: BoxFit.cover), - if (pressed == true) - Align( - alignment: Alignment.bottomRight, - child: Checkbox( - value: _checks[index], - onChanged: (newValue) { - setState(() { - _checks[index] = newValue!; - _checks_url[index] = x['url']; - _checks_docs[index] = x.id; - }); - }, - shape: RoundedRectangleBorder( - borderRadius: - BorderRadius.circular(10)), - checkColor: Colors.white, - activeColor: Color(0XFF007AFF), + //Image.network(x['url'], fit: BoxFit.cover), + if (pressed == true) + Align( + alignment: Alignment.bottomRight, + child: Checkbox( + value: _checks[index], + onChanged: (newValue) { + setState(() { + check_num=0; + _checks[index] = newValue!; + _checks_url[index] = x['url']; + _checks_docs[index] = x.id; + for(int i=0;i<_checks.length;i++){ + if(_checks[i]==true) + check_num=check_num+1; + } + }); + }, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(10)), + checkColor: Colors.white, + activeColor: Color(0XFF007AFF), + ), + ), + ], ), - ), - ], - ), - ); - }, - ); - } else { - return Container( - child: Center( - child: Text( - 'Es wurden noch keine Fotos im Chat gepostet.', - style: - TextStyle(fontSize: 20.0, color: Colors.grey), - textAlign: TextAlign.center, - ))); - } - } else { - return CircularProgressIndicator(); - } - }) - ), + ); + }, + ); + } else { + return Container( + child: Center( + child: Text( + 'Es wurden noch keine Fotos im Chat gepostet.', + style: + TextStyle(fontSize: 20.0, color: Colors.grey), + textAlign: TextAlign.center, + ))); + } + } else { + return CircularProgressIndicator(); + } + }) + ), + )), + ], )), - ], - )), ); } } diff --git a/lib/screen/mainHome.dart b/lib/screen/mainHome.dart index a1847cf..afdd1fe 100644 --- a/lib/screen/mainHome.dart +++ b/lib/screen/mainHome.dart @@ -4,65 +4,65 @@ import 'package:flutter/material.dart'; import 'package:sliding_switch/sliding_switch.dart'; import '../Auth/auth_service.dart'; +import '../utils/app_text_styles.dart'; import 'Camera/camera_load.dart'; import 'Community/HomePage.dart'; import 'MyPage/MyPage.dart'; import 'album/catchbox.dart'; + //import 'album/albumPage.dart'; import 'projectPage/progect_main.dart'; - - List cameras = []; int selectedIndex0 = 0; +List main_colorList=[Color(0xffCFD2D9),Color(0xffCFD2D9),Color(0xffCFD2D9),Color(0xffCFD2D9)]; class MainHomePage extends StatefulWidget { - - @override _HomePageState createState() => _HomePageState(); - } class _HomePageState extends State { -@override -void initState() { - // TODO: implement initState - super.initState(); - initCamera(); - -} - -void initCamera() async{ - cameras = await availableCameras(); - -} + @override + void initState() { + // TODO: implement initState + super.initState(); + initCamera(); + } + void initCamera() async { + cameras = await availableCameras(); + } Color? bgColorBottomNavigationBar; Color? iconColor; + + void _onItemTapped(int index) { setState(() { selectedIndex0 = index; print(selectedIndex0); + main_colorList=[Color(0xffCFD2D9),Color(0xffCFD2D9),Color(0xffCFD2D9),Color(0xffCFD2D9)]; + main_colorList[index]=Color(0xff3A94EE); + }); } -var my_list2 = ['홈', '커뮤니티','캐치박스','마이페이지']; + var my_list2 = ['홈', '커뮤니티', '캐치박스', '마이페이지']; - final List _widgetOptions = [ + final List _widgetOptions = [ projectPage(), HomePage(), Catchbox(), MYPage(), - ]; + ]; //String? user = FirebaseAuth.instance.currentUser!.email ?? FirebaseAuth.instance.currentUser!.displayName; @override Widget build(BuildContext context) { + final Size size = MediaQuery.of(context).size; return Scaffold( - body: SafeArea( child: _widgetOptions.elementAt(selectedIndex0), ), @@ -76,73 +76,73 @@ var my_list2 = ['홈', '커뮤니티','캐치박스','마이페이지']; ), height: 70, child: ClipRRect( - borderRadius: BorderRadius.only( - topLeft: Radius.circular(30.0), - topRight: Radius.circular(30.0), - ), - child: BottomNavigationBar( - - elevation: 10, - items: [ - BottomNavigationBarItem( - icon: Icon( - Icons.home, - color: iconColor, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(30.0), + topRight: Radius.circular(30.0), + ), + child: BottomNavigationBar( + elevation: 10, + items: [ + BottomNavigationBarItem( + icon: Image.asset( + 'assets/icons/bottombar/today_catch.png', + color: main_colorList[0], + width:size.width*0.055, + ), + label: '\n 오늘의 캐치', ), - label: '오늘의 캐치', - ), - BottomNavigationBarItem( - icon: Icon( - Icons.bookmark, - color: iconColor, + BottomNavigationBarItem( + icon: Image.asset( + 'assets/icons/bottombar/community.png', + color: main_colorList[1], + width:size.width*0.055, + ), + label: '\n 커뮤니티', ), - label: '커뮤니티', - ), - // BottomNavigationBarItem( - // icon: Icon(Icons.add, color: Colors.transparent,), - // label: '카메라', - // ), - BottomNavigationBarItem( - icon: Icon( - Icons.image, - color: iconColor, + // BottomNavigationBarItem( + // icon: Icon(Icons.add, color: Colors.transparent,), + // label: '카메라', + // ), + BottomNavigationBarItem( + icon:Image.asset( + 'assets/icons/bottombar/catchbox.png', + color: main_colorList[2], + width:size.width*0.055, + ), + label: '\n 캐치박스', ), - label: '캐치박스', - ), - BottomNavigationBarItem( - icon: Icon( - Icons.account_circle, - color: iconColor, + BottomNavigationBarItem( + icon: Image.asset( + 'assets/icons/bottombar/mypage.png', + color:main_colorList[3], + width:size.width*0.055, + ), + label: '\n 마이페이지', ), - label: '프로필', - ), - ], - currentIndex: selectedIndex0, - showUnselectedLabels: true, - type: BottomNavigationBarType.fixed, - backgroundColor: bgColorBottomNavigationBar, - onTap: _onItemTapped, - ) - ), + ], + selectedItemColor: Color(0xff3A94EE), + unselectedItemColor: Color(0xffCFD2D9), + currentIndex: selectedIndex0, + showUnselectedLabels: true, + type: BottomNavigationBarType.fixed, + backgroundColor: bgColorBottomNavigationBar, + selectedLabelStyle: labelSmallStyle(color:Color(0xff3A94EE)), + unselectedLabelStyle: labelSmallStyle(color:Color(0xffCFD2D9)), + onTap: _onItemTapped, + )), ), - - - - floatingActionButton: FloatingActionButton( backgroundColor: Colors.white, - elevation:5, + elevation: 5, child: SizedBox( - width:20, + width: 20, height: 20, child: Image.asset('assets/camera.png'), - ), onPressed: () { Navigator.push(context, MaterialPageRoute(builder: (context) { return CamerLoad(cameras); })); - }, ), floatingActionButtonLocation: diff --git a/lib/screen/projectPage/progect_main.dart b/lib/screen/projectPage/progect_main.dart index f20e7a7..c3ab1e1 100644 --- a/lib/screen/projectPage/progect_main.dart +++ b/lib/screen/projectPage/progect_main.dart @@ -2,6 +2,7 @@ import 'package:catch2_0_1/screen/projectPage/project_detail2.dart'; import 'package:catch2_0_1/screen/projectPage/project_detail1.dart'; import 'package:catch2_0_1/utils/app_colors.dart'; import 'package:cloud_firestore/cloud_firestore.dart'; +import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/material.dart'; import 'package:flutter/src/widgets/container.dart'; import 'package:flutter/src/widgets/framework.dart'; @@ -50,7 +51,7 @@ class _projectPageState extends State { return Container( margin: EdgeInsets.fromLTRB(24, 30, 24, 16), decoration: BoxDecoration( - border: Border.all( + border: Border.all( width: 1, ), ), @@ -109,7 +110,7 @@ class _add_personalState extends State {*/ elevation: 0, centerTitle: true, title: Text( - '오늘의 캐치', + FirebaseAuth.instance.currentUser!.email.toString(),// '오늘의 캐치', style: titleMediumStyle(color: Colors.black), ), ), @@ -126,13 +127,20 @@ class _add_personalState extends State {*/ onChanged: (bool value) { setState(() { part = value; + print(part); }); }, height: 40, - animationDuration: const Duration(milliseconds: 200), - onTap: () {}, + animationDuration: const Duration(milliseconds: 100), + onTap: () { + if (part == false) + part = false; + else + part = true; + }, + onDoubleTap: () {}, onSwipe: () {}, textOff: "모든 프로젝트", @@ -169,14 +177,14 @@ class _add_personalState extends State {*/ Expanded( child: StreamBuilder( stream: - FirebaseFirestore.instance.collection('project').snapshots(), + FirebaseFirestore.instance.collection('project').snapshots(), builder: (context, snapshot) { if (!snapshot.hasData) return Center( child: Text( - ' 업로드 된\n글이 없어요 :(', - style: labelLargeStyle(color: Color(0XFF9FA5B2)), - )); + ' 업로드 된\n글이 없어요 :(', + style: labelLargeStyle(color: Color(0XFF9FA5B2)), + )); if (part == true) return ListView.builder( itemCount: snapshot.data!.docs.length, @@ -191,10 +199,10 @@ class _add_personalState extends State {*/ right: size.width * 0.05, bottom: size.height * 0.01), child: Card( - elevation: 3, + elevation: 0.3, shape: RoundedRectangleBorder( borderRadius: - BorderRadius.all(Radius.circular(16))), + BorderRadius.all(Radius.circular(16))), child: InkWell( //카드 누르는 경우 onTap: () { @@ -213,13 +221,13 @@ class _add_personalState extends State {*/ Padding( padding: EdgeInsets.only( top: size.height * 0.03, - right: size.width * 0.7), + right: size.width * 0.745), child: Text( "D-" + snapshot .data!.docs[index]['final_day'] .toString(), - style: labelLargeStyle( + style: labelSmallStyle( color: Color(0xff9FA5B2)), ), ), @@ -236,15 +244,24 @@ class _add_personalState extends State {*/ subtitle: Row( children: [ Container( + height: size.height * 0.025, decoration: BoxDecoration( borderRadius: BorderRadius.all( - Radius.circular(10)), - color: Color(0xffF3F4F5), + Radius.circular(20)), + border: Border.all( + width: 1, + color: Color(0xffCFD2D9), + ), + color: Colors.white, ), margin: EdgeInsets.only( top: size.height * 0.01), child: Padding( - padding: EdgeInsets.all(8), + padding: EdgeInsets.only( + top: size.height * 0.000, + bottom: size.height * 0.000, + left: size.width * 0.02, + right: size.width * 0.02), child: Text( snapshot.data!.docs[index]['type'] .toString(), @@ -266,6 +283,39 @@ class _add_personalState extends State {*/ ), ], ), + // Row( + // children: [ + // Container( + // decoration: BoxDecoration( + // borderRadius: BorderRadius.all( + // Radius.circular(10)), + // color: Color(0xffF3F4F5), + // ), + // margin: EdgeInsets.only( + // top: size.height * 0.01), + // child: Padding( + // padding: EdgeInsets.all(8), + // child: Text( + // snapshot.data!.docs[index]['type'] + // .toString(), + // style: labelMediumStyle( + // color: Color(0xff9FA5B2)), + // ), + // ), + // ), + // Padding( + // padding: EdgeInsets.only( + // top: size.height * 0.01, + // left: size.width * 0.02), + // child: Text( + // snapshot.data!.docs[index]['user'] + // .toString(), + // style: labelMediumStyle( + // color: Color(0xff9FA5B2)), + // ), + // ), + // ], + // ), ), Row( children: [ @@ -273,47 +323,54 @@ class _add_personalState extends State {*/ margin: EdgeInsets.only( left: size.width * 0.05, bottom: size.height * 0.02, - top: size.height * 0.01), - width: size.width * 0.60, + top: size.height * 0.02), + width: size.width * 0.65, height: size.height * 0.01, child: ClipRRect( borderRadius: BorderRadius.all( Radius.circular(46)), child: LinearProgressIndicator( value: snapshot.data! - .docs[index]['percentage'] - .toDouble() * + .docs[index]['percentage'] + .toDouble() * 0.01, - valueColor: !snapshot.data!.docs[index]['part_user'].contains('1234@handong.ac.kr') + valueColor: snapshot + .data!.docs[index] + ['participate'] == + 0 ? AlwaysStoppedAnimation( - Color(0xff3A94EE)) + Color(0xff3A94EE)) : AlwaysStoppedAnimation( - Color(0xff00D796)), + Color(0xff00D796)), backgroundColor: Color(0xffE7E8EC), ), ), ), Padding( padding: EdgeInsets.only( + top: size.height * 0.01, bottom: size.height * 0.02, left: size.width * 0.03), - child: !snapshot.data!.docs[index]['part_user'].contains('1234@handong.ac.kr') + child: snapshot.data!.docs[index] + ['participate'] == + 0 ? Image.asset( - 'assets/coin.png', - width: 20, - ) + 'assets/coin.png', + width: 20, + ) : Image.asset( - 'assets/coin2.png', - width: 20, - ), + 'assets/coin2.png', + width: 20, + ), ), Padding( padding: EdgeInsets.only( + top: size.height * 0.01, bottom: size.height * 0.02, left: size.width * 0.01), child: Text( snapshot.data!.docs[index]['cash'] - .toString() + + .toString() + "00", style: labelMediumStyle( color: Color(0xff1A1A1A)), @@ -326,12 +383,7 @@ class _add_personalState extends State {*/ ), ); else - return Container( - child: Text( - 'asdfsdfgsdf', - style: TextStyle(color: Colors.amber), - ), - ); + return Container(); }); if (part == false) return ListView.builder( @@ -343,154 +395,183 @@ class _add_personalState extends State {*/ left: size.width * 0.05, right: size.width * 0.05, bottom: size.height * 0.01), - child: Card( - elevation: 1, - shape: RoundedRectangleBorder( - borderRadius: - BorderRadius.all(Radius.circular(16))), - child: InkWell( - //카드 누르는 경우 - onTap: () { - if(snapshot.data!.docs[index]['part_user'].contains('1234@handong.ac.kr')){ - Navigator.push( - context, - MaterialPageRoute( - builder: (BuildContext context) => - todaycatchdetail3(query: x), - )); - } else { - Navigator.push( - context, - MaterialPageRoute( - builder: (BuildContext context) => - todaycatchdetail(query: x), - )); - } - - print('모든 프로젝트'); - print(snapshot.data!.docs[index]['id'] - .toString()); - }, - child: Column(children: [ - Padding( - padding: EdgeInsets.only( - top: size.height * 0.03, - right: size.width * 0.7), - child: Text( - "D-" + - snapshot.data!.docs[index]['final_day'] - .toString(), - style: labelLargeStyle( - color: Color(0xff9FA5B2)), + child: Container( + decoration: new BoxDecoration( + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(.1), + blurRadius: 50.0, // soften the shadow + spreadRadius: 0.0, //extend the shadow + offset: Offset( + 10.0, // Move to right 10 horizontally + 10.0, // Move to bottom 10 Vertically ), - ), - ListTile( - title: Padding( + ) + ], + ), + child: Card( + elevation: 1, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.all(Radius.circular(16))), + child: InkWell( + //카드 누르는 경우 + onTap: () { + if (snapshot.data!.docs[index] + ['participate'] == + 1) { + Navigator.push( + context, + MaterialPageRoute( + builder: (BuildContext context) => + todaycatchdetail3(query: x), + )); + } else { + Navigator.push( + context, + MaterialPageRoute( + builder: (BuildContext context) => + todaycatchdetail(query: x), + )); + } + + print('모든 프로젝트'); + print(snapshot.data!.docs[index]['id'] + .toString()); + }, + child: Column(children: [ + Padding( padding: EdgeInsets.only( - top: size.height * 0.01), + top: size.height * 0.03, + right: size.width * 0.74), child: Text( - snapshot.data!.docs[index]['title'] - .toString(), - style: titleMediumStyle(), + "D-" + + snapshot + .data!.docs[index]['final_day'] + .toString(), + style: labelSmallStyle( + color: Color(0xff9FA5B2)), ), ), - subtitle: Row( - children: [ - Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.all( - Radius.circular(20)), - border: Border.all( - width: 1, - color: Color(0xffCFD2D9), + ListTile( + title: Padding( + padding: EdgeInsets.only( + top: size.height * 0.01), + child: Text( + snapshot.data!.docs[index]['title'] + .toString(), + style: titleMediumStyle(), + ), + ), + subtitle: Row( + children: [ + Container( + height: size.height * 0.025, + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(20)), + border: Border.all( + width: 1, + color: Color(0xffCFD2D9), + ), + color: Colors.white, + ), + margin: EdgeInsets.only( + top: size.height * 0.01), + child: Padding( + padding: EdgeInsets.only( + top: size.height * 0.000, + bottom: size.height * 0.000, + left: size.width * 0.02, + right: size.width * 0.02), + child: Text( + snapshot.data!.docs[index]['type'] + .toString(), + style: labelMediumStyle( + color: Color(0xff9FA5B2)), + ), ), - color: Colors.white, ), - margin: EdgeInsets.only( - top: size.height * 0.01), - child: Padding( + Padding( padding: EdgeInsets.only( - top: size.height * 0.005, - bottom: size.height * 0.005, - left: size.width * 0.02, - right: size.width * 0.02), + top: size.height * 0.01, + left: size.width * 0.02), child: Text( - snapshot.data!.docs[index]['type'] + snapshot.data!.docs[index]['user'] .toString(), style: labelMediumStyle( color: Color(0xff9FA5B2)), ), ), - ), - Padding( - padding: EdgeInsets.only( - top: size.height * 0.01, - left: size.width * 0.02), - child: Text( - snapshot.data!.docs[index]['user'] - .toString(), - style: labelMediumStyle( - color: Color(0xff9FA5B2)), - ), - ), - ], + ], + ), ), - ), - Row( - children: [ - Container( - margin: EdgeInsets.only( - left: size.width * 0.05, - bottom: size.height * 0.03, - top: size.height * 0.01), - width: size.width * 0.60, - height: size.height * 0.01, - child: ClipRRect( - borderRadius: BorderRadius.all( - Radius.circular(16)), - child: LinearProgressIndicator( - value: snapshot.data! - .docs[index]['percentage'] - .toDouble() * - 0.01, - valueColor: !snapshot.data!.docs[index]['part_user'].contains('1234@handong.ac.kr') - ? AlwaysStoppedAnimation( - Color(0xff3A94EE)) - : AlwaysStoppedAnimation( - Color(0xff00D796)), - backgroundColor: Color(0xffE7E8EC), + Padding( + padding: EdgeInsets.only( + top: size.height * 0.015), + child: Row( + children: [ + Container( + margin: EdgeInsets.only( + left: size.width * 0.05, + bottom: size.height * 0.03, + top: size.height * 0.01), + width: size.width * 0.65, + height: size.height * 0.01, + child: ClipRRect( + borderRadius: BorderRadius.all( + Radius.circular(16)), + child: LinearProgressIndicator( + value: snapshot.data! + .docs[index]['percentage'] + .toDouble() * + 0.01, + valueColor: snapshot + .data!.docs[index] + ['participate'] == + 0 + ? AlwaysStoppedAnimation< + Color>(Color(0xff3A94EE)) + : AlwaysStoppedAnimation< + Color>(Color(0xff00D796)), + backgroundColor: + Color(0xffE7E8EC), + ), + ), ), - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: size.height * 0.02, - left: size.width * 0.03), - child: !snapshot.data!.docs[index]['part_user'].contains('1234@handong.ac.kr') - ? Image.asset( - 'assets/coin.png', - width: 20, - ) - : Image.asset( - 'assets/coin2.png', - width: 20, - ), + Padding( + padding: EdgeInsets.only( + bottom: size.height * 0.02, + left: size.width * 0.03), + child: snapshot.data!.docs[index] + ['participate'] == + 0 + ? Image.asset( + 'assets/coin.png', + width: 20, + ) + : Image.asset( + 'assets/coin2.png', + width: 20, + ), + ), + Padding( + padding: EdgeInsets.only( + bottom: size.height * 0.02, + left: size.width * 0.01), + child: Text( + snapshot.data!.docs[index]['cash'] + .toString() + + "00", + style: labelMediumStyle( + color: Color(0xff1A1A1A)), + ), + ) + ], ), - Padding( - padding: EdgeInsets.only( - bottom: size.height * 0.02, - left: size.width * 0.01), - child: Text( - snapshot.data!.docs[index]['cash'] - .toString() + - "00", - style: labelMediumStyle( - color: Color(0xff1A1A1A)), - ), - ) - ], - ), - ]), + ), + ]), + ), ), ), ); @@ -506,11 +587,12 @@ class _add_personalState extends State {*/ animatedIcon: AnimatedIcons.menu_close, animatedIconTheme: IconThemeData(size: 22.0), */ - backgroundColor: Colors.blueAccent, + backgroundColor: Color(0xff3A94EE), + childrenButtonSize: Size(60, 70), child: Icon( - Icons.edit_outlined, + Icons.add, color: Colors.white, - size: 25, + size: 36, ), buttonSize: const Size(60, 60), useRotationAnimation: false, @@ -519,28 +601,29 @@ class _add_personalState extends State {*/ // height: 30.w, // fit : BoxFit.fitWidth), activeIcon: Icons.close, + activeForegroundColor: Colors.white, + animatedIconTheme: IconThemeData( - size: 25, - color: primary[0]?.withOpacity(0.4), + size: 36, + // color: primary[0]?.withOpacity(0.4), ), // this is ignored if animatedIcon is non null - curve: Curves.bounceIn, + // curve: Curves.bounceIn, overlayColor: Colors.black, - overlayOpacity: 0.8, - activeBackgroundColor: Colors.black.withOpacity(0.8), + overlayOpacity: 0.6, + activeBackgroundColor: Color.fromRGBO(97, 98, 98, 0.9), //childrenButtonSize: (const Size.round(100)), //activeForegroundColor: Colors.white, - + spacing: 10, foregroundColor: Colors.white, - elevation: 0.0, + elevation: 0.5, direction: SpeedDialDirection.up, - shape: const CircleBorder(), + // shape: const CircleBorder(), children: [ SpeedDialChild( child: Image.asset( 'assets/icons/Subtract.png', - height: 20, - width: 16, + height: 30, //fit : BoxFit.fitWidth ), shape: RoundedRectangleBorder( @@ -552,17 +635,9 @@ class _add_personalState extends State {*/ label: '기업, 공공기관 프로젝트 의뢰하기', // labelWidget, //labelShadow : Colors.black.withOpacity(0.6), - labelStyle: TextStyle( - fontFamily: 'NotoSansKR', - fontWeight: FontWeight.w700, - fontSize: 16, - height: 22 / 16, - letterSpacing: 0, - //fontWeight: FontWeight.w500, - color: Colors.white, - //color: primary[0]?.withOpacity(0.02), - ), - labelBackgroundColor: Colors.black.withOpacity(0.6), + labelStyle: titleMediumStyle(color: Colors.white), + // labelBackgroundColor: Colors.black.withOpacity(0.6), + labelBackgroundColor: Colors.grey.withOpacity(0), onTap: () { Navigator.push( context, @@ -572,9 +647,8 @@ class _add_personalState extends State {*/ }), SpeedDialChild( child: Image.asset( - 'assets/icons/Union.png', + 'assets/icons/personal.png', height: 24, - width: 21.61, //fit : BoxFit.fitWidth ), shape: RoundedRectangleBorder( diff --git a/lib/screen/projectPage/project_detail1.dart b/lib/screen/projectPage/project_detail1.dart index 0b40379..1b24d8e 100644 --- a/lib/screen/projectPage/project_detail1.dart +++ b/lib/screen/projectPage/project_detail1.dart @@ -50,13 +50,11 @@ class _todaycatchdetailState extends State { children: [ Row( children: [ - SizedBox( - width: 10, - ), Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text('Catcher', + // d- 몇인지 보여줘야 함. + Text('D-', style: labelLargeStyle(color: Color(0xff9FA5B2))), ], ), @@ -73,41 +71,85 @@ class _todaycatchdetailState extends State { // children: [Icon(Icons.more_vert)])) ], ), - SizedBox(height: 10), + SizedBox(height: size.height * 0.02), Row( children: [ - Chip( - label: Container( - height: 15, - child: Text('기업', - style: - labelMediumStyle(color: Color(0xff9FA5B2)))), - backgroundColor: Color(0xffF3F4F5)), - SizedBox(width: 5), - Text(query['cash'].toString(), - style: titleSmallStyle(color: Color(0xff9FA5B2))), - Text('캐시', style: titleSmallStyle(color: Color(0xff9FA5B2))), + Container( + width: size.width * 0.1, + height: size.height * 0.03, + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(20)), + border: Border.all( + width: 1, + color: Color(0xffCFD2D9), + ), + color: Colors.white, + ), + child: Center( + child: Text('기업', + style: labelMediumStyle(color: Color(0xff9FA5B2))), + )), + SizedBox(width: size.width * 0.016), + Text('Comapany Co',//query['cash'].toString(), + style: labelMediumStyle(color: Color(0xff9FA5B2))), + // Text('캐시', style: labelMediumStyle(color: Color(0xff9FA5B2))), ], ), - SizedBox(height: 20), + SizedBox(height: size.height * 0.04), Text(query['content'], style: bodyMediumStyle(color: Color(0xff1A1A1A))), SizedBox(height: 30), Row( children: [ + Image.asset( + 'assets/coin.png', + width: 20, + ), + Padding( + padding: EdgeInsets.only( + left: size.width * 0.01, right: size.width * 0.03), + child: Text( + //snapshot.data!.docs[index]['cash'] + // .toString() + + "100", + style: labelLargeStyle(color: Color(0xff1A1A1A))), + ), for (int i = 0; i < query['category'].length; i++) Padding( padding: EdgeInsets.only(right: 10), //height: 25.h, - child: Chip( - label: Text(query['category'][i], - style: labelMediumStyle(color: Color(0xff1A1A1A))), - backgroundColor: Color(0xFFF3F4F5), - deleteIcon: Icon( - Icons.close, - size: 8, - ), - ), + child: Container( + // width: size.width * 0.18, + height: size.height * 0.035, + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(20)), + border: Border.all( + width: 1, + color: Color(0xffCFD2D9), + ), + color: Colors.white, + ), + child: Padding( + padding: EdgeInsets.only( + left: size.width * 0.02, + right: size.width * 0.02), + child: Center( + child: Text(query['category'][i], + style: labelMediumStyle( + color: Color(0xff1A1A1A))), + // Text('기업', + // style: labelMediumStyle(color: Color(0xff9FA5B2))), + ), + )), + // Chip( + // label: Text(query['category'][i], + // style: labelMediumStyle(color: Color(0xff1A1A1A))), + // backgroundColor: Color(0xFFF3F4F5), + // deleteIcon: Icon( + // Icons.close, + // size: 8, + // ), + // ), ), ], ), @@ -116,7 +158,7 @@ class _todaycatchdetailState extends State { borderRadius: BorderRadius.all(Radius.circular(10)), child: LinearProgressIndicator( value: int.parse(query['percentage'].toString()) * 0.01, - minHeight: 8, + minHeight: size.height * 0.015, valueColor: AlwaysStoppedAnimation(primary[50]), backgroundColor: primary[0]!.withOpacity(0.05), ), @@ -124,16 +166,17 @@ class _todaycatchdetailState extends State { SizedBox(height: 10), Row( children: [ - Text(query['percentage'].toString(), - style: labelLargeStyle(color: Color(0xff9FA5B2))), - Text('% 달성', - style: labelLargeStyle(color: Color(0xff9FA5B2))), + // Text(query['percentage'].toString(), + // style: labelLargeStyle(color: Color(0xff9FA5B2))), + // Text('% 달성', + // style: labelLargeStyle(color: Color(0xff9FA5B2))), Expanded( child: Row( mainAxisAlignment: MainAxisAlignment.end, children: [ - Text('${query['final_day'].toString()}일 후 마감', - style: labelSmallStyle(color: Color(0xff9FA5B2))) + Text( + '100장 중 ${query['percentage'].toString()}장이 수집되었어요 !', + style: labelSmallStyle(color: Color(0xff1A1A1A))) ]), ) ], @@ -158,7 +201,7 @@ class _todaycatchdetailState extends State { return StatefulBuilder( builder: (BuildContext context, StateSetter setState) { return Container( - height: size.height * 0.52, + height: size.height * 0.57, padding: EdgeInsets.fromLTRB(0, 20, 0, 0), child: Column( children: [ @@ -167,7 +210,7 @@ class _todaycatchdetailState extends State { ), InkWell( child: Container( - padding: EdgeInsets.fromLTRB(18, 20, 19, 20), + padding: EdgeInsets.fromLTRB(18, 17, 19, 20), decoration: BoxDecoration( border: onTap ? Border.all( @@ -175,7 +218,7 @@ class _todaycatchdetailState extends State { color: Color(0xFF3A94EE), ) : Border.all( - color: Colors.white, + color: Color(0xffCFD2D9), ), color: onTap ? Color(0xFFF2F8FE) : Colors.white, @@ -184,34 +227,40 @@ class _todaycatchdetailState extends State { topRight: Radius.circular(20), bottomLeft: Radius.circular(20), bottomRight: Radius.circular(20)), - boxShadow: [ - BoxShadow( - color: Color(0xFFCFD2D9), - spreadRadius: 1, - blurRadius: 50, - //offset: Offset(0, 3), // changes position of shadow - ), - ], + // boxShadow: [ + // BoxShadow( + // color: Color(0xFFCFD2D9), + // spreadRadius: 1, + // blurRadius: 50, + // //offset: Offset(0, 3), // changes position of shadow + // ), + // ], ), - width: 312, + width: size.width * 0.86, child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - IconButton( - color: onTap - ? Colors.blueAccent - : Color(0xFFCFD2D9), - onPressed: () { - setState(() { - onTap = !onTap; - print(onTap); - }); - if (onTap == true && onTap2 == true) // - _onTap3 = true; - else - _onTap3 = false; - }, - icon: Icon(Icons.check), + Padding( + padding: EdgeInsets.only( + right: size.width * 0.02, + top: size.height * 0.022), + child: IconButton( + color: onTap + ? Colors.blueAccent + : Color(0xFFCFD2D9), + onPressed: () { + setState(() { + onTap = !onTap; + print(onTap); + }); + if (onTap == true && + onTap2 == true) // + _onTap3 = true; + else + _onTap3 = false; + }, + icon: Icon(Icons.check), + ), ), Column( crossAxisAlignment: @@ -219,7 +268,7 @@ class _todaycatchdetailState extends State { mainAxisAlignment: MainAxisAlignment.start, children: [ - Text('개인정보 및 데이터 수집 및 이용 동의', + Text('개인정보 및 데이터 수집 및 이용 동의\n', style: titleSmallStyle( color: Color(0xff1A1A1A))), //SizedBox(height: 16.h), @@ -282,7 +331,7 @@ class _todaycatchdetailState extends State { color: Color(0xFF3A94EE), ) : Border.all( - color: Colors.white, + color: Color(0xffCFD2D9), ), color: onTap2 ? Color(0xFFF2F8FE) : Colors.white, @@ -291,34 +340,40 @@ class _todaycatchdetailState extends State { topRight: Radius.circular(20), bottomLeft: Radius.circular(20), bottomRight: Radius.circular(20)), - boxShadow: [ - BoxShadow( - color: Color(0xFFCFD2D9), - spreadRadius: 1, - blurRadius: 50, - //offset: Offset(0, 3), // changes position of shadow - ), - ], + // boxShadow: [ + // BoxShadow( + // color: Color(0xFFCFD2D9), + // spreadRadius: 1, + // blurRadius: 50, + // //offset: Offset(0, 3), // changes position of shadow + // ), + // ], ), - width: 312, + width: size.width * 0.86, child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - IconButton( - color: onTap2 - ? Colors.blueAccent - : Color(0xFFCFD2D9), - onPressed: () { - setState(() { - onTap2 = !onTap2; - print(onTap); - }); - if (onTap == true && onTap2 == true) // - _onTap3 = true; - else - _onTap3 = false; - }, - icon: Icon(Icons.check), + Padding( + padding: EdgeInsets.only( + right: size.width * 0.02, + top: size.height * 0.022), + child: IconButton( + color: onTap2 + ? Colors.blueAccent + : Color(0xFFCFD2D9), + onPressed: () { + setState(() { + onTap2 = !onTap2; + print(onTap); + }); + if (onTap == true && + onTap2 == true) // + _onTap3 = true; + else + _onTap3 = false; + }, + icon: Icon(Icons.check), + ), ), Column( crossAxisAlignment: @@ -326,7 +381,7 @@ class _todaycatchdetailState extends State { mainAxisAlignment: MainAxisAlignment.start, children: [ - Text('개인정보 및 데이터 수집 및 이용 동의', + Text('개인정보 및 데이터 수집 및 이용 동의\n', style: titleSmallStyle( color: Color(0xff1A1A1A))), //SizedBox(height: 16.h), @@ -379,7 +434,7 @@ class _todaycatchdetailState extends State { }, ), SizedBox( - height: 20, + height: size.height * 0.04, ), ElevatedButton( // backgroundColor: _onTap3? primary[40] : Color(0xFFCFD2D9), @@ -388,7 +443,7 @@ class _todaycatchdetailState extends State { // ), style: ButtonStyle( fixedSize: - MaterialStateProperty.all(Size(307, 58)), + MaterialStateProperty.all(Size(size.width * 0.86, size.height * 0.075)), backgroundColor: MaterialStateProperty.all( _onTap3 ? primary[40] : Color(0xFFCFD2D9), //_onTap3? primary[40] : onSecondaryColor, @@ -410,23 +465,16 @@ class _todaycatchdetailState extends State { // .collection('project') // .doc( // 'cLxKtSGWwhUVJp972FCh').toString()); - - var userlist=query['part_user']; - if(!userlist.contains('1234@handong.ac.kr')) - userlist.add('1234@handong.ac.kr'); - print(query['id']); FirebaseFirestore.instance .collection('project') .doc(query['id']) - .update({ - 'participate':1, - 'part_user':userlist - }); - Navigator.push(context, - MaterialPageRoute(builder: (context) { - return MainHomePage(); - })); + .update({'participate': 1}); + Navigator.pop(context); + // Navigator.push(context, + // MaterialPageRoute(builder: (context) { + // return MainHomePage(); + // })); } // if(_onTap3 == true) diff --git a/lib/screen/projectPage/project_detail2.dart b/lib/screen/projectPage/project_detail2.dart index e54d89b..e9b3f16 100644 --- a/lib/screen/projectPage/project_detail2.dart +++ b/lib/screen/projectPage/project_detail2.dart @@ -1,6 +1,7 @@ import 'package:camera/camera.dart'; import 'package:catch2_0_1/utils/app_text_styles.dart'; import 'package:cloud_firestore/cloud_firestore.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -12,7 +13,7 @@ import '../mainHome.dart'; // import 'camera/camera_page.dart'; // import 'catchbox2.dart'; - +List cameras = []; class todaycatchdetail3 extends StatefulWidget { final QueryDocumentSnapshot query; @@ -40,6 +41,7 @@ class _todaycatchdetail3State extends State { @override Widget build(BuildContext context) { + final Size size = MediaQuery.of(context).size; return Scaffold( appBar: AppBar( automaticallyImplyLeading: false, @@ -57,14 +59,10 @@ class _todaycatchdetail3State extends State { children: [ Row( children: [ - SizedBox( - width: 10, - ), Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text('Catcher', - style: labelLargeStyle(color: Colors.black)), + Text('D-49', style: labelLargeStyle(color: Colors.black)), ], ), Expanded( @@ -74,33 +72,54 @@ class _todaycatchdetail3State extends State { IconButton( icon: Icon(Icons.more_vert), onPressed: () { + _showActionSheet(context); FirebaseFirestore.instance .collection('project') .doc(query['id']) .update({'participate': 0}); - Navigator.push(context, - MaterialPageRoute(builder: (context) { - return MainHomePage(); - })); + // Navigator.push(context, + // MaterialPageRoute(builder: (context) { + // return MainHomePage(); + // })); }, ) ])) ], ), - SizedBox(height: 20), - Text(query['title'], style: titleLargeStyle(color: Colors.black)), - SizedBox(height: 10), + SizedBox(height: size.height * 0.015), + Row( + children: [ + Text(query['title'], + style: titleLargeStyle(color: Colors.black)), + SizedBox( + width: size.width * 0.02, + ), + Image.asset('assets/icons/greenCheck.png', + height: size.height * 0.03) + ], + ), + SizedBox(height: size.height * 0.015), Row( children: [ //if(query['participate'] == 1) - Chip( - label: Container( - height: 15, - child: Text('참여중', - style: labelMediumStyle(color: Colors.black))), - backgroundColor: Color(0xFF00D796)), - SizedBox(width: 5), + Container( + width: size.width * 0.1, + height: size.height * 0.03, + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(20)), + border: Border.all( + width: 1, + color: Color(0xffCFD2D9), + ), + color: Colors.white, + ), + child: Center( + child: Text('기업', + style: labelMediumStyle(color: Color(0xff9FA5B2))), + )), + SizedBox(width: size.width * 0.02), + // 텍스트 다름 Text(query['cash'].toString(), style: titleSmallStyle(color: Colors.black)), Text('캐시', style: titleSmallStyle(color: Colors.black)), @@ -112,13 +131,36 @@ class _todaycatchdetail3State extends State { SizedBox(height: 30), Row( children: [ + Image.asset( + 'assets/coin2.png', + width: 20, + ), + SizedBox(width: size.width * 0.01), + Text('${query['cash'].toString()}00', + style: labelLargeStyle(color: Colors.black)), + SizedBox(width: size.width * 0.03), for (int i = 0; i < query['category'].length; i++) Padding( padding: EdgeInsets.only(right: 10), - child: Chip( - label: Text(query['category'][i], - style: labelMediumStyle(color: Colors.black)), - backgroundColor: Color(0xFFF3F4F5)), + child: Container( + height: size.height * 0.03, + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(20)), + border: Border.all( + width: 1, + color: Color(0xffCFD2D9), + ), + color: Colors.white, + ), + child: Padding( + padding: EdgeInsets.only( + left: size.width * 0.03, + right: size.width * 0.03), + child: Center( + child: Text(query['category'][i], + style: labelMediumStyle(color: Colors.black)), + ), + )), ), ], ), @@ -127,7 +169,7 @@ class _todaycatchdetail3State extends State { borderRadius: BorderRadius.all(Radius.circular(10)), child: LinearProgressIndicator( value: 0.04, - minHeight: 8, + minHeight: size.height * 0.015, valueColor: AlwaysStoppedAnimation(Color(0xff00D796)), backgroundColor: Color(0xFFF3F4F5), ), @@ -135,15 +177,13 @@ class _todaycatchdetail3State extends State { SizedBox(height: 10), Row( children: [ - Text(query['percentage'].toString(), - style: labelLargeStyle(color: Colors.black)), - Text('% 달성', style: labelLargeStyle(color: Colors.black)), Expanded( child: Row( mainAxisAlignment: MainAxisAlignment.end, children: [ - Text('${query['final_day'].toString()}일 후 마감', - style: labelSmallStyle(color: Colors.black)) + Text( + '100장 중 ${query['percentage'].toString()}장이 수집되었어요 !', + style: labelSmallStyle(color: Color(0xff1A1A1A))) ]), ) ], @@ -155,32 +195,42 @@ class _todaycatchdetail3State extends State { padding: EdgeInsetsDirectional.fromSTEB(24, 0, 24, 25), child: Row( children: [ - CircleAvatar( - radius: 30, - backgroundColor: Colors.blueAccent, - child: IconButton( + Container( + decoration: BoxDecoration( color: Colors.white, - onPressed: () async { - // Navigator.push(context, MaterialPageRoute(builder: (context) { - // return catchme(); - // })); + shape: BoxShape.circle, + boxShadow: [ + BoxShadow( + blurRadius: 10, color: Colors.grey, spreadRadius: 0) + ], + ), + child: CircleAvatar( + radius: 30, + backgroundColor: Color(0xff3A94EE), + child: IconButton( + color: Colors.white, + onPressed: () async { + // Navigator.push(context, MaterialPageRoute(builder: (context) { + // return catchme(); + // })); - Navigator.push(context, - MaterialPageRoute(builder: (context) { - return CamerLoad(cameras); - })); - // - // Navigator.push(context, MaterialPageRoute(builder: (context) { - // return CameraPage(cameras); - // })); - }, - icon: Icon(Icons.camera_alt_outlined), + Navigator.push(context, + MaterialPageRoute(builder: (context) { + return CamerLoad(cameras); + })); + // + // Navigator.push(context, MaterialPageRoute(builder: (context) { + // return CameraPage(cameras); + // })); + }, + icon: Icon(Icons.camera_alt_outlined), + ), ), ), SizedBox(width: 16), Expanded( child: FloatingActionButton( - backgroundColor: Colors.blueAccent, + backgroundColor: Color(0xff3A94EE), onPressed: () async { Navigator.push( context, @@ -198,6 +248,33 @@ class _todaycatchdetail3State extends State { ], ))); } + + void _showActionSheet(BuildContext context) { + showCupertinoModalPopup( + context: context, + builder: (BuildContext context) => CupertinoActionSheet( + actions: [ + CupertinoActionSheetAction( + isDestructiveAction: true, + // isDefaultAction: true, + onPressed: () { + Navigator.push(context, MaterialPageRoute(builder: (context) { + return MainHomePage(); + })); + }, + child: const Text('프로젝트 참여 취소하기'), + ), + ], + cancelButton: CupertinoActionSheetAction( + // isDestructiveAction: true, + onPressed: () { + Navigator.pop(context); + }, + child: const Text('취소'), + ), + ), + ); + } } class MyClipper extends CustomClipper { diff --git a/lib/utils/widget.dart b/lib/utils/widget.dart index 4677dd5..18ee126 100644 --- a/lib/utils/widget.dart +++ b/lib/utils/widget.dart @@ -3,16 +3,25 @@ import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:flutter/material.dart'; class MyWidget { + + Widget DivderLineMyCash() { + return Divider( + color: Color(0XFFE7E8EC), + height: 20, + thickness: 1, + indent: 15, + endIndent: 15); + } Widget logoImage() { - return Container( - height: 49, - width: 111, - alignment: Alignment.topCenter, - child: Image.asset('assets/LOGO.jpg'), - ); -} + return Container( + height: 49, + width: 111, + alignment: Alignment.topCenter, + child: Image.asset('assets/LOGO.jpg'), + ); + } - Widget IconImage(){ + Widget IconImage() { return Image.asset( '', height: 70, @@ -21,32 +30,31 @@ class MyWidget { Widget EnterRoomButton() { return IconButton( - onPressed: (){}, - icon: Image.asset('assets/Make_room_button.png', - height: 200, - width: 145, - ) - ); + onPressed: () {}, + icon: Image.asset( + 'assets/Make_room_button.png', + height: 200, + width: 145, + )); } - Widget MakeRoomButton() { + Widget MakeRoomButton() { return IconButton( - onPressed: (){}, - icon: Image.asset('assets/Go_room_button.png', - height: 200, - width: 145, - ) - ); + onPressed: () {}, + icon: Image.asset( + 'assets/Go_room_button.png', + height: 200, + width: 145, + )); } Widget DivderLine() { return Divider( - color: Color(0XFFE7E8EC), - height: 1, - thickness: 1, - indent: 15, - endIndent: 15 - ); + color: Color(0XFFE7E8EC), + height: 10, + thickness: 1, + indent: 3, + endIndent: 5); } } diff --git a/pubspec.yaml b/pubspec.yaml index 6f423d5..579479e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -109,6 +109,9 @@ flutter: - assets/icons/chat_map.png - assets/icons/chat_photo.png - assets/icons/chaticon.png + - assets/icons/mypage/MYcoin.png + - assets/account/ + - assets/icons/bottombar/ # - images/a_dot_burr.jpeg # - images/a_dot_ham.jpeg