withPointerEventSource method Null safety
- TestBindingEventSource source,
- VoidCallback task
protected">@protected
Sets pointerEventSource to source
, runs task
, then resets source
to the previous value.
Implementation
@protected
void withPointerEventSource(TestBindingEventSource source, VoidCallback task) {
final TestBindingEventSource previousSource = _pointerEventSource;
_pointerEventSource = source;
try {
task();
} finally {
_pointerEventSource = previousSource;
}
}