Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2021-1-capstone-design1
/
RIT_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
고원빈
2021-05-19 01:04:02 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2203f80c0ee32203964ba59028b56b5e98af3b6c
2203f80c
1 parent
7e83d2be
[frontend] 회원가입 연동
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
56 additions
and
2 deletions
frontend/README.md
frontend/flutter_application_1/.env
frontend/flutter_application_1/android/app/src/main/AndroidManifest.xml
frontend/flutter_application_1/lib/main.dart
frontend/flutter_application_1/lib/src/screens/SignUpLocal.dart
frontend/flutter_application_1/pubspec.lock
frontend/flutter_application_1/pubspec.yaml
frontend/README.md
View file @
2203f80
...
...
@@ -51,3 +51,7 @@ appbar 관련 디자인은 추후 구현 예정
+
API 연동 중에 추가로 개발 예정
+
build용 파일 구현
### 2021-05-17
+
server test 완료
### 2021-05-18
+
회원 가입 SERVER 연동
...
...
frontend/flutter_application_1/.env
0 → 100644
View file @
2203f80
SERVER_URL=포트 주소
\ No newline at end of file
frontend/flutter_application_1/android/app/src/main/AndroidManifest.xml
View file @
2203f80
...
...
@@ -10,6 +10,7 @@
<uses-permission
android:name=
"android.permission.VIBRATE"
/>
<uses-permission
android:name=
"android.permission.BLUETOOTH"
/>
<uses-permission
android:name=
"android.permission.BLUETOOTH_ADMIN"
/>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<uses-permission
android:name=
"android.permission.ACCESS_COARSE_LOCATION"
/>
<application
android:name=
"io.flutter.app.FlutterApplication"
...
...
frontend/flutter_application_1/lib/main.dart
View file @
2203f80
import
'package:flutter/material.dart'
;
import
'./src/screens/Homepage.dart'
;
void
main
(
)
{
import
'package:flutter_dotenv/flutter_dotenv.dart'
;
Future
main
(
)
async
{
await
DotEnv
().
load
(
'.env'
);
runApp
(
MyApp
());
}
...
...
frontend/flutter_application_1/lib/src/screens/SignUpLocal.dart
View file @
2203f80
import
'dart:convert'
;
import
'package:flutter/material.dart'
;
import
'package:http/http.dart'
as
http
;
import
'package:flutter_dotenv/flutter_dotenv.dart'
;
class
SignUpLocal
extends
StatefulWidget
{
@override
...
...
@@ -20,6 +22,17 @@ class _SignUpLocalState extends State<SignUpLocal> {
bool
passwordVisible
=
false
;
bool
passwordValidationVisible
=
true
;
Future
<
String
>
signup_Validate
()
async
{
http
.
Response
response
=
await
http
.
post
(
Uri
.
encodeFull
(
DotEnv
().
env
[
'SERVER_URL'
]
+
'auth/register'
),
headers:
{
"Content-Type"
:
"application/json"
},
body:
jsonEncode
({
'userId'
:
emailController
.
text
,
'password'
:
passwordController
.
text
,
'passwordCheck'
:
passwordValidController
.
text
}));
}
@override
Widget
build
(
BuildContext
context
)
{
final
Size
size
=
MediaQuery
.
of
(
context
).
size
;
...
...
@@ -64,6 +77,7 @@ class _SignUpLocalState extends State<SignUpLocal> {
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
<
Widget
>[
TextFormField
(
controller:
emailController
,
keyboardType:
TextInputType
.
text
,
decoration:
InputDecoration
(
labelText:
'이메일'
,
...
...
@@ -161,7 +175,14 @@ class _SignUpLocalState extends State<SignUpLocal> {
height:
80
,
padding:
const
EdgeInsets
.
fromLTRB
(
20
,
20
,
20
,
20
),
child:
RaisedButton
(
onPressed:
()
async
{},
onPressed:
()
async
{
String
saveMessage
=
await
signup_Validate
();
print
(
'saveMessage'
);
print
(
saveMessage
);
print
(
emailController
.
text
);
print
(
passwordController
.
text
);
print
(
passwordValidController
.
text
);
},
shape:
RoundedRectangleBorder
(
borderRadius:
new
BorderRadius
.
circular
(
18.0
),
side:
BorderSide
(
color:
Colors
.
blue
)),
...
...
frontend/flutter_application_1/pubspec.lock
View file @
2203f80
...
...
@@ -104,6 +104,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.0"
flutter_dotenv:
dependency: "direct main"
description:
name: flutter_dotenv
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
flutter_local_notifications:
dependency: "direct main"
description:
...
...
@@ -135,6 +142,20 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
http:
dependency: "direct main"
description:
name: http
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.2"
http_parser:
dependency: transitive
description:
name: http_parser
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.4"
intl:
dependency: "direct main"
description:
...
...
frontend/flutter_application_1/pubspec.yaml
View file @
2203f80
...
...
@@ -35,6 +35,8 @@ dependencies:
shared_preferences
:
^0.5.6+1
flutter_blue
:
^0.7.2
cupertino_icons
:
^0.1.3
http
:
^0.12.0+4
flutter_dotenv
:
^2.1.0
dev_dependencies
:
flutter_test
:
...
...
@@ -46,6 +48,7 @@ flutter:
uses-material-design
:
true
assets
:
-
.env
-
images/
-
images/main_logo.png
-
images/setting.png
...
...
Please
register
or
login
to post a comment