EmojiSpan constructor

EmojiSpan(
  1. Image image, {
  2. Key? key,
  3. required double imageWidth,
  4. required double imageHeight,
  5. EdgeInsets? margin,
  6. int start = 0,
  7. PlaceholderAlignment alignment = ui.PlaceholderAlignment.middle,
  8. String? actualText,
  9. TextBaseline? baseline,
  10. BoxFit fit = BoxFit.scaleDown,
  11. ImageLoadingBuilder? loadingBuilder,
  12. ImageFrameBuilder? frameBuilder,
  13. String? semanticLabel,
  14. bool excludeFromSemantics = false,
  15. Color? color,
  16. BlendMode? colorBlendMode,
  17. AlignmentGeometry imageAlignment = Alignment.center,
  18. ImageRepeat repeat = ImageRepeat.noRepeat,
  19. Rect? centerSlice,
  20. bool matchTextDirection = false,
  21. bool gaplessPlayback = false,
  22. FilterQuality filterQuality = FilterQuality.low,
  23. GestureTapCallback? onTap,
  24. 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,
      );