chore: remove deprecated apis (#74)

* dart format + remove withopacity

* remove unused imports
This commit is contained in:
Dr.Blank 2025-04-10 19:42:08 +05:30 committed by GitHub
parent 4af16ac5b4
commit 4ebf46d2fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 48 additions and 37 deletions

View file

@ -199,8 +199,10 @@ class _LibraryItemProgressIndicator extends HookConsumerWidget {
'${remainingTime.smartBinaryFormat} left',
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color:
Theme.of(context).colorScheme.onSurface.withOpacity(0.75),
color: Theme.of(context)
.colorScheme
.onSurface
.withValues(alpha: 0.75),
),
),
],
@ -227,7 +229,7 @@ class _HeroSectionSubLabelWithIcon extends HookConsumerWidget {
ref.watch(appSettingsProvider).themeSettings.useMaterialThemeOnItemPage;
final color = useMaterialThemeOnItemPage
? themeData.colorScheme.primary
: themeData.colorScheme.onSurface.withOpacity(0.75);
: themeData.colorScheme.onSurface.withValues(alpha: 0.75);
return Padding(
padding: const EdgeInsets.only(bottom: 8.0),
child: Row(
@ -443,7 +445,7 @@ class _BookTitle extends StatelessWidget {
? const SizedBox.shrink()
: Text(
style: themeData.textTheme.titleSmall?.copyWith(
color: themeData.colorScheme.onSurface.withOpacity(0.8),
color: themeData.colorScheme.onSurface.withValues(alpha: 0.8),
),
itemBookMetadata?.subtitle ?? '',
),

View file

@ -96,7 +96,10 @@ class LibraryItemMetadata extends HookConsumerWidget {
return VerticalDivider(
indent: 6,
endIndent: 6,
color: Theme.of(context).colorScheme.onSurface.withOpacity(0.6),
color: Theme.of(context)
.colorScheme
.onSurface
.withValues(alpha: 0.6),
);
},
),
@ -125,7 +128,7 @@ class _MetadataItem extends StatelessWidget {
children: [
Text(
style: themeData.textTheme.titleMedium?.copyWith(
color: themeData.colorScheme.onSurface.withOpacity(0.90),
color: themeData.colorScheme.onSurface.withValues(alpha: 0.90),
),
value,
maxLines: 1,
@ -133,7 +136,7 @@ class _MetadataItem extends StatelessWidget {
),
Text(
style: themeData.textTheme.bodySmall?.copyWith(
color: themeData.colorScheme.onSurface.withOpacity(0.7),
color: themeData.colorScheme.onSurface.withValues(alpha: 0.7),
),
title,
maxLines: 1,