CustomReadonlyEditorProvider<T extends CustomDocument> constructor

CustomReadonlyEditorProvider<T extends CustomDocument>({
  1. FutureOr<CustomDocument> openCustomDocument(
    1. Uri,
    2. CustomDocumentOpenContext,
    3. CancellationToken
    )?,
  2. FutureOr<void> resolveCustomEditor(
    1. CustomDocument,
    2. WebviewPanel,
    3. CancellationToken
    )?,
})

Implementation

factory CustomReadonlyEditorProvider({
  _i4.FutureOr<_i3.CustomDocument> Function(
    _i3.Uri,
    _i3.CustomDocumentOpenContext,
    _i3.CancellationToken,
  )? openCustomDocument,
  _i4.FutureOr<void> Function(
    _i3.CustomDocument,
    _i3.WebviewPanel,
    _i3.CancellationToken,
  )? resolveCustomEditor,
}) =>
    CustomReadonlyEditorProvider._(
      openCustomDocument: openCustomDocument == null
          ? null
          : _i5.allowInterop((
              p0,
              p1,
              p2,
            ) =>
              _i6.Promise.futureOr(() => openCustomDocument(
                    p0,
                    p1,
                    p2,
                  ))),
      resolveCustomEditor: resolveCustomEditor == null
          ? null
          : _i5.allowInterop((
              p0,
              p1,
              p2,
            ) =>
              _i6.Promise.futureOr(() => resolveCustomEditor(
                    p0,
                    p1,
                    p2,
                  ))),
    );