-
-
Notifications
You must be signed in to change notification settings - Fork 465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 NumberBox when max changed, and setState(). Duplicate GlobalKey detected in widget tree. #1146
Comments
Hello, I tried, but I'm unable to reproduce: NumberBox(
value: viewModel.value,
min: 1,
max: viewModel.max,
mode: SpinButtonPlacementMode.inline,
clearButton: false,
onChanged: (v) {
viewModel.value = v;
},
),
Button(child: Text('Change max'), onPressed: (){
viewModel.max += 1;
}), And in my viewModel: int _max = 2;
int get max => _max;
set max(int v) {
_max = v;
notifyListeners();
}
int _value = 1;
int get value => _value;
set value(int? v) {
_value = v ?? 1;
notifyListeners();
} It works has expected without any errors: So, I think your problem is caused by something else. |
Thank you for your reply. I found this problem on mac, but it did not appear on windows just now. I will try again with mac tomorrow |
Okay. |
After restarting my computer, the problem no longer occurred. It should not be related to Fluent_ui, but rather some unknown reasons. |
Describe the bug
Duplicate GlobalKey detected in widget tree.
To Reproduce
Steps to reproduce the behavior:
change cpuCoreCount and setState()
Screenshots
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: