diff --git a/.vscode/launch.json b/.vscode/launch.json
deleted file mode 100644
index 2071b9e..0000000
--- a/.vscode/launch.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- // IntelliSense를 사용하여 가능한 특성에 대해 알아보세요.
- // 기존 특성에 대한 설명을 보려면 가리킵니다.
- // 자세한 내용을 보려면 https://go.microsoft.com/fwlink/?linkid=830387을(를) 방문하세요.
- "version": "0.2.0",
- "configurations": [
- {
- "name": "Flutter",
- "request": "launch",
- "type": "dart"
- },
- {
- "name": "Flutter (profile mode)",
- "request": "launch",
- "type": "dart",
- "flutterMode": "profile"
- },
- {
- "name": "Flutter (release mode)",
- "request": "launch",
- "type": "dart",
- "flutterMode": "release"
- }
- ]
-}
\ No newline at end of file
diff --git a/android/.gitignore b/android/.gitignore
new file mode 100644
index 0000000..6f56801
--- /dev/null
+++ b/android/.gitignore
@@ -0,0 +1,13 @@
+gradle-wrapper.jar
+/.gradle
+/captures/
+/gradlew
+/gradlew.bat
+/local.properties
+GeneratedPluginRegistrant.java
+
+# Remember to never publicly share your keystore.
+# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
+key.properties
+**/*.keystore
+**/*.jks
diff --git a/android/app/build.gradle b/android/app/build.gradle
new file mode 100644
index 0000000..f56b525
--- /dev/null
+++ b/android/app/build.gradle
@@ -0,0 +1,72 @@
+def localProperties = new Properties()
+def localPropertiesFile = rootProject.file('local.properties')
+if (localPropertiesFile.exists()) {
+ localPropertiesFile.withReader('UTF-8') { reader ->
+ localProperties.load(reader)
+ }
+}
+
+def flutterRoot = localProperties.getProperty('flutter.sdk')
+if (flutterRoot == null) {
+ throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
+}
+
+def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
+if (flutterVersionCode == null) {
+ flutterVersionCode = '1'
+}
+
+def flutterVersionName = localProperties.getProperty('flutter.versionName')
+if (flutterVersionName == null) {
+ flutterVersionName = '1.0'
+}
+
+apply plugin: 'com.android.application'
+apply plugin: 'kotlin-android'
+apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
+
+android {
+ namespace "com.example.suwon"
+ compileSdkVersion flutter.compileSdkVersion
+ ndkVersion flutter.ndkVersion
+
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+
+ kotlinOptions {
+ jvmTarget = '1.8'
+ }
+
+ sourceSets {
+ main.java.srcDirs += 'src/main/kotlin'
+ }
+
+ defaultConfig {
+ // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
+ applicationId "com.example.suwon"
+ // You can update the following values to match your application needs.
+ // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
+ minSdkVersion flutter.minSdkVersion
+ targetSdkVersion flutter.targetSdkVersion
+ versionCode flutterVersionCode.toInteger()
+ versionName flutterVersionName
+ }
+
+ buildTypes {
+ release {
+ // TODO: Add your own signing config for the release build.
+ // Signing with the debug keys for now, so `flutter run --release` works.
+ signingConfig signingConfigs.debug
+ }
+ }
+}
+
+flutter {
+ source '../..'
+}
+
+dependencies {
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
+}
diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml
new file mode 100644
index 0000000..399f698
--- /dev/null
+++ b/android/app/src/debug/AndroidManifest.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..d1d507c
--- /dev/null
+++ b/android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/android/app/src/main/kotlin/com/example/suwon/MainActivity.kt b/android/app/src/main/kotlin/com/example/suwon/MainActivity.kt
new file mode 100644
index 0000000..3cd393e
--- /dev/null
+++ b/android/app/src/main/kotlin/com/example/suwon/MainActivity.kt
@@ -0,0 +1,6 @@
+package com.example.suwon
+
+import io.flutter.embedding.android.FlutterActivity
+
+class MainActivity: FlutterActivity() {
+}
diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml
new file mode 100644
index 0000000..f74085f
--- /dev/null
+++ b/android/app/src/main/res/drawable-v21/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml
new file mode 100644
index 0000000..304732f
--- /dev/null
+++ b/android/app/src/main/res/drawable/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..db77bb4
Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..17987b7
Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..09d4391
Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..d5f1c8d
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..4d6372e
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml
new file mode 100644
index 0000000..06952be
--- /dev/null
+++ b/android/app/src/main/res/values-night/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..cb1ef88
--- /dev/null
+++ b/android/app/src/main/res/values/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml
new file mode 100644
index 0000000..399f698
--- /dev/null
+++ b/android/app/src/profile/AndroidManifest.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/android/build.gradle b/android/build.gradle
new file mode 100644
index 0000000..f7eb7f6
--- /dev/null
+++ b/android/build.gradle
@@ -0,0 +1,31 @@
+buildscript {
+ ext.kotlin_version = '1.7.10'
+ repositories {
+ google()
+ mavenCentral()
+ }
+
+ dependencies {
+ classpath 'com.android.tools.build:gradle:7.3.0'
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
+ }
+}
+
+allprojects {
+ repositories {
+ google()
+ mavenCentral()
+ }
+}
+
+rootProject.buildDir = '../build'
+subprojects {
+ project.buildDir = "${rootProject.buildDir}/${project.name}"
+}
+subprojects {
+ project.evaluationDependsOn(':app')
+}
+
+tasks.register("clean", Delete) {
+ delete rootProject.buildDir
+}
diff --git a/android/gradle.properties b/android/gradle.properties
new file mode 100644
index 0000000..94adc3a
--- /dev/null
+++ b/android/gradle.properties
@@ -0,0 +1,3 @@
+org.gradle.jvmargs=-Xmx1536M
+android.useAndroidX=true
+android.enableJetifier=true
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..3c472b9
--- /dev/null
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
diff --git a/android/settings.gradle b/android/settings.gradle
new file mode 100644
index 0000000..44e62bc
--- /dev/null
+++ b/android/settings.gradle
@@ -0,0 +1,11 @@
+include ':app'
+
+def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
+def properties = new Properties()
+
+assert localPropertiesFile.exists()
+localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
+
+def flutterSdkPath = properties.getProperty("flutter.sdk")
+assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
+apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
diff --git a/assets/Exit.svg b/assets/Exit.svg
deleted file mode 100644
index 1d96145..0000000
--- a/assets/Exit.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-
diff --git a/assets/Report button.svg b/assets/Report button.svg
deleted file mode 100644
index 8fd0751..0000000
--- a/assets/Report button.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-
diff --git a/assets/User.svg b/assets/User.svg
deleted file mode 100644
index 212264e..0000000
--- a/assets/User.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-
diff --git a/assets/offchatbt.svg b/assets/offchatbt.svg
deleted file mode 100644
index 43a66b8..0000000
--- a/assets/offchatbt.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-
diff --git a/assets/onchatbt.svg b/assets/onchatbt.svg
deleted file mode 100644
index 27b8150..0000000
--- a/assets/onchatbt.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-
diff --git a/assets/Group.png b/asstes/Group.png
similarity index 100%
rename from assets/Group.png
rename to asstes/Group.png
diff --git a/assets/Icon_menu.svg b/asstes/Icon_menu.svg
similarity index 100%
rename from assets/Icon_menu.svg
rename to asstes/Icon_menu.svg
diff --git a/assets/SUCHAT.png b/asstes/SUCHAT.png
similarity index 100%
rename from assets/SUCHAT.png
rename to asstes/SUCHAT.png
diff --git a/assets/Vector6.png b/asstes/Vector6.png
similarity index 100%
rename from assets/Vector6.png
rename to asstes/Vector6.png
diff --git a/assets/bubble.png b/asstes/bubble.png
similarity index 100%
rename from assets/bubble.png
rename to asstes/bubble.png
diff --git a/assets/bubble_main.PNG b/asstes/bubble_main.PNG
similarity index 100%
rename from assets/bubble_main.PNG
rename to asstes/bubble_main.PNG
diff --git a/assets/close.png b/asstes/close.png
similarity index 100%
rename from assets/close.png
rename to asstes/close.png
diff --git a/assets/feedback.svg b/asstes/feedback.svg
similarity index 100%
rename from assets/feedback.svg
rename to asstes/feedback.svg
diff --git a/assets/font/KCC-Chassam.otf b/asstes/font/KCC-Chassam.otf
similarity index 100%
rename from assets/font/KCC-Chassam.otf
rename to asstes/font/KCC-Chassam.otf
diff --git a/assets/font/KCC-Chassam.ttf b/asstes/font/KCC-Chassam.ttf
similarity index 100%
rename from assets/font/KCC-Chassam.ttf
rename to asstes/font/KCC-Chassam.ttf
diff --git a/assets/font/Pretendard-Light.ttf b/asstes/font/Pretendard-Light.ttf
similarity index 100%
rename from assets/font/Pretendard-Light.ttf
rename to asstes/font/Pretendard-Light.ttf
diff --git a/assets/font/Pretendard-Regular.ttf b/asstes/font/Pretendard-Regular.ttf
similarity index 100%
rename from assets/font/Pretendard-Regular.ttf
rename to asstes/font/Pretendard-Regular.ttf
diff --git a/assets/font/Pretendard-SemiBold.ttf b/asstes/font/Pretendard-SemiBold.ttf
similarity index 100%
rename from assets/font/Pretendard-SemiBold.ttf
rename to asstes/font/Pretendard-SemiBold.ttf
diff --git a/assets/logout.svg b/asstes/logout.svg
similarity index 100%
rename from assets/logout.svg
rename to asstes/logout.svg
diff --git a/assets/onclikmenu.svg b/asstes/onclikmenu.svg
similarity index 100%
rename from assets/onclikmenu.svg
rename to asstes/onclikmenu.svg
diff --git a/assets/policy.svg b/asstes/policy.svg
similarity index 100%
rename from assets/policy.svg
rename to asstes/policy.svg
diff --git a/assets/profile.svg b/asstes/profile.svg
similarity index 100%
rename from assets/profile.svg
rename to asstes/profile.svg
diff --git a/assets/vector.svg b/asstes/vector.svg
similarity index 100%
rename from assets/vector.svg
rename to asstes/vector.svg
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index 960c3b7..5ff8545 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -168,7 +168,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 1430;
+ LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "";
TargetAttributes = {
331C8080294A63A400263BE5 = {
diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
index 87131a0..e42adcb 100644
--- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -1,6 +1,6 @@
LoginVM()),
+ ChangeNotifierProvider(create: (context) => LoginViewModel()),
ChangeNotifierProvider(
- create: (context) => SignupVM()), // 추가: SignupViewModel 제공
- ChangeNotifierProvider(create: (context) => AccountRecoveryVM()),
- ChangeNotifierProvider(create: (context) => ChatViewModel()),
+ create: (context) => SignupViewModel()), // 추가: SignupViewModel 제공
+ ChangeNotifierProvider(
+ create: (context) => AccountRecoveryViewModel()),
],
child: MaterialApp(
debugShowCheckedModeBanner: false,
- home: LoginScreen(),
+ home: NewLoignMain(),
),
);
}
diff --git a/lib/models/chat_model.dart b/lib/models/chat_model.dart
deleted file mode 100644
index 52c6db1..0000000
--- a/lib/models/chat_model.dart
+++ /dev/null
@@ -1,23 +0,0 @@
-class Message {
- final String roomId;
- final String sender;
- final String contents;
-
- Message({required this.roomId, required this.sender, required this.contents});
-
- factory Message.fromJson(Map json) {
- return Message(
- roomId: json['roomId'],
- sender: json['sender'],
- contents: json['contents'],
- );
- }
-
- Map toJson() {
- return {
- 'roomId': roomId,
- 'sender': sender,
- 'contents': contents,
- };
- }
-}
diff --git a/lib/models/user_model.dart b/lib/models/user_model.dart
index 5376f71..a395fed 100644
--- a/lib/models/user_model.dart
+++ b/lib/models/user_model.dart
@@ -1,9 +1,11 @@
class UserModel {
- final String account, password, email, nickname;
+ final String id;
+ final String password;
+ final String email;
- UserModel.fromJson(Map json)
- : account = json["account"],
- password = json["password"],
- email = json["email"],
- nickname = json["nickname"];
+ UserModel({
+ required this.id,
+ required this.password,
+ required this.email,
+ });
}
diff --git a/lib/viewmodels/AccountRecoveryVM.dart b/lib/viewmodels/AccountRecovery_viewmodel.dart
similarity index 94%
rename from lib/viewmodels/AccountRecoveryVM.dart
rename to lib/viewmodels/AccountRecovery_viewmodel.dart
index 1b12018..0b92b54 100644
--- a/lib/viewmodels/AccountRecoveryVM.dart
+++ b/lib/viewmodels/AccountRecovery_viewmodel.dart
@@ -1,11 +1,12 @@
import 'package:flutter/material.dart';
-class AccountRecoveryVM extends ChangeNotifier {
+class AccountRecoveryViewModel extends ChangeNotifier {
String _id = '';
String _password = '';
String _email = '';
String _validationCode = '';
+
bool _idError = false;
bool _pwError = false;
bool _emailError = false;
@@ -19,6 +20,7 @@ class AccountRecoveryVM extends ChangeNotifier {
TextEditingController pwMatchController = TextEditingController();
TextEditingController ValidationCodeController = TextEditingController();
+
bool get idError => _idError;
bool get pwError => _pwError;
bool get emailError => _emailError;
@@ -76,7 +78,7 @@ class AccountRecoveryVM extends ChangeNotifier {
bool validateEmail(String value) {
final RegExp emailRegExp =
- RegExp(r'^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$');
+ RegExp(r'^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$');
_isEmailValid = emailRegExp.hasMatch(value);
notifyListeners();
return _isEmailValid;
@@ -88,11 +90,11 @@ class AccountRecoveryVM extends ChangeNotifier {
//
String email = _email;
print('eamil: $email');
+
}
}
-
Future Search_PW() async {
- if (validateEmail(_email) && !_idError) {
+ if(validateEmail(_email)&& !_idError) {
// 이메일 및 ID 검증
// 인증코드 전송 및 검증
String id = _id;
@@ -104,4 +106,4 @@ class AccountRecoveryVM extends ChangeNotifier {
print('validationCode = $validationCode');
}
}
-}
+}
\ No newline at end of file
diff --git a/lib/viewmodels/ChattingVM.dart b/lib/viewmodels/ChattingVM.dart
deleted file mode 100644
index 8803107..0000000
--- a/lib/viewmodels/ChattingVM.dart
+++ /dev/null
@@ -1,50 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:stomp_dart_client/stomp.dart';
-import 'package:stomp_dart_client/stomp_config.dart';
-import 'package:stomp_dart_client/stomp_frame.dart';
-import 'dart:convert';
-import 'package:suwon/models/chat_model.dart';
-
-class ChatViewModel extends ChangeNotifier {
- StompClient? client;
- String serverUrl = 'ws://3.35.83.91:8080/stomp';
- String sendEndpoint = '/pub/chat/message/1234';
- List chatMessages = [];
-
- ChatViewModel() {
- client = StompClient(
- config: StompConfig(
- url: serverUrl,
- onConnect: onConnect,
- onWebSocketError: (dynamic error) => print(error.toString()),
- ),
- );
- }
-
- void initialize() {
- client!.activate();
- }
-
- void onConnect(StompFrame frame) {
- client!.subscribe(
- destination: '/sub/chat/room/1234',
- callback: (StompFrame frame) {
- if (frame.body != null) {
- Map jsonData = json.decode(frame.body!);
- Message message = Message.fromJson(jsonData);
- chatMessages.add(message);
- notifyListeners(); // 새로운 메시지가 추가될 때마다 호출
- }
- },
- );
- }
-
- void sendMessage(String message) {
- client!.send(
- destination: sendEndpoint,
- body: json.encode(
- Message(roomId: '1234', sender: 'your_name', contents: message)
- .toJson()),
- );
- }
-}
diff --git a/lib/viewmodels/LoginVM.dart b/lib/viewmodels/LoginVM.dart
deleted file mode 100644
index 0dbae9a..0000000
--- a/lib/viewmodels/LoginVM.dart
+++ /dev/null
@@ -1,59 +0,0 @@
-import 'package:flutter/material.dart';
-import 'dart:convert';
-import 'package:http/http.dart' as http;
-import 'package:suwon/models/user_model.dart';
-
-class LoginVM extends ChangeNotifier {
- String _loginResult = '';
- String get loginResult => _loginResult;
-
- // 사용자 ID 및 비밀번호를 저장하는 변수들
- String _userid = '';
- String _userpw = '';
-
- // 사용자 ID를 업데이트하는 메서드
- void setUserid(String value) {
- _userid = value;
- }
-
- // 사용자 비밀번호를 업데이트하는 메서드
- void setUserpw(String value) {
- _userpw = value;
- }
-
- Future login() async {
- try {
- final apiUrl = Uri.parse('http://3.35.83.91:8080/member/sign-in');
- final requestBody = {
- "account": _userid,
- "password": _userpw,
- };
-
- final response = await http.post(
- apiUrl,
- headers: {
- 'Content-Type': 'application/json',
- },
- body: json.encode(requestBody),
- );
-
- if (response.statusCode == 200) {
- final Map data = json.decode(response.body);
- if (data['success'] != null && data['success']) {
- _loginResult = '아이디 또는 비밀번호가 다릅니다';
- print('서버 응답 바디: ${response.body}');
- } else {
- _loginResult = '로그인 성공';
- print('서버 응답 바디: ${response.body}');
- }
- } else {
- _loginResult = '서버 오류: ${response.statusCode}';
- }
- } catch (error) {
- _loginResult = '오류: $error';
- }
-
- // 상태가 변경되었음을 알림
- notifyListeners();
- }
-}
diff --git a/lib/viewmodels/login_viewmodel.dart b/lib/viewmodels/login_viewmodel.dart
new file mode 100644
index 0000000..42b2fba
--- /dev/null
+++ b/lib/viewmodels/login_viewmodel.dart
@@ -0,0 +1,28 @@
+import 'package:flutter/material.dart';
+
+class LoginViewModel extends ChangeNotifier {
+ String _userid = '';
+ String _userpw = '';
+
+ String get userid => _userid;
+ String get userpw => _userpw;
+
+ void setUserid(String value) {
+ _userid = value;
+ notifyListeners();
+ }
+
+ void setUserpw(String value) {
+ _userpw = value;
+ notifyListeners();
+ }
+
+ Future login() async {
+ // 여기에서 실제 로그인 로직을 수행하고 결과를 반환합니다.
+ // 예를 들어, 서버와 통신하여 사용자 인증을 검증할 수 있습니다.
+ await Future.delayed(Duration(seconds: 2)); // 가상의 지연 시간 추가
+
+ // 가상의 로그인 결과 반환
+ return _userid == 'userid' && _userpw == 'userpw';
+ }
+}
diff --git a/lib/viewmodels/SignupVM.dart b/lib/viewmodels/signup_viewmodel.dart
similarity index 55%
rename from lib/viewmodels/SignupVM.dart
rename to lib/viewmodels/signup_viewmodel.dart
index 708764e..2ad25bc 100644
--- a/lib/viewmodels/SignupVM.dart
+++ b/lib/viewmodels/signup_viewmodel.dart
@@ -1,15 +1,13 @@
import 'package:flutter/material.dart';
-import 'package:http/http.dart' as http;
-import 'package:suwon/models/user_model.dart';
-import 'dart:convert';
-class SignupVM extends ChangeNotifier {
- String id = '';
- String password = '';
- String email = '';
- String nickname = '';
+class SignupViewModel extends ChangeNotifier {
+ String _id = '';
+ String _password = '';
+ String _email = '';
+ String _nickname = '';
+ String _mbti = '';
+ String _self = ''; //자기소개
- bool btActivation = true;
bool _idError = false;
bool _pwError = false;
bool _emailError = false;
@@ -39,7 +37,6 @@ class SignupVM extends ChangeNotifier {
void validateIdInput(String value) {
if (value.length >= 4 && value.length <= 16) {
_idError = false;
- btActivation = false;
} else {
_idError = true;
}
@@ -49,7 +46,6 @@ class SignupVM extends ChangeNotifier {
void validatePwInput(String value) {
if (value.length >= 6 && value.length <= 20) {
_pwError = false;
- btActivation = false;
} else {
_pwError = true;
}
@@ -57,19 +53,17 @@ class SignupVM extends ChangeNotifier {
}
void validatePwMatch(String value) {
- if (pwController.text == value) {
- _pwMatch = false;
- btActivation = false;
- } else {
+ if (pwController.text != value) {
_pwMatch = true;
+ } else {
+ _pwMatch = false;
}
notifyListeners();
}
- void validateNickNameInput(String value) {
+ void validateNickName(String value) {
if (value.length < 9) {
_nicknameError = false;
- btActivation = false;
} else {
_nicknameError = true;
}
@@ -86,14 +80,6 @@ class SignupVM extends ChangeNotifier {
notifyListeners();
}
- void truebt(btActivation) {
- if (_idError && _pwError && _pwMatch && _nicknameError == false) {
- btActivation = false;
- } else {
- btActivation = true;
- }
- }
-
bool validateEmail(String value) {
final RegExp emailRegExp =
RegExp(r'^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$');
@@ -102,41 +88,17 @@ class SignupVM extends ChangeNotifier {
return _isEmailValid;
}
- Future signup(UserModel userModel) async {
- try {
- // Convert UserModel to Map
- Map userMap = {
- "account": userModel.account,
- "password": userModel.password,
- "email": userModel.email,
- "nickname": userModel.nickname,
- };
-
- // Encode Map to JSON String
- String signupData = json.encode(userMap);
-
- // Make a POST request to your backend API
- final response = await http.post(
- Uri.parse("http://3.35.83.91:8080/member/sign-up"),
- headers: {
- 'Content-Type': 'application/json',
- },
- body: signupData,
- );
-
- print(userMap);
-
- // 응답 상태 확인
- if (response.statusCode == 200) {
- // 회원가입 성공 시, 필요한 경우 응답을 처리
- print('Signup successful');
- } else {
- // 회원가입 실패 시, 에러 처리
- print('Signup failed - ${response.statusCode}: ${response.body}');
- }
- } catch (error) {
- // 회원가입 과정에서 발생하는 에러 처리
- print('Signup failed: $error');
+ Future signup() async {
+ if (validateEmail(_email) && !_idError && !_pwError && _pwMatch) {
+ // 회원가입 로직을 여기에 구현하면 됩니다.
+ // 예: API 호출, 데이터 저장 등
+ String id = _id;
+ String password = _password;
+ String email = _email;
+
+ print('id: $id');
+ print('Password: $password');
+ print('email: $email');
}
}
}
diff --git a/lib/views/ChattingScreen.dart b/lib/views/ChattingScreen.dart
deleted file mode 100644
index c6bf8a9..0000000
--- a/lib/views/ChattingScreen.dart
+++ /dev/null
@@ -1,187 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:flutter_screenutil/flutter_screenutil.dart';
-import 'package:flutter_svg/flutter_svg.dart';
-import 'package:provider/provider.dart';
-import 'package:suwon/views/HomeScreen.dart';
-import 'package:suwon/viewmodels/ChattingVM.dart';
-
-class RandomChat extends StatefulWidget {
- const RandomChat({Key? key});
-
- @override
- State createState() => _RandomChatState();
-}
-
-class _RandomChatState extends State {
- late ChatViewModel viewModel;
-
- @override
- void initState() {
- super.initState();
- viewModel = Provider.of(context, listen: false);
- viewModel.initialize();
- }
-
- @override
- Widget build(BuildContext context) {
- return ScreenUtilInit(
- designSize: Size(390, 844),
- builder: (context, child) => Scaffold(
- resizeToAvoidBottomInset: true,
- body: SizedBox(
- height: 812.h,
- child: Column(
- children: [
- _Header(),
- Expanded(
- child: SingleChildScrollView(
- child: Column(
- children: viewModel.chatMessages
- .map(
- (message) => _ChatBubble(message: message.contents))
- .toList(),
- ),
- ),
- ),
- Container(
- padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 24.w),
- height: 58.h,
- child: _CustomTextField(viewModel: viewModel),
- ),
- ],
- ),
- ),
- ),
- );
- }
-}
-
-class _CustomTextField extends StatefulWidget {
- final ChatViewModel viewModel;
-
- _CustomTextField({Key? key, required this.viewModel}) : super(key: key);
-
- @override
- _CustomTextFieldState createState() => _CustomTextFieldState();
-}
-
-class _CustomTextFieldState extends State<_CustomTextField> {
- final TextEditingController _textController = TextEditingController();
-
- @override
- Widget build(BuildContext context) {
- return TextField(
- controller: _textController,
- decoration: InputDecoration(
- border: OutlineInputBorder(
- borderRadius: BorderRadius.circular(20),
- ),
- hintText: '채팅을 시작하세요...',
- hintStyle: TextStyle(
- color: Color(0xff737373),
- fontFamily: 'Pretendard-Regular',
- fontSize: 16.sp,
- fontWeight: FontWeight.w400,
- ),
- contentPadding: EdgeInsets.only(left: 17.w, top: 12, bottom: 12),
- suffixIcon: GestureDetector(
- onTap: () {
- String message = _textController.text;
- if (message.isNotEmpty) {
- widget.viewModel.sendMessage(message);
- _textController.clear();
- }
- },
- child: SvgPicture.asset(
- 'assets/onchatbt.svg',
- width: 40.w,
- height: 40.h,
- ),
- ),
- ),
- );
- }
-}
-
-class _Header extends StatelessWidget {
- @override
- Widget build(BuildContext context) {
- final chattingViewModel = Provider.of(context);
- return Container(
- height: 128.h,
- alignment: Alignment.bottomCenter,
- padding: EdgeInsets.only(right: 32.w, left: 32.w, bottom: 14.h),
- color: Color(0xff4D76C8),
- width: double.maxFinite,
- child: Row(
- children: [
- Container(
- child: Row(
- children: [
- SvgPicture.asset(
- 'assets/User.svg',
- width: 32.w,
- height: 32.h,
- ),
- SizedBox(width: 12.w),
- Text(
- '닉네임',
- style: TextStyle(
- fontFamily: 'KCCChassam',
- fontSize: 22.sp,
- fontWeight: FontWeight.w400,
- color: Colors.white,
- ),
- ),
- ],
- ),
- ),
- SizedBox(width: 95.w),
- GestureDetector(
- child: SvgPicture.asset(
- 'assets/Report button.svg',
- width: 40.w,
- height: 40.h,
- ),
- ),
- SizedBox(width: 12.w),
- GestureDetector(
- onTap: () {
- Navigator.push(
- context,
- MaterialPageRoute(builder: (context) => HomeScreen()),
- );
- },
- child: SvgPicture.asset(
- 'assets/Exit.svg',
- width: 38.w,
- height: 38.h,
- ),
- ),
- ],
- ),
- );
- }
-}
-
-class _ChatBubble extends StatelessWidget {
- final String message;
-
- const _ChatBubble({Key? key, required this.message}) : super(key: key);
-
- @override
- Widget build(BuildContext context) {
- return Container(
- padding: EdgeInsets.all(8),
- margin: EdgeInsets.symmetric(vertical: 4),
- decoration: BoxDecoration(
- color: Colors.lightBlueAccent,
- borderRadius: BorderRadius.circular(10),
- ),
- child: Text(
- message,
- style: TextStyle(color: Colors.white),
- ),
- );
- }
-}
diff --git a/lib/views/CustomDrawerScreen.dart b/lib/views/CustomDrawerScreen.dart
deleted file mode 100644
index 05aac55..0000000
--- a/lib/views/CustomDrawerScreen.dart
+++ /dev/null
@@ -1,189 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:flutter_screenutil/flutter_screenutil.dart';
-import 'package:flutter_svg/flutter_svg.dart';
-import 'package:suwon/views/EditProfileDrawerScreen.dart';
-import 'package:suwon/views/TermsConditionsDrawerScreen.dart';
-import 'package:suwon/views/FeedbackDrawerScreen.dart';
-import 'package:suwon/views/LoginScreen.dart';
-import 'package:suwon/views/widgets/CancelAndActionAlertDialogWidget.dart';
-
-class CustomDrawerScreen extends StatelessWidget {
- @override
- Widget build(BuildContext context) {
- return Drawer(
- child: Container(
- color: Colors.white,
- child: ListView(
- physics: const NeverScrollableScrollPhysics(),
- padding: EdgeInsets.zero,
- children: [
- Container(
- height: 100.sp,
- padding: EdgeInsets.only(right: 20.sp),
- child: Row(
- crossAxisAlignment: CrossAxisAlignment.end,
- mainAxisAlignment:
- MainAxisAlignment.spaceBetween, // 가로 방향에서 맨 오른쪽 정렬
- children: [
- SizedBox(),
- IconButton(
- onPressed: () {
- Navigator.of(context).pop();
- },
- icon: Image.asset(
- 'assets/close.png',
- scale: 4.sp,
- ),
- )
- ],
- ),
- ),
- Container(
- padding: EdgeInsets.all(0),
- child: Column(
- children: [
- Container(
- alignment: Alignment.topLeft,
- margin: EdgeInsets.zero, // 상단 여백 제거
- padding: EdgeInsets.only(left: 40.sp),
- height: 120,
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- CircleAvatar(
- backgroundColor: Colors.white,
- backgroundImage: AssetImage('assets/Group.png'),
- ),
- SizedBox(height: 8),
- Text(
- 'AnSungMin',
- style: TextStyle(
- color: Colors.black,
- fontFamily: 'KCCChassam',
- fontSize: 22,
- fontStyle: FontStyle.normal,
- fontWeight: FontWeight.w400,
- ),
- ),
- Text(
- '# ISTP',
- style: TextStyle(
- color: Color(0xff767676),
- fontFamily: 'KCCChassam',
- fontSize: 14,
- fontStyle: FontStyle.normal,
- fontWeight: FontWeight.w400,
- ),
- ),
- ],
- ),
- ),
- ],
- ),
- ),
- Divider(
- color: Color(0xFFEDEDED),
- thickness: 1.0,
- ),
- SizedBox(height: 20),
- ListTile_main(
- text: '프로필 수정',
- Menu_Icon: 'assets/profile.svg',
- onTap: () {
- Navigator.push(
- context,
- MaterialPageRoute(
- builder: (context) => EditProfileDrawerScreen(),
- ),
- );
- },
- ),
- SizedBox(height: 20),
- ListTile_main(
- text: '이용약관',
- Menu_Icon: 'assets/policy.svg',
- onTap: () {
- Navigator.push(
- context,
- MaterialPageRoute(
- builder: (context) => TermsConditionsDrawerScreen(),
- ),
- );
- },
- ),
- SizedBox(height: 20),
- ListTile_main(
- text: ' 피드백',
- Menu_Icon: 'assets/feedback.svg',
- onTap: () {
- Navigator.push(
- context,
- MaterialPageRoute(
- builder: (context) => FeedbackDrawerScreen(),
- ),
- );
- },
- ),
- SizedBox(height: 20),
- ListTile_main(
- text: '로그아웃',
- Menu_Icon: 'assets/logout.svg',
- onTap: () {
- CancelAndActionAlertDialogWidget(
- title: "로그아웃 하시겠습니까?",
- action: "로그아웃",
- onAction: () {
- Navigator.push(
- context,
- MaterialPageRoute(
- builder: (context) => LoginScreen()),
- );
- },
- onCancel: () {})
- .show(context);
- }),
- ],
- ),
- ),
- );
- }
-}
-
-class ListTile_main extends StatelessWidget {
- final String text;
- final String Menu_Icon;
- final VoidCallback onTap;
-
- const ListTile_main(
- {required this.text, required this.Menu_Icon, required this.onTap});
- @override
- Widget build(BuildContext context) {
- return ListTile(
- title: Row(
- children: [
- SizedBox(
- width: 20.sp,
- ),
- SvgPicture.asset(Menu_Icon),
- SizedBox(width: 10.sp),
- Text(
- text,
- style: TextStyle(
- color: Colors.black,
- fontFamily: 'Pretendard',
- fontSize: 16.sp,
- fontStyle: FontStyle.normal,
- fontWeight: FontWeight.w400,
- letterSpacing: -0.4.sp,
- ),
- ), // 제목
- SizedBox(width: 20.sp),
- Image.asset(
- 'assets/Vector6.png',
- scale: 4.sp,
- )
- ],
- ),
- onTap: onTap);
- }
-}
diff --git a/lib/views/EmailAuthentication.dart b/lib/views/EmailAuthentication.dart
deleted file mode 100644
index 32f8691..0000000
--- a/lib/views/EmailAuthentication.dart
+++ /dev/null
@@ -1,132 +0,0 @@
-import 'dart:convert';
-
-import 'package:flutter/material.dart';
-import 'package:flutter_screenutil/flutter_screenutil.dart';
-import 'package:suwon/models/user_model.dart';
-import 'package:suwon/viewmodels/SignupVM.dart';
-import 'package:provider/provider.dart';
-import 'package:suwon/views/LoginScreen.dart';
-import 'package:suwon/views/SignUpScreen.dart';
-import 'package:suwon/views/widgets/CustomButtonWidget.dart';
-import 'package:suwon/views/widgets/EmailTextFieldWidget.dart';
-import 'package:suwon/views/widgets/SuchatAppBarWidget.dart';
-import 'package:suwon/views/widgets/TextFontWidget.dart';
-
-class EmailAuth extends StatelessWidget {
- const EmailAuth({super.key});
-
- @override
- Widget build(BuildContext context) {
- final signupViewModel = Provider.of(context);
- return ScreenUtilInit(
- designSize: Size(390, 844),
- builder: (context, child) => Scaffold(
- resizeToAvoidBottomInset: false,
- body: Container(
- margin: EdgeInsets.only(top: 88.h),
- child: Form(
- child: Column(
- children: [
- Container(
- //상단바
- margin: EdgeInsets.symmetric(horizontal: 20.w),
- child: SuchatAppBarWidget(
- text: ' 회원가입',
- onPressed: () {
- Navigator.push(
- context,
- MaterialPageRoute(
- builder: (context) => SignUpScreen(),
- ),
- );
- },
- ),
- ),
- Container(
- margin: EdgeInsets.symmetric(horizontal: 32.w),
- child: Column(children: [
- SizedBox(
- width: double.maxFinite,
- child: Column(
- mainAxisAlignment: MainAxisAlignment.start,
- children: [
- SizedBox(height: 35.h),
- EmailTextFieldWidget(
- controller: signupViewModel.emailController,
- onChanged: (value) =>
- signupViewModel.isEmailValid),
- SizedBox(height: 57.h),
- Row(
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- TextFontWidget.fontSemiBold(
- text: '* 입력하신 메일로 ',
- fontSize: 12.sp,
- color: Color(0xFF989898),
- ),
- TextFontWidget.fontSemiBold(
- text: '이메일 인증 URL ',
- fontSize: 12.sp,
- color: Color(0xff2d63d8),
- ),
- TextFontWidget.fontSemiBold(
- text: '을 전송합니다',
- fontSize: 12.sp,
- color: Color(0xFF989898),
- ),
- ],
- ),
- SizedBox(height: 10.h),
- CustomButtonWidget(
- text: '인증메일 전송',
- color: Colors.white,
- backgroundColor: Color(0xff2d63d8),
- onPressed: () async {
- // 사용자 입력을 JSON 형식으로 변환합니다
- String jsonData = json.encode({
- "memberId": signupViewModel.idController.text,
- "password": signupViewModel.pwController.text,
- "email": signupViewModel.emailController.text,
- "nickname":
- signupViewModel.nicknameController.text,
- });
-
- // UserModel.fromJson 생성자를 사용하여 UserModel 객체를 만듭니다
- UserModel userModel =
- UserModel.fromJson(json.decode(jsonData));
-
- // UserModel 객체와 함께 signup 메서드를 호출합니다
- await signupViewModel.signup(userModel);
- },
- ),
- SizedBox(
- height: 15.h,
- ),
- CustomButtonWidget(
- text: '회원가입 완료',
- color: Colors.white,
- backgroundColor: Color(0xFF111111),
- onPressed: () {
- signupViewModel.idController.clear();
- signupViewModel.pwController.clear();
- signupViewModel.pwMatchController.clear();
- signupViewModel.emailController.clear();
- signupViewModel.nicknameController.clear();
- Navigator.push(
- context,
- MaterialPageRoute(
- builder: (context) => LoginScreen()),
- );
- }),
- ],
- ),
- ),
- ]),
- ),
- ],
- ),
- ),
- )),
- );
- }
-}
diff --git a/lib/views/FeedbackDrawerScreen.dart b/lib/views/FeedbackDrawerScreen.dart
deleted file mode 100644
index 18a5eb4..0000000
--- a/lib/views/FeedbackDrawerScreen.dart
+++ /dev/null
@@ -1,69 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:flutter_screenutil/flutter_screenutil.dart';
-import 'package:suwon/views/widgets/DrawerAppBarWidget.dart';
-import 'package:suwon/views/widgets/CustomButtonWidget.dart';
-
-class FeedbackDrawerScreen extends StatelessWidget {
- final GlobalKey _formKey = GlobalKey();
-
- @override
- Widget build(BuildContext context) {
- return ScreenUtilInit(
- designSize: Size(390, 844),
- builder: (context, child) => Scaffold(
- resizeToAvoidBottomInset: false,
- body: Container(
- margin: EdgeInsets.only(top: 88.h),
- child: Form(
- key: _formKey,
- child: Column(
- children: [
- Container(
- //상단바
- margin: EdgeInsets.symmetric(horizontal: 20.w),
- child: DrawerAppBarWidget(
- text: '피드백',
- onPressed: () {
- Navigator.of(context).pop();
- },
- ),
- ),
- Container(
- margin: EdgeInsets.symmetric(horizontal: 32.w),
- child: Column(
- children: [
- SizedBox(height: 20.h),
- TextField(
- maxLength: 40,
- maxLines: 9, // 여기에서 줄넘김 기능을 추가합니다.
- decoration: InputDecoration(
- border: OutlineInputBorder(
- borderRadius: BorderRadius.circular(10),
- ),
- hintText: '앱 사용 시 불편한 점 또는 건의 사항이 있다면 자유롭게 작성해 주세요',
- hintStyle: TextStyle(
- fontFamily: 'Pretendard-Regular',
- fontSize: 14.sp,
- fontWeight: FontWeight.w400,
- ),
- counterText: '',
- contentPadding: EdgeInsets.symmetric(
- vertical: 20, horizontal: 12),
- ),
- ),
- SizedBox(height: 24.h),
- CustomButtonWidget(
- text: "제출하기",
- backgroundColor: Color(0xFF2D64D8),
- onPressed: () {},
- color: Color(0xFFFFFFFF))
- ],
- ),
- ),
- ],
- ),
- ),
- )),
- );
- }
-}
diff --git a/lib/views/HomeScreen.dart b/lib/views/HomeScreen.dart
deleted file mode 100644
index c2e22fd..0000000
--- a/lib/views/HomeScreen.dart
+++ /dev/null
@@ -1,214 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:flutter_screenutil/flutter_screenutil.dart';
-import 'package:flutter_svg/flutter_svg.dart';
-import 'package:suwon/views/CustomDrawerScreen.dart';
-import 'package:suwon/views/MatchingLoadingScreen.dart';
-
-class HomeScreen extends StatelessWidget {
- const HomeScreen({super.key});
-
- @override
- Widget build(BuildContext context) {
- final _scaffoldKey = GlobalKey();
-
- return ScreenUtilInit(
- designSize: Size(390, 844),
- builder: (context, child) => Scaffold(
- backgroundColor: Colors.white,
- key: _scaffoldKey,
- resizeToAvoidBottomInset: false,
- appBar: AppBar(
- toolbarHeight: 80.h,
- centerTitle: false,
- automaticallyImplyLeading: false,
- elevation: 0.0,
- backgroundColor: Colors.white,
- title: Container(
- width: 96.w,
- height: 80.h,
- padding: EdgeInsets.zero,
- margin: EdgeInsets.zero,
- child: Row(
- children: [
- SizedBox(
- width: 15.w,
- ),
- Image.asset(
- 'assets/SUCHAT.png',
- width: 76.w,
- height: 20.h,
- )
- ],
- ),
- ),
- actions: [
- Container(
- child: Row(
- mainAxisAlignment: MainAxisAlignment.end,
- children: [
- Container(
- child: IconButton(
- onPressed: () {
- _scaffoldKey.currentState?.openEndDrawer();
- },
- icon: SvgPicture.asset('assets/onclikmenu.svg',
- width: 28.w, height: 20.h),
- )),
- SizedBox(
- width: 25.w,
- ),
- ],
- ),
- ),
- ],
- ),
- body: Column(
- children: [
- Container(
- child: Text(
- '_배너',
- style: TextStyle(
- fontSize: 18.sp,
- fontWeight: FontWeight.w400,
- ),
- ),
- alignment: Alignment.center,
- height: 55.h,
- width: 390.w,
- color: Color(0xffDBDBDB),
- ),
- Row(
- children: [
- SizedBox(
- width: 32.w,
- ),
- Container(
- height: 335.h,
- width: 358.w,
- clipBehavior: Clip.hardEdge,
- decoration: BoxDecoration(color: Colors.white),
- child: Transform.scale(
- scale: 1,
- child: Transform.translate(
- offset: const Offset(0, -60),
- child: ClipRect(
- child: Image.asset(
- 'assets/bubble_main.PNG',
- fit: BoxFit.fill,
- ),
- ),
- ),
- ),
- ),
- ],
- ),
- Container(
- child: CustomButton_main(
- text: '매칭 시작하기',
- onPressed: () {
- Navigator.push(
- context,
- MaterialPageRoute(
- builder: (context) => MatchingLoadingScreen()),
- );
- },
- ),
- ),
- SizedBox(
- height: 24.h,
- width: 360.w,
- ),
- Container(
- child: Text(
- '주의!! 욕설 및 상대방에게 불쾌함을 주는 채팅\n 적발 시 계정 이용이 제한됩니다 ',
- style: TextStyle(
- color: Color(0xff767676),
- fontFamily: 'KCCChassam',
- fontStyle: FontStyle.normal,
- fontWeight: FontWeight.w400,
- fontSize: 14.sp,
- letterSpacing: -0.4,
- ),
- ),
- ),
- SizedBox(
- height: 120.h,
- width: 390.w,
- ),
- Container(
- height: 20.h,
- width: 390.w,
- child: Text(
- '@copyright by Flag',
- textAlign: TextAlign.center,
- style: TextStyle(
- color: Color(0xff767676),
- fontFamily: 'Pretendard',
- fontSize: 12.sp,
- fontWeight: FontWeight.w400,
- letterSpacing: 0.3,
- ),
- ),
- )
- ],
- ),
- endDrawer: CustomDrawerScreen(),
- ));
- }
-}
-
-class CustomButton_main extends StatelessWidget {
- final String text;
- final VoidCallback onPressed;
-
- const CustomButton_main({
- required this.text,
- required this.onPressed,
- });
-
- @override
- Widget build(BuildContext context) {
- return Container(
- height: 64.h,
- width: 334.w,
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(25.r),
- color: Color(0xff2D64D8),
- ),
- child: TextButton(
- onPressed: onPressed,
- child: Text(
- text,
- style: TextStyle(
- color: Color(0xffffffff),
- fontSize: 24.sp,
- fontWeight: FontWeight.w400,
- fontFamily: 'KCCChassam',
- fontStyle: FontStyle.normal,
- ),
- ),
- ),
- );
- }
-}
-
-class resign_Button extends StatelessWidget {
- @override
- Widget build(BuildContext context) {
- return TextButton(
- onPressed: () {},
- child: Text(
- '회원 탈퇴하기 >',
- style: TextStyle(
- color: Color(0xff767676),
- fontFamily: 'Pretendard',
- fontSize: 12.sp,
- fontStyle: FontStyle.normal,
- fontWeight: FontWeight.w400,
- letterSpacing: 0.3.sp,
- ),
- ),
- style: TextButton.styleFrom(padding: EdgeInsets.zero),
- );
- }
-}
diff --git a/lib/views/ChangePasswordScreen.dart b/lib/views/Login_page_changePW.dart
similarity index 92%
rename from lib/views/ChangePasswordScreen.dart
rename to lib/views/Login_page_changePW.dart
index 3dc087b..37eba13 100644
--- a/lib/views/ChangePasswordScreen.dart
+++ b/lib/views/Login_page_changePW.dart
@@ -1,19 +1,21 @@
+import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:provider/provider.dart';
-import 'package:suwon/viewmodels/AccountRecoveryVM.dart';
+import 'package:suwon/viewmodels/AccountRecovery_viewmodel.dart';
-import 'package:suwon/views/LoginScreen.dart';
+import 'package:suwon/views/login_screen.dart';
-import 'package:suwon/views/widgets/SuchatAppBarWidget.dart';
-import 'package:suwon/views/widgets/CustomButtonWidget.dart';
+import 'package:suwon/views/widgets/appbar.dart';
+import 'package:suwon/views/widgets/csbutton.dart';
-class ChangePasswordScreen extends StatelessWidget {
+class ChangePW extends StatelessWidget {
final GlobalKey _formKey = GlobalKey();
@override
Widget build(BuildContext context) {
- final accountRecoveryViewModel = Provider.of(context);
+ final accountRecoveryViewModel =
+ Provider.of(context);
return ScreenUtilInit(
designSize: Size(390, 844),
@@ -27,7 +29,7 @@ class ChangePasswordScreen extends StatelessWidget {
children: [
Container(
margin: EdgeInsets.symmetric(horizontal: 20.w),
- child: SuchatAppBarWidget(
+ child: SuchatAppBar(
text: '비밀번호 변경',
onPressed: () {
accountRecoveryViewModel.pwController.clear();
@@ -35,7 +37,7 @@ class ChangePasswordScreen extends StatelessWidget {
Navigator.push(
context,
MaterialPageRoute(
- builder: (context) => const LoginScreen()),
+ builder: (context) => const NewLoignMain()),
);
},
),
@@ -91,7 +93,7 @@ class ChangePasswordScreen extends StatelessWidget {
: Icons.visibility,
),
SizedBox(height: 48.h),
- CustomButtonWidget(
+ CustomButton(
text: '변경 완료',
color: Colors.white,
backgroundColor: Color(0xff2D64D8),
diff --git a/lib/views/SearchIdScreen.dart b/lib/views/Login_page_searchID.dart
similarity index 85%
rename from lib/views/SearchIdScreen.dart
rename to lib/views/Login_page_searchID.dart
index e1ab2f2..2504818 100644
--- a/lib/views/SearchIdScreen.dart
+++ b/lib/views/Login_page_searchID.dart
@@ -1,21 +1,22 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
-import 'package:suwon/viewmodels/AccountRecoveryVM.dart';
-import 'package:suwon/viewmodels/SignupVM.dart';
-import 'package:suwon/views/LoginScreen.dart';
-import 'package:suwon/views/widgets/SuchatAppBarWidget.dart';
-import 'package:suwon/views/widgets/CustomButtonWidget.dart';
-import 'package:suwon/views/widgets/EmailTextFieldWidget.dart';
+import 'package:suwon/viewmodels/AccountRecovery_viewmodel.dart';
+import 'package:suwon/viewmodels/signup_viewmodel.dart';
+import 'package:suwon/views/login_screen.dart';
+import 'package:suwon/views/widgets/appbar.dart';
+import 'package:suwon/views/widgets/csbutton.dart';
+import 'package:suwon/views/widgets/emailfield.dart';
import 'package:provider/provider.dart';
-class SearchIdScreen extends StatelessWidget {
- const SearchIdScreen({super.key});
+class SearchID extends StatelessWidget {
+ const SearchID({super.key});
@override
Widget build(BuildContext context) {
final GlobalKey _formKey = GlobalKey();
- final accountRecoveryViewModel = Provider.of(context);
+ final accountRecoveryViewModel =
+ Provider.of(context);
return ScreenUtilInit(
designSize: Size(390, 844),
@@ -30,14 +31,14 @@ class SearchIdScreen extends StatelessWidget {
Container(
//상단바
margin: EdgeInsets.symmetric(horizontal: 20.w),
- child: SuchatAppBarWidget(
+ child: SuchatAppBar(
text: '아이디 찾기',
onPressed: () {
accountRecoveryViewModel.emailController.clear();
Navigator.push(
context,
MaterialPageRoute(
- builder: (context) => const LoginScreen()),
+ builder: (context) => const NewLoignMain()),
);
},
),
@@ -54,7 +55,7 @@ class SearchIdScreen extends StatelessWidget {
SizedBox(
height: 42.h,
),
- EmailTextFieldWidget(
+ EmailFD(
controller:
accountRecoveryViewModel.emailController,
onChanged: (value) =>
@@ -101,7 +102,7 @@ class SearchIdScreen extends StatelessWidget {
SizedBox(
height: 12.h,
),
- CustomButtonWidget(
+ CustomButton(
text: '확인메일 전송',
color: Colors.white,
backgroundColor: Color(0xff2D64D8),
@@ -110,7 +111,7 @@ class SearchIdScreen extends StatelessWidget {
SizedBox(
height: 12.h,
),
- CustomButtonWidget(
+ CustomButton(
text: '로그인 하러가기',
color: Colors.white,
backgroundColor: Color(0xff111111),
@@ -118,7 +119,7 @@ class SearchIdScreen extends StatelessWidget {
Navigator.push(
context,
MaterialPageRoute(
- builder: (context) => LoginScreen(),
+ builder: (context) => NewLoignMain(),
),
);
},
diff --git a/lib/views/SearchPasswordScreen.dart b/lib/views/Login_page_searchPW.dart
similarity index 89%
rename from lib/views/SearchPasswordScreen.dart
rename to lib/views/Login_page_searchPW.dart
index 0968583..0eafa27 100644
--- a/lib/views/SearchPasswordScreen.dart
+++ b/lib/views/Login_page_searchPW.dart
@@ -1,20 +1,22 @@
+import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:provider/provider.dart';
-import 'package:suwon/viewmodels/AccountRecoveryVM.dart';
-import 'package:suwon/views/LoginScreen.dart';
-import 'package:suwon/views/widgets/SuchatAppBarWidget.dart';
-import 'package:suwon/views/widgets/CustomButtonWidget.dart';
-import 'package:suwon/views/widgets/EmailTextFieldWidget.dart';
-import 'package:suwon/views/widgets/IdTextFieldWidget.dart';
+import 'package:suwon/viewmodels/AccountRecovery_viewmodel.dart';
+import 'package:suwon/views/login_screen.dart';
+import 'package:suwon/views/widgets/appbar.dart';
+import 'package:suwon/views/widgets/csbutton.dart';
+import 'package:suwon/views/widgets/emailfield.dart';
+import 'package:suwon/views/widgets/idfield.dart';
-class SearchPasswordScreen extends StatelessWidget {
+class SearchPW extends StatelessWidget {
final GlobalKey _formKey = GlobalKey();
- SearchPasswordScreen({super.key});
+ SearchPW({super.key});
@override
Widget build(BuildContext context) {
- final accountRecoveryViewModel = Provider.of(context);
+ final accountRecoveryViewModel =
+ Provider.of(context);
return ScreenUtilInit(
designSize: Size(390, 844),
@@ -28,7 +30,7 @@ class SearchPasswordScreen extends StatelessWidget {
children: [
Container(
margin: EdgeInsets.symmetric(horizontal: 20.w),
- child: SuchatAppBarWidget(
+ child: SuchatAppBar(
text: '비밀번호 찾기',
onPressed: () {
accountRecoveryViewModel.idController.clear();
@@ -38,7 +40,7 @@ class SearchPasswordScreen extends StatelessWidget {
Navigator.push(
context,
MaterialPageRoute(
- builder: (context) => const LoginScreen()),
+ builder: (context) => const NewLoignMain()),
);
},
),
@@ -51,7 +53,7 @@ class SearchPasswordScreen extends StatelessWidget {
SizedBox(
height: 42.h,
),
- IdTextFieldWidget(
+ IdFD(
controller:
accountRecoveryViewModel.idController,
onChanged: (value) => accountRecoveryViewModel
@@ -59,7 +61,7 @@ class SearchPasswordScreen extends StatelessWidget {
SizedBox(
height: 21.h,
),
- EmailTextFieldWidget(
+ EmailFD(
controller:
accountRecoveryViewModel.emailController,
onChanged: (value) =>
@@ -108,7 +110,7 @@ class SearchPasswordScreen extends StatelessWidget {
SizedBox(
height: 12.h,
),
- CustomButtonWidget(
+ CustomButton(
text: '인증코드 전송',
color: Colors.white,
backgroundColor: Color(0xff2D64D8),
diff --git a/lib/views/Main_page.dart b/lib/views/Main_page.dart
new file mode 100644
index 0000000..bae9e3a
--- /dev/null
+++ b/lib/views/Main_page.dart
@@ -0,0 +1,440 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:flutter_svg/flutter_svg.dart';
+import 'package:suwon/views/edit_profie.dart';
+import 'package:suwon/views/login_screen.dart';
+import 'package:suwon/views/matching_loding.dart';
+
+class MainPage extends StatelessWidget {
+ const MainPage({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ final _scaffoldKey = GlobalKey();
+
+ return ScreenUtilInit(
+ designSize: Size(390, 844),
+ builder: (context, child) => Scaffold(
+ key: _scaffoldKey,
+ resizeToAvoidBottomInset: false,
+ appBar: AppBar(
+ elevation: 0.0,
+ backgroundColor: Colors.white,
+ title: Container(
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ SizedBox(width: 20.sp),
+ Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Image.asset(
+ 'asstes/SUCHAT.png',
+ width: 74.sp,
+ height: 20.sp,
+ fit: BoxFit.fill,
+ )
+ ],
+ )
+ ],
+ ),
+ ),
+ centerTitle: false,
+ automaticallyImplyLeading: false,
+ actions: [
+ Container(
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Container(
+ child: IconButton(
+ onPressed: () {
+ _scaffoldKey.currentState?.openEndDrawer();
+ },
+ icon: SvgPicture.asset(
+ 'asstes/Icon_menu.svg',
+ ),
+ ),
+ )
+ ],
+ ),
+ SizedBox(
+ width: 28.sp,
+ )
+ ],
+ ),
+ )
+ ],
+ ),
+ endDrawer: Drawer(
+ backgroundColor: Colors.white,
+ width: 250.sp,
+ child: Container(
+ height: 800.sp,
+ width: double.infinity,
+ child:
+ ListView(
+ physics: const NeverScrollableScrollPhysics(),
+ padding: EdgeInsets.only(top: 0),
+ children: [
+ Column(
+ children: [
+ Container(
+ height: 85.sp,
+ child: Row(
+ crossAxisAlignment: CrossAxisAlignment.end,
+ children: [
+ SizedBox(
+ width: 190.sp,
+ ),
+ IconButton(
+ onPressed: () {},
+ icon: Image.asset(
+ 'asstes/close.png',
+ scale: 4.sp,
+ ),
+ )
+ ],
+ ),
+ ),
+ UserAccountsDrawerHeader(
+ decoration: BoxDecoration(color: Colors.white),
+ margin: EdgeInsets.zero,
+ currentAccountPicture: CircleAvatar(
+ backgroundColor: Colors.white,
+ backgroundImage: AssetImage('asstes/Group.png'),
+ ),
+ currentAccountPictureSize: Size(49.sp, 49.sp),
+ accountName: Text(
+ 'AnSungMin',
+ style: TextStyle(
+ color: Colors.black,
+ fontFamily: 'KCCChassam',
+ fontSize: 22.sp,
+ fontStyle: FontStyle.normal,
+ fontWeight: FontWeight.w400,
+ ),
+ ),
+ accountEmail: Text(
+ '# ISTP',
+ style: TextStyle(
+ color: Color(0xff767676),
+ fontFamily: 'KCCChassam',
+ fontSize: 14.sp,
+ fontStyle: FontStyle.normal,
+ fontWeight: FontWeight.w400,
+ ),
+ ),
+ ),
+ Container(
+ height: 400.sp,
+ width: double.infinity,
+ decoration: BoxDecoration(
+ border: Border(
+ top: BorderSide(
+ color: Color(0xffEDEDED),
+ width: 1.sp,
+ ),
+ bottom: BorderSide(
+ color: Color(0xffEDEDED),
+ width: 1.sp,
+ ),
+ ),
+ ),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.spaceEvenly,
+ children: [
+ SizedBox(
+ height: 59.sp,
+ ),
+ ListTile(
+ leading: SvgPicture.asset('asstes/profile.svg'),
+ title: Text(
+ '프로필 수정',
+ style: TextStyle(
+ color: Colors.black,
+ fontFamily: 'Pretendard',
+ fontSize: 16.sp,
+ fontStyle: FontStyle.normal,
+ fontWeight: FontWeight.w400,
+ letterSpacing: -0.4.sp,
+ ),
+ ),
+ onTap: () {
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => EditProfile(),
+ ),
+ );
+ },
+ trailing: Image.asset(
+ 'asstes/Vector6.png',
+ scale: 4.sp,
+ ),
+ ),
+ ListTile(
+ leading: SvgPicture.asset('asstes/policy.svg'),
+ title: Text(
+ '이용약관',
+ style: TextStyle(
+ color: Colors.black,
+ fontFamily: 'Pretendard',
+ fontSize: 16.sp,
+ fontStyle: FontStyle.normal,
+ fontWeight: FontWeight.w400,
+ letterSpacing: -0.4.sp,
+ ),
+ ),
+ onTap: () {},
+ trailing: Image.asset(
+ 'asstes/Vector6.png',
+ scale: 4.sp,
+ ),
+ ),
+ ListTile(
+ leading: SvgPicture.asset('asstes/feedback.svg'),
+ title: Text(
+ '피드백',
+ style: TextStyle(
+ color: Colors.black,
+ fontFamily: 'Pretendard',
+ fontSize: 16.sp,
+ fontStyle: FontStyle.normal,
+ fontWeight: FontWeight.w400,
+ letterSpacing: -0.4.sp,
+ ),
+ ),
+ onTap: () {},
+ trailing: Image.asset(
+ 'asstes/Vector6.png',
+ scale: 4.sp,
+ ),
+ ),
+ ListTile(
+ leading: SvgPicture.asset('asstes/logout.svg'),
+ title: Padding(
+ padding: EdgeInsets.zero,
+ child: Text(
+ '로그아웃',
+ style: TextStyle(
+ color: Colors.black,
+ fontFamily: 'Pretendard',
+ fontSize: 16.sp,
+ fontStyle: FontStyle.normal,
+ fontWeight: FontWeight.w400,
+ letterSpacing: -0.4.sp,
+ ),
+ ),
+ ),
+ onTap: () {
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => NewLoignMain()),
+ );
+ },
+ trailing: Image.asset(
+ 'asstes/Vector6.png',
+ scale: 4.sp,
+ ),
+ ),
+ SizedBox(
+ height: 100.sp,
+ )
+ ],
+ ),
+ ),
+ Container(
+ height: 150.sp,
+ width: double.infinity,
+ color: Color(0xffEDEDED),
+ child: Row(
+ children: [
+ SizedBox(
+ width: 32.sp,
+ ),
+ Column(
+ children: [
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox(
+ height: 15.sp,
+ ),
+ Image.asset(
+ 'asstes/SUCHAT.png',
+ scale: 3.sp,
+ ),
+ SizedBox(
+ height: 12.sp,
+ ),
+ Text(
+ 'Copyright 2023.\nFlag inc. all rights reserved.',
+ style: TextStyle(
+ color: Color(0xff767676),
+ fontFamily: 'Pretendard',
+ fontSize: 10.sp,
+ fontStyle: FontStyle.normal,
+ fontWeight: FontWeight.w400,
+ letterSpacing: 0.25.sp,
+ ),
+ ),
+ TextButton(
+ onPressed: () {},
+ child: Text(
+ '회원 탈퇴하기 >',
+ style: TextStyle(
+ color: Color(0xff767676),
+ fontFamily: 'Pretendard',
+ fontSize: 12.sp,
+ fontStyle: FontStyle.normal,
+ fontWeight: FontWeight.w400,
+ letterSpacing: 0.3.sp,
+ ),
+ ),
+ style: TextButton.styleFrom(
+ padding: EdgeInsets.zero),
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ ),
+ )
+ ],
+ )
+ ],
+ ),
+ )
+ ),
+ body: Container(
+ color: Colors.white,
+ child: Column(
+ children: [
+ SizedBox(
+ height: 18.sp,
+ ),
+ Container(
+ child: Container(
+ child: Text(
+ '_배너',
+ style: TextStyle(
+ fontSize: 18.sp,
+ fontWeight: FontWeight.w400,
+ ),
+ ),
+ alignment: Alignment.center,
+ height: 55.sp,
+ width: 390.sp,
+ color: Color(0xffDBDBDB),
+ ),
+ ),
+ Container(
+ height: 331.h,
+ width: double.infinity,
+ clipBehavior: Clip.hardEdge,
+ decoration: BoxDecoration(color: Colors.white),
+ child: Transform.scale(
+ scale: 1.sp,
+ child: Transform.translate(
+ offset: const Offset(25, -60),
+ child: Image.asset('asstes/bubble_main.PNG', scale: 1.sp,fit: BoxFit.fill,),
+ ),
+ ),
+ ),
+ Container(
+ child: CustomButton_main(
+ text: '매칭 시작하기',
+ onPressed: () {
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => MatchingLoading()),
+ );
+ },
+ ),
+ ),
+ SizedBox(
+ height: 24.sp,
+ width: double.infinity,
+ ),
+ Container(
+
+ child: Text(
+ '주의!! 욕설 및 상대방에게 불쾌함을 주는 채팅\n 적발 시 계정 이용이 제한됩니다 ',
+ style: TextStyle(
+ color: Color(0xff767676),
+ fontFamily: 'KCCChassam',
+ fontStyle: FontStyle.normal,
+ fontWeight: FontWeight.w400,
+ fontSize: 14.sp,
+ letterSpacing: -0.4.sp,
+ ),
+ ),
+ ),
+ SizedBox(
+ height: 120.sp,
+ width: double.infinity,
+ ),
+ Container(
+ height: 20.sp,
+ width: double.infinity,
+ child: Text(
+ '@copyright by Flag',textAlign: TextAlign.center,
+ style: TextStyle(
+ color: Color(0xff767676),
+ fontFamily: 'Pretendard',
+ fontSize: 12.sp,
+ fontWeight: FontWeight.w400,
+ letterSpacing: 0.3.sp,
+
+ ),
+ ),
+ )
+ ],
+ ),
+ ),
+ ),
+ );
+ }
+}
+
+class CustomButton_main extends StatelessWidget {
+ final String text;
+ final VoidCallback onPressed;
+
+ const CustomButton_main({
+ required this.text,
+ required this.onPressed,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ return Container(
+ height: 64.sp,
+ width: 334.sp,
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(25.w),
+ color: Color(0xff2D64D8),
+ ),
+ child: TextButton(
+ onPressed: onPressed,
+ child: Text(
+ text,
+ style: TextStyle(
+ color: Color(0xffffffff),
+ fontSize: 24.sp,
+ fontWeight: FontWeight.w400,
+ fontFamily: 'KCCChassam',
+ fontStyle: FontStyle.normal,
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/views/RandomChatScreen.dart b/lib/views/RandomChatScreen.dart
deleted file mode 100644
index 04e32c3..0000000
--- a/lib/views/RandomChatScreen.dart
+++ /dev/null
@@ -1,164 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:flutter_screenutil/flutter_screenutil.dart';
-import 'package:flutter_svg/flutter_svg.dart';
-
-class RandomChat extends StatefulWidget {
- const RandomChat({super.key});
-
- @override
- State createState() => _RandomChatState();
-}
-
-class _RandomChatState extends State {
- bool isChatEnabled = false;
-
- @override
- Widget build(BuildContext context) {
- return ScreenUtilInit(
- designSize: Size(390, 844),
- builder: (context, child) => Scaffold(
- resizeToAvoidBottomInset: true,
- body: SizedBox(
- height: 812.h,
- child: Column(
- children: [
- header(),
- Expanded(
- child: SingleChildScrollView(
- child: Column(
- children: [
- // Add your chat messages here
- ],
- ),
- ),
- ),
- Container(
- padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 24.w),
- height: 58.h,
- child: CustomTextField(
- hintText: '채팅을 시작해 보세요...',
- onIconTap: (isEnabled) {
- setState(() {
- isChatEnabled = isEnabled;
- });
- },
- ),
- ),
- ],
- ),
- ),
- ),
- );
- }
-
- Widget header() {
- return Container(
- height: 128.h,
- alignment: Alignment.bottomCenter,
- padding: EdgeInsets.only(right: 32.w, left: 32.w, bottom: 14.h),
- color: Color(0xff4D76C8),
- width: double.maxFinite,
- child: Row(
- children: [
- Container(
- child: Row(
- children: [
- SvgPicture.asset(
- 'assets/User.svg',
- width: 32.w,
- height: 32.h,
- ),
- SizedBox(width: 12.w),
- Text(
- 'nickname',
- style: TextStyle(
- fontFamily: 'KCCChassam',
- fontSize: 22.sp,
- fontWeight: FontWeight.w400,
- color: Colors.white,
- ),
- ),
- ],
- ),
- ),
- SizedBox(width: 95.w),
- InkWell(
- onTap: () {
- // 이미지 버튼이 탭되면 onPressed 함수를 호출합니다.
- onPressed() {}
- },
- child: SvgPicture.asset(
- 'assets/Report button.svg',
- width: 40.w,
- height: 40.h,
- ),
- ),
- SizedBox(width: 12.w),
- InkWell(
- onTap: () {
- // 이미지 버튼이 탭되면 onPressed 함수를 호출합니다.
- onPressed() {}
- },
- child: SvgPicture.asset(
- 'assets/Exit.svg',
- width: 38.w,
- height: 38.h,
- ),
- ),
- ],
- ),
- );
- }
-}
-
-class CustomTextField extends StatefulWidget {
- final String hintText;
- final Function(bool) onIconTap;
-
- CustomTextField({required this.hintText, required this.onIconTap});
-
- @override
- _CustomTextFieldState createState() => _CustomTextFieldState();
-}
-
-class _CustomTextFieldState extends State {
- bool isInputEmpty = true;
-
- @override
- Widget build(BuildContext context) {
- return TextField(
- decoration: InputDecoration(
- border: OutlineInputBorder(
- borderRadius: BorderRadius.circular(20),
- ),
- hintText: widget.hintText,
- hintStyle: TextStyle(
- color: Color(0xff737373),
- fontFamily: 'Pretendard-Regular',
- fontSize: 16.sp,
- fontWeight: FontWeight.w400,
- ),
- contentPadding: EdgeInsets.only(left: 17.w, top: 12, bottom: 12),
- suffixIcon: InkWell(
- onTap: () {
- setState(() {
- isInputEmpty = !isInputEmpty;
- });
- widget.onIconTap(isInputEmpty);
- },
- child: isInputEmpty
- ? SvgPicture.asset(
- 'asstes/onchatbt.svg',
- width: 40.w,
- height: 40.h,
- )
- : SvgPicture.asset(
- 'asstes/offchatbt.svg',
- width: 40.w,
- height: 40.h,
- ),
- ),
- ),
- );
- }
-}
diff --git a/lib/views/TermsConditionsDrawerScreen.dart b/lib/views/TermsConditionsDrawerScreen.dart
deleted file mode 100644
index 614aada..0000000
--- a/lib/views/TermsConditionsDrawerScreen.dart
+++ /dev/null
@@ -1,36 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:flutter_screenutil/flutter_screenutil.dart';
-import 'package:suwon/views/widgets/DrawerAppBarWidget.dart';
-
-class TermsConditionsDrawerScreen extends StatelessWidget {
- final GlobalKey _formKey = GlobalKey();
-
- @override
- Widget build(BuildContext context) {
- return ScreenUtilInit(
- designSize: Size(390, 844),
- builder: (context, child) => Scaffold(
- resizeToAvoidBottomInset: false,
- body: Container(
- margin: EdgeInsets.only(top: 88.h),
- child: Form(
- key: _formKey,
- child: Column(
- children: [
- Container(
- //상단바
- margin: EdgeInsets.symmetric(horizontal: 20.w),
- child: DrawerAppBarWidget(
- text: '이용약관',
- onPressed: () {
- Navigator.of(context).pop();
- },
- ),
- ),
- ],
- ),
- ),
- )),
- );
- }
-}
diff --git a/lib/views/EditProfileDrawerScreen.dart b/lib/views/edit_profie.dart
similarity index 92%
rename from lib/views/EditProfileDrawerScreen.dart
rename to lib/views/edit_profie.dart
index b068bcf..8a4b64a 100644
--- a/lib/views/EditProfileDrawerScreen.dart
+++ b/lib/views/edit_profie.dart
@@ -1,19 +1,19 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
-import 'package:suwon/views/HomeScreen.dart';
-import 'package:suwon/views/SignUpScreen.dart';
-import 'package:suwon/views/widgets/SuchatAppBarWidget.dart';
-import 'package:suwon/viewmodels/SignupVM.dart';
+import 'package:suwon/views/Main_page.dart';
+import 'package:suwon/views/signup_creen.dart';
+import 'package:suwon/views/widgets/appbar.dart';
+import 'package:suwon/viewmodels/signup_viewmodel.dart';
import 'package:provider/provider.dart';
-import 'package:suwon/views/widgets/CustomButtonWidget.dart';
-import 'package:suwon/views/widgets/TextFontWidget.dart';
+import 'package:suwon/views/widgets/csbutton.dart';
+import 'package:suwon/views/widgets/font.dart';
-class EditProfileDrawerScreen extends StatelessWidget {
+class EditProfile extends StatelessWidget {
final GlobalKey _formKey = GlobalKey();
@override
Widget build(BuildContext context) {
- final signupViewModel = Provider.of(context);
+ final signupViewModel = Provider.of(context);
return ScreenUtilInit(
designSize: Size(390, 844),
builder: (context, child) => Scaffold(
@@ -27,7 +27,7 @@ class EditProfileDrawerScreen extends StatelessWidget {
Container(
//상단바
margin: EdgeInsets.symmetric(horizontal: 20.w),
- child: SuchatAppBarWidget(
+ child: SuchatAppBar(
text: ' 프로필 설정',
onPressed: () {
signupViewModel.idController.clear();
@@ -35,7 +35,7 @@ class EditProfileDrawerScreen extends StatelessWidget {
Navigator.push(
context,
MaterialPageRoute(
- builder: (context) => HomeScreen(),
+ builder: (context) => MainPage(),
),
);
},
@@ -56,7 +56,7 @@ class EditProfileDrawerScreen extends StatelessWidget {
color: Color(0xFFFF0000),
controller: signupViewModel.nicknameController,
onChanged: (value) =>
- signupViewModel.validateNickNameInput(value),
+ signupViewModel.validateNickName(value),
showErrorText: signupViewModel.nicknameError,
errorText: '* 닉네임은 8자 이내로 작성 해주세요',
hintText: '# NICKNAME',
@@ -70,7 +70,7 @@ class EditProfileDrawerScreen extends StatelessWidget {
),
child: TextButton(
onPressed: () {},
- child: TextFontWidget.fontRegular(
+ child: TextFont.fontRegular(
color: Color(0xFFFFFFFF),
fontSize: 14,
text: '중복 확인')),
diff --git a/lib/views/LoginScreen.dart b/lib/views/login_screen.dart
similarity index 67%
rename from lib/views/LoginScreen.dart
rename to lib/views/login_screen.dart
index 91fae1b..d1c72c0 100644
--- a/lib/views/LoginScreen.dart
+++ b/lib/views/login_screen.dart
@@ -1,25 +1,22 @@
-// ignore_for_file: use_build_context_synchronously
-
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
-import 'package:suwon/views/ChangePasswordScreen.dart';
-import 'package:suwon/views/SearchIdScreen.dart';
-import 'package:suwon/views/HomeScreen.dart';
-import 'package:suwon/views/SignUpScreen.dart';
-import 'package:suwon/views/widgets/CustomButtonWidget.dart';
+import 'package:suwon/views/Login_page_changePW.dart';
+import 'package:suwon/views/Login_page_searchID.dart';
+import 'package:suwon/views/Main_page.dart';
+import 'package:suwon/views/Signup_creen.dart';
+import 'package:suwon/views/widgets/csbutton.dart';
import 'package:provider/provider.dart';
-import 'package:suwon/viewmodels/LoginVM.dart';
-import 'package:suwon/views/widgets/NormalAlertDialogWidget.dart';
-import 'package:suwon/views/widgets/TextFontWidget.dart';
+import 'package:suwon/viewmodels/login_viewmodel.dart';
+import 'package:suwon/views/widgets/font.dart';
-import 'SearchPasswordScreen.dart';
+import 'Login_page_searchPW.dart';
-class LoginScreen extends StatelessWidget {
- const LoginScreen({super.key});
+class NewLoignMain extends StatelessWidget {
+ const NewLoignMain({super.key});
@override
Widget build(BuildContext context) {
- final loginViewModel = Provider.of(context);
+ final loginViewModel = Provider.of(context);
return ScreenUtilInit(
designSize: Size(390, 844),
builder: (context, child) => Scaffold(
@@ -33,7 +30,7 @@ class LoginScreen extends StatelessWidget {
margin: EdgeInsets.only(left: 32.w),
child: Image(
fit: BoxFit.fill,
- image: AssetImage('assets/bubble.PNG'),
+ image: AssetImage('asstes/bubble.PNG'),
),
),
SizedBox(height: 32.h),
@@ -43,44 +40,38 @@ class LoginScreen extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center,
children: [
InputFD(
- // ID 입력창
- onChanged: (value) => loginViewModel.setUserid(value),
- hintText: 'ID',
- ),
+ //ID 입력창
+ onChanged: (value) => loginViewModel.setUserid(value),
+ hintText: 'ID'),
SizedBox(
height: 10.h,
),
InputFD(
- // PW 입력창
- onChanged: (value) => loginViewModel.setUserpw(value),
- hintText: 'PW',
- obscureText: true,
- ),
+ // PW 입력창
+ onChanged: (value) => loginViewModel.setUserpw(value),
+ hintText: 'PW',
+ obscureText: true),
SizedBox(height: 24.h),
- CustomButtonWidget(
+ CustomButton(
// 로그인 버튼
text: '로그인',
color: Colors.white,
backgroundColor: Color(0xff2d63d8),
onPressed: () async {
- await loginViewModel.login();
- // 로그인 결과에 따른 처리를 추가할 수 있음
- print(loginViewModel.loginResult);
-
- // 예제로 홈 화면으로 이동하는 부분 추가
- if (loginViewModel.loginResult == '로그인 성공') {
+ /*bool success = await loginViewModel.login();
+ if (success) {
Navigator.push(
context,
- MaterialPageRoute(
- builder: (context) => HomeScreen()),
+ MaterialPageRoute(builder: (context) => MainPage()),
);
} else {
- NormalAlertDialogWidget(
- title: '알림',
- message: 'ID 혹은 비밀번호가 올바르지 않습니다.',
- onClose: () {})
- .show(context);
+ // 로그인 실패 처리
}
+ */
+ Navigator.push(
+ context,
+ MaterialPageRoute(builder: (context) => MainPage()),
+ );
}),
Row(
mainAxisAlignment: MainAxisAlignment.center,
@@ -90,24 +81,24 @@ class LoginScreen extends StatelessWidget {
Navigator.push(
context,
MaterialPageRoute(
- builder: (context) => const SearchIdScreen()),
+ builder: (context) => const SearchID()),
);
},
- child: TextFontWidget.fontRegular(
+ child: TextFont.fontRegular(
text: '아이디 찾기',
fontSize: 14.sp,
color: Color(0xFF232323))),
- TextFontWidget.fontRegular(
+ TextFont.fontRegular(
text: '/', fontSize: 16.sp, color: Color(0xFFBFBFBF)),
TextButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
- builder: (context) => SearchPasswordScreen()),
+ builder: (context) => SearchPW()),
);
},
- child: TextFontWidget.fontRegular(
+ child: TextFont.fontRegular(
text: '비밀번호 찾기',
fontSize: 14.sp,
color: Color(0xFF232323))),
@@ -125,7 +116,7 @@ class LoginScreen extends StatelessWidget {
thickness: 1,
color: Colors.grey,
)),
- TextFontWidget.fontRegular(
+ TextFont.fontRegular(
text: '계정이 없으신가요?',
fontSize: 14.sp,
color: Color(0xFF767676)),
@@ -140,7 +131,7 @@ class LoginScreen extends StatelessWidget {
SizedBox(
height: 18.h,
),
- CustomButtonWidget(
+ CustomButton(
text: '회원가입',
color: Colors.white,
backgroundColor: Color(0xFF111111),
@@ -148,7 +139,7 @@ class LoginScreen extends StatelessWidget {
Navigator.push(
context,
MaterialPageRoute(
- builder: (context) => SignUpScreen()),
+ builder: (context) => SignupScreen()),
);
}),
],
diff --git a/lib/views/MatchingLoadingScreen.dart b/lib/views/matching_loding.dart
similarity index 87%
rename from lib/views/MatchingLoadingScreen.dart
rename to lib/views/matching_loding.dart
index e56150f..69ffd4e 100644
--- a/lib/views/MatchingLoadingScreen.dart
+++ b/lib/views/matching_loding.dart
@@ -2,18 +2,17 @@ import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
-import 'package:suwon/views/ChattingScreen.dart';
-import 'package:suwon/views/HomeScreen.dart';
-import 'package:suwon/views/widgets/CustomButtonWidget.dart';
+import 'package:suwon/views/Main_page.dart';
+import 'package:suwon/views/widgets/csbutton.dart';
-class MatchingLoadingScreen extends StatefulWidget {
- const MatchingLoadingScreen({Key? key}) : super(key: key);
+class MatchingLoading extends StatefulWidget {
+ const MatchingLoading({Key? key}) : super(key: key);
@override
_MatchingLoadingState createState() => _MatchingLoadingState();
}
-class _MatchingLoadingState extends State {
+class _MatchingLoadingState extends State {
StreamController dotStreamController = StreamController();
int numDots = 0;
@@ -90,13 +89,13 @@ class _MatchingLoadingState extends State {
fontsize: 16.sp,
),
SizedBox(height: 60.h),
- CustomButtonWidget(
+ CustomButton(
text: '매칭 중단하기',
backgroundColor: Color(0xff111111),
onPressed: () {
Navigator.push(
context,
- MaterialPageRoute(builder: (context) => RandomChat()),
+ MaterialPageRoute(builder: (context) => MainPage()),
);
},
color: Color(0xffFFFFFF),
diff --git a/lib/views/SetProfileScreen.dart b/lib/views/setprofile.dart
similarity index 93%
rename from lib/views/SetProfileScreen.dart
rename to lib/views/setprofile.dart
index f90a3be..a85c009 100644
--- a/lib/views/SetProfileScreen.dart
+++ b/lib/views/setprofile.dart
@@ -1,18 +1,18 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
-import 'package:suwon/views/SignUpScreen.dart';
-import 'package:suwon/views/widgets/SuchatAppBarWidget.dart';
-import 'package:suwon/viewmodels/SignupVM.dart';
+import 'package:suwon/views/signup_creen.dart';
+import 'package:suwon/views/widgets/appbar.dart';
+import 'package:suwon/viewmodels/signup_viewmodel.dart';
import 'package:provider/provider.dart';
-import 'package:suwon/views/widgets/CustomButtonWidget.dart';
-import 'package:suwon/views/widgets/TextFontWidget.dart';
+import 'package:suwon/views/widgets/csbutton.dart';
+import 'package:suwon/views/widgets/font.dart';
-class SetProfileScreen extends StatelessWidget {
+class SetProfile extends StatelessWidget {
final GlobalKey _formKey = GlobalKey();
@override
Widget build(BuildContext context) {
- final signupViewModel = Provider.of(context);
+ final signupViewModel = Provider.of(context);
return ScreenUtilInit(
designSize: Size(390, 844),
builder: (context, child) => Scaffold(
@@ -26,7 +26,7 @@ class SetProfileScreen extends StatelessWidget {
Container(
//상단바
margin: EdgeInsets.symmetric(horizontal: 20.w),
- child: SuchatAppBarWidget(
+ child: SuchatAppBar(
text: ' 프로필 설정',
onPressed: () {
signupViewModel.idController.clear();
@@ -34,7 +34,7 @@ class SetProfileScreen extends StatelessWidget {
Navigator.push(
context,
MaterialPageRoute(
- builder: (context) => SignUpScreen(),
+ builder: (context) => SignupScreen(),
),
);
},
@@ -54,7 +54,7 @@ class SetProfileScreen extends StatelessWidget {
color: Color(0xFFFF0000),
controller: signupViewModel.nicknameController,
onChanged: (value) =>
- signupViewModel.validateNickNameInput(value),
+ signupViewModel.validateNickName(value),
showErrorText: signupViewModel.nicknameError,
errorText: '* 닉네임은 8자 이내로 작성 해주세요',
hintText: '# NICKNAME',
@@ -68,7 +68,7 @@ class SetProfileScreen extends StatelessWidget {
),
child: TextButton(
onPressed: () {},
- child: TextFontWidget.fontRegular(
+ child: TextFont.fontRegular(
color: Color(0xFFFFFFFF),
fontSize: 14,
text: '중복 확인')),
@@ -86,7 +86,7 @@ class SetProfileScreen extends StatelessWidget {
SizedBox(height: 12.h),
Self(controller: signupViewModel.selfController),
SizedBox(height: 48.h),
- CustomButtonWidget(
+ CustomButton(
text: '시작하기',
color: Colors.white,
backgroundColor: Color(0xFF2D64D8),
diff --git a/lib/views/SignUpScreen.dart b/lib/views/signup_creen.dart
similarity index 68%
rename from lib/views/SignUpScreen.dart
rename to lib/views/signup_creen.dart
index 97402c7..4d3283e 100644
--- a/lib/views/SignUpScreen.dart
+++ b/lib/views/signup_creen.dart
@@ -1,23 +1,20 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
-import 'package:suwon/views/EmailAuthentication.dart';
-import 'package:suwon/views/LoginScreen.dart';
-import 'package:suwon/views/SignUpDoneScreen.dart';
-import 'package:suwon/views/widgets/SuchatAppBarWidget.dart';
-import 'package:suwon/viewmodels/SignupVM.dart';
+import 'package:suwon/views/login_screen.dart';
+import 'package:suwon/views/signup_done.dart';
+import 'package:suwon/views/widgets/appbar.dart';
+import 'package:suwon/viewmodels/signup_viewmodel.dart';
import 'package:provider/provider.dart';
-import 'package:suwon/views/widgets/CustomButtonWidget.dart';
-import 'package:suwon/views/widgets/EmailTextFieldWidget.dart';
-import 'package:suwon/views/widgets/TextFontWidget.dart';
+import 'package:suwon/views/widgets/csbutton.dart';
+import 'package:suwon/views/widgets/emailfield.dart';
+import 'package:suwon/views/widgets/font.dart';
-class SignUpScreen extends StatelessWidget {
+class SignupScreen extends StatelessWidget {
final GlobalKey _formKey = GlobalKey();
- SignUpScreen({super.key});
-
@override
Widget build(BuildContext context) {
- final signupViewModel = Provider.of(context);
+ final signupViewModel = Provider.of(context);
return ScreenUtilInit(
designSize: Size(390, 844),
builder: (context, child) => Scaffold(
@@ -31,7 +28,7 @@ class SignUpScreen extends StatelessWidget {
Container(
//상단바
margin: EdgeInsets.symmetric(horizontal: 20.w),
- child: SuchatAppBarWidget(
+ child: SuchatAppBar(
text: ' 회원가입',
onPressed: () {
signupViewModel.idController.clear();
@@ -41,7 +38,7 @@ class SignUpScreen extends StatelessWidget {
Navigator.push(
context,
MaterialPageRoute(
- builder: (context) => LoginScreen(),
+ builder: (context) => NewLoignMain(),
),
);
},
@@ -55,29 +52,8 @@ class SignUpScreen extends StatelessWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
- SizedBox(height: 40.h),
- IdInputFD(
- labelText: '아이디',
- hintText: '아이디 입력 (4~16자)',
- controller: signupViewModel.idController,
- showErrorText: signupViewModel.idError,
- errorText: '* 4자 이상 16자 이내로 작성해 주세요',
- onChanged: (value) =>
- signupViewModel.validateIdInput(value),
- onPressed: () {},
- ),
- SizedBox(height: 40.h),
- IdInputFD(
- labelText: '닉네임',
- hintText: '닉네임 입력',
- controller: signupViewModel.nicknameController,
- showErrorText: signupViewModel.nicknameError,
- errorText: '8자 이내로 작성해 주세요',
- onChanged: (value) =>
- signupViewModel.validateNickNameInput(value),
- onPressed: () {},
- ),
- SizedBox(height: 40.h),
+ IdInputFD(),
+ SizedBox(height: 44.h),
PwInputFD(
labelText: '비밀번호',
showErrorText: signupViewModel.pwError,
@@ -111,27 +87,30 @@ class SignUpScreen extends StatelessWidget {
? Icons.visibility_off
: Icons.visibility,
),
- SizedBox(height: 60.h),
- CustomButtonWidget(
- text: '다음',
+ SizedBox(height: 46.h),
+ EmailFD(
+ controller: signupViewModel.emailController,
+ onChanged: (value) =>
+ signupViewModel.isEmailValid),
+ SizedBox(height: 57.h),
+ CustomButton(
+ text: '회원가입',
color: Colors.white,
- backgroundColor: signupViewModel.btActivation
- ? Colors.grey
- : Color(0xFF111111),
- onPressed: () async {}),
-
- /* Navigator.push(
+ backgroundColor: Color(0xFF111111),
+ onPressed: () {
+ Navigator.push(
context,
MaterialPageRoute(
- builder: (context) => EmailAuth()),
- );*/
+ builder: (context) => SignUpDone()),
+ );
+ }),
SizedBox(
height: 14.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
- TextFontWidget.fontSemiBold(
+ TextFont.fontSemiBold(
text: '회원가입 시 ',
fontSize: 12.sp,
color: Color(0xFF989898),
@@ -140,13 +119,13 @@ class SignUpScreen extends StatelessWidget {
onTap: () {
// 버튼이 클릭되었을 때 실행될 코드
},
- child: TextFontWidget.fontSemiBold(
+ child: TextFont.fontSemiBold(
text: '서비스 이용약관',
fontSize: 12.sp,
color: Color(0xFF2D64D8),
),
),
- TextFontWidget.fontSemiBold(
+ TextFont.fontSemiBold(
text: ' 및 ',
fontSize: 12.sp,
color: Color(0xFF989898),
@@ -155,7 +134,7 @@ class SignUpScreen extends StatelessWidget {
onTap: () {
// 버튼이 클릭되었을 때 실행될 코드
},
- child: TextFontWidget.fontSemiBold(
+ child: TextFont.fontSemiBold(
text: '개인정보 처리방침',
fontSize: 12.sp,
color: Color(0xFF2D64D8),
@@ -163,7 +142,7 @@ class SignUpScreen extends StatelessWidget {
),
],
),
- TextFontWidget.fontSemiBold(
+ TextFont.fontSemiBold(
text: '하신 것으로 간주됩니다',
fontSize: 12.sp,
color: Color(0xFF989898),
@@ -182,63 +161,37 @@ class SignUpScreen extends StatelessWidget {
}
class IdInputFD extends StatelessWidget {
- final String labelText;
- final String hintText;
- final TextEditingController controller;
- final Function(String) onChanged;
- final bool showErrorText;
- final String errorText;
- final VoidCallback? onPressed;
-
- IdInputFD({
- required this.labelText,
- required this.hintText,
- required this.controller,
- required this.onChanged,
- required this.showErrorText,
- required this.errorText,
- this.onPressed,
- });
-
- // 에러 메시지 위젯
- Widget errorTextWidget() {
- if (showErrorText) {
- return Text(
- errorText,
- style: TextStyle(color: Colors.red),
- );
- } else {
- return Container(); // 에러가 없으면 빈 컨테이너 반환
- }
- }
-
@override
Widget build(BuildContext context) {
+ final signupViewModel = Provider.of(context);
return Column(
children: [
Row(
children: [
SizedBox(width: 8.w),
Text(
- labelText,
+ '아이디',
style: TextStyle(
- fontFamily: 'Pretendard-Regular',
- fontSize: 16.sp,
- fontWeight: FontWeight.w400,
- ),
+ fontFamily: 'Pretendard-Regular',
+ fontSize: 16.sp,
+ fontWeight: FontWeight.w400),
),
SizedBox(
width: 12.w,
),
- errorTextWidget(), // 에러 메시지 위젯 추가
+ if (signupViewModel.idError)
+ Text(
+ '* 4자 이상 16자 이내로 작성해 주세요',
+ style: TextStyle(color: Colors.red),
+ ),
],
),
SizedBox(height: 8.h),
SizedBox(
height: 50.h,
child: TextFormField(
- controller: controller,
- onChanged: onChanged,
+ controller: signupViewModel.idController,
+ onChanged: (value) => signupViewModel.validateIdInput(value),
decoration: InputDecoration(
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
@@ -247,7 +200,7 @@ class IdInputFD extends StatelessWidget {
fontFamily: 'Pretendard-Light',
fontSize: 14.sp,
),
- hintText: hintText,
+ hintText: '아이디 입력 (4~16자)',
contentPadding:
EdgeInsets.only(top: 10, bottom: 17, left: 10, right: 10),
suffix: Container(
@@ -258,13 +211,9 @@ class IdInputFD extends StatelessWidget {
color: Color(0xFF2D64D8),
),
child: TextButton(
- onPressed: onPressed ?? () {}, // onPressed가 null이 아닐 때만 사용
- child: TextFontWidget.fontRegular(
- color: Color(0xFFFFFFFF),
- fontSize: 14,
- text: '중복 확인',
- ),
- ),
+ onPressed: () {},
+ child: TextFont.fontRegular(
+ color: Color(0xFFFFFFFF), fontSize: 14, text: '중복 확인')),
),
),
),
diff --git a/lib/views/SignUpDoneScreen.dart b/lib/views/signup_done.dart
similarity index 87%
rename from lib/views/SignUpDoneScreen.dart
rename to lib/views/signup_done.dart
index 392ee46..cbbe84f 100644
--- a/lib/views/SignUpDoneScreen.dart
+++ b/lib/views/signup_done.dart
@@ -1,17 +1,16 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
-import 'package:suwon/views/widgets/NormalAlertDialogWidget.dart';
-import 'package:suwon/views/widgets/CustomButtonWidget.dart';
-import 'package:suwon/views/LoginScreen.dart';
+import 'package:suwon/views/widgets/csbutton.dart';
+import 'package:suwon/views/login_screen.dart';
-class SignUpDoneScreen extends StatefulWidget {
- const SignUpDoneScreen({super.key});
+class SignUpDone extends StatefulWidget {
+ const SignUpDone({super.key});
@override
_SignUpDoneState createState() => _SignUpDoneState();
}
-class _SignUpDoneState extends State {
+class _SignUpDoneState extends State {
bool showCheck = false;
@override
@@ -90,7 +89,7 @@ class _SignUpDoneState extends State {
),
],
),
- CustomButtonWidget(
+ CustomButton(
text: '로그인',
color: Colors.black,
border: Border.all(width: 1, color: Color(0xFF2D64D8)),
@@ -99,7 +98,7 @@ class _SignUpDoneState extends State {
Navigator.push(
context,
MaterialPageRoute(
- builder: (context) => LoginScreen(),
+ builder: (context) => NewLoignMain(),
),
);
},
@@ -107,19 +106,10 @@ class _SignUpDoneState extends State {
SizedBox(
height: 12.h,
),
- CustomButtonWidget(
+ CustomButton(
text: '메일 재발송',
backgroundColor: Color(0xFF111111),
- onPressed: () {
- NormalAlertDialogWidget(
- title: "알림",
- message: "포털 메일이 재발송되었습니다.",
- onClose: () {
- // 다이얼로그 닫기 후 뒤로 화면이동
- //Navigator.of(context).pop();
- },
- ).show(context);
- },
+ onPressed: () {},
color: Colors.white,
),
],
diff --git a/lib/views/widgets/CancelAndActionAlertDialogWidget.dart b/lib/views/widgets/CancelAndActionAlertDialogWidget.dart
deleted file mode 100644
index 2c3642d..0000000
--- a/lib/views/widgets/CancelAndActionAlertDialogWidget.dart
+++ /dev/null
@@ -1,41 +0,0 @@
-import 'package:flutter/cupertino.dart';
-
-class CancelAndActionAlertDialogWidget {
- final String title;
- final String action;
- final VoidCallback onCancel;
- final VoidCallback onAction;
-
- CancelAndActionAlertDialogWidget({
- required this.title,
- required this.action,
- required this.onCancel,
- required this.onAction,
- });
-
- void show(BuildContext context) {
- showCupertinoDialog(
- context: context,
- builder: (BuildContext context) {
- return CupertinoAlertDialog(
- title: Text(title),
- actions: [
- CupertinoDialogAction(
- child: Text('취소'),
- onPressed: () {
- onCancel();
- Navigator.of(context).pop();
- },
- ),
- CupertinoDialogAction(
- child: Text(action),
- onPressed: () {
- onAction();
- },
- ),
- ],
- );
- },
- );
- }
-}
diff --git a/lib/views/widgets/DrawerAppBarWidget.dart b/lib/views/widgets/DrawerAppBarWidget.dart
deleted file mode 100644
index 0c1f8dc..0000000
--- a/lib/views/widgets/DrawerAppBarWidget.dart
+++ /dev/null
@@ -1,51 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:flutter_screenutil/flutter_screenutil.dart';
-
-class DrawerAppBarWidget extends StatelessWidget {
- final String text;
- final VoidCallback onPressed;
-
- const DrawerAppBarWidget({
- required this.text,
- required this.onPressed,
- });
-
- @override
- Widget build(BuildContext context) {
- double iconScale = 4.sp;
- double iconButtonPadding = 40.sp;
-
- return Container(
- width: double.maxFinite,
- height: 40.h,
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- // 아이콘 맨 오른쪽 정렬 위해서 왼쪽에 더미공간 추가
- SizedBox(
- width: iconScale + iconButtonPadding,
- height: iconScale + iconButtonPadding,
- ),
- Container(
- alignment: Alignment.center,
- child: Text(
- text,
- style: TextStyle(
- fontFamily: 'Pretendard-Regular',
- fontSize: 18.sp,
- fontWeight: FontWeight.w600,
- ),
- ),
- ),
- IconButton(
- onPressed: onPressed,
- icon: Image.asset(
- 'assets/close.png',
- scale: iconScale,
- ),
- ),
- ],
- ),
- );
- }
-}
diff --git a/lib/views/widgets/NormalAlertDialogWidget.dart b/lib/views/widgets/NormalAlertDialogWidget.dart
deleted file mode 100644
index 209ad5c..0000000
--- a/lib/views/widgets/NormalAlertDialogWidget.dart
+++ /dev/null
@@ -1,34 +0,0 @@
-import 'package:flutter/cupertino.dart';
-
-class NormalAlertDialogWidget {
- final String title;
- final String message;
- final VoidCallback onClose;
-
- NormalAlertDialogWidget({
- required this.title,
- required this.message,
- required this.onClose,
- });
-
- void show(BuildContext context) {
- showCupertinoDialog(
- context: context,
- builder: (BuildContext context) {
- return CupertinoAlertDialog(
- title: Text(title),
- content: Text(message),
- actions: [
- CupertinoDialogAction(
- child: Text('확인'),
- onPressed: () {
- onClose();
- Navigator.of(context).pop();
- },
- ),
- ],
- );
- },
- );
- }
-}
diff --git a/lib/views/widgets/SuchatAppBarWidget.dart b/lib/views/widgets/appbar.dart
similarity index 95%
rename from lib/views/widgets/SuchatAppBarWidget.dart
rename to lib/views/widgets/appbar.dart
index e3ff747..6c50e1f 100644
--- a/lib/views/widgets/SuchatAppBarWidget.dart
+++ b/lib/views/widgets/appbar.dart
@@ -1,11 +1,11 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
-class SuchatAppBarWidget extends StatelessWidget {
+class SuchatAppBar extends StatelessWidget {
final String text;
final VoidCallback onPressed;
- const SuchatAppBarWidget({
+ const SuchatAppBar({
required this.text,
required this.onPressed,
});
diff --git a/lib/views/widgets/CustomButtonWidget.dart b/lib/views/widgets/csbutton.dart
similarity index 88%
rename from lib/views/widgets/CustomButtonWidget.dart
rename to lib/views/widgets/csbutton.dart
index 6d61e9f..5b6b268 100644
--- a/lib/views/widgets/CustomButtonWidget.dart
+++ b/lib/views/widgets/csbutton.dart
@@ -1,21 +1,19 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
-class CustomButtonWidget extends StatelessWidget {
+class CustomButton extends StatelessWidget {
final String text;
final Color backgroundColor;
final VoidCallback onPressed;
final Border? border;
final Color color;
- final bool? isEnabled;
- const CustomButtonWidget({
+ const CustomButton({
required this.text,
required this.backgroundColor,
required this.onPressed,
required this.color,
this.border,
- this.isEnabled,
});
@override
diff --git a/lib/views/widgets/EmailTextFieldWidget.dart b/lib/views/widgets/emailfield.dart
similarity index 87%
rename from lib/views/widgets/EmailTextFieldWidget.dart
rename to lib/views/widgets/emailfield.dart
index 0eeaaa5..6dc668c 100644
--- a/lib/views/widgets/EmailTextFieldWidget.dart
+++ b/lib/views/widgets/emailfield.dart
@@ -1,11 +1,11 @@
import 'package:flutter/material.dart';
-import 'package:suwon/views/widgets/TextFontWidget.dart';
+import 'package:suwon/views/widgets/font.dart';
-class EmailTextFieldWidget extends StatelessWidget {
+class EmailFD extends StatelessWidget {
final TextEditingController? controller;
final ValueChanged? onChanged;
- const EmailTextFieldWidget({
+ const EmailFD({
required this.controller,
required this.onChanged,
});
@@ -34,7 +34,7 @@ class EmailTextFieldWidget extends StatelessWidget {
fontWeight: FontWeight.w400,
color: Color(0xFF989898),
),
- suffix: TextFontWidget.fontRegular(
+ suffix: TextFont.fontRegular(
text: '@ suwon.ac.kr',
fontSize: 16,
color: Color(0xFF000000)),
diff --git a/lib/views/widgets/TextFontWidget.dart b/lib/views/widgets/font.dart
similarity index 97%
rename from lib/views/widgets/TextFontWidget.dart
rename to lib/views/widgets/font.dart
index ae651a6..6c93f7e 100644
--- a/lib/views/widgets/TextFontWidget.dart
+++ b/lib/views/widgets/font.dart
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
-class TextFontWidget {
+class TextFont {
static Widget fontRegular({
required String text,
required double fontSize,
diff --git a/lib/views/widgets/IdTextFieldWidget.dart b/lib/views/widgets/idfield.dart
similarity index 89%
rename from lib/views/widgets/IdTextFieldWidget.dart
rename to lib/views/widgets/idfield.dart
index cbb338e..f377490 100644
--- a/lib/views/widgets/IdTextFieldWidget.dart
+++ b/lib/views/widgets/idfield.dart
@@ -1,14 +1,14 @@
import 'package:flutter/material.dart';
-import 'package:suwon/views/widgets/TextFontWidget.dart';
+import 'package:suwon/views/widgets/font.dart';
-class IdTextFieldWidget extends StatelessWidget {
+class IdFD extends StatelessWidget {
final TextEditingController? controller;
final ValueChanged? onChanged;
- const IdTextFieldWidget({
+ const IdFD({
required this.controller,
required this.onChanged,
- });
+});
@override
Widget build(BuildContext context) {
diff --git a/pubspec.lock b/pubspec.lock
index 73718ad..0b95113 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -45,18 +45,10 @@ packages:
dependency: transitive
description:
name: collection
- sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
+ sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
url: "https://pub.dev"
source: hosted
- version: "1.18.0"
- crypto:
- dependency: transitive
- description:
- name: crypto
- sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
- url: "https://pub.dev"
- source: hosted
- version: "3.0.3"
+ version: "1.17.1"
cupertino_icons:
dependency: "direct main"
description:
@@ -107,30 +99,14 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
- http:
- dependency: "direct main"
- description:
- name: http
- sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba
- url: "https://pub.dev"
- source: hosted
- version: "1.2.0"
- http_parser:
+ js:
dependency: transitive
description:
- name: http_parser
- sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
+ name: js
+ sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
url: "https://pub.dev"
source: hosted
- version: "4.0.2"
- json_annotation:
- dependency: "direct main"
- description:
- name: json_annotation
- sha256: "0aa7409f6c82acfab96853b8b0c7503de49918cbe705a57cfdeb477756b4521b"
- url: "https://pub.dev"
- source: hosted
- version: "4.1.0"
+ version: "0.6.7"
lints:
dependency: transitive
description:
@@ -143,26 +119,26 @@ packages:
dependency: transitive
description:
name: matcher
- sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
+ sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
url: "https://pub.dev"
source: hosted
- version: "0.12.16"
+ version: "0.12.15"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
- sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
+ sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
url: "https://pub.dev"
source: hosted
- version: "0.5.0"
+ version: "0.2.0"
meta:
dependency: transitive
description:
name: meta
- sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
+ sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
url: "https://pub.dev"
source: hosted
- version: "1.10.0"
+ version: "1.9.1"
nested:
dependency: transitive
description:
@@ -212,34 +188,26 @@ packages:
dependency: transitive
description:
name: source_span
- sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
+ sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
url: "https://pub.dev"
source: hosted
- version: "1.10.0"
+ version: "1.9.1"
stack_trace:
dependency: transitive
description:
name: stack_trace
- sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
- url: "https://pub.dev"
- source: hosted
- version: "1.11.1"
- stomp_dart_client:
- dependency: "direct main"
- description:
- name: stomp_dart_client
- sha256: "10ecb6255a95eec78c3b064512fc8700cd2af9506cedafe3694e9662773dd1d5"
+ sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
url: "https://pub.dev"
source: hosted
- version: "1.0.3"
+ version: "1.11.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
- sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
+ sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
url: "https://pub.dev"
source: hosted
- version: "2.1.2"
+ version: "2.1.1"
string_scanner:
dependency: transitive
description:
@@ -260,18 +228,10 @@ packages:
dependency: transitive
description:
name: test_api
- sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
- url: "https://pub.dev"
- source: hosted
- version: "0.6.1"
- typed_data:
- dependency: transitive
- description:
- name: typed_data
- sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
+ sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
url: "https://pub.dev"
source: hosted
- version: "1.3.2"
+ version: "0.5.1"
vector_graphics:
dependency: transitive
description:
@@ -304,22 +264,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
- web:
- dependency: transitive
- description:
- name: web
- sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
- url: "https://pub.dev"
- source: hosted
- version: "0.3.0"
- web_socket_channel:
- dependency: transitive
- description:
- name: web_socket_channel
- sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b
- url: "https://pub.dev"
- source: hosted
- version: "2.4.0"
xml:
dependency: transitive
description:
@@ -329,5 +273,5 @@ packages:
source: hosted
version: "6.3.0"
sdks:
- dart: ">=3.2.0 <4.0.0"
+ dart: ">=3.0.3 <4.0.0"
flutter: ">=3.10.0"
diff --git a/pubspec.yaml b/pubspec.yaml
index d3a5333..940e218 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -2,7 +2,7 @@ name: suwon
description: flag project
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
-publish_to: "none" # Remove this line if you wish to publish to pub.dev
+publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
@@ -19,7 +19,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment:
- sdk: ">=3.0.3 <4.0.0"
+ sdk: '>=3.0.3 <4.0.0'
# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
@@ -30,18 +30,11 @@ environment:
dependencies:
flutter_svg: ^2.0.7
flutter_screenutil: ^5.8.4
-
+
flutter:
sdk: flutter
-
provider: ^6.0.5
-
- http: ^1.2.0
-
- stomp_dart_client: ^1.0.3
- json_annotation: ^4.0.1
-
# The following adds the Cupertino Icons font to your application.
@@ -64,6 +57,7 @@ dev_dependencies:
# The following section is specific to Flutter packages.
flutter:
+
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
@@ -71,9 +65,9 @@ flutter:
# To add assets to your application, add an assets section, like this:
assets:
- - assets/bubble.PNG
- - assets/SUCHAT.png
- - assets/
+ - asstes/bubble.PNG
+ - asstes/SUCHAT.png
+ - asstes/
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware
@@ -89,19 +83,19 @@ flutter:
fonts:
- family: KCCChassam
fonts:
- - asset: assets/font/KCC-Chassam.ttf
+ - asset: asstes/font/KCC-Chassam.ttf
style: normal
- family: Pretendard-Light
fonts:
- - asset: assets/font/Pretendard-Light.ttf
+ - asset: asstes/font/Pretendard-Light.ttf
style: normal
- family: Pretendard-SemiBold
fonts:
- - asset: assets/font/Pretendard-SemiBold.ttf
+ - asset: asstes/font/Pretendard-SemiBold.ttf
style: normal
- family: Pretendard-Regular
fonts:
- - asset: assets/font/Pretendard-Regular.ttf
+ - asset: asstes/font/Pretendard-Regular.ttf
style: normal
#
diff --git a/web/favicon.png b/web/favicon.png
deleted file mode 100644
index 8aaa46a..0000000
Binary files a/web/favicon.png and /dev/null differ
diff --git a/web/icons/Icon-192.png b/web/icons/Icon-192.png
deleted file mode 100644
index b749bfe..0000000
Binary files a/web/icons/Icon-192.png and /dev/null differ
diff --git a/web/icons/Icon-512.png b/web/icons/Icon-512.png
deleted file mode 100644
index 88cfd48..0000000
Binary files a/web/icons/Icon-512.png and /dev/null differ
diff --git a/web/icons/Icon-maskable-192.png b/web/icons/Icon-maskable-192.png
deleted file mode 100644
index eb9b4d7..0000000
Binary files a/web/icons/Icon-maskable-192.png and /dev/null differ
diff --git a/web/icons/Icon-maskable-512.png b/web/icons/Icon-maskable-512.png
deleted file mode 100644
index d69c566..0000000
Binary files a/web/icons/Icon-maskable-512.png and /dev/null differ
diff --git a/web/index.html b/web/index.html
deleted file mode 100644
index d92431e..0000000
--- a/web/index.html
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- toon_flix
-
-
-
-
-
-
-
-
-
-
diff --git a/web/manifest.json b/web/manifest.json
deleted file mode 100644
index a56629f..0000000
--- a/web/manifest.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "name": "suwon",
- "short_name": "suwon",
- "start_url": ".",
- "display": "standalone",
- "background_color": "#0175C2",
- "theme_color": "#0175C2",
- "description": "A new Flutter project.",
- "orientation": "portrait-primary",
- "prefer_related_applications": false,
- "icons": [
- {
- "src": "icons/Icon-192.png",
- "sizes": "192x192",
- "type": "image/png"
- },
- {
- "src": "icons/Icon-512.png",
- "sizes": "512x512",
- "type": "image/png"
- },
- {
- "src": "icons/Icon-maskable-192.png",
- "sizes": "192x192",
- "type": "image/png",
- "purpose": "maskable"
- },
- {
- "src": "icons/Icon-maskable-512.png",
- "sizes": "512x512",
- "type": "image/png",
- "purpose": "maskable"
- }
- ]
-}