pub fn new(widget: W, disabled_if: impl Fn(&T, &Env) -> bool + 'static) -> Self {
        DisabledIf {
            child: WidgetPod::new(widget),
            disabled_if: Box::new(disabled_if),
        }
    }
/// Creates a new `DisabledIf` widget with the child widget and the closure to decide if the
/// widget should be [`disabled`].
///
/// [`disabled`]: crate::EventCtx::is_disabled
Creates a new `DisabledIf` widget with the child widget and the closure to decide if the
widget should be [`disabled`].


Creates a new ` DisabledIf ` widget with the child widget and the closure to decide if the widget should be [ ` disabled ` ] .
pub fn new(widget: W, disabled_if: impl Fn(&T, &Env) -> bool + 'static) -> Self {
        DisabledIf {
            child: WidgetPod::new(widget),
            disabled_if: Box::new(disabled_if),
        }
    }
pub fn new ( widget : W , disabled_if : impl Fn ( & T , & Env ) -> bool + ' static ) -> Self { DisabledIf { child : WidgetPod :: new ( widget ) , disabled_if : Box :: new ( disabled_if ) , } }
Creates a new `DisabledIf` widget with the child widget and the closure to decide if the
widget should be [`disabled`].
Creates a new ` DisabledIf ` widget with the child widget and the closure to decide if the widget should be [ ` disabled ` ] .
widget
W
disabled_if
impl Fn(&T, &Env) -> bool + 'static
widget
W
disabled_if
impl Fn(&T, &Env) -> bool + 'static