diff --git a/CHANGELOG.md b/CHANGELOG.md index 6333a5ac0..4652757a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file. ### Changed +- Accessibility: removing animations also removes the overscroll stretch effect - target Android 14 (API 34) - upgraded Flutter to stable v3.10.5 diff --git a/lib/widgets/aves_app.dart b/lib/widgets/aves_app.dart index 34b95099a..46661873a 100644 --- a/lib/widgets/aves_app.dart +++ b/lib/widgets/aves_app.dart @@ -295,8 +295,7 @@ class _AvesAppState extends State with WidgetsBindingObserver { ...LocalizationsNn.delegates, ], supportedLocales: AvesApp.supportedLocales, - // TODO TLAD remove custom scroll behavior when this is fixed: https://github.com/flutter/flutter/issues/82906 - scrollBehavior: StretchMaterialScrollBehavior(), + scrollBehavior: AvesScrollBehavior(), ), ), ); @@ -633,13 +632,20 @@ class _AvesAppState extends State with WidgetsBindingObserver { void _onError(String? error) => reportService.recordError(error, null); } -class StretchMaterialScrollBehavior extends MaterialScrollBehavior { +class AvesScrollBehavior extends MaterialScrollBehavior { @override Widget buildOverscrollIndicator(BuildContext context, Widget child, ScrollableDetails details) { - return StretchingOverscrollIndicator( - axisDirection: details.direction, - child: child, - ); + final animate = context.select((v) => v.accessibilityAnimations.animate); + return animate + ? StretchingOverscrollIndicator( + axisDirection: details.direction, + child: child, + ) + : GlowingOverscrollIndicator( + axisDirection: details.direction, + color: Colors.white, + child: child, + ); } }