applyUnless method
Applies a modifier only when condition is false.
The inverse of applyIf.
button.applyUnless(isEnabled, (w) => w.opacity(0.5))
Implementation
Widget applyUnless(bool condition, Widget Function(Widget widget) modifier) {
return condition ? this : modifier(this);
}