-
-
Notifications
You must be signed in to change notification settings - Fork 468
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
Button state bug🐛 #230
Labels
bug
Something isn't working
Comments
Sorry, but I can't reproduce. Can you try? Button(
child: const Text('This is a text'),
onPressed: SingletonClass.instance.buttonEnabled ? () {} : null,
), |
Well I wrote wrong in the issue. That is not my source code. bandicam.2022-03-20.02-06-10-320.mp4 |
onPressed: () {
GKernel.instance.converting = true;
setState(() {});
compute(convert, ConvertArgs(convertmethod: GKernel.instance.convertMethod, dithering: GKernel.instance.dithering)).then((value) {
GKernel.instance.converting = false;
setState(() {});
});
}), RepaintBoundary(
child: Button(
child: const Text('保存为图片'),
onPressed: GKernel.instance.converting ? null : () {},
),
), |
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When I click on a disabled Button ( onPressed: null ) and use setState to enable it, it will still be displayed gray as it is disabled
Like this:
Button(
child: const Text('This is a text'),
onPressed: SingletonClass.instance.buttonEnabled ? null : () {},
),
The text was updated successfully, but these errors were encountered: