Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Flutter/ai-assistview/ai-assistview-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,7 @@ The [`suggestionItemShape`](https://pub.dev/documentation/syncfusion_flutter_cor
The [`responseToolbarBackgroundColor`](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfAIAssistViewThemeData/responseToolbarBackgroundColor.html) property is used to specify the background color of response message toolbar contents.

{% tabs %}
{% highlight Dart %}
{% highlight Dart hl_lines="8" %}

// Load if there are existing messages.
final List<AssistMessage> _messages = <AssistMessage>[];
Expand Down
2 changes: 1 addition & 1 deletion Flutter/ai-assistview/composer.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ The [`contentPadding`](https://api.flutter.dev/flutter/material/InputDecoration/
The [`hintText`](https://api.flutter.dev/flutter/material/InputDecoration/hintText.html) property sets the placeholder text for the text field. By default, it is set to `null`.

{% tabs %}
{% highlight dart hl_lines="11" %}
{% highlight dart hl_lines="10" %}

final List<AssistMessage> _messages = <AssistMessage>[];

Expand Down
4 changes: 2 additions & 2 deletions Flutter/ai-assistview/conversation-area.md
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ Customize the area where message content is displayed by changing its `backgroun
Provide a list of response [suggestions](https://pub.dev/documentation/syncfusion_flutter_chat/latest/assist_view/AssistMessage/suggestions.html). When the user selects one, it is considered a new request message. Additionally, the layout, background colors, and other elements of the suggestions can be customized.

{% tabs %}
{% highlight dart hl_lines="8" %}
{% highlight dart hl_lines="8 41" %}

final List<AssistMessage> _messages = <AssistMessage>[];

Expand Down Expand Up @@ -469,7 +469,7 @@ Indicates that the AI service's response is in progress after a request has been
Append a [toolbar](https://pub.dev/documentation/syncfusion_flutter_chat/latest/assist_view/AssistMessage/toolbarItems.html) to response messages that provides options to perform various actions, such as rating the response, sharing it, copying it, and more.

{% tabs %}
{% highlight dart hl_lines="8" %}
{% highlight dart hl_lines="8 48" %}

final List<AssistMessage> _messages = <AssistMessage>[];

Expand Down
6 changes: 3 additions & 3 deletions Flutter/ai-assistview/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Import the library using the code provided below.
Add an AI AssistView widget with the required [`messages`](https://pub.dev/documentation/syncfusion_flutter_chat/latest/assist_view/SfAIAssistView/messages.html) property.

{% tabs %}
{% highlight dart hl_lines="5" %}
{% highlight dart hl_lines="6" %}

final List<AssistMessage> _messages = <AssistMessage>[];

Expand Down Expand Up @@ -110,7 +110,7 @@ To add the [`AssistComposer`](https://pub.dev/documentation/syncfusion_flutter_c
By default, conversation messages are empty. It’s a good idea to show a message or design to indicate this. You can use the [`placeholderBuilder`](https://pub.dev/documentation/syncfusion_flutter_chat/latest/assist_view/SfAIAssistView/placeholderBuilder.html) property to create a custom widget that appears in the conversation area, which can be removed once messages start coming in.

{% tabs %}
{% highlight dart hl_lines="19" %}
{% highlight dart hl_lines="21" %}

final List<AssistMessage> _messages = <AssistMessage>[];

Expand Down Expand Up @@ -167,7 +167,7 @@ It represents the send button, which was not included by default. To add it, cre
When the send button is clicked, the [`AssistActionButton.onPressed`](https://pub.dev/documentation/syncfusion_flutter_chat/latest/assist_view/AssistActionButton/onPressed.html) callback is invoked, which rebuilds the AI AssistView widget with the newly composed message.

{% tabs %}
{% highlight dart hl_lines="106" %}
{% highlight dart hl_lines="107" %}

final List<AssistMessage> _messages = <AssistMessage>[];

Expand Down
4 changes: 2 additions & 2 deletions Flutter/chat/action-button.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ The [`child`](https://pub.dev/documentation/syncfusion_flutter_chat/latest/chat/
It is a callback that is invoked whenever the action button is pressed. Since the chat widget does not rebuild itself to update the newly composed message, it provides the default text from the composer as a parameter. The user can create a message object and include it in the existing [`messages`](https://pub.dev/documentation/syncfusion_flutter_chat/latest/chat/SfChat/messages.html) list by rebuilding the chat widget to add the newly composed message to the conversational area.

{% tabs %}
{% highlight dart hl_lines="10" %}
{% highlight dart hl_lines="11" %}

// Load if there are existing messages.
final List<ChatMessage> _messages = <ChatMessage>[];
Expand Down Expand Up @@ -165,7 +165,7 @@ It is a callback that is invoked whenever the action button is pressed. Since th
The [`tooltip`](https://pub.dev/documentation/syncfusion_flutter_chat/latest/chat/ChatActionButton/tooltip.html) text describes the button's action when pressed. It is displayed when the user long-presses on touch devices or hovers the mouse over it on desktop devices. By default, it is set to null, so no tooltip is shown.

{% tabs %}
{% highlight dart hl_lines="26" %}
{% highlight dart hl_lines="27" %}

@override
Widget build(BuildContext context) {
Expand Down
16 changes: 8 additions & 8 deletions Flutter/chat/composer.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ The [`enabled`](https://api.flutter.dev/flutter/material/InputDecoration/enabled
The [`border`](https://api.flutter.dev/flutter/material/InputDecoration/border.html) property defines shape of the border that is drawn around the text field. By default, an [`OutlineInputBorder`](https://api.flutter.dev/flutter/material/OutlineInputBorder-class.html) is used.

{% tabs %}
{% highlight dart %}
{% highlight dart hl_lines="34" %}

late List<ChatMessage> _messages;

Expand Down Expand Up @@ -126,7 +126,7 @@ The [`border`](https://api.flutter.dev/flutter/material/InputDecoration/border.h
The [`contentPadding`](https://api.flutter.dev/flutter/material/InputDecoration/contentPadding.html) property defines the padding surrounding the text added inside the text field. By default, the `padding` is set to `16` horizontally and `18` vertically.

{% tabs %}
{% highlight dart hl_lines="28" %}
{% highlight dart hl_lines="27" %}

late List<ChatMessage> _messages;

Expand Down Expand Up @@ -171,7 +171,7 @@ The [`contentPadding`](https://api.flutter.dev/flutter/material/InputDecoration/
The [`hintText`](https://api.flutter.dev/flutter/material/InputDecoration/hintText.html) property sets the placeholder text for the text field. By default, it is set to `null`.

{% tabs %}
{% highlight dart %}
{% highlight dart hl_lines="12" %}

// Load if there are existing messages.
final List<ChatMessage> _messages = <ChatMessage>[];
Expand Down Expand Up @@ -201,7 +201,7 @@ The [`hintText`](https://api.flutter.dev/flutter/material/InputDecoration/hintTe
The [`hintStyle`](https://api.flutter.dev/flutter/material/InputDecoration/hintStyle.html) property refers to the text style of the hint text.

{% tabs %}
{% highlight dart %}
{% highlight dart hl_lines="13" %}

// Load if there are existing messages.
final List<ChatMessage> _messages = <ChatMessage>[];
Expand Down Expand Up @@ -236,7 +236,7 @@ The [`hintStyle`](https://api.flutter.dev/flutter/material/InputDecoration/hintS
The [`prefixIcon`](https://api.flutter.dev/flutter/material/InputDecoration/prefixIcon.html) and [`suffixIcon`](https://api.flutter.dev/flutter/material/InputDecoration/suffixIcon.html) properties are used to add icons at the beginning and end of the text field, respectively.

{% tabs %}
{% highlight dart %}
{% highlight dart hl_lines="34 38" %}

late List<ChatMessage> _messages;

Expand Down Expand Up @@ -297,7 +297,7 @@ The [`margin`](https://pub.dev/documentation/syncfusion_flutter_chat/latest/chat
By default, the top `margin` is set to `16`.

{% tabs %}
{% highlight dart %}
{% highlight dart hl_lines="33" %}

late List<ChatMessage> _messages;

Expand Down Expand Up @@ -349,7 +349,7 @@ The [`textStyle`](https://pub.dev/documentation/syncfusion_flutter_chat/latest/c
The specified text style will be merged with the [`bodyMedium`](https://api.flutter.dev/flutter/material/TextTheme/bodyMedium.html) and `editorTextStyle` text styles.

{% tabs %}
{% highlight dart %}
{% highlight dart hl_lines="33" %}

late List<ChatMessage> _messages;

Expand Down Expand Up @@ -403,7 +403,7 @@ The [`ChatComposer.builder`](https://pub.dev/documentation/syncfusion_flutter_ch
If [`ChatComposer.builder`](https://pub.dev/documentation/syncfusion_flutter_chat/latest/chat/ChatComposer/ChatComposer.builder.html) is used, the action button will always be enabled.

{% tabs %}
{% highlight dart %}
{% highlight dart hl_lines="11" %}

// Load if there are existing messages.
final List<ChatMessage> _messages = <ChatMessage>[];
Expand Down
4 changes: 2 additions & 2 deletions Flutter/chat/conversation-area.md
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ The [`margin`](https://pub.dev/documentation/syncfusion_flutter_chat/latest/chat
The [`padding`](https://pub.dev/documentation/syncfusion_flutter_chat/latest/chat/ChatMessageSettings/padding.html) property is used to specify the padding within the content area of the message, controlling spacing around the text. Defaults to `EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0)`.

{% tabs %}
{% highlight dart hl_lines="33 37" %}
{% highlight dart hl_lines="33 34 37 38" %}

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -745,7 +745,7 @@ The [`avatarPadding`](https://pub.dev/documentation/syncfusion_flutter_chat/late
The [`headerPadding`](https://pub.dev/documentation/syncfusion_flutter_chat/latest/chat/ChatMessageSettings/headerPadding.html) property is used to specify the padding around the header section of the message, including the username and timestamp. Defaults to `EdgeInsetsDirectional.only(top: 14.0, bottom: 4.0)`.

{% tabs %}
{% highlight dart hl_lines="33 37" %}
{% highlight dart hl_lines="33 34 37 38" %}

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion Flutter/chat/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ It represents the send button, which was not included by default. To add it, cre
When the send button is clicked, the [`ChatActionButton.onPressed`](https://pub.dev/documentation/syncfusion_flutter_chat/latest/chat/ChatActionButton/onPressed.html) callback is invoked, which rebuilds the chat widget with the newly composed message.

{% tabs %}
{% highlight dart hl_lines="38" %}
{% highlight dart hl_lines="39" %}

@override
void initState() {
Expand Down