SimpleUrlPreview constructor

SimpleUrlPreview({
  1. required String url,
  2. double previewHeight = 130.0,
  3. bool? isClosable,
  4. Color? bgColor,
  5. TextStyle? titleStyle,
  6. int titleLines = 2,
  7. TextStyle? descriptionStyle,
  8. int descriptionLines = 3,
  9. TextStyle? siteNameStyle,
  10. Color? imageLoaderColor,
  11. EdgeInsetsGeometry? previewContainerPadding,
  12. VoidCallback? onTap,
})

Implementation

SimpleUrlPreview({
  required this.url,
  this.previewHeight = 130.0,
  this.isClosable,
  this.bgColor,
  this.titleStyle,
  this.titleLines = 2,
  this.descriptionStyle,
  this.descriptionLines = 3,
  this.siteNameStyle,
  this.imageLoaderColor,
  this.previewContainerPadding,
  this.onTap,
})  : assert(previewHeight >= 130.0,
          'The preview height should be greater than or equal to 130'),
      assert(titleLines <= 2 && titleLines > 0,
          'The title lines should be less than or equal to 2 and not equal to 0'),
      assert(descriptionLines <= 3 && descriptionLines > 0,
          'The description lines should be less than or equal to 3 and not equal to 0');