Files
buzz/mobile/lib/shared/widgets/frosted_header_scroll_state.dart
kenny lopez 7ca134fac1 address mobile review feedback
Signed-off-by: kenny lopez <klopez4212@gmail.com>
2026-08-03 18:08:34 +01:00

21 lines
627 B
Dart

import 'package:flutter/material.dart';
/// Shares the scroll elevation state from [FrostedScaffold] with its header.
/// Keeping this separate lets all of the existing page bodies continue to own
/// their scroll views.
class FrostedHeaderScrollState extends InheritedNotifier<ValueNotifier<bool>> {
const FrostedHeaderScrollState({
required super.notifier,
required super.child,
super.key,
});
static bool isScrolledOf(BuildContext context) {
return context
.dependOnInheritedWidgetOfExactType<FrostedHeaderScrollState>()
?.notifier
?.value ??
false;
}
}