AnyLinkPreview constructor
const
AnyLinkPreview({
- Key? key,
- required String link,
- Duration cache = const Duration(days: 1),
- TextStyle? titleStyle,
- TextStyle? bodyStyle,
- UIDirection displayDirection = UIDirection.uiDirectionVertical,
- bool showMultimedia = true,
- Color? backgroundColor = const Color.fromRGBO(235, 235, 235, 1),
- int bodyMaxLines = 3,
- TextOverflow bodyTextOverflow = TextOverflow.ellipsis,
- Widget? placeholderWidget,
- Widget? errorWidget,
- String? errorBody,
- String? errorImage,
- String? errorTitle,
- double? borderRadius,
- List<
BoxShadow> ? boxShadow, - bool removeElevation = false,
- String? proxyUrl,
- Map<
String, String> ? headers, - VoidCallback? onTap,
- double? previewHeight,
- LaunchMode urlLaunchMode = LaunchMode.platformDefault,
- String? userAgent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3',
Implementation
const AnyLinkPreview({
super.key,
required this.link,
this.cache = const Duration(days: 1),
this.titleStyle,
this.bodyStyle,
this.displayDirection = UIDirection.uiDirectionVertical,
this.showMultimedia = true,
this.backgroundColor = const Color.fromRGBO(235, 235, 235, 1),
this.bodyMaxLines = 3,
this.bodyTextOverflow = TextOverflow.ellipsis,
this.placeholderWidget,
this.errorWidget,
this.errorBody,
this.errorImage,
this.errorTitle,
this.borderRadius,
this.boxShadow,
this.removeElevation = false,
this.proxyUrl,
this.headers,
this.onTap,
this.previewHeight,
this.urlLaunchMode = LaunchMode.platformDefault,
this.userAgent =
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3',
}) : itemBuilder = null;