Responsive Sign In

Loading preview

Starting the Flutter app

A responsive sign-in form that adapts to different screen sizes, with a clean layout and form validation.

Get the source

Add it to your project

Copies the Dart source into your app, so you own it. Flutter SDK only, no extra packages.

First time? Run dart pub global activate fluttertemplates_dev, or read the CLI guide.

How it works

SignInPage2 reads MediaQuery width and stacks _Logo above _FormContent below 600px; wider screens get them side by side in a Row capped at 800px. Both layouts sit in a SingleChildScrollView, so short screens can scroll when the keyboard opens. _FormContent owns the Form, the password toggle and _rememberMe. A valid submit reaches a /// do something comment, so no one is signed in.

Adapting it

  • Add email and password controllers, and call your auth service at the /// do something comment.
  • The email RegExp only checks format, so confirm the address on your server.