flutter_form_wizard/example/lib/template_page.dart

67 lines
1.6 KiB
Dart
Raw Normal View History

import 'package:flutter/material.dart';
class TemplatePage extends StatelessWidget {
const TemplatePage({
super.key,
required this.size,
required this.fontSize,
required this.title,
required this.pageNumber,
required this.amountOfPages,
2022-09-28 12:02:40 +02:00
required this.FlutterFormWidgets,
});
final Size size;
final double fontSize;
final String title;
final int pageNumber;
final int amountOfPages;
2022-09-28 12:02:40 +02:00
final List<Widget> FlutterFormWidgets;
@override
Widget build(BuildContext context) {
2022-09-20 16:14:09 +02:00
return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Align(
alignment: Alignment.centerLeft,
child: Padding(
padding: EdgeInsets.symmetric(horizontal: size.width / 10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: size.height / 10,
),
Text(
"$pageNumber / $amountOfPages",
style: TextStyle(
fontSize: fontSize,
),
2022-09-20 16:14:09 +02:00
),
SizedBox(
height: size.height / 80,
),
Text(
title,
style: TextStyle(
fontSize: fontSize,
fontWeight: FontWeight.w900,
),
2022-09-20 16:14:09 +02:00
),
],
),
),
2022-09-20 16:14:09 +02:00
),
const Spacer(),
2022-09-28 12:02:40 +02:00
for (var widget in FlutterFormWidgets) ...[
2022-09-20 16:14:09 +02:00
widget,
],
2022-09-20 16:14:09 +02:00
const Spacer(
flex: 2,
),
],
);
}
}