dash_chat使用及方法

/// Flex value for the messeage container defaults to 1

? /// Made so that the message container takes as much as possible

? /// if no height or width is passed explicity

? final int messageContainerFlex;

? /// Height for the Dash chat Widget

? final double height;

? // Width for the Dash chat Widget

? final double width;

? /// List of messages to display in the chat container

? /// Takes a [List] of [ChatMessage]

? final List<ChatMessage> messages;

? /// If provided, this text editing controller will be used for

? /// the text input.

? final TextEditingController textController;

? /// If provided, this focus node will be used for the text input.

? final FocusNode focusNode;

? /// Use to change the direction of the text ltr is used for

? /// launguages that start from left like English &

? /// rtl is used for languages like Arabic

? ///

? /// Defaults to `TextDirection.ltr`

? final TextDirection inputTextDirection;

? /// If provided will stop using the default controller

? /// i.e [TextEditingController] and will use this to update the

? /// text input field.

? final String text;

? /// If the text parameter is passed then onTextChange must also

? /// be passed.

? final Function(String) onTextChange;

? /// Used to provide input decoration to the text as default only

? /// to the input placeholder for the chat input

? /// "Add Message here...".

? final InputDecoration inputDecoration;

? ///Configures how the platform keyboard will select an uppercase or lowercase keyboard.

? ///Only supports text keyboards, other keyboard types will ignore this configuration. Capitalization is locale-aware.

? ///Defaults to [TextCapitalization.none]. Must not be null.

? final TextCapitalization textCapitalization;

? /// Usually new message added by the user gets [Uuid] String

? /// Can be override by proving this parameter

? final String Function() messageIdGenerator;

? /// The current user object [ChatUser].

? final ChatUser user;

? /// To function where you can make api calls and play

? /// with the [ChatMessage] obeject before make calls.

? final Function(ChatMessage) onSend;

? /// Should the send button be always active it defaults to false

? /// Usually it will only become active if some text is entered.

? final bool alwaysShowSend;

? /// [DateFormat] object for formatting date to show in [MessageListView]

? /// defaults to `HH:mm:ss`.

? final DateFormat dateFormat;

? /// [DateFormat] object for formatting time to show in [MessageContainer]

? /// defaults to `yyyy-MM-dd`.

? final DateFormat timeFormat;

? /// Should the user avatar be shown defaults to false and will not

? /// show the user avatar.

? final bool showUserAvatar;

? /// avatarBuilder will override the the default avatar which uses

? /// [CircleAvatar].

? final Widget Function(ChatUser) avatarBuilder;

? /// Should the avatar be shown for every message defaulst to false.

? final bool showAvatarForEveryMessage;

? /// [onPressAvatar] function takes a function with this structure

? /// [Function(ChatUser)] will trigger when the avatar

? /// is tapped on

? final Function(ChatUser) onPressAvatar;

? /// [onLongPressAvatar] function takea a function with this structure

? /// [Function(ChatUser)] will trigger when the avatar

? /// is long pressed

? final Function(ChatUser) onLongPressAvatar;

? /// [onLongPressMessage] function takea a function with this structure

? /// [Function(ChatMessage)] will trigger when the message

? /// is long pressed.

? final Function(ChatMessage) onLongPressMessage;

? /// Should the messages be shown in reversed order.

? final bool inverted;

? /// messageBuilder will override the the default chat container which uses

? /// and you will need to build complete message Widget it will not accept

? /// and include any other builder functions.

? final Widget Function(ChatMessage) messageBuilder;

? /// messageTextBuilder will override the the default message text.

? final Widget Function(String) messageTextBuilder;

? /// messageImageBuilder will override the the default Image.

? final Widget Function(String url) messageImageBuilder;

? /// messageTimeBuilder will override the the default text.

? final Widget Function(String url) messageTimeBuilder;

? /// dateBuilder will override the the default time text.

? final Widget Function(String) dateBuilder;

? /// A Widget that will be shown below the [MessageListView] like you can

? /// show a "tying..." at the end.

? final Widget Function() chatFooterBuilder;

? /// Main input length of the input text box defaulst to no limit.

? final int maxInputLength;

? /// Used to parse text to make it linkified text uses

? /// [flutter_parsed_text](https://pub.dev/packages/flutter_parsed_text)

? /// takes a list of [MatchText] in order to parse Email, phone, links

? /// and can also add custom pattersn using regex

? final List<MatchText> parsePatterns;

? /// Provides a custom style to the message container

? /// takes [BoxDecoration]

? final BoxDecoration messageContainerDecoration;

? /// [List] of [Widget] to show before the [TextField].

? final List<Widget> leading;

? /// [List] of [Widget] to show after the [TextField].will remove the

? /// send button and will have to implement that yourself.

? final List<Widget> trailing;

? /// sendButtonBuilder will override the the default [IconButton].

? final Widget Function(Function) sendButtonBuilder;

? /// Style for the [TextField].

? final TextStyle inputTextStyle;

? /// [TextField] container style.

? final BoxDecoration inputContainerStyle;

? /// Max length of the input lines default to 1.

? final int inputMaxLines;

? /// Should the input cursor be shown defaults to true.

? final bool showInputCursor;

? /// Width of the text input defaults to 2.0.

? final double inputCursorWidth;

? /// Color of the input cursor defaults to theme.

? final Color inputCursorColor;

? /// ScrollController for the [MessageListView] will use the default

? /// scrollcontroller in the Widget.

? final ScrollController scrollController;

? /// A Widget that will be shown below the [ChatInputToolbar] like you can

? /// show a list of buttons like file image just like in Slack app.

? final Widget Function() inputFooterBuilder;

? /// Padding for the [MessageListView].

? final EdgeInsetsGeometry messageContainerPadding;

? /// Callback method when the quickReply was tapped on

? /// will pass [Reply] as a paramter to function.

? final Function(Reply) onQuickReply;

? /// Container style for the QuickReply Container [BoxDecoration].

? final BoxDecoration quickReplyStyle;

? /// [TextStyle] for QuickReply textstyle.

? final TextStyle quickReplyTextStyle;

? /// quickReplyBuilder will override the the default QuickReply Widget.

? final Widget Function(Reply) quickReplyBuilder;

? /// Should the [trailling] Widgets be shown before the send button

? /// As default it will be shown before the send button.

? final bool showTraillingBeforeSend;

? /// Should the scroll to bottom widget be shown

? /// default to true.

? final bool scrollToBottom;

? /// Overrides the default [scrollToBottomWidget] with a custom widget

? final Widget Function() scrollToBottomWidget;

? /// Override the default behaviour of the onScrollToBottom Widget

? final Function onScrollToBottomPress;

? /// Should the LoadEarlier Floating widget be shown or use

? /// load as you scroll scheme whcih will call the [onLoadEarlier]

? /// function as default it is set to this scheme which is false.

? /// false - load as you scroll scheme

? /// true - shows a loadEarlier Widget

? final bool shouldShowLoadEarlier;

? /// Override the default behaviour of the onScrollToBottom Widget

? final Widget Function() showLoadEarlierWidget;

? /// Override the default behaviour of the onLoadEarleir Widget

? /// or used as a callback when the listView reaches the top

? final Function onLoadEarlier;

? /// Padding for the default input toolbar

? /// by default it padding is set 0.0

? final EdgeInsets inputToolbarPadding;

? /// Margin for the default input toolbar

? /// by default it padding is set 0.0

? final EdgeInsets inputToolbarMargin;

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末您市,一起剝皮案震驚了整個(gè)濱河市励幼,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌,老刑警劉巖,帶你破解...
    沈念sama閱讀 207,248評(píng)論 6 481
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異,居然都是意外死亡混埠,警方通過查閱死者的電腦和手機(jī),發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 88,681評(píng)論 2 381
  • 文/潘曉璐 我一進(jìn)店門诗轻,熙熙樓的掌柜王于貴愁眉苦臉地迎上來钳宪,“玉大人,你說我怎么就攤上這事±粲保” “怎么了搔体?”我有些...
    開封第一講書人閱讀 153,443評(píng)論 0 344
  • 文/不壞的土叔 我叫張陵,是天一觀的道長半醉。 經(jīng)常有香客問我疚俱,道長,這世上最難降的妖魔是什么缩多? 我笑而不...
    開封第一講書人閱讀 55,475評(píng)論 1 279
  • 正文 為了忘掉前任呆奕,我火速辦了婚禮,結(jié)果婚禮上瞧壮,老公的妹妹穿的比我還像新娘。我一直安慰自己匙握,他們只是感情好咆槽,可當(dāng)我...
    茶點(diǎn)故事閱讀 64,458評(píng)論 5 374
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著圈纺,像睡著了一般秦忿。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上蛾娶,一...
    開封第一講書人閱讀 49,185評(píng)論 1 284
  • 那天灯谣,我揣著相機(jī)與錄音,去河邊找鬼蛔琅。 笑死胎许,一個(gè)胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的罗售。 我是一名探鬼主播辜窑,決...
    沈念sama閱讀 38,451評(píng)論 3 401
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼寨躁!你這毒婦竟也來了穆碎?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 37,112評(píng)論 0 261
  • 序言:老撾萬榮一對情侶失蹤职恳,失蹤者是張志新(化名)和其女友劉穎所禀,沒想到半個(gè)月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體放钦,經(jīng)...
    沈念sama閱讀 43,609評(píng)論 1 300
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡色徘,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 36,083評(píng)論 2 325
  • 正文 我和宋清朗相戀三年,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了操禀。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片贺氓。...
    茶點(diǎn)故事閱讀 38,163評(píng)論 1 334
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出辙培,到底是詐尸還是另有隱情蔑水,我是刑警寧澤,帶...
    沈念sama閱讀 33,803評(píng)論 4 323
  • 正文 年R本政府宣布扬蕊,位于F島的核電站搀别,受9級(jí)特大地震影響,放射性物質(zhì)發(fā)生泄漏尾抑。R本人自食惡果不足惜歇父,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 39,357評(píng)論 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望再愈。 院中可真熱鬧榜苫,春花似錦、人聲如沸翎冲。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,357評(píng)論 0 19
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽抗悍。三九已至驹饺,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間缴渊,已是汗流浹背赏壹。 一陣腳步聲響...
    開封第一講書人閱讀 31,590評(píng)論 1 261
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留衔沼,地道東北人蝌借。 一個(gè)月前我還...
    沈念sama閱讀 45,636評(píng)論 2 355
  • 正文 我出身青樓,卻偏偏與公主長得像指蚁,于是被迫代替她去往敵國和親骨望。 傳聞我的和親對象是個(gè)殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 42,925評(píng)論 2 344

推薦閱讀更多精彩內(nèi)容

  • pyspark.sql模塊 模塊上下文 Spark SQL和DataFrames的重要類: pyspark.sql...
    mpro閱讀 9,446評(píng)論 0 13
  • NAME dnsmasq - A lightweight DHCP and caching DNS server....
    ximitc閱讀 2,815評(píng)論 0 0
  • Introduction What is Bowtie 2? Bowtie 2 is an ultrafast a...
    wzz閱讀 5,566評(píng)論 0 5
  • mean to add the formatted="false" attribute?.[ 46% 47325/...
    ProZoom閱讀 2,693評(píng)論 0 3
  • 意大利地處歐洲南部的亞平寧半島欣舵,約有人口7600多萬擎鸠,絕大多數(shù)信奉天主教。自公元前753年羅馬城興建以來缘圈,羅馬帝國...
    魔旅行閱讀 705評(píng)論 0 1