Flutter class LandingPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
final userModel = Provider.of<UserModel>(context);
if (userModel.viewState == ViewState.Idle) {
if (_userModel.user == null) {
return LogInPage();
} else {
return HomePage(user: _userModel.user);
}
} else {
return Scaffold(
body: Center(
child: CircularProgressIndicator(),
));
}
}
}