Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FLUT-926193 - [Feature] Modified assist view widget name #1047

Open
wants to merge 6 commits into
base: development
Choose a base branch
from
Open
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

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ This section explains how to add and customize the action button using the vario

## Action button

The [`actionButton`] represents the send button and is not included in the chat by default. To add it, create an instance of [`AssistActionButton`] and assign it to the [`actionButton`] property.
The [`actionButton`](https://pub.dev/documentation/syncfusion_flutter_chat/28.1.33-beta/assist_view/SfAIAssistView/actionButton.html) represents the send button and is not included in the chat by default. To add it, create an instance of [`AssistActionButton`](https://pub.dev/documentation/syncfusion_flutter_chat/28.1.33-beta/assist_view/AssistActionButton-class.html) and assign it to the [`actionButton`](https://pub.dev/documentation/syncfusion_flutter_chat/28.1.33-beta/assist_view/SfAIAssistView/actionButton.html) property.

The default action button is a send button. Pressing or clicking this button triggers a callback, allowing the user to request a response to their composed message from their preferred AI service.

If [`AssistComposer.builder`] is used, the parameter of onPressed will always be an empty string.
If [`AssistComposer.builder`](https://pub.dev/documentation/syncfusion_flutter_chat/28.1.33-beta/assist_view/AssistComposer/AssistComposer.builder.html) is used, the parameter of onPressed will always be an empty string.

If [`AssistActionButton.onPressed`] is null, the action button will always be disabled.
If [`AssistActionButton.onPressed`](https://pub.dev/documentation/syncfusion_flutter_chat/28.1.33-beta/assist_view/AssistActionButton/onPressed.html) is null, the action button will always be disabled.

If the default composer is disabled, the action button will also be disabled.

Expand Down Expand Up @@ -49,7 +49,7 @@ If no composer is added (by specifying the composer as null), the action button

### Child

The [child] property allows you to define a custom widget consisting of one or more interactive elements to serve as action buttons, such as a send button, microphone icon for voice input, file attachment button, or other interactive widgets.
The [child](https://pub.dev/documentation/syncfusion_flutter_chat/28.1.33-beta/assist_view/AssistActionButton/child.html) property allows you to define a custom widget consisting of one or more interactive elements to serve as action buttons, such as a send button, microphone icon for voice input, file attachment button, or other interactive widgets.

{% tabs %}
{% highlight dart %}
Expand All @@ -76,7 +76,7 @@ The [child] property allows you to define a custom widget consisting of one or m

### onPressed callback

It is a callback that is invoked whenever the action button is pressed. Since the assist 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`] list by rebuilding the assist widget to add the newly composed message to the conversational area.
It is a callback that is invoked whenever the action button is pressed. Since the assist 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/28.1.33-beta/assist_view/SfAIAssistView/messages.html) list by rebuilding the assist widget to add the newly composed message to the conversational area.

{% tabs %}
{% highlight dart %}
Expand Down Expand Up @@ -118,7 +118,7 @@ It is a callback that is invoked whenever the action button is pressed. Since th

### Tooltip

The [`tooltip`] 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.
The [`tooltip`](https://pub.dev/documentation/syncfusion_flutter_chat/28.1.33-beta/assist_view/AssistActionButton/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 %}
Expand All @@ -145,15 +145,15 @@ The [`tooltip`] text describes the button's action when pressed. It is displayed

### Colors

The [`foregroundColor`] property is the color of the default send button icon. The default color is set to `colorScheme.onPrimary`.
The [`foregroundColor`](https://pub.dev/documentation/syncfusion_flutter_chat/28.1.33-beta/assist_view/AssistActionButton/foregroundColor.html) property is the color of the default send button icon. The default color is set to `colorScheme.onPrimary`.

The [`backgroundColor`] property is the color of the button's background. The default color is set to `colorScheme.primary`.
The [`backgroundColor`](https://pub.dev/documentation/syncfusion_flutter_chat/28.1.33-beta/assist_view/AssistActionButton/backgroundColor.html) property is the color of the button's background. The default color is set to `colorScheme.primary`.

The [`focusColor`] property will replace the background color when the button is in a focused state. The default color is set to `colorScheme.primary.withOpacity(0.86)`.
The [`focusColor`](https://pub.dev/documentation/syncfusion_flutter_chat/28.1.33-beta/assist_view/AssistActionButton/focusColor.html) property will replace the background color when the button is in a focused state. The default color is set to `colorScheme.primary.withOpacity(0.86)`.

The [`hoverColor`] property color will replace the background color when a pointer is hovering over the button. The default color is set to `colorScheme.primary.withOpacity(0.91)`.
The [`hoverColor`](https://pub.dev/documentation/syncfusion_flutter_chat/28.1.33-beta/assist_view/AssistActionButton/hoverColor.html) property color will replace the background color when a pointer is hovering over the button. The default color is set to `colorScheme.primary.withOpacity(0.91)`.

The [`splashColor`] property is the splash color of the button's InkWell. The default color is set to `colorScheme.primary.withOpacity(0.86)`.
The [`splashColor`](https://pub.dev/documentation/syncfusion_flutter_chat/28.1.33-beta/assist_view/AssistActionButton/splashColor.html) property is the splash color of the button's InkWell. The default color is set to `colorScheme.primary.withOpacity(0.86)`.

{% tabs %}
{% highlight dart %}
Expand Down Expand Up @@ -184,13 +184,13 @@ The [`splashColor`] property is the splash color of the button's InkWell. The de

### Elevation

The [`elevation`] property is the size of the shadow below the action button in normal state. Defaults to `0.0`.
The [`elevation`](https://pub.dev/documentation/syncfusion_flutter_chat/28.1.33-beta/assist_view/AssistActionButton/elevation.html) property is the size of the shadow below the action button in normal state. Defaults to `0.0`.

The [`focusElevation`] property defines the elevation of the button when it has focus. Defaults to `0.0`.
The [`focusElevation`](https://pub.dev/documentation/syncfusion_flutter_chat/28.1.33-beta/assist_view/AssistActionButton/focusElevation.html) property defines the elevation of the button when it has focus. Defaults to `0.0`.

The [`hoverElevation`] property sets the elevation of the button when it is hovered over. Defaults to `0.0`.
The [`hoverElevation`](https://pub.dev/documentation/syncfusion_flutter_chat/28.1.33-beta/assist_view/AssistActionButton/hoverElevation.html) property sets the elevation of the button when it is hovered over. Defaults to `0.0`.

The [`highlightElevation`] property determines the elevation when the button is pressed. Defaults to `0.0`.
The [`highlightElevation`](https://pub.dev/documentation/syncfusion_flutter_chat/28.1.33-beta/assist_view/AssistActionButton/highlightElevation.html) property determines the elevation when the button is pressed. Defaults to `0.0`.

{% tabs %}
{% highlight dart %}
Expand Down Expand Up @@ -220,7 +220,7 @@ The [`highlightElevation`] property determines the elevation when the button is

### Mouse cursor

The [`mouseCursor`] property defines the type of cursor that appears when hovering over the button. It can be set to different values to customize the cursor shape (e.g., [`SystemMouseCursors.click`], [`SystemMouseCursors.forbidden`], etc.). If not specified, the default cursor will be used.
The [`mouseCursor`](https://pub.dev/documentation/syncfusion_flutter_chat/28.1.33-beta/assist_view/AssistActionButton/mouseCursor.html) property defines the type of cursor that appears when hovering over the button. It can be set to different values to customize the cursor shape (e.g., [`SystemMouseCursors.click`](https://api.flutter.dev/flutter/services/SystemMouseCursors/click-constant.html), [`SystemMouseCursors.forbidden`](https://api.flutter.dev/flutter/services/SystemMouseCursors/forbidden-constant.html), etc.). If not specified, the default cursor will be used.

{% tabs %}
{% highlight dart %}
Expand All @@ -247,7 +247,7 @@ The [`mouseCursor`] property defines the type of cursor that appears when hoveri

### Shape

The [`shape`] property sets the shape of the button's border, such as rounded or circular. By default, it is set to `RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(20.0)))`.
The [`shape`](https://pub.dev/documentation/syncfusion_flutter_chat/28.1.33-beta/assist_view/AssistActionButton/shape.html) property sets the shape of the button's border, such as rounded or circular. By default, it is set to `RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(20.0)))`.

{% tabs %}
{% highlight dart %}
Expand Down Expand Up @@ -281,7 +281,7 @@ The [`shape`] property sets the shape of the button's border, such as rounded or

### Padding

The [`padding`] property defines the space inside the button between its border and the content. By default, it is set to `EdgeInsetsDirectional.only(start: 8.0)`.
The [`padding`](https://pub.dev/documentation/syncfusion_flutter_chat/28.1.33-beta/assist_view/AssistActionButton/padding.html) property defines the space inside the button between its border and the content. By default, it is set to `EdgeInsetsDirectional.only(start: 8.0)`.

{% tabs %}
{% highlight dart %}
Expand All @@ -308,7 +308,7 @@ The [`padding`] property defines the space inside the button between its border

### Size

The [`size`] property specifies the width and height of the button. By default, it is set to `Size.square(40.0)`.
The [`size`](https://pub.dev/documentation/syncfusion_flutter_chat/28.1.33-beta/assist_view/AssistActionButton/size.html) property specifies the width and height of the button. By default, it is set to `Size.square(40.0)`.

{% tabs %}
{% highlight dart %}
Expand All @@ -333,8 +333,8 @@ The [`size`] property specifies the width and height of the button. By default,
{% endhighlight %}
{% endtabs %}

>You can refer to our [Flutter Chat] feature tour page for its groundbreaking feature representations. You can also explore our [Flutter Chat example] which demonstrates conversations between two or more users in a fully customizable layout and shows how to easily configure the chat with built-in support for creating stunning visual effects.
>You can refer to our [`Flutter AI AssistView`](https://www.syncfusion.com/flutter-widgets/flutter-aiassistview) feature tour page for its groundbreaking feature representations. You can also explore our [`Flutter AI AssistView example`](https://flutter.syncfusion.com/#/ai-assist-view/getting-started) which demonstrates interaction between users and AI services in a fully customizable layout and shows how to easily configure the AI AssistView with built-in support for creating stunning visual effects.

#### See Also

* You can also customize the above properties using [`SfAIAssistViewTheme`] by wrapping with [`SfAIAssistView`].
* You can also customize the above properties using [`SfAIAssistViewTheme`](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfAIAssistViewTheme-class.html) by wrapping with [`SfAIAssistView`](https://pub.dev/documentation/syncfusion_flutter_chat/28.1.33-beta/assist_view/SfAIAssistView-class.html).
Loading