Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/84 feat homepage api 연동 #90

Merged
merged 16 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT"/>
<application
android:label="fam_story_frontend"
android:label="fam'Story"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"
android:requestLegacyExternalStorage="true"
Expand Down
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/son.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions devtools_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extensions:
61 changes: 53 additions & 8 deletions lib/di/provider/id_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ class IdProvider with ChangeNotifier {
String nickname = '';
String introMessage = '';

int memberNumber = 0;
String familyName = '';
String createdDate = '';
String familyKeyCode = '';

int age = 0;
int gender = 0;
String email = '';
String username = '';

void setFamilyId(int id) {
familyId = id;
notifyListeners();
Expand All @@ -18,23 +28,58 @@ class IdProvider with ChangeNotifier {
notifyListeners();
}

void setRole(int role) {
role = role;
void setRole(int ro) {
role = ro;
notifyListeners();
}

void setName(String nam) {
name = nam;
notifyListeners();
}

void setName(String name) {
name = name;
void setNicKName(String nick) {
nickname = nick;
notifyListeners();
}

void setNicKName(String nickname) {
nickname = nickname;
void setIntroMessage(String message) {
introMessage = message;
notifyListeners();
}

void setIntroMessage(String introMessage) {
introMessage = introMessage;
void setMemberNumber(int memNum) {
memberNumber = memNum;
notifyListeners();
}
void setFamilyName(String fam) {
familyName = fam;
notifyListeners();
}
void setCreatedDate(String date) {
createdDate = date;
notifyListeners();
}
void setKeyCode(String keycode) {
familyKeyCode = keycode;
notifyListeners();
}

void setAge(int ageage) {
age = ageage;
notifyListeners();
}
void setGender(int gen) {
gender = gen;
notifyListeners();
}
void setEmail(String emailemail) {
email = emailemail;
notifyListeners();
}
void setUsername(String usernamename) {
username = usernamename;
notifyListeners();
}

}
13 changes: 7 additions & 6 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:fam_story_frontend/pages/family_create_page.dart';
import 'package:fam_story_frontend/pages/family_join_page.dart';
import 'package:fam_story_frontend/pages/home_page.dart';
import 'package:fam_story_frontend/pages/role_page.dart';
import 'package:fam_story_frontend/pages/setting_page.dart';
import 'package:flutter/material.dart';
import 'package:fam_story_frontend/screens/loading_screen.dart';
import 'package:fam_story_frontend/pages/family_join_create_page.dart';
Expand Down Expand Up @@ -64,7 +65,12 @@ Future<void> main() async {
);
initializeNotification();

runApp(const FamStory());
runApp(
ChangeNotifierProvider(
create: (context) => IdProvider(),
child: const FamStory(),
),
);
}

class FamStory extends StatelessWidget {
Expand All @@ -82,11 +88,6 @@ class FamStory extends StatelessWidget {
routes: {
// TODO: 로딩에서 가족 여부 체크

// '/': (context) => ChangeNotifierProvider(
// create: (context) => IdProvider(),
// child: const RootPage(),
// ),

'/': (context) => const LoadingScreen(),

// '/': (context) => const FamilyJoinPage(),
Expand Down
3 changes: 1 addition & 2 deletions lib/models/family_interaction_model.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
class FamilyInteractionModel {
final int interactionId, srcMemberId, dstMemberId, interactionType;
final bool isChecked;
final int interactionId, srcMemberId, dstMemberId, interactionType, isChecked;

FamilyInteractionModel.fromJson(Map<String, dynamic> json)
: interactionId = json['interactionId'],
Expand Down
Loading