TextBubble1 constructor

TextBubble1({
  1. bool isSender = true,
  2. required String text,
  3. String? time,
  4. bool tail = true,
  5. Color color = Colors.white70,
  6. bool sent = false,
  7. bool delivered = false,
  8. bool seen = false,
  9. TextStyle textStyle = const TextStyle(color: Colors.black87, fontSize: 16),
  10. TextStyle timeTextStyle = const TextStyle(color: Colors.black87, fontSize: 10),
  11. Widget? button,
})

Implementation

TextBubble1({
  super.isSender,
  required String text,
  String? time,
  super.tail,
  super.color,
  super.sent,
  super.delivered,
  super.seen,
  TextStyle textStyle = const TextStyle(
    color: Colors.black87,
    fontSize: 16,
  ),
  TextStyle timeTextStyle = const TextStyle(
    color: Colors.black87,
    fontSize: 10,
  ),
  Widget? button,
}) : super(
        widget: Row(children: [
          Text(
            text,
            style: textStyle,
            textAlign: TextAlign.left,
          ),
          if (button != null) Spacer(),
          if (button != null) button
        ]),
        timeWidget: time != null
            ? Text(
                time,
                style: timeTextStyle,
                textAlign: TextAlign.right,
              )
            : null,
      );