PipelineOwner constructor

PipelineOwner({
  1. VoidCallback? onNeedVisualUpdate,
  2. VoidCallback? onSemanticsOwnerCreated,
  3. SemanticsUpdateCallback? onSemanticsUpdate,
  4. VoidCallback? onSemanticsOwnerDisposed,
})

Creates a pipeline owner.

Typically created by the binding (e.g., RendererBinding), but can be created separately from the binding to drive off-screen render objects through the rendering pipeline.

Implementation

PipelineOwner({
  this.onNeedVisualUpdate,
  this.onSemanticsOwnerCreated,
  this.onSemanticsUpdate,
  this.onSemanticsOwnerDisposed,
}){
  // TODO(polina-c): stop duplicating code across disposables
  // https://github.com/flutter/flutter/issues/137435
  if (kFlutterMemoryAllocationsEnabled) {
    FlutterMemoryAllocations.instance.dispatchObjectCreated(
      library: 'package:flutter/rendering.dart',
      className: '$PipelineOwner',
      object: this,
    );
  }
}