feat: Added new docs

This commit is contained in:
Deven Joshi
2021-07-02 17:33:19 +05:30
parent 469e481b0d
commit da75fd57a9
8 changed files with 41 additions and 7 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

@@ -0,0 +1,4 @@
{
"label": "Guides",
"position": 5
}
@@ -1,6 +1,6 @@
---
id: local_data_persistence
sidebar_position: 9
sidebar_position: 2
title: Adding Local Data Persistence
---
@@ -1,6 +1,6 @@
---
id: adding_push_notifications
sidebar_position: 8
sidebar_position: 3
title: Adding Push Notifications
---
@@ -1,4 +0,0 @@
{
"label": "Other",
"position": 5
}
@@ -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
]
),
```
@@ -0,0 +1,5 @@
---
id: user_list_core
sidebar_position: 10
title: UserListCore
---