mirrored_repositories/coffeeCup/lib/screens
import 'package:coffeeCup/screens/authenticate/register.dart';
import 'package:coffeeCup/screens/authenticate/sign_in.dart';
import 'package:flutter/material.dart';

class Authenticate extends StatefulWidget {
  @override
  _AuthenticateState createState() => _AuthenticateState();
}

class _AuthenticateState extends State<Authenticate> {
  // windowpicker
  bool showSignIn = true;

  void toggleView() {
    setState(() {
      showSignIn = !showSignIn;
    });
  }

  @override
  Widget build(BuildContext context) {
    if (showSignIn) {
      return SignIn(
          toggleView: toggleView); // passing function to signin widget
    } else {
      return Register(
          toggleView: toggleView); // passing function to register widget
    }
  }
}
