rename multi select for language + Fix question quizz not working + other fixs
This commit is contained in:
parent
4248da3b0d
commit
c2972b11ea
@ -7,7 +7,7 @@ import 'package:multi_select_flutter/util/multi_select_item.dart';
|
||||
import 'package:multi_select_flutter/util/multi_select_list_type.dart';
|
||||
|
||||
|
||||
class MultiSelectDropdownContainer extends StatelessWidget {
|
||||
class MultiSelectDropdownLanguageContainer extends StatelessWidget {
|
||||
final Color color;
|
||||
final String label;
|
||||
final String labelHint;
|
||||
@ -17,7 +17,7 @@ class MultiSelectDropdownContainer extends StatelessWidget {
|
||||
final bool isAtLeastOne;
|
||||
final double fontSize;
|
||||
final ValueChanged<List<dynamic>> onChanged;
|
||||
const MultiSelectDropdownContainer({
|
||||
const MultiSelectDropdownLanguageContainer({
|
||||
Key? key,
|
||||
this.color = kSecond,
|
||||
required this.label,
|
||||
@ -79,6 +79,7 @@ Future<QuestionDTO> showNewOrUpdateQuestionQuizz(QuestionDTO? inputQuestionDTO,
|
||||
modalLabel: "Question",
|
||||
fontSize: 20,
|
||||
color: kPrimaryColor,
|
||||
resourceTypes: [ResourceType.Image, ResourceType.ImageUrl, ResourceType.Video, ResourceType.VideoUrl, ResourceType.Audio],
|
||||
initialValue: questionDTO.label != null ? questionDTO.label! : [],
|
||||
onGetResult: (value) {
|
||||
if (questionDTO.label != value) {
|
||||
|
||||
@ -479,7 +479,7 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
|
||||
initialValue: sectionDTO.data!,
|
||||
onChanged: (String data) {
|
||||
sectionDTO.data = data;
|
||||
save(false, sectionDTO, appContext);
|
||||
//save(false, sectionDTO, appContext);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ import 'package:manager_app/Components/number_input_container.dart';
|
||||
import 'package:manager_app/Components/resource_input_container.dart';
|
||||
import 'package:manager_app/Components/loading_common.dart';
|
||||
import 'package:manager_app/Components/message_notification.dart';
|
||||
import 'package:manager_app/Components/multi_select_dropdown_container.dart';
|
||||
import 'package:manager_app/Components/multi_select_dropdown_language_container.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';
|
||||
@ -177,7 +177,7 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
|
||||
},
|
||||
),
|
||||
),
|
||||
MultiSelectDropdownContainer(
|
||||
MultiSelectDropdownLanguageContainer(
|
||||
label: "Langues :",
|
||||
initialValue: configurationDTO.languages != null ? configurationDTO.languages!: [],
|
||||
values: languages,
|
||||
@ -206,8 +206,8 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
|
||||
},
|
||||
),
|
||||
CheckInputContainer(
|
||||
icon: Icons.image_not_supported_outlined,
|
||||
label: "Background sur les images :",
|
||||
icon: Icons.image,
|
||||
label: "Fond pour les images des sections :",
|
||||
fontSize: 20,
|
||||
isChecked: configurationDTO.isSectionImageBackground,
|
||||
onChanged: (value) {
|
||||
@ -337,10 +337,10 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
|
||||
Container(
|
||||
height: 100,
|
||||
child: NumberInputContainer(
|
||||
label: "Pourcentage place des sections :",
|
||||
label: "Place des sections (%) :",
|
||||
initialValue: configurationDTO.screenPercentageSectionsMainPage ?? 0,
|
||||
isSmall: true,
|
||||
maxLength: 2,
|
||||
maxLength: 3,
|
||||
onChanged: (value) {
|
||||
try {
|
||||
configurationDTO.screenPercentageSectionsMainPage = int.parse(value);
|
||||
@ -362,8 +362,8 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
|
||||
try {
|
||||
configurationDTO.roundedValue = int.parse(value);
|
||||
} catch (e) {
|
||||
print('Rounded value not a number');
|
||||
showNotification(Colors.orange, kWhite, 'Cela doit être un chiffre', context, null);
|
||||
print('Rounded value not a number');
|
||||
showNotification(Colors.orange, kWhite, 'Cela doit être un chiffre', context, null);
|
||||
}
|
||||
},
|
||||
),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user