Knob<T> constructor
Knob<T> ({
- required String label,
- String? description,
- @Deprecated('Use initialValue instead.') T? value,
- T? initialValue,
- bool isNullable = false,
- @Deprecated('This parameter is not used anymore. ' 'It defaults to [value == null] instead of [false]') bool isNull = false,
Implementation
Knob({
required this.label,
this.description,
@Deprecated('Use initialValue instead.') T? value,
T? initialValue,
this.isNullable = false,
@Deprecated(
'This parameter is not used anymore. '
'It defaults to [value == null] instead of [false]',
)
this.isNull = false,
}) : this.initialValue = (initialValue ?? value) as T {
this.isNull = this.initialValue == null;
}