feat!(core): commit breaking changes
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
## 3.0.0
|
## 3.0.0
|
||||||
|
|
||||||
⚠️ Deprecated
|
🛑️ Breaking Changes from `2.2.1`
|
||||||
|
|
||||||
- `MessageSearchListViewCore` `paginationParams` property is now deprecated in favor of `limit`.
|
- `MessageSearchListViewCore` `paginationParams` property is now deprecated in favor of `limit`.
|
||||||
```dart
|
```dart
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
// new
|
// new
|
||||||
limit = 30
|
limit = 30
|
||||||
```
|
```
|
||||||
- `UserListViewCore` `pagination` property is now deprecated in favor of `limit`.
|
- `UserListCore` `pagination` property is now deprecated in favor of `limit`.
|
||||||
```dart
|
```dart
|
||||||
// previous
|
// previous
|
||||||
pagination = const PaginationParams(limit: 30)
|
pagination = const PaginationParams(limit: 30)
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
// new
|
// new
|
||||||
limit = 30
|
limit = 30
|
||||||
```
|
```
|
||||||
- `ChannelListViewCore` `pagination` property is now deprecated in favor of `limit`.
|
- `ChannelListCore` `pagination` property is now deprecated in favor of `limit`.
|
||||||
```dart
|
```dart
|
||||||
// previous
|
// previous
|
||||||
pagination = const PaginationParams(limit: 30)
|
pagination = const PaginationParams(limit: 30)
|
||||||
@@ -27,6 +27,8 @@
|
|||||||
limit = 30
|
limit = 30
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- `UserListViewCore` `filter` property now is non-nullable.
|
||||||
|
|
||||||
🔄 Changed
|
🔄 Changed
|
||||||
|
|
||||||
- `UserListViewCore` filter property now has a default value.
|
- `UserListViewCore` filter property now has a default value.
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ import 'package:stream_chat_flutter_core/src/typedef.dart';
|
|||||||
/// information about the channels.
|
/// information about the channels.
|
||||||
class ChannelListCore extends StatefulWidget {
|
class ChannelListCore extends StatefulWidget {
|
||||||
/// Instantiate a new ChannelListView
|
/// Instantiate a new ChannelListView
|
||||||
ChannelListCore({
|
const ChannelListCore({
|
||||||
Key? key,
|
Key? key,
|
||||||
required this.errorBuilder,
|
required this.errorBuilder,
|
||||||
required this.emptyBuilder,
|
required this.emptyBuilder,
|
||||||
@@ -69,15 +69,9 @@ class ChannelListCore extends StatefulWidget {
|
|||||||
this.memberLimit,
|
this.memberLimit,
|
||||||
this.messageLimit,
|
this.messageLimit,
|
||||||
this.sort,
|
this.sort,
|
||||||
@Deprecated(
|
|
||||||
"'pagination' is deprecated and shouldn't be used. "
|
|
||||||
"This property is no longer used, Please use 'limit' instead",
|
|
||||||
)
|
|
||||||
this.pagination,
|
|
||||||
this.channelListController,
|
this.channelListController,
|
||||||
int? limit,
|
this.limit = 25,
|
||||||
}) : limit = limit ?? pagination?.limit ?? 25,
|
}) : super(key: key);
|
||||||
super(key: key);
|
|
||||||
|
|
||||||
/// A [ChannelListController] allows reloading and pagination.
|
/// A [ChannelListController] allows reloading and pagination.
|
||||||
/// Use [ChannelListController.loadData] and
|
/// Use [ChannelListController.loadData] and
|
||||||
@@ -124,16 +118,6 @@ class ChannelListCore extends StatefulWidget {
|
|||||||
/// Number of messages to fetch in each channel
|
/// Number of messages to fetch in each channel
|
||||||
final int? messageLimit;
|
final int? messageLimit;
|
||||||
|
|
||||||
/// Pagination parameters
|
|
||||||
/// limit: the number of channels to return (max is 30)
|
|
||||||
/// offset: the offset (max is 1000)
|
|
||||||
/// message_limit: how many messages should be included to each channel
|
|
||||||
@Deprecated(
|
|
||||||
"'pagination' is deprecated and shouldn't be used. "
|
|
||||||
"This property is no longer used, Please use 'limit' instead",
|
|
||||||
)
|
|
||||||
final PaginationParams? pagination;
|
|
||||||
|
|
||||||
/// The amount of channels requested per API call.
|
/// The amount of channels requested per API call.
|
||||||
final int limit;
|
final int limit;
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart';
|
|||||||
/// [errorBuilder] must all be supplied and not null.
|
/// [errorBuilder] must all be supplied and not null.
|
||||||
class UserListCore extends StatefulWidget {
|
class UserListCore extends StatefulWidget {
|
||||||
/// Instantiate a new [UserListCore]
|
/// Instantiate a new [UserListCore]
|
||||||
UserListCore({
|
const UserListCore({
|
||||||
required this.errorBuilder,
|
required this.errorBuilder,
|
||||||
required this.emptyBuilder,
|
required this.emptyBuilder,
|
||||||
required this.loadingBuilder,
|
required this.loadingBuilder,
|
||||||
@@ -66,16 +66,10 @@ class UserListCore extends StatefulWidget {
|
|||||||
this.filter = const Filter.empty(),
|
this.filter = const Filter.empty(),
|
||||||
this.sort,
|
this.sort,
|
||||||
this.presence,
|
this.presence,
|
||||||
@Deprecated(
|
|
||||||
"'pagination' is deprecated and shouldn't be used. "
|
|
||||||
"This property is no longer used, Please use 'limit' instead",
|
|
||||||
)
|
|
||||||
this.pagination,
|
|
||||||
this.groupAlphabetically = false,
|
this.groupAlphabetically = false,
|
||||||
this.userListController,
|
this.userListController,
|
||||||
int? limit,
|
this.limit = 30,
|
||||||
}) : limit = limit ?? pagination?.limit ?? 30,
|
}) : super(key: key);
|
||||||
super(key: key);
|
|
||||||
|
|
||||||
/// A [UserListController] allows reloading and pagination.
|
/// A [UserListController] allows reloading and pagination.
|
||||||
/// Use [UserListController.loadData] and [UserListController.paginateData]
|
/// Use [UserListController.loadData] and [UserListController.paginateData]
|
||||||
@@ -97,8 +91,7 @@ class UserListCore extends StatefulWidget {
|
|||||||
/// The query filters to use.
|
/// The query filters to use.
|
||||||
/// You can query on any of the custom fields you've defined on the [Channel].
|
/// You can query on any of the custom fields you've defined on the [Channel].
|
||||||
/// You can also filter other built-in channel fields.
|
/// You can also filter other built-in channel fields.
|
||||||
// TODO: Make it non-nullable in a future breaking release
|
final Filter filter;
|
||||||
final Filter? filter;
|
|
||||||
|
|
||||||
/// The sorting used for the channels matching the filters.
|
/// The sorting used for the channels matching the filters.
|
||||||
/// Sorting is based on field and direction, multiple sorting options can be
|
/// Sorting is based on field and direction, multiple sorting options can be
|
||||||
@@ -109,16 +102,6 @@ class UserListCore extends StatefulWidget {
|
|||||||
/// If true you’ll receive user presence updates via the websocket events
|
/// If true you’ll receive user presence updates via the websocket events
|
||||||
final bool? presence;
|
final bool? presence;
|
||||||
|
|
||||||
/// Pagination parameters
|
|
||||||
/// limit: the number of users to return (max is 30)
|
|
||||||
/// offset: the offset (max is 1000)
|
|
||||||
/// message_limit: how many messages should be included to each channel
|
|
||||||
@Deprecated(
|
|
||||||
"'pagination' is deprecated and shouldn't be used. "
|
|
||||||
"This property is no longer used, Please use 'limit' instead",
|
|
||||||
)
|
|
||||||
final PaginationParams? pagination;
|
|
||||||
|
|
||||||
/// The amount of users requested per API call.
|
/// The amount of users requested per API call.
|
||||||
final int limit;
|
final int limit;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user