Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,4 @@ class CongratulationPage extends StatelessWidget {
),
);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ class CongratulationAppBar extends StatelessWidget
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
width: AppGaps.gap36,
),
SizedBox(width: AppGaps.gap36),
Text(
"회원가입",
style: AppTypography.subtitle2.copyWith(color: AppColors.grey900),
Expand Down
7 changes: 4 additions & 3 deletions lib/auth/presentation/pages/login/login_viewmodel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ class LoginViewModel extends ChangeNotifier {
try {
bool installed = await isKakaoTalkInstalled();

OAuthToken token = installed
? await UserApi.instance.loginWithKakaoTalk()
: await UserApi.instance.loginWithKakaoAccount();
OAuthToken token =
installed
? await UserApi.instance.loginWithKakaoTalk()
: await UserApi.instance.loginWithKakaoAccount();

final user = await UserApi.instance.me();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:code_l/auth/presentation/pages/terms_and_conditions/terms_and_conditions_viewmodel.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

final termsAndConditionsViewModelProvider =
ChangeNotifierProvider((ref) => TermsAndConditionsViewmodel());
final termsAndConditionsViewModelProvider = ChangeNotifierProvider(
(ref) => TermsAndConditionsViewmodel(),
);
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ class TermsAndConditionPage extends ConsumerWidget {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const WomanVerificationPage()),
builder: (context) => const WomanVerificationPage(),
),
);
},
),
Expand Down Expand Up @@ -72,19 +73,21 @@ class TermsAndConditionPage extends ConsumerWidget {
Text(
"모두 동의합니다.",
style: AppTypography.subtitle2.copyWith(
color: viewmodel.checkState[0]
? AppColors.grey900
: AppColors.grey500,
color:
viewmodel.checkState[0]
? AppColors.grey900
: AppColors.grey500,
),
),
IconButton(
onPressed: () => notifier.toggleAll(),
iconSize: 36,
icon: Icon(
Icons.check_circle_outline,
color: viewmodel.checkState[0]
? AppColors.grey900
: AppColors.grey500,
color:
viewmodel.checkState[0]
? AppColors.grey900
: AppColors.grey500,
),
),
],
Expand All @@ -95,17 +98,16 @@ class TermsAndConditionPage extends ConsumerWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
TextButton(
style: TextButton.styleFrom(
padding: EdgeInsets.zero,
),
style: TextButton.styleFrom(padding: EdgeInsets.zero),
onPressed: () {},
child: Text(
getLabel(i),
style: AppTypography.body2.copyWith(
decoration: TextDecoration.underline,
color: viewmodel.checkState[i]
? AppColors.grey900
: AppColors.grey500,
color:
viewmodel.checkState[i]
? AppColors.grey900
: AppColors.grey500,
),
),
),
Expand All @@ -114,9 +116,10 @@ class TermsAndConditionPage extends ConsumerWidget {
iconSize: 24,
icon: Icon(
Icons.check,
color: viewmodel.checkState[i]
? AppColors.grey900
: AppColors.grey500,
color:
viewmodel.checkState[i]
? AppColors.grey900
: AppColors.grey500,
),
),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ class TermsAndConditionsViewmodel extends ChangeNotifier {

void toggleAll() {
final allAgree = !checkState[0];
checkState = [allAgree, for (int i = 1; i < checkState.length; i++) allAgree];
checkState = [
allAgree,
for (int i = 1; i < checkState.length; i++) allAgree,
];
if (checkState.sublist(1, 4).every((checked) => checked)) {
isValid = true;
} else {
Expand Down
5 changes: 3 additions & 2 deletions lib/auth/presentation/pages/woman/providers.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:code_l/auth/presentation/pages/woman/woman_verification_viewmodel.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

final womanViewmodelProvider =
ChangeNotifierProvider((ref) => WomanVerificationViewmodel());
final womanViewmodelProvider = ChangeNotifierProvider(
(ref) => WomanVerificationViewmodel(),
);
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ class WomanVerificationAppBar extends StatelessWidget
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
width: AppGaps.gap36,
),
SizedBox(width: AppGaps.gap36),
Text(
"여성확인 안내",
style: AppTypography.subtitle2.copyWith(color: AppColors.grey900),
Expand Down
Loading