MessagePageScaffold class
A scaffold for a chat experience in which a conversation thread is displayed, with a message editor mounted to the bottom of the chat area.
In the case of an app running on a phone, this scaffold is typically used for the entire screen. On a tablet, this scaffold might be used for just a chat pane.
The bottom sheet in this scaffold supports various sizing modes. These modes can be queried and altered with a given controller.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- RenderObjectWidget
- MessagePageScaffold
Constructors
- MessagePageScaffold({Key? key, MessagePageController? controller, required MessagePageScaffoldContentBuilder contentBuilder, required WidgetBuilder bottomSheetBuilder, double bottomSheetMinimumTopGap = 200, double bottomSheetMinimumHeight = 150, double bottomSheetCollapsedMaximumHeight = double.infinity})
-
const
Properties
- bottomSheetBuilder → WidgetBuilder
-
Builds the bottom sheet within this scaffold, e.g., a chat message editor.
final
- bottomSheetCollapsedMaximumHeight → double
-
The maximum height that the bottom sheet can expand to, as the intrinsic height
of the content increases.
final
- bottomSheetMinimumHeight → double
-
The shortest that the bottom sheet can ever be, regardless of content or
height mode.
final
- bottomSheetMinimumTopGap → double
-
When dragging the bottom sheet up, or when filling it with content,
this is the minimum gap allowed between the sheet and the top of this
scaffold.
final
- contentBuilder → MessagePageScaffoldContentBuilder
-
Builds the content within this scaffold, e.g., a chat conversation thread.
final
- controller → MessagePageController?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createElement(
) → RenderObjectElement -
RenderObjectWidgets always inflate to a RenderObjectElement subclass.
override
-
createRenderObject(
BuildContext context) → RenderMessagePageScaffold -
Creates an instance of the RenderObject class that this
RenderObjectWidget represents, using the configuration described by this
RenderObjectWidget.
override
-
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
-
didUnmountRenderObject(
covariant RenderObject renderObject) → void -
This method is called when a RenderObject that was previously
associated with this widget is removed from the render tree.
The provided RenderObject will be of the same type as the one created by
this widget's createRenderObject method.
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, int wrapWidth = 65}) → 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
-
updateRenderObject(
BuildContext context, covariant RenderMessagePageScaffold renderObject) → void -
Copies the configuration described by this RenderObjectWidget to the
given RenderObject, which will be of the same type as returned by this
object's createRenderObject.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited