CustomEditorProvider<T extends CustomDocument> constructor

CustomEditorProvider<T extends CustomDocument>({
  1. OnDidChangeCustomDocument? onDidChangeCustomDocument,
  2. Future saveCustomDocument(
    1. CustomDocument,
    2. CancellationToken
    )?,
  3. Future saveCustomDocumentAs(
    1. CustomDocument,
    2. Uri,
    3. CancellationToken
    )?,
  4. Future revertCustomDocument(
    1. CustomDocument,
    2. CancellationToken
    )?,
  5. Future backupCustomDocument(
    1. CustomDocument,
    2. CustomDocumentBackupContext,
    3. CancellationToken
    )?,
  6. FutureOr<CustomDocument> openCustomDocument(
    1. Uri,
    2. CustomDocumentOpenContext,
    3. CancellationToken
    )?,
  7. FutureOr<void> resolveCustomEditor(
    1. CustomDocument,
    2. WebviewPanel,
    3. CancellationToken
    )?,
})

Implementation

factory CustomEditorProvider({
  _i3.OnDidChangeCustomDocument? onDidChangeCustomDocument,
  _i2.Future<_i2.dynamic> Function(
    _i3.CustomDocument,
    _i3.CancellationToken,
  )? saveCustomDocument,
  _i2.Future<_i2.dynamic> Function(
    _i3.CustomDocument,
    _i3.Uri,
    _i3.CancellationToken,
  )? saveCustomDocumentAs,
  _i2.Future<_i2.dynamic> Function(
    _i3.CustomDocument,
    _i3.CancellationToken,
  )? revertCustomDocument,
  _i2.Future<_i2.dynamic> Function(
    _i3.CustomDocument,
    _i3.CustomDocumentBackupContext,
    _i3.CancellationToken,
  )? backupCustomDocument,
  _i4.FutureOr<_i3.CustomDocument> Function(
    _i3.Uri,
    _i3.CustomDocumentOpenContext,
    _i3.CancellationToken,
  )? openCustomDocument,
  _i4.FutureOr<void> Function(
    _i3.CustomDocument,
    _i3.WebviewPanel,
    _i3.CancellationToken,
  )? resolveCustomEditor,
}) =>
    CustomEditorProvider._(
      onDidChangeCustomDocument: onDidChangeCustomDocument ?? _i6.undefined,
      saveCustomDocument: saveCustomDocument == null
          ? null
          : _i5.allowInterop(saveCustomDocument),
      saveCustomDocumentAs: saveCustomDocumentAs == null
          ? null
          : _i5.allowInterop(saveCustomDocumentAs),
      revertCustomDocument: revertCustomDocument == null
          ? null
          : _i5.allowInterop(revertCustomDocument),
      backupCustomDocument: backupCustomDocument == null
          ? null
          : _i5.allowInterop(backupCustomDocument),
      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,
                  ))),
    );