ChatScreen class
to display chat
if you want display chat appBar , you must add otherUserName or otherUserImage
if you need add custom appBar , you must create screen and add appBar in Scaffold appBar
or in the Top of body then add ChatScreen widget in body
if you want display unread message count , you must add unreadMsgRealTime
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ChatScreen
Constructors
-
ChatScreen({Key? key, required List<
Message> messages, required ScrollController scrollController, Color activeSendIconColor = ColorsPackage.primary, required void onSubmitMessage(String message), int unreadMsgRealTime = 0, String otherUserName = "", String otherUserImage = "", String textHint = '', TextStyle? userNameStyle, Color chatAppBackgroundColor = ColorsPackage.whiteColor, Color fillColorTextFeild = const Color.fromARGB(255, 237, 241, 252), Color textColor = ColorsPackage.boldTextColor, Color myMessageBackGrounColor = ColorsPackage.primary, Color otherMessageBackGrounColor = ColorsPackage.darkGrey, TextStyle? messageTextStyle}) -
to display chat
const
Properties
- activeSendIconColor → Color
-
active color for send icon button
final
- chatAppBackgroundColor → Color
-
BackGround for chatAppBar
final
- fillColorTextFeild → Color
-
background color for text feild
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
messages
→ List<
Message> -
list of messages to display in chat
final
- messageTextStyle → TextStyle?
-
message text style
final
- myMessageBackGrounColor → Color
-
background color for my message
final
- onSubmitMessage → void Function(String message)
-
function to send message
final
- otherMessageBackGrounColor → Color
-
background color for other message
final
- otherUserImage → String
-
other user image to display in appBar
final
- otherUserName → String
-
other user name to display in appBar
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollController → ScrollController
-
ScrollController to pagination and scroll
final
- textColor → Color
-
text color in text feild
final
- textHint → String
-
text hint for message textFeild
final
- unreadMsgRealTime → int
-
unread message count when real time message arrives
final
- userNameStyle → TextStyle?
-
user name Textstyle
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< ChatScreen> -
Creates the mutable state for this widget at a given location in the tree.
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
-
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