ChatTile class

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を操作することで自分の発言か他人の発言かを視覚的に変えることができます。

Inheritance
Available Extensions
Annotations

Constructors

ChatTile(Widget label, {Key? key, Color? backgroundColor, Color? foregroundColor, TextStyle? textStyle, List<Widget> actions = const [], Widget? leading, Widget? trailing, double elevation = 0.0, BorderRadiusGeometry? borderRadius, EdgeInsetsGeometry padding = const EdgeInsets.symmetric(vertical: 4), EdgeInsetsGeometry contentPadding = const EdgeInsets.all(16), MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start, CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.start, double space = 4, Widget? title, bool reverse = false})
This widget is used to create a chat screen.
const

Properties

actions List<Widget>
Action to be placed below the body of the chat.
final
backgroundColor Color?
Background color.
final
borderRadius BorderRadiusGeometry?
Rounded corners for chat containers.
final
contentPadding EdgeInsetsGeometry
Padding inside the chat container.
final
crossAxisAlignment CrossAxisAlignment
Alignment of the chat container.
final
elevation double
Chat container height.
final
foregroundColor Color?
Color of text and icons.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label Widget
Body of chat.
final
leading Widget?
Icon to be placed on the left side of the chat container.
final
mainAxisAlignment MainAxisAlignment
Alignment of the chat container.
final
padding EdgeInsetsGeometry
Padding throughout the chat.
final
reverse bool
If true, reverse the orientation.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
space double
Space between chat containers.
final
textStyle TextStyle?
Text Style.
final
title Widget?
Widget to be displayed in the title section.
final
trailing Widget?
Icon to be placed on the right side of the chat container.
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited