flutter_form_wizard/example/lib/example_pages/check_page.dart

98 lines
2.7 KiB
Dart
Raw Normal View History

2022-11-01 08:23:35 +01:00
// SPDX-FileCopyrightText: 2022 Iconica
//
// SPDX-License-Identifier: BSD-3-Clause
import 'package:flutter/material.dart';
2022-11-29 09:43:55 +01:00
import 'package:flutter_form_wizard/flutter_form.dart';
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,
bottom: 10,
),
padding: const EdgeInsets.symmetric(horizontal: 40),
2022-09-20 16:14:09 +02:00
child: const Text(
"Check answers",
style: TextStyle(
2022-09-20 16:14:09 +02:00
fontSize: 25,
fontWeight: FontWeight.w900,
),
),
),
inputCheckWidget:
(String id, String title, String? description, Function onPressed) {
return GestureDetector(
onTap: () async {
await onPressed();
},
child: Container(
2022-09-20 16:14:09 +02:00
width: MediaQuery.of(context).size.width * 0.9,
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,
fontSize: 16,
overflow: TextOverflow.ellipsis,
),
),
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),
)
],
),
),
);
},
);
}
}