accessibility: disable accessibility nav in app media query
This commit is contained in:
parent
cd343a743a
commit
bed111a165
3 changed files with 34 additions and 18 deletions
|
@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- Accessibility: using accessibility services keeping snack bar beyond countdown
|
||||||
- Accessibility: navigation with TalkBack
|
- Accessibility: navigation with TalkBack
|
||||||
|
|
||||||
## <a id="v1.8.2"></a>[v1.8.2] - 2023-02-28
|
## <a id="v1.8.2"></a>[v1.8.2] - 2023-02-28
|
||||||
|
|
|
@ -161,7 +161,7 @@ class _BugReportState extends State<BugReport> with FeedbackMixin {
|
||||||
'System locales: ${WidgetsBinding.instance.window.locales.join(', ')}',
|
'System locales: ${WidgetsBinding.instance.window.locales.join(', ')}',
|
||||||
'Aves locale: ${settings.locale ?? 'system'} -> ${settings.appliedLocale}',
|
'Aves locale: ${settings.locale ?? 'system'} -> ${settings.appliedLocale}',
|
||||||
'Installer: ${packageInfo.installerStore}',
|
'Installer: ${packageInfo.installerStore}',
|
||||||
'Accessibility: accessibleNavigation=${accessibility.accessibleNavigation}, disableAnimations=${accessibility.disableAnimations}',
|
'Error reporting: ${settings.isErrorReportingAllowed}',
|
||||||
].join('\n');
|
].join('\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -247,6 +247,16 @@ class _AvesAppState extends State<AvesApp> with WidgetsBindingObserver {
|
||||||
// handle Android TV remote `select` button
|
// handle Android TV remote `select` button
|
||||||
LogicalKeySet(LogicalKeyboardKey.select): const ActivateIntent(),
|
LogicalKeySet(LogicalKeyboardKey.select): const ActivateIntent(),
|
||||||
},
|
},
|
||||||
|
child: MediaQuery.fromWindow(
|
||||||
|
child: Builder(
|
||||||
|
builder: (context) {
|
||||||
|
return MediaQuery(
|
||||||
|
data: MediaQuery.of(context).copyWith(
|
||||||
|
// disable accessible navigation, as it impacts snack bar action timer
|
||||||
|
// for all users of apps registered as accessibility services,
|
||||||
|
// even though they are not for accessibility purposes (like TalkBack is)
|
||||||
|
accessibleNavigation: false,
|
||||||
|
),
|
||||||
child: MaterialApp(
|
child: MaterialApp(
|
||||||
navigatorKey: AvesApp.navigatorKey,
|
navigatorKey: AvesApp.navigatorKey,
|
||||||
home: home,
|
home: home,
|
||||||
|
@ -265,6 +275,11 @@ class _AvesAppState extends State<AvesApp> with WidgetsBindingObserver {
|
||||||
supportedLocales: AvesApp.supportedLocales,
|
supportedLocales: AvesApp.supportedLocales,
|
||||||
// TODO TLAD remove custom scroll behavior when this is fixed: https://github.com/flutter/flutter/issues/82906
|
// TODO TLAD remove custom scroll behavior when this is fixed: https://github.com/flutter/flutter/issues/82906
|
||||||
scrollBehavior: StretchMaterialScrollBehavior(),
|
scrollBehavior: StretchMaterialScrollBehavior(),
|
||||||
|
useInheritedMediaQuery: true,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue