-
![]() how to use disbale "Elevated Button" thanks library |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi @yunchiri, thank you for your question. Can you explain a bit more about what you mean? Below a few guesses and their answers, but since I am not sure I understand the question correctly, the answer may not be what you are looking for. Q1: How do I get this style of Q2: How do I recreate the shown style in the image? Q3: How do I disable a button, in this case the So to disable a button conditionally you can e.g. use a ternary operator: :
ElevatedButton(
onPressed: buttonIsDisabled ? null : () { ...enabled press actions },
child: Text('Elevated button'),
),
: Hope this helps, this does not seem to be an issue though, so I'm closing the issue and moving the question to the Discussions section as a Q&A. Feel free to continue the discussion there and provide more info if the above answer did not help. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Hi @yunchiri, thank you for your question.
Can you explain a bit more about what you mean? Below a few guesses and their answers, but since I am not sure I understand the question correctly, the answer may not be what you are looking for.
Q1: How do I get this style of
ElevatedButton
in disabled mode in?A1: Since you have it configured in the Playground, if you copy the theme from the playground generated code config, and use it in your app's
MaterialApp.theme
this is the style you will then get when theElevatedButton
is in its disabled state.Q2: How do I recreate the shown style in the image?
A2: A bit hard to say exactly from the screen shot what configs have been made in the Playgro…