mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 21:48:14 -08:00
fix: Standardize precision used in communityRating (#424)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
d421bb13e6
commit
ca7cd827e1
3 changed files with 29 additions and 31 deletions
|
|
@ -68,32 +68,28 @@ class ItemBaseModel with ItemBaseModelMappable {
|
|||
}
|
||||
|
||||
Widget? subTitle(SortingOptions options) => switch (options) {
|
||||
SortingOptions.parentalRating => overview.parentalRating != null
|
||||
? Row(
|
||||
children: [
|
||||
const Icon(
|
||||
IconsaxPlusBold.star_1,
|
||||
size: 14,
|
||||
color: Colors.yellowAccent,
|
||||
),
|
||||
const SizedBox(width: 6),
|
||||
Text((overview.parentalRating ?? 0.0).toString())
|
||||
],
|
||||
)
|
||||
: null,
|
||||
SortingOptions.communityRating => overview.communityRating != null
|
||||
? Row(
|
||||
children: [
|
||||
const Icon(
|
||||
IconsaxPlusBold.star_1,
|
||||
size: 14,
|
||||
color: Colors.yellowAccent,
|
||||
),
|
||||
const SizedBox(width: 6),
|
||||
Text((overview.communityRating ?? 0.0).toString())
|
||||
],
|
||||
)
|
||||
: null,
|
||||
SortingOptions.parentalRating => Row(
|
||||
children: [
|
||||
const Icon(
|
||||
IconsaxPlusBold.star_1,
|
||||
size: 14,
|
||||
color: Colors.yellowAccent,
|
||||
),
|
||||
const SizedBox(width: 6),
|
||||
Text(overview.parentalRating?.toString() ?? "--"),
|
||||
],
|
||||
),
|
||||
SortingOptions.communityRating => Row(
|
||||
children: [
|
||||
const Icon(
|
||||
IconsaxPlusBold.star_1,
|
||||
size: 14,
|
||||
color: Colors.yellowAccent,
|
||||
),
|
||||
const SizedBox(width: 6),
|
||||
Text(overview.communityRating?.toStringAsFixed(2) ?? "--"),
|
||||
],
|
||||
),
|
||||
_ => null,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue