[Solved]The method ‘validate’ can’t be unconditionally invoked because the receiver can be ‘null’. Try making the call conditional (using ‘?.’) or adding a null check to the target
you might be getting the compilation error with below code with flutter 2.5 if (!_formKey.currentState.validate()) { // Invalid! return; }…