mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-24 20:09:30 +00:00
chore: remove deprecated apis (#74)
* dart format + remove withopacity * remove unused imports
This commit is contained in:
parent
4af16ac5b4
commit
4ebf46d2fd
22 changed files with 48 additions and 37 deletions
|
|
@ -98,8 +98,10 @@ class MySearchBar extends HookConsumerWidget {
|
|||
// opacity: 0.5 for the hint text
|
||||
hintStyle: WidgetStatePropertyAll(
|
||||
Theme.of(context).textTheme.bodyMedium!.copyWith(
|
||||
color:
|
||||
Theme.of(context).colorScheme.onSurface.withOpacity(0.5),
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.onSurface
|
||||
.withValues(alpha: 0.5),
|
||||
),
|
||||
),
|
||||
textInputAction: TextInputAction.search,
|
||||
|
|
|
|||
|
|
@ -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 ?? '',
|
||||
),
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -175,7 +175,6 @@ class UserLoginMultipleAuth extends HookConsumerWidget {
|
|||
],
|
||||
),
|
||||
),
|
||||
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: switch (methodChoice.value) {
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ class UserLoginWithPassword extends HookConsumerWidget {
|
|||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.onSurface
|
||||
.withOpacity(0.8),
|
||||
.withValues(alpha: 0.8),
|
||||
),
|
||||
border: const OutlineInputBorder(),
|
||||
),
|
||||
|
|
@ -127,12 +127,15 @@ class UserLoginWithPassword extends HookConsumerWidget {
|
|||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.onSurface
|
||||
.withOpacity(0.8),
|
||||
.withValues(alpha: 0.8),
|
||||
),
|
||||
border: const OutlineInputBorder(),
|
||||
suffixIcon: ColorFiltered(
|
||||
colorFilter: ColorFilter.mode(
|
||||
Theme.of(context).colorScheme.primary.withOpacity(0.8),
|
||||
Theme.of(context)
|
||||
.colorScheme
|
||||
.primary
|
||||
.withValues(alpha: 0.8),
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
child: InkWell(
|
||||
|
|
|
|||
|
|
@ -84,7 +84,10 @@ class UserLoginWithToken extends HookConsumerWidget {
|
|||
decoration: InputDecoration(
|
||||
labelText: 'API Token',
|
||||
labelStyle: TextStyle(
|
||||
color: Theme.of(context).colorScheme.onSurface.withOpacity(0.8),
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.onSurface
|
||||
.withValues(alpha: 0.8),
|
||||
),
|
||||
border: const OutlineInputBorder(),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -104,8 +104,10 @@ class PlayerWhenExpanded extends HookConsumerWidget {
|
|||
decoration: BoxDecoration(
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color:
|
||||
Theme.of(context).colorScheme.primary.withOpacity(0.1),
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.primary
|
||||
.withValues(alpha: 0.1),
|
||||
blurRadius: 32 * earlyPercentage,
|
||||
spreadRadius: 8 * earlyPercentage,
|
||||
// offset: Offset(0, 16 * earlyPercentage),
|
||||
|
|
@ -171,7 +173,7 @@ class PlayerWhenExpanded extends HookConsumerWidget {
|
|||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.onSurface
|
||||
.withOpacity(0.7),
|
||||
.withValues(alpha: 0.7),
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ class PlayerWhenMinimized extends HookConsumerWidget {
|
|||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.onSurface
|
||||
.withOpacity(0.7),
|
||||
.withValues(alpha: 0.7),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|||
import 'package:list_wheel_scroll_view_nls/list_wheel_scroll_view_nls.dart';
|
||||
import 'package:vaani/features/player/providers/audiobook_player.dart';
|
||||
import 'package:vaani/settings/app_settings_provider.dart';
|
||||
import 'package:vaani/shared/hooks.dart';
|
||||
|
||||
const double itemExtent = 25;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import 'package:vaani/features/sleep_timer/providers/sleep_timer_provider.dart'
|
|||
import 'package:vaani/main.dart';
|
||||
import 'package:vaani/settings/app_settings_provider.dart';
|
||||
import 'package:vaani/shared/extensions/duration_format.dart';
|
||||
import 'package:vaani/shared/hooks.dart';
|
||||
|
||||
class SleepTimerButton extends HookConsumerWidget {
|
||||
const SleepTimerButton({
|
||||
|
|
|
|||
|
|
@ -261,9 +261,7 @@ class ServerManagerPage extends HookConsumerWidget {
|
|||
},
|
||||
),
|
||||
),
|
||||
|
||||
MiniPlayerBottomPadding(),
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue