mirrored_repositories/awesome-flutter/projects/brew_crew/lib
import 'package:brew_crew/models/app_user.dart';
import 'package:brew_crew/screens/authenticate/authenticate.dart';
import 'package:brew_crew/screens/home/home.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

class Wrapper extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final user = Provider.of<AppUser>(context);

    // return either Authenticate or Home widget
    if (user == null) {
      return Authenticate();
    } else {
      return Home();
    }
  }
}
