Skip to content

Authstate listener causes bottom bar to not navigate to other pages #3

Description

@Hosea987

I tried an auth state listener so that the app does not have to go to the google sign in page everytime i open the app. So i added this bit of code:

@OverRide
Widget build(BuildContext context) {
return StreamBuilder(
stream: FirebaseAuth.instance.onAuthStateChanged,
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.active) {
FirebaseUser user = snapshot.data;
if (user == null) {
return buildAuthPage();
}
return buildUnAuthPage();
} else {
return Scaffold(
body: Center(
child: CircularProgressIndicator(),
),
);
}
},
);
}

But the problem is that everytime i click on ant item in the bottom bar it keeps bringing me back to the timeline page. I cant go to the other pages by clikcing on items in the bottom bar. Please help,i have been stuck for 2 weeks now with no solution(newb problems)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions