TextBubble1 constructor

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

Implementation

TextBubble1(
    {super.isSender,
    required String text,
    Widget? button,
    Widget? widget,
    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,
    )})
    : super(
        widget: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            mainAxisAlignment: MainAxisAlignment.start,
            children: [
              if (text.isNotEmpty)
                Text(
                  text,
                  style: textStyle,
                  textAlign: TextAlign.left,
                ),
              if (widget != null) widget,
              if (button != null) button
            ]),
        timeWidget: time != null
            ? Text(
                time,
                style: timeTextStyle,
                textAlign: TextAlign.right,
              )
            : null,
      );