Flutter-Ernaehrungsapp/lib/android/components/statistics_circular_indicat...

32 lines
979 B
Dart
Raw Normal View History

2023-05-29 12:08:46 +02:00
import 'package:ernaehrung/android/components/circular/circular_component.dart';
import 'package:flutter/material.dart';
class StatisticsPercentComponent extends StatelessWidget {
late String eaten, calorienBurned, calorienLeft, calorienLeftPercent;
StatisticsPercentComponent(int eaten, int calorienBurned, int calorienLeft, {super.key}){
this.eaten = '$eaten Gegessen';
this.calorienBurned = '$calorienBurned Verbrannt';
this.calorienLeft = '$calorienLeft Kcal Übrig';
}
String get getEaten => eaten;
get getCalorienBurned => calorienBurned;
get getCalorienLeft => calorienLeft;
get getCalorienLeftPercent => calorienLeftPercent;
@override
Widget build(BuildContext context) {
return Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(eaten),
const CircularLoadingComponent("100"),
Text(calorienBurned),
],
);
}
}