From d121e6fa119dbcd15acc89813bd8a51460c1b262 Mon Sep 17 00:00:00 2001 From: heyhemant <62196986+heyhemant@users.noreply.github.com> Date: Wed, 30 Sep 2020 19:46:14 +0530 Subject: [PATCH] Adding some comments Added some comments so that the code can easily understand by new devs --- lib/main.dart | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 9feb83c..b31f108 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -19,9 +19,9 @@ class FormPage extends StatefulWidget { class _FormPageState extends State { final scaffoldKey = new GlobalKey(); - final formKey = new GlobalKey(); + final formKey = new GlobalKey(); //creatig a key - String _email; + String _email; //Variables hold Email and password String _password; @override @@ -69,13 +69,13 @@ class _FormPageState extends State { new TextFormField( decoration: new InputDecoration(labelText: "Email"), validator: (val) => - !val.contains('@') ? 'Invalid Email' : null, + !val.contains('@') ? 'Invalid Email' : null, //checking if email is correct or not onSaved: (val) => _email = val, ), new TextFormField( - decoration: new InputDecoration(labelText: "Password"), + decoration: new InputDecoration(labelText: "Password"), validator: (val) => - val.length < 6 ? 'Password too short' : null, + val.length < 6 ? 'Password too short' : null, //checking if password is correct or not and fulfil the conditions onSaved: (val) => _password = val, obscureText: true, ),