mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-08 23:18:16 -07:00
chore: Lots of bug fixes and navigation improvements
This commit is contained in:
parent
9bb5e81812
commit
92d5391b93
35 changed files with 513 additions and 455 deletions
|
|
@ -29,7 +29,7 @@ class HideOnScroll extends ConsumerStatefulWidget {
|
|||
}
|
||||
|
||||
class _HideOnScrollState extends ConsumerState<HideOnScroll> {
|
||||
late final ScrollController scrollController = widget.controller ?? ScrollController();
|
||||
late ScrollController scrollController = widget.controller ?? ScrollController();
|
||||
bool isVisible = true;
|
||||
|
||||
@override
|
||||
|
|
@ -47,6 +47,16 @@ class _HideOnScrollState extends ConsumerState<HideOnScroll> {
|
|||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
void didUpdateWidget(covariant HideOnScroll oldWidget) {
|
||||
super.didUpdateWidget(oldWidget);
|
||||
if (oldWidget.controller != widget.controller) {
|
||||
scrollController.removeListener(_onScroll);
|
||||
scrollController = widget.controller ?? ScrollController();
|
||||
scrollController.addListener(_onScroll);
|
||||
}
|
||||
}
|
||||
|
||||
void _onScroll() {
|
||||
if (!widget.canHide) {
|
||||
if (!isVisible) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue