Skip to content

Commit

Permalink
✨Feat: 홈 위젯
Browse files Browse the repository at this point in the history
  • Loading branch information
seochan99 committed Feb 20, 2024
1 parent 2e2f43e commit 692a44f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/viewModels/home/home_viewmodel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ class HomeViewModel extends GetxController {
var circleNumber = 42.obs;
var linialPersent = 0.9.obs;

@override
void onInit() {
super.onInit();
update();
}

// 발음 점수 업데이트
void updateSpeakingScore(int newScore) {
speakingScore.value = newScore;
Expand All @@ -27,4 +33,3 @@ class HomeViewModel extends GetxController {
linialPersent.value = newPersent;
}
}

1 change: 1 addition & 0 deletions lib/views/home/home_head_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class HomeHeaderWidget extends StatelessWidget {
),
),
// Use ViewModel data

Text(
isLoggedIn
? '${vm.learningLanguage.value} - ${vm.nickname.value}'
Expand Down

0 comments on commit 692a44f

Please sign in to comment.