anzahl der sets anzeigen

This commit is contained in:
Göran Heinemann 2020-04-02 00:10:04 +02:00
parent e3650c16ed
commit 29f2f296e4

View File

@ -23,7 +23,7 @@ class ExerciseViewState extends State<ExerciseView>{
Future<List> getWorkouts() async {
var response = await http.get(
"http://10.16.17.65/api/workout.php?token=satbwertwhbertnwertwertghwertgwertg&workout="+this.widget.id,
"http://10.16.17.18/api/workout.php?token=satbwertwhbertnwertwertghwertgwertg&workout="+this.widget.id,
headers: {
"Accept": "application/json"
}
@ -58,9 +58,8 @@ class ExerciseViewState extends State<ExerciseView>{
itemBuilder: (BuildContext context, int index){
return new ListTile(
leading: Icon(data[index]['type'] == 'duration' ? Icons.access_alarm : (data[index]['type'] == 'count' ? Icons.filter_1 : Icons.transfer_within_a_station)),
title: Text(data[index]['name']),
subtitle: Text(data[index]['amount'] + ' ' + data[index]['unit']),
trailing: Icon(Icons.add_box),
title: Text((index+1).toString() + ': ' + data[index]['name']),
subtitle: Text(data[index]['sets'] + ' x ' + data[index]['amount'] + ' ' + data[index]['unit']),
onTap: (){
Navigator.push(context, MaterialPageRoute(
builder: (context) => ExerciseDetailsView(data[index]['name'], data[index]['description'], data[index]['amount'], data[index]['type'], data[index]['unit'])