mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-01-16 07:09:32 +00:00
chore: update flutter and dependencies
This commit is contained in:
parent
06694f5f0b
commit
a520136e01
80 changed files with 7701 additions and 9141 deletions
|
|
@ -35,7 +35,7 @@ class LibraryItemActions extends HookConsumerWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final item = ref.watch(libraryItemProvider(id)).valueOrNull;
|
||||
final item = ref.watch(libraryItemProvider(id)).value;
|
||||
if (item == null) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
|
|
@ -216,7 +216,7 @@ class LibItemDownloadButton extends HookConsumerWidget {
|
|||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final isItemDownloaded = ref.watch(isItemDownloadedProvider(item));
|
||||
if (isItemDownloaded.valueOrNull ?? false) {
|
||||
if (isItemDownloaded.value ?? false) {
|
||||
return AlreadyItemDownloadedButton(item: item);
|
||||
}
|
||||
final isItemDownloading = ref.watch(isItemDownloadingProvider(item.id));
|
||||
|
|
@ -252,7 +252,7 @@ class ItemCurrentlyInDownloadQueue extends HookConsumerWidget {
|
|||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final progress = ref
|
||||
.watch(itemDownloadProgressProvider(item.id))
|
||||
.valueOrNull
|
||||
.value
|
||||
?.clamp(0.05, 1.0);
|
||||
|
||||
if (progress == 1) {
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ class _BookDetails extends HookConsumerWidget {
|
|||
final itemFromApi = ref.watch(libraryItemProvider(id));
|
||||
|
||||
final itemBookMetadata =
|
||||
itemFromApi.valueOrNull?.media.metadata.asBookMetadataExpanded;
|
||||
itemFromApi.value?.media.metadata.asBookMetadataExpanded;
|
||||
|
||||
return Expanded(
|
||||
child: Padding(
|
||||
|
|
@ -143,7 +143,7 @@ class _LibraryItemProgressIndicator extends HookConsumerWidget {
|
|||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final player = ref.watch(audiobookPlayerProvider);
|
||||
final libraryItem = ref.watch(libraryItemProvider(id)).valueOrNull;
|
||||
final libraryItem = ref.watch(libraryItemProvider(id)).value;
|
||||
if (libraryItem == null) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
|
|
@ -362,7 +362,7 @@ class _BookCover extends HookConsumerWidget {
|
|||
MediaQuery.of(context).highContrast,
|
||||
),
|
||||
)
|
||||
.valueOrNull;
|
||||
.value;
|
||||
}
|
||||
|
||||
return ThemeSwitcher(
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ class LibraryItemMetadata extends HookConsumerWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final item = ref.watch(libraryItemProvider(id)).valueOrNull;
|
||||
final item = ref.watch(libraryItemProvider(id)).value;
|
||||
|
||||
/// formats the duration of the book as `10h 30m`
|
||||
///
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ class LibraryItemDescription extends HookConsumerWidget {
|
|||
final String id;
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final item = ref.watch(libraryItemProvider(id)).valueOrNull;
|
||||
final item = ref.watch(libraryItemProvider(id)).value;
|
||||
if (item == null) {
|
||||
return const SizedBox();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class LibraryItemSliverAppBar extends HookConsumerWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final item = ref.watch(libraryItemProvider(id)).valueOrNull;
|
||||
final item = ref.watch(libraryItemProvider(id)).value;
|
||||
|
||||
final showTitle = useState(false);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue