2022-11-01 08:23:35 +01:00
|
|
|
// SPDX-FileCopyrightText: 2022 Iconica
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
|
2022-09-20 11:04:00 +02:00
|
|
|
import 'package:flutter/material.dart';
|
2022-09-29 16:29:38 +02:00
|
|
|
import 'package:flutter_form/flutter_form.dart';
|
2022-09-20 11:04:00 +02:00
|
|
|
|
|
|
|
class CheckPageExample {
|
|
|
|
CheckPage showCheckpage(
|
|
|
|
BuildContext context,
|
|
|
|
Size size,
|
|
|
|
double fontSize,
|
|
|
|
String checkPageText,
|
|
|
|
) {
|
|
|
|
return CheckPage(
|
|
|
|
title: Container(
|
|
|
|
margin: const EdgeInsets.only(
|
2022-09-20 16:14:09 +02:00
|
|
|
top: 70,
|
2022-09-20 11:04:00 +02:00
|
|
|
bottom: 10,
|
|
|
|
),
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 40),
|
2022-09-20 16:14:09 +02:00
|
|
|
child: const Text(
|
|
|
|
"Check answers",
|
2022-09-20 11:04:00 +02:00
|
|
|
style: TextStyle(
|
2022-09-20 16:14:09 +02:00
|
|
|
fontSize: 25,
|
2022-09-20 11:04:00 +02:00
|
|
|
fontWeight: FontWeight.w900,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
inputCheckWidget:
|
2022-10-26 09:00:24 +02:00
|
|
|
(String id, String title, String? description, Function onPressed) {
|
2022-09-20 11:04:00 +02:00
|
|
|
return GestureDetector(
|
|
|
|
onTap: () async {
|
|
|
|
await onPressed();
|
|
|
|
},
|
|
|
|
child: Container(
|
2022-09-20 16:14:09 +02:00
|
|
|
width: MediaQuery.of(context).size.width * 0.9,
|
2022-09-20 11:04:00 +02:00
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
top: 18,
|
|
|
|
bottom: 16,
|
|
|
|
right: 18,
|
|
|
|
left: 27,
|
|
|
|
),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: Colors.white,
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
boxShadow: [
|
|
|
|
BoxShadow(
|
|
|
|
color: const Color(0xFF000000).withOpacity(0.20),
|
|
|
|
blurRadius: 5,
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
width: 30,
|
|
|
|
height: 30,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: const Color(0xFFD8D8D8),
|
|
|
|
borderRadius: BorderRadius.circular(5),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
const SizedBox(
|
|
|
|
width: 16,
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
title,
|
|
|
|
style: const TextStyle(
|
|
|
|
fontWeight: FontWeight.w900,
|
2022-11-24 14:41:39 +01:00
|
|
|
fontSize: 16,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
2022-09-20 11:04:00 +02:00
|
|
|
),
|
|
|
|
),
|
|
|
|
const Spacer(),
|
|
|
|
const Icon(Icons.arrow_forward),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
if (description != null)
|
|
|
|
const SizedBox(
|
|
|
|
height: 9,
|
|
|
|
),
|
|
|
|
if (description != null)
|
|
|
|
Text(
|
|
|
|
description,
|
2022-09-20 16:14:09 +02:00
|
|
|
style: const TextStyle(fontSize: 16),
|
2022-09-20 11:04:00 +02:00
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
},
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|