diff --git a/docusaurus/docs/Flutter/assets/swipe_channel.png b/docusaurus/docs/Flutter/assets/swipe_channel.png new file mode 100644 index 00000000..44f13ca5 Binary files /dev/null and b/docusaurus/docs/Flutter/assets/swipe_channel.png differ diff --git a/docusaurus/docs/Flutter/guides/_category_.json b/docusaurus/docs/Flutter/guides/_category_.json new file mode 100644 index 00000000..c2af63bb --- /dev/null +++ b/docusaurus/docs/Flutter/guides/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Guides", + "position": 5 +} \ No newline at end of file diff --git a/docusaurus/docs/Flutter/stream_chat_flutter/adding_local_data_persistence.mdx b/docusaurus/docs/Flutter/guides/adding_local_data_persistence.mdx similarity index 78% rename from docusaurus/docs/Flutter/stream_chat_flutter/adding_local_data_persistence.mdx rename to docusaurus/docs/Flutter/guides/adding_local_data_persistence.mdx index 10abc63d..21ec99ce 100644 --- a/docusaurus/docs/Flutter/stream_chat_flutter/adding_local_data_persistence.mdx +++ b/docusaurus/docs/Flutter/guides/adding_local_data_persistence.mdx @@ -1,6 +1,6 @@ --- id: local_data_persistence -sidebar_position: 9 +sidebar_position: 2 title: Adding Local Data Persistence --- diff --git a/docusaurus/docs/Flutter/stream_chat_flutter/adding_push_notifcations.mdx b/docusaurus/docs/Flutter/guides/adding_push_notifcations.mdx similarity index 78% rename from docusaurus/docs/Flutter/stream_chat_flutter/adding_push_notifcations.mdx rename to docusaurus/docs/Flutter/guides/adding_push_notifcations.mdx index b9d87913..20621ca7 100644 --- a/docusaurus/docs/Flutter/stream_chat_flutter/adding_push_notifcations.mdx +++ b/docusaurus/docs/Flutter/guides/adding_push_notifcations.mdx @@ -1,6 +1,6 @@ --- id: adding_push_notifications -sidebar_position: 8 +sidebar_position: 3 title: Adding Push Notifications --- diff --git a/docusaurus/docs/Flutter/other/introduction.mdx b/docusaurus/docs/Flutter/guides/introduction.mdx similarity index 100% rename from docusaurus/docs/Flutter/other/introduction.mdx rename to docusaurus/docs/Flutter/guides/introduction.mdx diff --git a/docusaurus/docs/Flutter/other/_category_.json b/docusaurus/docs/Flutter/other/_category_.json deleted file mode 100644 index acf56fce..00000000 --- a/docusaurus/docs/Flutter/other/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Other", - "position": 5 -} \ No newline at end of file diff --git a/docusaurus/docs/Flutter/stream_chat_flutter/channel_list_view.mdx b/docusaurus/docs/Flutter/stream_chat_flutter/channel_list_view.mdx index e72bba0f..379b3a2a 100644 --- a/docusaurus/docs/Flutter/stream_chat_flutter/channel_list_view.mdx +++ b/docusaurus/docs/Flutter/stream_chat_flutter/channel_list_view.mdx @@ -46,7 +46,7 @@ class ChannelListPage extends StatelessWidget { This example by default displays the channels that a user is a part of. Now let's look at customizing the widget. -#### Customizing the Channel Preview +### Customizing the Channel Preview A common aspect of the widget needed to be tweaked according to each app is the Channel Preview (the Channel tile in the list). To do this, we use the `channelPreviewBuilder` param like this: @@ -69,3 +69,32 @@ Which gives you a new Channel preview in the list: ![](../assets/channel_preview.png) +### Adding Swipe Actions + +To add actions (such as delete, more info, etc) when Channel preview is swiped left, set the `swipeToAction` +parameter to `true`. + +```dart +ChannelListView( + ... + swipeToAction: true, +), +``` + +This adds two basic actions - info and delete: + +![](../assets/swipe_channel.png) + +To add custom actions of your own, use the `swipeActions` param: + +```dart +ChannelListView( + ... + swipeToAction: true, + swipeActions: [ + // Your action widgets here + ] +), +``` + + diff --git a/docusaurus/docs/Flutter/stream_chat_flutter_core/user_list_core.mdx b/docusaurus/docs/Flutter/stream_chat_flutter_core/user_list_core.mdx new file mode 100644 index 00000000..0f515a12 --- /dev/null +++ b/docusaurus/docs/Flutter/stream_chat_flutter_core/user_list_core.mdx @@ -0,0 +1,5 @@ +--- +id: user_list_core +sidebar_position: 10 +title: UserListCore +--- \ No newline at end of file