Skip to content

Commit

Permalink
Added scrollable view in results screen
Browse files Browse the repository at this point in the history
  • Loading branch information
sujithsojan committed Jun 10, 2024
1 parent bf43ba0 commit 759db4b
Showing 1 changed file with 24 additions and 19 deletions.
43 changes: 24 additions & 19 deletions lib/questions_summary.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,30 @@ class QuestionSummary extends StatelessWidget {

@override
Widget build(BuildContext context) {
return Column(
children:
summaryData.map((data) {
return Row(
children: [
Text(((data['question_index'] as int) +1).toString()),
Expanded(
child: Column(
children: [
Text(data['question'] as String),
const SizedBox(height: 5,),
Text(data['user_answer'] as String),
Text(data['correct_answer'] as String),
],
),
),
],
);
}).toList(),
return SizedBox(
height: 300,
child: SingleChildScrollView(
child: Column(
children:
summaryData.map((data) {
return Row(
children: [
Text(((data['question_index'] as int) +1).toString()),
Expanded(
child: Column(
children: [
Text(data['question'] as String),
const SizedBox(height: 5,),
Text(data['user_answer'] as String),
Text(data['correct_answer'] as String),
],
),
),
],
);
}).toList(),
),
),
);

}
Expand Down

0 comments on commit 759db4b

Please sign in to comment.