finishText method

  1. @override
InlineSpan finishText()
override

finish SpecialText

Implementation

@override
InlineSpan finishText() {
  return WidgetSpan(
      child: Container(
    padding: margin,
    child: Wrap(
        runSpacing: verSpacing,
        spacing: horSpacing,
        children: tagItems?.take(maxTagCount).map<Widget>((tagItem) {
              return GestureDetector(
                child: Container(
                  width: tagItem.width,
                  height: tagItem.height,
                  alignment: Alignment.center,
                  padding: EdgeInsets.all(padding),
                  decoration: BoxDecoration(
                    color: tagItem.backgroundColor,
                    border: Border.all(color: tagItem.borderColor ?? Colors.grey.withOpacity(0.4), width: 1.0),
                    borderRadius: BorderRadius.all(
                      Radius.circular(radius),
                    ),
                  ),
                  child: Text(
                    tagItem.text ?? "",
                    textAlign: TextAlign.start,
                    style: TextStyle(fontSize: tagItem.fontSize, color: tagItem.fontColor),
                  ),
                ),
                onTap: () {
                  if (tapCallback != null) {
                    var map = HashMap<String, dynamic>();
                    map[tagKey] = tagItem;
                    tapCallback!(map);
                  }
                },
              );
            }).toList() ??
            []),
  ));
}