EmojiSpan constructor
EmojiSpan(
- Image image, {
- Key? key,
- required double imageWidth,
- required double imageHeight,
- EdgeInsets? margin,
- int start = 0,
- PlaceholderAlignment alignment = ui.PlaceholderAlignment.middle,
- String? actualText,
- TextBaseline? baseline,
- BoxFit fit = BoxFit.scaleDown,
- ImageLoadingBuilder? loadingBuilder,
- ImageFrameBuilder? frameBuilder,
- String? semanticLabel,
- bool excludeFromSemantics = false,
- Color? color,
- BlendMode? colorBlendMode,
- AlignmentGeometry imageAlignment = Alignment.center,
- ImageRepeat repeat = ImageRepeat.noRepeat,
- Rect? centerSlice,
- bool matchTextDirection = false,
- bool gaplessPlayback = false,
- FilterQuality filterQuality = FilterQuality.low,
- GestureTapCallback? onTap,
- HitTestBehavior behavior = HitTestBehavior.deferToChild,
Implementation
EmojiSpan(
Image image, {
Key? key,
required double imageWidth,
required double imageHeight,
EdgeInsets? margin,
int start = 0,
ui.PlaceholderAlignment alignment = ui.PlaceholderAlignment.middle,
String? actualText,
TextBaseline? baseline,
BoxFit fit = BoxFit.scaleDown,
ImageLoadingBuilder? loadingBuilder,
ImageFrameBuilder? frameBuilder,
String? semanticLabel,
bool excludeFromSemantics = false,
Color? color,
BlendMode? colorBlendMode,
AlignmentGeometry imageAlignment = Alignment.center,
ImageRepeat repeat = ImageRepeat.noRepeat,
Rect? centerSlice,
bool matchTextDirection = false,
bool gaplessPlayback = false,
FilterQuality filterQuality = FilterQuality.low,
GestureTapCallback? onTap,
HitTestBehavior behavior = HitTestBehavior.deferToChild,
}) : width = imageWidth + (margin == null ? 0 : margin.horizontal),
height = imageHeight + (margin == null ? 0 : margin.vertical),
super(
child: Container(
padding: margin,
child: GestureDetector(
onTap: onTap,
behavior: behavior,
child: image,
),
),
baseline: baseline,
alignment: alignment,
start: start,
deleteAll: true,
actualText: actualText,
);