You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you call for a rebuild on a widget that contains a NumberFormBox from outside the NumberFormField it throws the error:
This NumberFormBox<double> widget cannot be marked as needing to build because the framework is already in the process of building widgets. A widget can be marked as needing to be built during the build phase only if one of its ancestors is currently building. This exception is allowed because the framework builds parent widgets before children, which means a dirty descendant will always be built. Otherwise, the framework might not visit this widget during this build phase.
The widget on which setState() or markNeedsBuild() was called was: NumberFormBox<double>
dependencies: [UnmanagedRestorationScope, _FluentTheme]
state: TextFormBoxState#3989d
The widget which was currently being built when the offending call was made was: Flexible
flex: 1
To Reproduce
I believe all you need to do is try to setState()/rebuild a widget that contains a NumberFormBox, but it could be that something about having two of them in a Column is the real issue. I noticed this originally when I had two number form boxes in a stateful widget that calls setState() to work with the values in the NumberFormBoxs.
when the first NumberFormBox is edited the second one throws an error when the rebuild starts to occur. This doesn't happen with the default Material TextFormField so I believe something in fluent_ui is producing the issue. Note that I tested this without my bloc as shown below and the issue persisted.
In case it is useful, my entire build method looks like this:
If you call for a rebuild on a widget that contains a
NumberFormBox
from outside theNumberFormField
it throws the error:To Reproduce
I believe all you need to do is try to
setState()
/rebuild a widget that contains aNumberFormBox
, but it could be that something about having two of them in aColumn
is the real issue. I noticed this originally when I had two number form boxes in a stateful widget that callssetState()
to work with the values in theNumberFormBox
s.when the first
NumberFormBox
is edited the second one throws an error when the rebuild starts to occur. This doesn't happen with the default MaterialTextFormField
so I believe something influent_ui
is producing the issue. Note that I tested this without my bloc as shown below and the issue persisted.In case it is useful, my entire build method looks like this:
The text was updated successfully, but these errors were encountered: