import 'package:flutter/material.dart';

class CLXAttributeString {
  final List<TextSpan> _list = [];
  TextSpan get _textSpan => TextSpan(children: _list);
  RichText get richText => RichText(text: _textSpan);

  CLXAttributeString addAttribute(TextSpan attStr) {
    _list.add(attStr);
    return this;
  }

  CLXAttributeString add(String string, TextStyle style) {
    return addAttribute(TextSpan(text: string, style: style));
  }
}
