From d014308db93a1ec81e93d4b73e14097b076a41f8 Mon Sep 17 00:00:00 2001 From: Thomas Fransolet Date: Fri, 26 Jan 2024 21:02:40 +0100 Subject: [PATCH] Update sous menu (handling of Pdf, Puzzle and Agenda) --- .../SubSection/Menu/showEditSubSection.dart | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/lib/Screens/Configurations/Section/SubSection/Menu/showEditSubSection.dart b/lib/Screens/Configurations/Section/SubSection/Menu/showEditSubSection.dart index e93c632..01346ea 100644 --- a/lib/Screens/Configurations/Section/SubSection/Menu/showEditSubSection.dart +++ b/lib/Screens/Configurations/Section/SubSection/Menu/showEditSubSection.dart @@ -3,6 +3,9 @@ import 'package:flutter/material.dart'; import 'package:manager_app/Components/multi_string_input_container.dart'; import 'package:manager_app/Components/rounded_button.dart'; import 'package:manager_app/Components/string_input_container.dart'; +import 'package:manager_app/Screens/Configurations/Section/SubSection/Agenda/agenda_config.dart'; +import 'package:manager_app/Screens/Configurations/Section/SubSection/PDF/PDF_config.dart'; +import 'package:manager_app/Screens/Configurations/Section/SubSection/Puzzle/puzzle_config.dart'; import 'package:manager_app/Screens/Configurations/Section/SubSection/Quizz/quizz_config.dart'; import 'package:manager_app/Screens/Configurations/Section/SubSection/Slider/slider_config.dart'; import 'package:manager_app/Screens/Configurations/Section/SubSection/WebOrVideo/web_video_config.dart'; @@ -220,5 +223,26 @@ getSpecificData(SectionDTO sectionDTO, BuildContext context, AppContext appConte sectionDTO.data = data; }, ); + case SectionType.Pdf: + return PDFConfig( + initialValue: sectionDTO.data!, + onChanged: (String data) { + sectionDTO.data = data; + }, + ); + case SectionType.Puzzle: + return PuzzleConfig( + initialValue: sectionDTO.data!, + onChanged: (String data) { + sectionDTO.data = data; + }, + ); + case SectionType.Agenda: + return AgendaConfig( + initialValue: sectionDTO.data!, + onChanged: (String data) { + sectionDTO.data = data; + }, + ); } }