I am trying to conditionally build a widget in Flutter, however my condition somehow doesn't equal what I think it should. How is this not the same thing?
Provider
class User with ChangeNotifier {
Map _user = {};
Map get user {
return _user;
}
void setUser() {
// Set _user and notify listeners
}
}
Widget doing the build
Widget build(BuildContext context) {
final user = Provider.of<User>(context);
if (user.user == {}) {
print('It equals it');
print(user.user);
} else {
print('It DOES NOT equals it');
print(user.user);
}
...
bottomNavigationBar: user.user == {} ? BottomNavBar() : null
}
Here is what that somehow comes out to:

What am I doing wrong?