WidgetOpenGraph class

WidgetOpenGraph Widget Internal widget to show the OpenGraphEntity data This widget is used by OpenGraphPreview

Inheritance

Constructors

WidgetOpenGraph({Key? key, required OpenGraphEntity data, required double height, required bool isProduction, required double borderRadius, Widget? fallbackImage, bool enableBlur = true, TextStyle? titleStyle, TextStyle? descriptionStyle, TextStyle? hostStyle, int titleMaxLines = 1, int descriptionMaxLines = 2, Color overlayColor = const Color(0x80000000), BoxFit imageFit = BoxFit.fitWidth, VoidCallback? onTap, OpenGraphLayout layout = OpenGraphLayout.overlay})
WidgetOpenGraph is a widget to show the OpenGraphEntity data data is the OpenGraphEntity data to show in the widget height is the height of the widget isProduction is a flag to show the image or a default image borderRadius is the border radius of the widget fallbackImage replaces the default image when there is no og:image enableBlur toggles the blur effect behind the text overlay
const

Properties

borderRadius double
Border radius of the widget
final
data OpenGraphEntity
OpenGraphEntity data
final
descriptionMaxLines int
Maximum lines for the description (default: 2).
final
descriptionStyle TextStyle?
Style merged over the default description style (white).
final
enableBlur bool
Whether the text overlay uses a blur effect. Disable it in long lists for better scrolling performance (BackdropFilter is expensive).
final
fallbackImage Widget?
Custom widget shown when there is no og:image (or it fails to load), instead of the default bundled image.
final
hashCode int
The hash code for this object.
no setterinherited
height double
Height of the widget
final
hostStyle TextStyle?
Style merged over the default host style (white54).
final
imageFit BoxFit
How the image fits its box (default: BoxFit.fitWidth in the overlay layout, BoxFit.cover suits the horizontal one).
final
isProduction bool
Is production mode
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
layout OpenGraphLayout
Arrangement of image and texts (default: OpenGraphLayout.overlay).
final
onTap VoidCallback?
Called when the card is tapped, e.g. to open the URL.
final
overlayColor Color
Color of the panel behind the texts (default: 50% black).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
titleMaxLines int
Maximum lines for the title (default: 1).
final
titleStyle TextStyle?
Style merged over the default title style (white, bold).
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited