revert some changes

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2023-04-20 17:28:33 +05:30
committed by xsahil03x
parent ccfacd4af1
commit a909261072
2 changed files with 6 additions and 12 deletions
@@ -26,12 +26,8 @@ class UnboundedCustomScrollView extends CustomScrollView {
super.slivers, super.slivers,
super.semanticChildCount, super.semanticChildCount,
super.dragStartBehavior, super.dragStartBehavior,
ScrollViewKeyboardDismissBehavior? keyboardDismissBehavior, super.keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
}) : _anchor = anchor, }) : _anchor = anchor;
super(
keyboardDismissBehavior: keyboardDismissBehavior ??
ScrollViewKeyboardDismissBehavior.manual,
);
// [CustomScrollView] enforces constraints on [CustomScrollView.anchor], so // [CustomScrollView] enforces constraints on [CustomScrollView.anchor], so
// we need our own version. // we need our own version.
@@ -52,12 +52,12 @@ class StreamChannelListController extends PagedValueNotifier<int, Channel> {
this.limit = defaultChannelPagedLimit, this.limit = defaultChannelPagedLimit,
this.messageLimit, this.messageLimit,
this.memberLimit, this.memberLimit,
}) }) : _eventHandler = eventHandler ?? StreamChannelListEventHandler(),
: _eventHandler = eventHandler ?? StreamChannelListEventHandler(),
super(const PagedValue.loading()); super(const PagedValue.loading());
/// Creates a [StreamChannelListController] from the passed [value]. /// Creates a [StreamChannelListController] from the passed [value].
StreamChannelListController.fromValue(super.value, { StreamChannelListController.fromValue(
super.value, {
required this.client, required this.client,
StreamChannelListEventHandler? eventHandler, StreamChannelListEventHandler? eventHandler,
this.filter, this.filter,
@@ -246,10 +246,8 @@ class StreamChannelListController extends PagedValueNotifier<int, Channel> {
_channelEventSubscription = client _channelEventSubscription = client
.on() .on()
.skip(1) // Skipping the last emitted event. .skip(1) // Skipping the last emitted event.
// We only need to handle the latest events. // We only need to handle the latest events.
.listen((event) { .listen((event) {
print('event: $event');
// Only handle the event if the value is in success state. // Only handle the event if the value is in success state.
if (value.isNotSuccess) return; if (value.isNotSuccess) return;