stretching overscroll

This commit is contained in:
Thibault Deckers 2022-05-12 22:48:20 +09:00
parent fd8083a90f
commit 8f5d19bb17

View file

@ -148,6 +148,8 @@ class _AvesAppState extends State<AvesApp> with WidgetsBindingObserver {
locale: settingsLocale,
localizationsDelegates: AppLocalizations.localizationsDelegates,
supportedLocales: AppLocalizations.supportedLocales,
// TODO TLAD remove custom scroll behavior when this is fixed: https://github.com/flutter/flutter/issues/82906
scrollBehavior: StretchMaterialScrollBehavior(),
);
},
);
@ -325,3 +327,13 @@ class _AvesAppState extends State<AvesApp> with WidgetsBindingObserver {
void _onError(String? error) => reportService.recordError(error, null);
}
class StretchMaterialScrollBehavior extends MaterialScrollBehavior {
@override
Widget buildOverscrollIndicator(BuildContext context, Widget child, ScrollableDetails details) {
return StretchingOverscrollIndicator(
axisDirection: details.direction,
child: child,
);
}
}