SignalEffect constructor
const
SignalEffect({
- dynamic effect(
- BuildContext context
- @Deprecated('Use effect instead') void callback(
- BuildContext context
- required Widget child,
- String? debugLabel,
- Key? key,
Creates a SignalEffect widget.
The effect is executed inside a reactive effect.
The child is rendered normally.
Implementation
const SignalEffect({
dynamic Function(BuildContext context)? effect,
@Deprecated('Use effect instead')
void Function(BuildContext context)? callback,
required this.child,
this.debugLabel,
super.key,
}) : assert(effect != null || callback != null,
'Either effect or callback must be provided'),
_effect = effect ?? callback;