Skip to content

Commit

Permalink
fix: set height tnc scrollable
Browse files Browse the repository at this point in the history
  • Loading branch information
reorr committed Apr 23, 2024
1 parent 0d5a45f commit efc9453
Showing 1 changed file with 88 additions and 84 deletions.
172 changes: 88 additions & 84 deletions app/lib/features/quiz_start/presentation/pages/quiz_start_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -123,103 +123,107 @@ class _QuizStartPageState extends State<QuizStartPage> {
Row(
children: [
Expanded(
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(
height: 20,
),
Center(
child: Text(
'Jumlah soal: ${state.quiz.problems[state.participation.challenge_group]?.length}',
style: const TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
child: SizedBox(
height: MediaQuery.of(context).size.height - 340,
child: SingleChildScrollView(
clipBehavior: Clip.antiAlias,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(
height: 20,
),
Center(
child: Text(
'Jumlah soal: ${state.quiz.problems[state.participation.challenge_group]?.length}',
style: const TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
),
),
),
),
const SizedBox(
height: 5,
),
Center(
child: Text(
'Alokasi waktu: ${state.quiz.duration_minute[state.participation.challenge_group]} menit',
style: const TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
const SizedBox(
height: 5,
),
Center(
child: Text(
'Alokasi waktu: ${state.quiz.duration_minute[state.participation.challenge_group]} menit',
style: const TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
),
),
),
),
const SizedBox(
height: 5,
),
Center(
child: Text(
'Sisa coba lagi: ${state.participation.quiz_max_attempts - state.participation.attempts.length}/${state.participation.quiz_max_attempts}',
style: const TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
const SizedBox(
height: 5,
),
Center(
child: Text(
'Sisa coba lagi: ${state.participation.quiz_max_attempts - state.participation.attempts.length}/${state.participation.quiz_max_attempts}',
style: const TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
),
),
),
),
const SizedBox(
height: 30,
),
const Center(
child: Text(
'Peraturan',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 14,
const SizedBox(
height: 30,
),
const Center(
child: Text(
'Peraturan',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 14,
),
),
),
),
const SizedBox(
height: 10,
),
buildTnC(),
const SizedBox(
height: 10,
),
Row(
children: [
Checkbox(
value: state.agreement,
onChanged: (state.participation.attempts.length <
state.participation.quiz_max_attempts)
? (value) {
if (value != null) {
context
.read<QuizStartCubit>()
.setAgreement(value: value);
const SizedBox(
height: 10,
),
buildTnC(),
const SizedBox(
height: 10,
),
Row(
children: [
Checkbox(
value: state.agreement,
onChanged: (state.participation.attempts.length <
state.participation.quiz_max_attempts)
? (value) {
if (value != null) {
context
.read<QuizStartCubit>()
.setAgreement(value: value);
}
}
: null,
activeColor: const Color(0xFF1BB8E1),
),
Flexible(
child: GestureDetector(
onTap: () {
if (state.participation.attempts.length <
state.participation.quiz_max_attempts) {
final newValue = !state.agreement;
context
.read<QuizStartCubit>()
.setAgreement(value: newValue);
}
: null,
activeColor: const Color(0xFF1BB8E1),
),
Flexible(
child: GestureDetector(
onTap: () {
if (state.participation.attempts.length <
state.participation.quiz_max_attempts) {
final newValue = !state.agreement;
context
.read<QuizStartCubit>()
.setAgreement(value: newValue);
}
},
child: const Text(
'Saya telah membaca peraturan & akan mengerjakan dengan jujur',
style: TextStyle(
fontSize: 13,
},
child: const Text(
'Saya telah membaca peraturan & akan mengerjakan dengan jujur',
style: TextStyle(
fontSize: 13,
),
),
),
),
),
],
),
],
],
),
],
),
),
),
),
Expand Down

0 comments on commit efc9453

Please sign in to comment.