Skip to content

Commit

Permalink
Merge branch 'feature/resultsUI' into develop
Browse files Browse the repository at this point in the history
Application display finished, time to move on to testing and CI/CD
  • Loading branch information
martin-headspace committed Feb 17, 2020
2 parents d2036ea + f283fc6 commit 7b9c0d5
Showing 1 changed file with 23 additions and 9 deletions.
32 changes: 23 additions & 9 deletions eight_queens/lib/results.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,33 @@ class _ResultsPageState extends State<ResultsPage> {
super.initState();
});
}

Widget ResultItem(BuildContext context, int index) {
String todisplay = "";
for(int x = 0; x < boards[index].length; x++ ){
todisplay += boards[index][x].toString();
todisplay+= "\n";
}
return Text(todisplay);
}

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: new ListView.builder(
itemCount: boards.length ?? 0,
itemBuilder: (BuildContext context, int index) {
return new Text(boards[index].toString());
},
)
appBar: AppBar(
title: Text(widget.title),
),
body: new ListView.builder(
itemCount: boards.length ?? 0,
itemBuilder: (BuildContext context, int index) {
return ListTile(
title: Text('Result ${index+1}'),
subtitle: Container(
child: ResultItem(context, index)
),
);
},
)
);
}
}

0 comments on commit 7b9c0d5

Please sign in to comment.