Skip to content

Commit

Permalink
fixed issue for logout
Browse files Browse the repository at this point in the history
  • Loading branch information
KartikDeshmukh0211 committed Nov 17, 2024
1 parent 7cd791e commit 42c1c32
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/views/pages/profile/profile_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:donorconnect/cubit/profile/profile_cubit.dart';
import 'package:donorconnect/cubit/profile/profile_state.dart';
import 'package:donorconnect/language/helper/language_extention.dart';
import 'package:donorconnect/views/common_widgets/toggle_button.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

Expand Down Expand Up @@ -41,7 +42,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
actions: [
IconButton(
onPressed: () {

AuthCubit(_auth, _firestore).signOut(context);
},
icon: const Icon(
Icons.logout,
Expand Down Expand Up @@ -179,7 +180,8 @@ class _ProfileScreenState extends State<ProfileScreen> {
// theme-toggle button
BlocBuilder<ThemeCubit, Themestate>(
builder: (context, themeState) {
final isDarkMode = themeState.themeData.brightness == Brightness.dark;
final isDarkMode =
themeState.themeData.brightness == Brightness.dark;
return ThemeToggleButton(
switchValue: isDarkMode,
);
Expand Down

0 comments on commit 42c1c32

Please sign in to comment.