Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
judemont committed May 12, 2024
1 parent 1297442 commit 992b5b7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
24 changes: 13 additions & 11 deletions lib/screens/detailed_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,18 @@ class _DetailedViewState extends State<DetailedView> {
const SizedBox(
height: 10,
),
Visibility(
visible: isTouchingChart,
child: Column(
children: [
Text(formatePrice(touchedPrice,
Database.getValue("settings", "currency"))),
Text(DateFormat('MM/dd/yyyy hh:mm')
.format(touchedTime))
],
)),
isTouchingChart
? Column(
children: [
Text(formatePrice(touchedPrice,
Database.getValue("settings", "currency"))),
Text(DateFormat('MM/dd/yyyy hh:mm')
.format(touchedTime))
],
)
: const SizedBox(
height: 40,
),
const SizedBox(
height: 10,
),
Expand All @@ -159,7 +161,7 @@ class _DetailedViewState extends State<DetailedView> {
tooltipBgColor: Colors.white.withAlpha(0),
getTooltipItems: (lineBarSpots) {
return [
LineTooltipItem("", TextStyle())
LineTooltipItem("", const TextStyle())
];
}),
touchCallback: (touchEvent,
Expand Down
3 changes: 2 additions & 1 deletion lib/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ String formatePrice(double? price, String symbol) {
String formattedPrice;

if ((price ?? 0.0) < (1 / pow(10, priceTotalLength - 1))) {
formattedPrice = (price ?? 0).toStringAsFixed(8);
formattedPrice =
"${(price ?? 0).toStringAsFixed(8)} ${symbol.toUpperCase()}";
} else {
int decimalDigits =
priceLength > priceTotalLength ? 0 : (priceTotalLength - priceLength);
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.0+100
version: 1.0.1+101

environment:
sdk: ">=3.3.1 <4.0.0"
Expand Down

0 comments on commit 992b5b7

Please sign in to comment.