notification property

ScrollUpdateNotification? notification

Implementation

ScrollUpdateNotification? get notification => _notification;
void notification=(ScrollUpdateNotification? value)

Implementation

set notification(ScrollUpdateNotification? value) {
  _notification = value;

  // print('notification axis direction ${value?.metrics.axisDirection}');
  // print('notification axis ${value?.metrics.axis}');
  // print('notification scrollDelta ${value?.scrollDelta?.sign}');
  // print('dy is $dy');

  if (dy == 0 &&
      (value?.metrics.axis == Axis.vertical &&
          value?.scrollDelta?.sign == 1)) {
    print('hiding nav bar');
    dy = 150;
    notifyListeners();
  } else if (dy == 150 &&
      (value?.metrics.axis == Axis.horizontal ||
          value?.scrollDelta?.sign == -1)) {
    print('showing nav bar');
    dy = 0;
    notifyListeners();
  }
}