-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feat/connect-to-backend
- Loading branch information
Showing
10 changed files
with
248 additions
and
101 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:kai_friends_app/widgets/main_button.dart'; | ||
|
||
class LoginPage extends StatelessWidget { | ||
const LoginPage({Key? key}) : super(key: key); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
body: Container( | ||
width: double.infinity, | ||
height: double.infinity, | ||
decoration: const BoxDecoration( | ||
image: DecorationImage( | ||
image: AssetImage('images/login_background.png'), | ||
fit: BoxFit.cover, | ||
), | ||
), | ||
child: SafeArea( | ||
child: Center( | ||
child: Column( | ||
mainAxisAlignment: MainAxisAlignment.end, | ||
children: [ | ||
FractionallySizedBox( | ||
widthFactor: 0.7, | ||
child: Image.asset('images/login_logo.png'), | ||
), | ||
MainButton(name: '카이스트 통합인증으로 로그인 / 가입', f: (){}), | ||
const SizedBox(height: 50), | ||
], | ||
), | ||
), | ||
), | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,101 +1,32 @@ | ||
import 'dart:collection'; | ||
|
||
import 'package:flutter/material.dart'; | ||
import 'package:kai_friends_app/models/sample/sample_users.dart'; | ||
import 'package:kai_friends_app/models/user.dart'; | ||
import 'package:kai_friends_app/screens/main/user_profile_view.dart'; | ||
|
||
class UserRecommendationScreen extends StatefulWidget { | ||
Queue<UserProfile> userProfiles = | ||
Queue<UserProfile>.from(sampleUserProfiles); // TODO: fetch with API | ||
|
||
@override | ||
_UserRecommendationScreenState createState() => | ||
_UserRecommendationScreenState(); | ||
} | ||
|
||
class _UserRecommendationScreenState extends State<UserRecommendationScreen> { | ||
late UserProfile userProfile; | ||
|
||
@override | ||
void initState() { | ||
super.initState(); | ||
userProfile = widget.userProfiles.first; | ||
} | ||
|
||
void changeUserProfile() { | ||
if (widget.userProfiles.length == 1) { | ||
print('End of user list'); | ||
return; | ||
} | ||
|
||
widget.userProfiles.removeFirst(); | ||
setState(() { | ||
userProfile = widget.userProfiles.first; | ||
}); | ||
} | ||
import 'package:kai_friends_app/screens/main/friend_filter.dart'; | ||
import 'package:kai_friends_app/widgets/friend_selection/friend_selection_view.dart'; | ||
import 'package:kai_friends_app/widgets/top_app_bar.dart'; | ||
|
||
class UserRecommendationScreen extends StatelessWidget { | ||
final String getFriendRecommendationUrl = | ||
'/friendrecommendation'; // TODO: modify URL | ||
@override | ||
Widget build(BuildContext context) { | ||
return SafeArea( | ||
child: SingleChildScrollView( | ||
child: Column( | ||
children: [ | ||
const SizedBox(height: 60.0), // TODO: add filter button | ||
UserProfileView(userProfile: userProfile), | ||
const SizedBox(height: 30.0), | ||
FriendDecisionButtons(callback: changeUserProfile), | ||
], | ||
), | ||
// TODO: add filter button | ||
return Scaffold( | ||
appBar: TopAppBar(title: '', actions: [ | ||
TextButton.icon( | ||
style: TextButton.styleFrom( | ||
primary: Colors.black, | ||
), | ||
onPressed: () { | ||
Navigator.push( | ||
context, | ||
MaterialPageRoute( | ||
builder: (context) => FriendFilterScreen())); | ||
}, | ||
icon: const Icon(Icons.filter_list), | ||
label: const Text('필터')), | ||
]), | ||
body: FriendSelectionView( | ||
getUserProfilesUrl: getFriendRecommendationUrl, | ||
), | ||
); | ||
} | ||
} | ||
|
||
class FriendDecisionButtons extends StatelessWidget { | ||
FriendDecisionButtons({required this.callback}); | ||
|
||
final Function callback; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Row( | ||
mainAxisAlignment: MainAxisAlignment.spaceEvenly, | ||
children: <Widget>[ | ||
IconButton( | ||
iconSize: 50, | ||
icon: const Icon( | ||
Icons.clear, | ||
color: Color(0xFFE73700), | ||
), | ||
tooltip: '아니요', | ||
onPressed: () { | ||
callback(); | ||
}, | ||
), | ||
IconButton( | ||
iconSize: 50, | ||
icon: const Icon( | ||
Icons.autorenew, | ||
color: Color(0xFFE73700), | ||
), | ||
tooltip: '패스할래요', | ||
onPressed: () { | ||
callback(); | ||
}, | ||
), | ||
IconButton( | ||
iconSize: 50, | ||
icon: const Icon( | ||
Icons.favorite, | ||
color: Color(0xFFE73700), | ||
), | ||
tooltip: '좋아요', | ||
onPressed: () { | ||
callback(); | ||
}, | ||
), | ||
], | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:kai_friends_app/widgets/friend_selection/friend_selection_view.dart'; | ||
import 'package:kai_friends_app/widgets/top_app_bar.dart'; | ||
|
||
class ReceivedRequestsScreen extends StatelessWidget { | ||
final String getReceivedRequestsUrl = | ||
'/receievedrequests'; // TODO: modify URL | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
appBar: const TopAppBar( | ||
title: '', | ||
actions: [], | ||
), | ||
body: FriendSelectionView( | ||
getUserProfilesUrl: getReceivedRequestsUrl, | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.