ToggleSheetDelegate<T>.value constructor

ToggleSheetDelegate<T>.value(
  1. T value
)

Creates a ToggleSheetDelegate that holds a fixed value.

The value parameter specifies the value to be used by the delegate.

⚠️ Important: You should create this delegate outside the widget's build method — ideally as a final field in a State class, or within a view model or other persistent scope. Avoid constructing it inline within build() to ensure consistency and performance.

Returns an instance of ToggleSheetDelegateValue with the provided value.

Implementation

factory ToggleSheetDelegate.value(T value) =>
    ToggleSheetDelegateValue<T>(value: value);