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
|
||||
|
||||
- Accessibility: using accessibility services keeping snack bar beyond countdown
|
||||
- Accessibility: navigation with TalkBack
|
||||
|
||||
## <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(', ')}',
|
||||
'Aves locale: ${settings.locale ?? 'system'} -> ${settings.appliedLocale}',
|
||||
'Installer: ${packageInfo.installerStore}',
|
||||
'Accessibility: accessibleNavigation=${accessibility.accessibleNavigation}, disableAnimations=${accessibility.disableAnimations}',
|
||||
'Error reporting: ${settings.isErrorReportingAllowed}',
|
||||
].join('\n');
|
||||
}
|
||||
|
||||
|
|
|
@ -247,24 +247,39 @@ class _AvesAppState extends State<AvesApp> with WidgetsBindingObserver {
|
|||
// handle Android TV remote `select` button
|
||||
LogicalKeySet(LogicalKeyboardKey.select): const ActivateIntent(),
|
||||
},
|
||||
child: MaterialApp(
|
||||
navigatorKey: AvesApp.navigatorKey,
|
||||
home: home,
|
||||
navigatorObservers: _navigatorObservers,
|
||||
builder: (context, child) => _decorateAppChild(
|
||||
context: context,
|
||||
initialized: initialized,
|
||||
child: child,
|
||||
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(
|
||||
navigatorKey: AvesApp.navigatorKey,
|
||||
home: home,
|
||||
navigatorObservers: _navigatorObservers,
|
||||
builder: (context, child) => _decorateAppChild(
|
||||
context: context,
|
||||
initialized: initialized,
|
||||
child: child,
|
||||
),
|
||||
onGenerateTitle: (context) => context.l10n.appName,
|
||||
theme: lightTheme,
|
||||
darkTheme: darkTheme,
|
||||
themeMode: themeBrightness.appThemeMode,
|
||||
locale: settingsLocale,
|
||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
supportedLocales: AvesApp.supportedLocales,
|
||||
// TODO TLAD remove custom scroll behavior when this is fixed: https://github.com/flutter/flutter/issues/82906
|
||||
scrollBehavior: StretchMaterialScrollBehavior(),
|
||||
useInheritedMediaQuery: true,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
onGenerateTitle: (context) => context.l10n.appName,
|
||||
theme: lightTheme,
|
||||
darkTheme: darkTheme,
|
||||
themeMode: themeBrightness.appThemeMode,
|
||||
locale: settingsLocale,
|
||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
supportedLocales: AvesApp.supportedLocales,
|
||||
// TODO TLAD remove custom scroll behavior when this is fixed: https://github.com/flutter/flutter/issues/82906
|
||||
scrollBehavior: StretchMaterialScrollBehavior(),
|
||||
),
|
||||
);
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue