edsonbonfim / form

A simple and powerful way to manipulate flutter forms. :rocket::zap:
https://edsonbonfim.github.io/form
MIT License
11 stars 4 forks source link

The getter 'validators' was called on null. #3

Open allanwolski opened 4 years ago

allanwolski commented 4 years ago

I'm getting an error after upgrading to version 0.0.5

════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
The following NoSuchMethodError was thrown building Input(state: _InputState#70296):
The getter 'validators' was called on null.
Receiver: null
Tried calling: validators

When the exception was thrown, this was the stack: 
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)
#1      _InputBaseState.didUpdateWidget (package:form/src/form.dart:533:41)
#2      StatefulElement.update (package:flutter/src/widgets/framework.dart:4690:58)
#3      Element.updateChild (package:flutter/src/widgets/framework.dart:3201:15)
#4      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4527:16)
...
edsonbonfim commented 4 years ago

Could you show me an example of use where this error occurs?

allanwolski commented 4 years ago

The problem occurs when focusing on an error field. If I remove setState the error does not occur.

_focusNode.addListener(() {
   setState(() {});
});
allanwolski commented 4 years ago

@edsonbonfim

Any updates on this?

guilhermedaldim commented 4 years ago

Same issue here

allanwolski commented 4 years ago

@edsonbonfim

Has the plugin been discontinued?

guilhermedaldim commented 3 years ago

@edsonbonfim

Any updates on this?