```
class User {
 String token;
 User({this.token});
} 

class AuthService {
final String url = 'https://reqres.in/api/login';
final controller = StreamController<User>();

Future<User> signIn(String email, String password) async {
final response =
    await post(url, body: {'email': email, 'password': password});
final data = jsonDecode(response.body);
final user = _userFromDatabaseUser(data);
// print(user.token);
controller.add(user);
return user;
}

//create user obj based on the database user
User _userFromDatabaseUser(Map user) {
return user != null ? User(token: user['token']) : null;
}

//user stream for provider
Stream<User> get user {
 return controller.stream;
}
}
//in Sign in page 
onPressed: () async {
if (_formKey.currentState.validate()) {
 dynamic result = await _auth.signIn(email, password);
 print(result); // Instance of 'User'                                        
 }
}

```

I am new to flutter and want to make an app that only authenticated users. I'm trying to read user token data from a stream. then check that token is not null if I got token then goto home page otherwise it will show error how do I print or store token value?