chore: accessibility improvements, Semantics wrappers, and tooltip additions across screens

This commit is contained in:
zarzet
2026-03-08 15:08:13 +07:00
parent c35857bb61
commit 75a2bec8d5
26 changed files with 971 additions and 736 deletions
+23 -6
View File
@@ -32,6 +32,7 @@ class CollapsingHeader extends StatelessWidget {
surfaceTintColor: Colors.transparent,
leading: showBackButton
? IconButton(
tooltip: MaterialLocalizations.of(context).backButtonTooltip,
icon: const Icon(Icons.arrow_back),
onPressed: () => Navigator.pop(context),
)
@@ -39,7 +40,10 @@ class CollapsingHeader extends StatelessWidget {
automaticallyImplyLeading: false,
flexibleSpace: LayoutBuilder(
builder: (context, constraints) {
final expandRatio = _calculateExpandRatio(constraints, topPadding);
final expandRatio = _calculateExpandRatio(
constraints,
topPadding,
);
final animation = AlwaysStoppedAnimation(expandRatio);
return FlexibleSpaceBar(
@@ -48,13 +52,22 @@ class CollapsingHeader extends StatelessWidget {
title: Container(
alignment: Alignment.bottomLeft,
padding: EdgeInsets.only(
left: Tween<double>(begin: showBackButton ? 56 : 24, end: 24).evaluate(animation),
bottom: Tween<double>(begin: 16, end: 24).evaluate(animation),
left: Tween<double>(
begin: showBackButton ? 56 : 24,
end: 24,
).evaluate(animation),
bottom: Tween<double>(
begin: 16,
end: 24,
).evaluate(animation),
),
child: Text(
title,
style: TextStyle(
fontSize: Tween<double>(begin: 20, end: 28).evaluate(animation),
fontSize: Tween<double>(
begin: 20,
end: 28,
).evaluate(animation),
fontWeight: FontWeight.bold,
color: colorScheme.onSurface,
),
@@ -142,8 +155,12 @@ class InfoCard extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(title, style: Theme.of(context).textTheme.bodyLarge),
Text(subtitle, style: Theme.of(context).textTheme.bodyMedium?.copyWith(
color: colorScheme.onSurfaceVariant)),
Text(
subtitle,
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
color: colorScheme.onSurfaceVariant,
),
),
],
),
],
@@ -61,6 +61,7 @@ class PrioritySettingsScaffold extends StatelessWidget {
backgroundColor: colorScheme.surface,
surfaceTintColor: Colors.transparent,
leading: IconButton(
tooltip: MaterialLocalizations.of(context).backButtonTooltip,
icon: const Icon(Icons.arrow_back),
onPressed: () => _handleBack(context),
),
@@ -36,6 +36,7 @@ class TrackCollectionQuickActions extends ConsumerWidget {
final colorScheme = Theme.of(context).colorScheme;
return IconButton(
tooltip: MaterialLocalizations.of(context).showMenuTooltip,
icon: Icon(
Icons.more_vert,
color: colorScheme.onSurfaceVariant,