diff --git a/lib/Components/multi_input_modal.dart b/lib/Components/multi_input_modal.dart index dcb9c3b..2bdbab0 100644 --- a/lib/Components/multi_input_modal.dart +++ b/lib/Components/multi_input_modal.dart @@ -9,7 +9,7 @@ import 'package:managerapi/api.dart'; import 'package:collection/collection.dart'; import 'package:provider/provider.dart'; -showMultiStringInput (String label, String modalLabel, List values, List newValues, Function onGetResult, int maxLines, BuildContext context) { /*Function onSelect,*/ +showMultiStringInput (String label, String modalLabel, bool isTitle, List values, List newValues, Function onGetResult, int maxLines, BuildContext context) { /*Function onSelect,*/ showDialog( builder: (BuildContext context) => AlertDialog( shape: RoundedRectangleBorder( @@ -23,7 +23,7 @@ showMultiStringInput (String label, String modalLabel, List valu child: SingleChildScrollView( child: Column( mainAxisAlignment: MainAxisAlignment.spaceAround, - children: getTranslations(context, Provider.of(context), label, newValues), + children: getTranslations(context, Provider.of(context), label, isTitle, newValues), ), ), ), @@ -84,7 +84,7 @@ showMultiStringInput (String label, String modalLabel, List valu ); } -getTranslations(BuildContext context, AppContext appContext, String label, List newValues) { +getTranslations(BuildContext context, AppContext appContext, String label, bool isTitle, List newValues) { List translations = []; ManagerAppContext managerAppContext = appContext.getContext(); for(var language in managerAppContext.selectedConfiguration.languages) { @@ -114,7 +114,7 @@ getTranslations(BuildContext context, AppContext appContext, String label, List< TextFormInputContainer( label: label, color: kWhite, - isTitle: true, + isTitle: isTitle, initialValue: newValues.where((element) => element.language == language).first.value, onChanged: (value) { newValues.where((element) => element.language == language).first.value = value; diff --git a/lib/Components/multi_string_input_container.dart b/lib/Components/multi_string_input_container.dart index 8290f9f..fabc0ef 100644 --- a/lib/Components/multi_string_input_container.dart +++ b/lib/Components/multi_string_input_container.dart @@ -13,6 +13,7 @@ class MultiStringContainer extends StatelessWidget { final List initialValue; final Function onGetResult; final int maxLines; + final bool isTitle; const MultiStringContainer({ Key key, this.color = kSecond, @@ -21,6 +22,7 @@ class MultiStringContainer extends StatelessWidget { this.initialValue, this.onGetResult, this.maxLines, + this.isTitle, }) : super(key: key); @override @@ -45,7 +47,7 @@ class MultiStringContainer extends StatelessWidget { initialValue.forEach((value) { newValues.add(TranslationDTO.fromJson(jsonDecode(jsonEncode(value)))); }); - showMultiStringInput(label, modalLabel, initialValue, newValues, onGetResult, maxLines, context); + showMultiStringInput(label, modalLabel, isTitle, initialValue, newValues, onGetResult, maxLines, context); }, child: Container( decoration: BoxDecoration( diff --git a/lib/Screens/Configurations/Section/SubSection/Article/article_config.dart b/lib/Screens/Configurations/Section/SubSection/Article/article_config.dart index e073f93..fab970b 100644 --- a/lib/Screens/Configurations/Section/SubSection/Article/article_config.dart +++ b/lib/Screens/Configurations/Section/SubSection/Article/article_config.dart @@ -1,7 +1,10 @@ +import 'package:auto_size_text/auto_size_text.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:manager_app/Components/check_input_container.dart'; import 'package:manager_app/Components/multi_string_input_container.dart'; +import 'package:manager_app/Components/text_form_input_container.dart'; +import 'package:manager_app/Models/managerContext.dart'; import 'package:manager_app/Screens/Configurations/Section/SubSection/Slider/listView_card_image.dart'; import 'package:manager_app/Screens/Configurations/Section/SubSection/Slider/new_update_image_slider.dart'; import 'package:manager_app/app_context.dart'; @@ -77,12 +80,12 @@ class _ArticleConfigState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ - // Bad MultiStringContainer( label: "Contenu affiché:", modalLabel: "Contenu", color: kPrimaryColor, initialValue: articleDTO != null ? articleDTO.content : [], + isTitle: false, onGetResult: (value) { setState(() { if (articleDTO.content != value) { @@ -205,4 +208,4 @@ class _ArticleConfigState extends State { ), ); } -} \ No newline at end of file +} diff --git a/lib/Screens/Configurations/Section/section_detail_screen.dart b/lib/Screens/Configurations/Section/section_detail_screen.dart index 570aa29..0e30732 100644 --- a/lib/Screens/Configurations/Section/section_detail_screen.dart +++ b/lib/Screens/Configurations/Section/section_detail_screen.dart @@ -169,6 +169,7 @@ class _SectionDetailScreenState extends State { } }, maxLines: 1, + isTitle: true, ), MultiStringContainer( label: "Description affichée:", @@ -182,6 +183,7 @@ class _SectionDetailScreenState extends State { } }, maxLines: 2, + isTitle: true, ), ], ), diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index 51436ae..2e1de87 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -5,6 +5,9 @@ list(APPEND FLUTTER_PLUGIN_LIST ) +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + set(PLUGIN_BUNDLED_LIBRARIES) foreach(plugin ${FLUTTER_PLUGIN_LIST}) @@ -13,3 +16,8 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST}) list(APPEND PLUGIN_BUNDLED_LIBRARIES $) list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/pubspec.lock b/pubspec.lock index 43632f3..4ee815b 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -77,7 +77,7 @@ packages: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0" + version: "1.16.0" convert: dependency: "direct main" description: @@ -126,7 +126,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.0" ffi: dependency: transitive description: @@ -218,7 +218,7 @@ packages: name: js url: "https://pub.dartlang.org" source: hosted - version: "0.6.3" + version: "0.6.4" managerapi: dependency: "direct main" description: @@ -239,7 +239,7 @@ packages: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.3" + version: "0.1.4" material_segmented_control: dependency: "direct main" description: @@ -281,7 +281,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.1" path_parsing: dependency: transitive description: @@ -363,7 +363,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.8.2" stack_trace: dependency: transitive description: @@ -398,7 +398,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.8" + version: "0.4.9" typed_data: dependency: transitive description: @@ -412,7 +412,7 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.2" video_player: dependency: "direct main" description: @@ -463,5 +463,5 @@ packages: source: hosted version: "5.3.1" sdks: - dart: ">=2.15.0 <3.0.0" + dart: ">=2.17.0-0 <3.0.0" flutter: ">=2.10.0" diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index 4d10c25..b93c4c3 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -5,6 +5,9 @@ list(APPEND FLUTTER_PLUGIN_LIST ) +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + set(PLUGIN_BUNDLED_LIBRARIES) foreach(plugin ${FLUTTER_PLUGIN_LIST}) @@ -13,3 +16,8 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST}) list(APPEND PLUGIN_BUNDLED_LIBRARIES $) list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin)