DocumentColorProvider constructor

DocumentColorProvider({
  1. FutureOr<List<ColorInformation>> provideDocumentColors(
    1. TextDocument,
    2. CancellationToken
    )?,
  2. FutureOr<List<ColorPresentation>> provideColorPresentations(
    1. Color,
    2. dynamic,
    3. CancellationToken
    )?,
})

Implementation

factory DocumentColorProvider({
  _i4.FutureOr<_i2.List<_i3.ColorInformation>> Function(
    _i3.TextDocument,
    _i3.CancellationToken,
  )? provideDocumentColors,
  _i4.FutureOr<_i2.List<_i3.ColorPresentation>> Function(
    _i3.Color,
    _i2.dynamic,
    _i3.CancellationToken,
  )? provideColorPresentations,
}) =>
    DocumentColorProvider._(
      provideDocumentColors: provideDocumentColors == null
          ? null
          : _i5.allowInterop((
              p0,
              p1,
            ) =>
              _i6.Promise.futureOr(() => provideDocumentColors(
                    p0,
                    p1,
                  ))),
      provideColorPresentations: provideColorPresentations == null
          ? null
          : _i5.allowInterop((
              p0,
              p1,
              p2,
            ) =>
              _i6.Promise.futureOr(() => provideColorPresentations(
                    p0,
                    p1,
                    p2,
                  ))),
    );