Adding the login/signup screen

The login screen will serve two purposes: it will allow our user to log in to our app, or to sign up and obtain an identity. We'll use email and password authentication, so we'll need to design a screen that allows the input of a login and a password. We won't need or use any other data from our users. We will proceed as follows:

  1. Back in the app code, let's create a new file in the screens folder and call it login_screen.dart.
  2. Inside the login_screen.dart file, we'll import the material.dart library, and create a new stateful widget using the stful shortcut. We'll call this widget LoginScreen.
  3. Inside the _LoginScreenState class, we'll create a few state-level variables, such as those shown in the following ...

Get Flutter Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.