Skip to content

Commit

Permalink
feat: add percentage at book cover
Browse files Browse the repository at this point in the history
  • Loading branch information
Anxcye committed Aug 10, 2024
1 parent 46073bf commit a8e6ddc
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions lib/widgets/book_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,25 @@ class BookItem extends StatelessWidget {
overflow: TextOverflow.ellipsis,
style: const TextStyle(fontWeight: FontWeight.bold),
),
Text(
book.author,
style: const TextStyle(
fontWeight: FontWeight.w300,
fontSize: 9,
overflow: TextOverflow.ellipsis),
Row(
children: [
Expanded(
child: Text(
book.author,
style: const TextStyle(
fontWeight: FontWeight.w300,
fontSize: 9,
overflow: TextOverflow.ellipsis),
),
),
Text(
'${book.readingPercentage.toStringAsFixed(0)}%',
style: const TextStyle(
fontWeight: FontWeight.w300,
fontSize: 9,
overflow: TextOverflow.ellipsis),
),
],
),
],
),
Expand Down

0 comments on commit a8e6ddc

Please sign in to comment.