NOT EXISTS
- это первое, что приходит на ум:
select t.*
from t
where status = 'Checked Out' and
not exists (select 1
from t t2
where t2.card_number = t.card_number and
t2.status = 'Checked In' and
t2.transaction_date >= t.transaction_date and
t2.transaction_date < dateadd(day, 7, t.transaction_date)
);
Вы можете поместить следующий код в прослушиватель прокрутки списков.
FocusScope.of(context).requestFocus(new FocusNode());
Вот что дает вам желаемый эффект:
NotificationListener(
onNotification: (ScrollNotification scrollInfo) {
if (scrollInfo is ScrollUpdateNotification) {
if (scrollInfo.scrollDelta >= 20.0) {
FocusScope.of(context).requestFocus(FocusNode());
}
}
},
child: new FirebaseAnimatedList ...)
Это то, что я сделал:
NotificationListener(
onNotification: (t) {
if (t is UserScrollNotification) {
FocusScope.of(context).requestFocus(FocusNode());
}
},
child: ListView.builder(
itemBuilder: (_, i) => Container(),
itemCount: items.length,
),
);
Присоединение ScrollListener
не сработало для меня, потому что Android использует ClampingScrollPhysics
, и оно получит событие прокрутки, только если элементы ListView длиннее, чем родитель. Тем не менее, NotificationListener
получит все всплывающие события, включая UserScrollNotification
.