ChatTile constructor

const ChatTile(
  1. Widget label, {
  2. Key? key,
  3. Color? backgroundColor,
  4. Color? foregroundColor,
  5. TextStyle? textStyle,
  6. List<Widget> actions = const [],
  7. Widget? leading,
  8. Widget? trailing,
  9. double elevation = 0.0,
  10. BorderRadiusGeometry? borderRadius,
  11. EdgeInsetsGeometry padding = const EdgeInsets.symmetric(vertical: 4),
  12. EdgeInsetsGeometry contentPadding = const EdgeInsets.all(16),
  13. MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
  14. CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.start,
  15. double space = 4,
  16. Widget? title,
  17. bool reverse = false,
})

This widget is used to create a chat screen.

The body of the chat is described in label.

Icons can be specified for leading and trailing.

By manipulating mainAxisAlignment and crossAxisAlignment, you can visually change whether you are speaking for yourself or others.

チャット画面を作成するためのウィジェットです。

labelにチャットの本文を記載します。

leadingtrailingにはアイコンなどを指定することができます。

mainAxisAlignmentcrossAxisAlignmentを操作することで自分の発言か他人の発言かを視覚的に変えることができます。

Implementation

const ChatTile(
  this.label, {
  super.key,
  this.backgroundColor,
  this.foregroundColor,
  this.textStyle,
  this.actions = const [],
  this.leading,
  this.trailing,
  this.elevation = 0.0,
  this.borderRadius,
  this.padding = const EdgeInsets.symmetric(vertical: 4),
  this.contentPadding = const EdgeInsets.all(16),
  this.mainAxisAlignment = MainAxisAlignment.start,
  this.crossAxisAlignment = CrossAxisAlignment.start,
  this.space = 4,
  this.title,
  this.reverse = false,
});