|
|
@@ -21,7 +21,7 @@ class _WalkingState extends State<Walking> {
|
|
|
num distance = 0;
|
|
|
Position? lastPosition;
|
|
|
num points = 0;
|
|
|
- int totalPoints = 0;
|
|
|
+ num totalPoints = 0;
|
|
|
num totalDistance = 0;
|
|
|
|
|
|
@override
|
|
|
@@ -43,9 +43,8 @@ class _WalkingState extends State<Walking> {
|
|
|
|
|
|
void _updatePoints(num newPoints) {
|
|
|
setState(() {
|
|
|
- final currentPoints = points + newPoints;
|
|
|
- totalPoints += currentPoints.floor();
|
|
|
- points += currentPoints;
|
|
|
+ totalPoints += newPoints;
|
|
|
+ points += newPoints;
|
|
|
});
|
|
|
}
|
|
|
|
|
|
@@ -93,7 +92,7 @@ class _WalkingState extends State<Walking> {
|
|
|
),
|
|
|
const SizedBox(height: 32),
|
|
|
Text(
|
|
|
- "Earned points since start:\n$totalPoints pts",
|
|
|
+ "Earned points since start:\n${totalPoints.floor()} pts",
|
|
|
textAlign: TextAlign.center,
|
|
|
style: const TextStyle(fontSize: 24),
|
|
|
),
|