Add navigation buttons to mobile recap screens and fix child card width
- Add 'Previous' and 'Submit' buttons to mobile recap screens (Parent & AM) - Fix imports for navigation buttons and widgets - Adjust ChildCardWidget width to fill available space on mobile editing Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
08612c455d
commit
dfe91ed772
@ -7,7 +7,9 @@ import 'dart:math' as math;
|
|||||||
import '../../models/am_registration_data.dart';
|
import '../../models/am_registration_data.dart';
|
||||||
import '../../models/card_assets.dart';
|
import '../../models/card_assets.dart';
|
||||||
import '../../config/display_config.dart';
|
import '../../config/display_config.dart';
|
||||||
|
import '../../widgets/hover_relief_widget.dart';
|
||||||
import '../../widgets/image_button.dart';
|
import '../../widgets/image_button.dart';
|
||||||
|
import '../../widgets/custom_navigation_button.dart';
|
||||||
import '../../widgets/personal_info_form_screen.dart';
|
import '../../widgets/personal_info_form_screen.dart';
|
||||||
import '../../widgets/professional_info_form_screen.dart';
|
import '../../widgets/professional_info_form_screen.dart';
|
||||||
import '../../widgets/presentation_form_screen.dart';
|
import '../../widgets/presentation_form_screen.dart';
|
||||||
@ -60,11 +62,55 @@ class _AmRegisterStep4ScreenState extends State<AmRegisterStep4Screen> {
|
|||||||
_buildPresentation(context, registrationData),
|
_buildPresentation(context, registrationData),
|
||||||
const SizedBox(height: 40),
|
const SizedBox(height: 40),
|
||||||
|
|
||||||
|
// Boutons Mobile (Retour + Soumettre) ou Bouton Soumettre Desktop
|
||||||
|
if (config.isMobile)
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: screenSize.width * 0.05),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: HoverReliefWidget(
|
||||||
|
child: CustomNavigationButton(
|
||||||
|
text: 'Précédent',
|
||||||
|
style: NavigationButtonStyle.purple,
|
||||||
|
onPressed: () {
|
||||||
|
if (context.canPop()) {
|
||||||
|
context.pop();
|
||||||
|
} else {
|
||||||
|
context.go('/am-register-step3');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
width: double.infinity,
|
||||||
|
height: 50,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 16),
|
||||||
|
Expanded(
|
||||||
|
child: HoverReliefWidget(
|
||||||
|
child: CustomNavigationButton(
|
||||||
|
text: 'Soumettre',
|
||||||
|
style: NavigationButtonStyle.green,
|
||||||
|
onPressed: () {
|
||||||
|
print("Données AM finales: ${registrationData.firstName} ${registrationData.lastName}");
|
||||||
|
_showConfirmationModal(context);
|
||||||
|
},
|
||||||
|
width: double.infinity,
|
||||||
|
height: 50,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
else
|
||||||
ImageButton(
|
ImageButton(
|
||||||
bg: 'assets/images/bg_green.png',
|
bg: 'assets/images/bg_green.png',
|
||||||
text: 'Soumettre ma demande',
|
text: 'Soumettre ma demande',
|
||||||
textColor: const Color(0xFF2D6A4F),
|
textColor: const Color(0xFF2D6A4F),
|
||||||
width: config.isMobile ? 300 : 350,
|
width: 350,
|
||||||
height: 50,
|
height: 50,
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
|||||||
@ -7,7 +7,9 @@ import 'dart:math' as math;
|
|||||||
import '../../models/user_registration_data.dart';
|
import '../../models/user_registration_data.dart';
|
||||||
import '../../models/card_assets.dart';
|
import '../../models/card_assets.dart';
|
||||||
import '../../config/display_config.dart';
|
import '../../config/display_config.dart';
|
||||||
|
import '../../widgets/hover_relief_widget.dart';
|
||||||
import '../../widgets/image_button.dart';
|
import '../../widgets/image_button.dart';
|
||||||
|
import '../../widgets/custom_navigation_button.dart';
|
||||||
import '../../widgets/personal_info_form_screen.dart';
|
import '../../widgets/personal_info_form_screen.dart';
|
||||||
import '../../widgets/child_card_widget.dart';
|
import '../../widgets/child_card_widget.dart';
|
||||||
import '../../widgets/presentation_form_screen.dart';
|
import '../../widgets/presentation_form_screen.dart';
|
||||||
@ -72,11 +74,55 @@ class _ParentRegisterStep5ScreenState extends State<ParentRegisterStep5Screen> {
|
|||||||
_buildMotivation(context, registrationData),
|
_buildMotivation(context, registrationData),
|
||||||
const SizedBox(height: 40),
|
const SizedBox(height: 40),
|
||||||
|
|
||||||
|
// Boutons Mobile (Retour + Soumettre) ou Bouton Soumettre Desktop
|
||||||
|
if (config.isMobile)
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: screenSize.width * 0.05),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: HoverReliefWidget(
|
||||||
|
child: CustomNavigationButton(
|
||||||
|
text: 'Précédent',
|
||||||
|
style: NavigationButtonStyle.purple,
|
||||||
|
onPressed: () {
|
||||||
|
if (context.canPop()) {
|
||||||
|
context.pop();
|
||||||
|
} else {
|
||||||
|
context.go('/parent-register-step4');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
width: double.infinity,
|
||||||
|
height: 50,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 16),
|
||||||
|
Expanded(
|
||||||
|
child: HoverReliefWidget(
|
||||||
|
child: CustomNavigationButton(
|
||||||
|
text: 'Soumettre',
|
||||||
|
style: NavigationButtonStyle.green,
|
||||||
|
onPressed: () {
|
||||||
|
print("Données finales: ${registrationData.parent1.firstName}, Enfant(s): ${registrationData.children.length}");
|
||||||
|
_showConfirmationModal(context);
|
||||||
|
},
|
||||||
|
width: double.infinity,
|
||||||
|
height: 50,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
else
|
||||||
ImageButton(
|
ImageButton(
|
||||||
bg: 'assets/images/bg_green.png',
|
bg: 'assets/images/bg_green.png',
|
||||||
text: 'Soumettre ma demande',
|
text: 'Soumettre ma demande',
|
||||||
textColor: const Color(0xFF2D6A4F),
|
textColor: const Color(0xFF2D6A4F),
|
||||||
width: config.isMobile ? 300 : 350,
|
width: 350,
|
||||||
height: 50,
|
height: 50,
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user