anzahl der sets anzeigen
This commit is contained in:
parent
e3650c16ed
commit
29f2f296e4
@ -23,7 +23,7 @@ class ExerciseViewState extends State<ExerciseView>{
|
|||||||
|
|
||||||
Future<List> getWorkouts() async {
|
Future<List> getWorkouts() async {
|
||||||
var response = await http.get(
|
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: {
|
headers: {
|
||||||
"Accept": "application/json"
|
"Accept": "application/json"
|
||||||
}
|
}
|
||||||
@ -58,9 +58,8 @@ class ExerciseViewState extends State<ExerciseView>{
|
|||||||
itemBuilder: (BuildContext context, int index){
|
itemBuilder: (BuildContext context, int index){
|
||||||
return new ListTile(
|
return new ListTile(
|
||||||
leading: Icon(data[index]['type'] == 'duration' ? Icons.access_alarm : (data[index]['type'] == 'count' ? Icons.filter_1 : Icons.transfer_within_a_station)),
|
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']),
|
title: Text((index+1).toString() + ': ' + data[index]['name']),
|
||||||
subtitle: Text(data[index]['amount'] + ' ' + data[index]['unit']),
|
subtitle: Text(data[index]['sets'] + ' x ' + data[index]['amount'] + ' ' + data[index]['unit']),
|
||||||
trailing: Icon(Icons.add_box),
|
|
||||||
onTap: (){
|
onTap: (){
|
||||||
Navigator.push(context, MaterialPageRoute(
|
Navigator.push(context, MaterialPageRoute(
|
||||||
builder: (context) => ExerciseDetailsView(data[index]['name'], data[index]['description'], data[index]['amount'], data[index]['type'], data[index]['unit'])
|
builder: (context) => ExerciseDetailsView(data[index]['name'], data[index]['description'], data[index]['amount'], data[index]['type'], data[index]['unit'])
|
||||||
|
Loading…
Reference in New Issue
Block a user