mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-09 12:39:29 +00:00
upgrade to flutter 3.27.4
This commit is contained in:
parent
e7946feca1
commit
2fd4650bb8
44 changed files with 433 additions and 315 deletions
|
|
@ -22,4 +22,4 @@ final playlistProvider =
|
|||
|
||||
typedef _$Playlist = AutoDisposeNotifier<AudiobookPlaylist>;
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
|
|
|||
|
|
@ -43,4 +43,4 @@ final audiobookPlayerProvider =
|
|||
|
||||
typedef _$AudiobookPlayer = Notifier<core.AudiobookPlayer>;
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:shelfsdk/audiobookshelf_api.dart';
|
||||
|
|
@ -9,7 +10,7 @@ part 'currently_playing_provider.g.dart';
|
|||
final _logger = Logger('CurrentlyPlayingProvider');
|
||||
|
||||
@riverpod
|
||||
BookExpanded? currentlyPlayingBook(CurrentlyPlayingBookRef ref) {
|
||||
BookExpanded? currentlyPlayingBook(Ref ref) {
|
||||
try {
|
||||
final player = ref.watch(audiobookPlayerProvider);
|
||||
return player.book;
|
||||
|
|
@ -21,7 +22,7 @@ BookExpanded? currentlyPlayingBook(CurrentlyPlayingBookRef ref) {
|
|||
|
||||
/// provided the current chapter of the book being played
|
||||
@riverpod
|
||||
BookChapter? currentPlayingChapter(CurrentPlayingChapterRef ref) {
|
||||
BookChapter? currentPlayingChapter(Ref ref) {
|
||||
final player = ref.watch(audiobookPlayerProvider);
|
||||
player.slowPositionStream.listen((_) {
|
||||
ref.invalidateSelf();
|
||||
|
|
@ -32,7 +33,7 @@ BookChapter? currentPlayingChapter(CurrentPlayingChapterRef ref) {
|
|||
|
||||
/// provides the book metadata of the currently playing book
|
||||
@riverpod
|
||||
BookMetadataExpanded? currentBookMetadata(CurrentBookMetadataRef ref) {
|
||||
BookMetadataExpanded? currentBookMetadata(Ref ref) {
|
||||
final player = ref.watch(audiobookPlayerProvider);
|
||||
if (player.book == null) return null;
|
||||
return player.book!.metadata.asBookMetadataExpanded;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ part of 'currently_playing_provider.dart';
|
|||
// **************************************************************************
|
||||
|
||||
String _$currentlyPlayingBookHash() =>
|
||||
r'7440b0d54cb364f66e704783652e8f1490ae90e0';
|
||||
r'e4258694c8f0d1e89651b330fae0f672ca13a484';
|
||||
|
||||
/// See also [currentlyPlayingBook].
|
||||
@ProviderFor(currentlyPlayingBook)
|
||||
|
|
@ -22,9 +22,11 @@ final currentlyPlayingBookProvider =
|
|||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef CurrentlyPlayingBookRef = AutoDisposeProviderRef<BookExpanded?>;
|
||||
String _$currentPlayingChapterHash() =>
|
||||
r'a084da724e3d8bb1b1475e867ab3200d7d61d827';
|
||||
r'73db8b8a9058573bb0c68ec5d5f8aba9306f3d24';
|
||||
|
||||
/// provided the current chapter of the book being played
|
||||
///
|
||||
|
|
@ -41,9 +43,11 @@ final currentPlayingChapterProvider =
|
|||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef CurrentPlayingChapterRef = AutoDisposeProviderRef<BookChapter?>;
|
||||
String _$currentBookMetadataHash() =>
|
||||
r'9088debba151894b61f2dcba1bba12a89244b9b1';
|
||||
r'f537ef4ef19280bc952de658ecf6520c535ae344';
|
||||
|
||||
/// provides the book metadata of the currently playing book
|
||||
///
|
||||
|
|
@ -60,6 +64,8 @@ final currentBookMetadataProvider =
|
|||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef CurrentBookMetadataRef = AutoDisposeProviderRef<BookMetadataExpanded?>;
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ extension on Ref {
|
|||
|
||||
@Riverpod(keepAlive: true)
|
||||
Raw<ValueNotifier<double>> playerExpandProgressNotifier(
|
||||
PlayerExpandProgressNotifierRef ref,
|
||||
Ref ref,
|
||||
) {
|
||||
final ValueNotifier<double> playerExpandProgress =
|
||||
ValueNotifier(playerMinHeight);
|
||||
|
|
@ -47,7 +47,7 @@ Raw<ValueNotifier<double>> playerExpandProgressNotifier(
|
|||
// a provider that will listen to the playerExpandProgressNotifier and return the percentage of the player expanded
|
||||
@Riverpod(keepAlive: true)
|
||||
double playerHeight(
|
||||
PlayerHeightRef ref,
|
||||
Ref ref,
|
||||
) {
|
||||
final playerExpandProgress = ref.watch(playerExpandProgressNotifierProvider);
|
||||
|
||||
|
|
@ -64,7 +64,7 @@ final audioBookMiniplayerController = MiniplayerController();
|
|||
|
||||
@Riverpod(keepAlive: true)
|
||||
bool isPlayerActive(
|
||||
IsPlayerActiveRef ref,
|
||||
Ref ref,
|
||||
) {
|
||||
try {
|
||||
final player = ref.watch(audiobookPlayerProvider);
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ part of 'player_form.dart';
|
|||
// **************************************************************************
|
||||
|
||||
String _$playerExpandProgressNotifierHash() =>
|
||||
r'e4817361b9a311b61ca23e51082ed11b0a1120ab';
|
||||
r'1ac7172d90a070f96222286edd1a176be197f378';
|
||||
|
||||
/// See also [playerExpandProgressNotifier].
|
||||
@ProviderFor(playerExpandProgressNotifier)
|
||||
|
|
@ -22,9 +22,11 @@ final playerExpandProgressNotifierProvider =
|
|||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef PlayerExpandProgressNotifierRef
|
||||
= ProviderRef<Raw<ValueNotifier<double>>>;
|
||||
String _$playerHeightHash() => r'26dbcb180d494575488d700bd5bdb58c02c224a9';
|
||||
String _$playerHeightHash() => r'3f031eaffdffbb2c6ddf7eb1aba31bf1619260fc';
|
||||
|
||||
/// See also [playerHeight].
|
||||
@ProviderFor(playerHeight)
|
||||
|
|
@ -37,8 +39,10 @@ final playerHeightProvider = Provider<double>.internal(
|
|||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef PlayerHeightRef = ProviderRef<double>;
|
||||
String _$isPlayerActiveHash() => r'147e13cd7fd6fd3823623557ce4f300dc15b6fe6';
|
||||
String _$isPlayerActiveHash() => r'2c7ca125423126fb5f0ef218d37bc8fe0ca9ec98';
|
||||
|
||||
/// See also [isPlayerActive].
|
||||
@ProviderFor(isPlayerActive)
|
||||
|
|
@ -52,6 +56,8 @@ final isPlayerActiveProvider = Provider<bool>.internal(
|
|||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef IsPlayerActiveRef = ProviderRef<bool>;
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue