skip to Main Content

Error occurrence while trying to validate form : unhandled exception:Null check operator used on null value – Flutter

ElevatedButton( onPressed: () async { if (_formKey.currentState!.validate()) { try { final newUser = await _auth.createUserWithEmailAndPassword( email: email.text, password: password.text); if (newUser != null) { Navigator.push( context, MaterialPageRoute( builder: (context) => DashboardScreen(), )); } setState(() {}); } catch (e) { print(e);…

VIEW QUESTION
Back To Top
Search