chore: run dart format
Some checks are pending
Flutter CI & Release / Test (push) Waiting to run
Flutter CI & Release / Build Android APKs (push) Blocked by required conditions
Flutter CI & Release / build_linux (push) Blocked by required conditions
Flutter CI & Release / Create GitHub Release (push) Blocked by required conditions

This commit is contained in:
Dr.Blank 2026-01-10 16:51:05 +05:30
parent a520136e01
commit e23c0b6c5f
No known key found for this signature in database
GPG key ID: BA5F87FF0560C57B
84 changed files with 1565 additions and 1945 deletions

View file

@ -4,10 +4,7 @@ import 'package:vaani/api/library_item_provider.dart';
import 'package:vaani/shared/extensions/model_conversions.dart';
class LibraryItemMetadata extends HookConsumerWidget {
const LibraryItemMetadata({
super.key,
required this.id,
});
const LibraryItemMetadata({super.key, required this.id});
final String id;
@ -72,7 +69,8 @@ class LibraryItemMetadata extends HookConsumerWidget {
),
_MetadataItem(
title: 'Published',
value: itemBookMetadata?.publishedDate ??
value:
itemBookMetadata?.publishedDate ??
itemBookMetadata?.publishedYear ??
'Unknown',
),
@ -87,22 +85,18 @@ class LibraryItemMetadata extends HookConsumerWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
// alternate between metadata and vertical divider
children: List.generate(
children.length * 2 - 1,
(index) {
if (index.isEven) {
return children[index ~/ 2];
}
return VerticalDivider(
indent: 6,
endIndent: 6,
color: Theme.of(context)
.colorScheme
.onSurface
.withValues(alpha: 0.6),
);
},
),
children: List.generate(children.length * 2 - 1, (index) {
if (index.isEven) {
return children[index ~/ 2];
}
return VerticalDivider(
indent: 6,
endIndent: 6,
color: Theme.of(
context,
).colorScheme.onSurface.withValues(alpha: 0.6),
);
}),
),
),
);
@ -111,10 +105,7 @@ class LibraryItemMetadata extends HookConsumerWidget {
/// key-value pair to display as column
class _MetadataItem extends StatelessWidget {
const _MetadataItem({
required this.title,
required this.value,
});
const _MetadataItem({required this.title, required this.value});
final String title;
final String value;