AnyLinkPreview.builder constructor

const AnyLinkPreview.builder({
  1. Key? key,
  2. required String link,
  3. required Widget itemBuilder(
    1. BuildContext,
    2. Metadata,
    3. ImageProvider<Object>?,
    4. SvgPicture?,
    )?,
  4. Duration cache = const Duration(days: 1),
  5. Widget? placeholderWidget,
  6. Widget? errorWidget,
  7. String? proxyUrl,
  8. Map<String, String>? headers,
})

Implementation

const AnyLinkPreview.builder({
  super.key,
  required this.link,
  required this.itemBuilder,
  this.cache = const Duration(days: 1),
  this.placeholderWidget,
  this.errorWidget,
  this.proxyUrl,
  this.headers,
})  : titleStyle = null,
      bodyStyle = null,
      displayDirection = UIDirection.uiDirectionVertical,
      showMultimedia = true,
      backgroundColor = null,
      bodyMaxLines = 3,
      bodyTextOverflow = TextOverflow.ellipsis,
      borderRadius = null,
      errorBody = null,
      errorImage = null,
      errorTitle = null,
      boxShadow = null,
      removeElevation = false,
      onTap = null,
      previewHeight = null,
      userAgent =
          'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3',
      urlLaunchMode = LaunchMode.platformDefault;