TreeDataProvider<T> constructor

TreeDataProvider<T>({
  1. Event? onDidChangeTreeData,
  2. Object getTreeItem(
    1. dynamic
    )?,
  3. FutureOr<List> getChildren([
    1. dynamic
    ])?,
  4. FutureOr getParent(
    1. dynamic
    )?,
  5. FutureOr<TreeItem> resolveTreeItem(
    1. TreeItem,
    2. dynamic,
    3. CancellationToken
    )?,
})

Implementation

factory TreeDataProvider({
  _i3.Event<_i2.dynamic>? onDidChangeTreeData,
  _i2.Object Function(_i2.dynamic)? getTreeItem,
  _i4.FutureOr<_i2.List<_i2.dynamic>> Function([_i2.dynamic])? getChildren,
  _i4.FutureOr<_i2.dynamic> Function(_i2.dynamic)? getParent,
  _i4.FutureOr<_i3.TreeItem> Function(
    _i3.TreeItem,
    _i2.dynamic,
    _i3.CancellationToken,
  )? resolveTreeItem,
}) =>
    TreeDataProvider._(
      onDidChangeTreeData: onDidChangeTreeData ?? _i6.undefined,
      getTreeItem: getTreeItem == null ? null : _i5.allowInterop(getTreeItem),
      getChildren: getChildren == null
          ? null
          : _i5.allowInterop(
              (p0) => _i6.Promise.futureOr(() => getChildren(p0))),
      getParent: getParent == null
          ? null
          : _i5.allowInterop(
              (p0) => _i6.Promise.futureOr(() => getParent(p0))),
      resolveTreeItem: resolveTreeItem == null
          ? null
          : _i5.allowInterop((
              p0,
              p1,
              p2,
            ) =>
              _i6.Promise.futureOr(() => resolveTreeItem(
                    p0,
                    p1,
                    p2,
                  ))),
    );