icon method

RichTextBuilder icon(
  1. IconData data, {
  2. double? size,
  3. Color? color,
  4. double? offset,
})

Implementation

RichTextBuilder icon(IconData data, {double? size, Color? color, double? offset}) {
  size ??= 20;
  offset ??= 0;
  final sizeWithOffset = size + offset;
  return widget(SizedBox(
      height: sizeWithOffset,
      width: size,
      child: Align(
        alignment: Alignment.bottomCenter,
        child: Icon(
          data,
          size: size,
          color: color ?? sunnyColors.text,
        ),
      )));

  // children.add(TextSpan(
  //   text: String.fromCharCode(data.codePoint),
  //   style: TextStyle(
  //       fontFamily: data.fontFamily,
  //       fontSize: size,
  //       color: color ?? sunnyColors.text),
  // ));
  // return this;
}