UnreadDivider class
WhatsApp-style "N new messages" divider rendered above the first unread message when a chat is opened with pending messages.
The divider is a snapshot of the state at chat-open time — the host wires it via MessageList.unreadBoundaryMessageId + MessageList.unreadCount. Once rendered, it stays fixed on that message until the user leaves the chat (re-entering with zero unread hides it).
Styling falls back to the ambient Theme.of(context).colorScheme
so it inherits Material light/dark contrast for free. Override
color / textStyle for finer control without touching
ChatTheme — the divider is intentionally self-styled.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- UnreadDivider
Constructors
Properties
- color → Color?
-
Override for the horizontal line + label background colour.
Defaults to a 40% alpha version of the Material primary colour
— same visual weight as WhatsApp's tinted line.
final
- count → int
-
Number of unread messages snapshotted when the chat opened.
1renders the singular form,>1the plural form via the localization helper ChatUiLocalizations.newMessages.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
- textStyle → TextStyle?
-
Override for the label text style.
final
- theme → ChatTheme
-
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, 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
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited