Hanim 01a7937004 feat: Implement multi-step registration for Childminder with data validation and summary display
- Added routes for registration steps 2, 3, and 4 in app_router.dart.
- Created AmRegisterStep2Screen for entering professional details including birth date, city, country, social security number, agreement number, and max children.
- Implemented validation for social security number and max children fields.
- Developed AmRegisterStep3Screen for entering a motivation message and accepting terms and conditions.
- Created AmRegisterStep4Screen to display a summary of the registration data for review before submission.
- Introduced SummaryCard widget for displaying user information in a structured format.
- Enhanced DataGenerator utility to provide realistic data for testing.
2025-08-18 16:37:27 +02:00

60 lines
1.6 KiB
Dart

import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
class SummaryCard extends StatelessWidget {
final String backgroundImagePath;
final String title;
final List<Widget> content;
final VoidCallback onEdit;
const SummaryCard({
super.key,
required this.backgroundImagePath,
required this.title,
required this.content,
required this.onEdit,
});
@override
Widget build(BuildContext context) {
return AspectRatio(
aspectRatio: 2.0,
child: Container(
padding: const EdgeInsets.symmetric(vertical: 20.0, horizontal: 25.0),
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(backgroundImagePath),
fit: BoxFit.cover,
),
borderRadius: BorderRadius.circular(15),
),
child: Column(
children: [
Row(
children: [
Expanded(
child: Text(
title,
style: GoogleFonts.merienda(fontSize: 28, fontWeight: FontWeight.w600),
textAlign: TextAlign.center,
),
),
IconButton(
icon: const Icon(Icons.edit, color: Colors.black54, size: 28),
onPressed: onEdit,
tooltip: 'Modifier',
),
],
),
const SizedBox(height: 18),
Expanded(
child: Column(
children: content,
),
),
],
),
),
);
}
}