Отпустить клавиатуру на свитке?

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)
                 );
0
задан FlutterFirebase 18 January 2019 в 21:33
поделиться

3 ответа

Вы можете поместить следующий код в прослушиватель прокрутки списков.

FocusScope.of(context).requestFocus(new FocusNode());

0
ответ дан westdabestdb 18 January 2019 в 21:33
поделиться

Вот что дает вам желаемый эффект:

NotificationListener(
 onNotification: (ScrollNotification scrollInfo) {

   if (scrollInfo is ScrollUpdateNotification) {
     if (scrollInfo.scrollDelta >= 20.0)      {
       FocusScope.of(context).requestFocus(FocusNode());
      }
     }

    },
 child: new FirebaseAnimatedList ...)
0
ответ дан user3532201 18 January 2019 в 21:33
поделиться

Это то, что я сделал:

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.

0
ответ дан Fuxing Loh 18 January 2019 в 21:33
поделиться
Другие вопросы по тегам:

Похожие вопросы: