Skip to content

Commit

Permalink
remove unused call word from cubits
Browse files Browse the repository at this point in the history
  • Loading branch information
Eldar2021 committed Mar 26, 2024
1 parent 2a170a6 commit ac1ee12
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions app/lib/app/presentation/cubit/app_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ class AppCubit extends Cubit<AppState> {
final SetColorUseCase setColorUseCase;

Future<void> changeLang(String langKey) async {
final local = await setLocaleUseCase.call(langKey);
final local = await setLocaleUseCase(langKey);
emit(state.copyWith(currentLocale: local));
}

Future<void> changeMode({required bool isDark}) async {
await setModeUseCase.call(isDark: isDark);
await setModeUseCase(isDark: isDark);
emit(state.copyWith(theme: state.theme.copyWith(brightness: isDark ? Brightness.dark : Brightness.light)));
}

Future<void> changeColor(int index, Color color) async {
await setColorUseCase.call(index, color);
await setColorUseCase(index, color);
emit(state.copyWith(theme: state.theme.copyWith(targetColor: color)));
}

Expand Down
4 changes: 2 additions & 2 deletions app/lib/app/presentation/cubit/auth_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class AuthCubit extends Cubit<AuthState> {
final SetGenderUseCase setGenderUseCase;

Future<AuthState> login(String languageCode, Gender gender) async {
final user = await loginUseCase.call(languageCode, gender);
final user = await loginUseCase(languageCode, gender);
user.fold(
(l) => emit(state.copyWith(exception: l)),
(r) => emit(state.copyWith(user: r)),
Expand All @@ -26,7 +26,7 @@ class AuthCubit extends Cubit<AuthState> {
}

Future<void> setGender(Gender gender) async {
await setGenderUseCase.call(gender);
await setGenderUseCase(gender);
emit(state.copyWith(user: state.user?.copyWith(gender: gender)));
}

Expand Down

0 comments on commit ac1ee12

Please sign in to comment.