diff --git a/README.md b/README.md index 6eae7ba..2ec0afd 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ Faut pas oublier d'aller changer la version avant chaque upload de version (Puis 2) Mettre à jour l'icone (dans pubspec.yaml ref icon) - flutter pub get - dart run flutter_launcher_icons -3) Mettre à jour android manifest et info.plist +3) Mettre à jour android manifest et info.plist (faire un CTRL MAJ F et replace..) - be.unov.myinfomate.mdlf - be.unov.mymuseum.fortsaintheribert 4) Mettre à jour les couleurs de l'app diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index 9649d30..b7b954b 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="be.unov.mymuseum.fortsaintheribert"> diff --git a/android/app/src/main/kotlin/be/unov/myvisit/mymuseum_visitapp/MainActivity.kt b/android/app/src/main/kotlin/be/unov/myvisit/mymuseum_visitapp/MainActivity.kt index df07978..69a9b06 100644 --- a/android/app/src/main/kotlin/be/unov/myvisit/mymuseum_visitapp/MainActivity.kt +++ b/android/app/src/main/kotlin/be/unov/myvisit/mymuseum_visitapp/MainActivity.kt @@ -1,4 +1,4 @@ -package be.unov.myinfomate.mdlf +package be.unov.mymuseum.fortsaintheribert import io.flutter.embedding.android.FlutterActivity diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml index 9649d30..b7b954b 100644 --- a/android/app/src/profile/AndroidManifest.xml +++ b/android/app/src/profile/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="be.unov.mymuseum.fortsaintheribert"> diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index ac47f88..ded8fb7 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -391,7 +391,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = be.unov.myinfomate.mdlf; + PRODUCT_BUNDLE_IDENTIFIER = be.unov.mymuseum.fortsaintheribert; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -527,7 +527,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = be.unov.myinfomate.mdlf; + PRODUCT_BUNDLE_IDENTIFIER = be.unov.mymuseum.fortsaintheribert; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -555,7 +555,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = be.unov.myinfomate.mdlf; + PRODUCT_BUNDLE_IDENTIFIER = be.unov.mymuseum.fortsaintheribert; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; diff --git a/lib/Components/CustomAppBar.dart b/lib/Components/CustomAppBar.dart index deec23f..f3dfe0b 100644 --- a/lib/Components/CustomAppBar.dart +++ b/lib/Components/CustomAppBar.dart @@ -30,6 +30,12 @@ class _CustomAppBarState extends State { VisitAppContext visitAppContext = appContext.getContext(); Size size = MediaQuery.of(context).size; + String cleanedTitle = widget.title.replaceAll('\n', ' ').replaceAll('
', ' '); + + String formattedTitle = cleanedTitle.length > 35 + ? cleanedTitle.substring(0, 35) + '...' + : cleanedTitle; + //final notchInset = MediaQuery.of(context).padding; return AppBar( shadowColor: kMainColor1, @@ -48,13 +54,16 @@ class _CustomAppBarState extends State { }, child: SizedBox( width: widget.isHomeButton ? size.width * 0.8 : null, - child: HtmlWidget( - widget.title, - textStyle: const TextStyle(color: Colors.white), - customStylesBuilder: (element) - { - return {'text-align': 'center', 'font-family': "Roboto", '-webkit-line-clamp': "2",}; - } + height: 60, + child: Center( + child: HtmlWidget( + formattedTitle, + textStyle: const TextStyle(color: Colors.white, fontFamily: 'Roboto', fontSize: 20), + customStylesBuilder: (element) + { + return {'text-align': 'center', 'font-family': "Roboto", '-webkit-line-clamp': "2"}; + }, + ), ), ), ), @@ -108,7 +117,7 @@ class _CustomAppBarState extends State { Color(0xFF7633B8), Color(0xFF6528B6), Color(0xFF6025B6)*/ - Color(0xFFf6b3c4), + kMainColor0, //Color(0xFFf6b3c4) kMainColor1, kMainColor2, diff --git a/lib/Components/SearchBox.dart b/lib/Components/SearchBox.dart index 1724ac5..991918f 100644 --- a/lib/Components/SearchBox.dart +++ b/lib/Components/SearchBox.dart @@ -45,6 +45,7 @@ class _SearchBoxState extends State { icon: const Icon(Icons.search, color: Colors.white), hintText: TranslationHelper.getFromLocale("search", appContext.getContext()), hintStyle: const TextStyle(color: Colors.white), + contentPadding: const EdgeInsets.symmetric(vertical: 13.0), suffixIcon: _controller.value.text.isNotEmpty ? InkWell( onTap: () { if(_controller.value.text.isNotEmpty) { diff --git a/lib/Components/fade_route.dart b/lib/Components/fade_route.dart new file mode 100644 index 0000000..7009247 --- /dev/null +++ b/lib/Components/fade_route.dart @@ -0,0 +1,23 @@ +import 'package:flutter/material.dart'; + +class FadeRoute extends PageRouteBuilder { + final Widget page; + + FadeRoute({required this.page}) + : super( + pageBuilder: (context, animation, secondaryAnimation) => page, + transitionsBuilder: (context, animation, secondaryAnimation, child) { + const begin = 0.0; + const end = 1.0; + const curve = Curves.easeInOut; + + final tween = Tween(begin: begin, end: end).chain(CurveTween(curve: curve)); + final opacityAnimation = animation.drive(tween); + + return FadeTransition( + opacity: opacityAnimation, + child: child, + ); + }, + ); +} diff --git a/lib/Screens/Article/article_page.dart b/lib/Screens/Article/article_page.dart index 4df4b2f..7a492dc 100644 --- a/lib/Screens/Article/article_page.dart +++ b/lib/Screens/Article/article_page.dart @@ -39,7 +39,7 @@ class _ArticlePageState extends State { List resourcesModel = []; ResourceModel? audioResourceModel; final GlobalKey _scaffoldKey = GlobalKey(); - late File audioFile; + File? audioFile; late VisitAppContext visitAppContext; @override @@ -126,7 +126,7 @@ class _ArticlePageState extends State { builder: (context, AsyncSnapshot snapshot) { return Padding( padding: EdgeInsets.only(right: 0, top: 0), //size.height*0.1 - child: audioResourceModel != null && audioResourceModel!.source != null ? AudioPlayerFloatingContainer(file: audioFile, resourceURl: "", isAuto: articleDTO!.isReadAudioAuto!) : null, + child: audioResourceModel != null && audioResourceModel!.source != null ? AudioPlayerFloatingContainer(file: audioFile, resourceURl: audioResourceModel!.source!, isAuto: articleDTO!.isReadAudioAuto!) : null, ); } ), diff --git a/lib/Screens/Article/audio_player_floating.dart b/lib/Screens/Article/audio_player_floating.dart index 4cf271a..714d60b 100644 --- a/lib/Screens/Article/audio_player_floating.dart +++ b/lib/Screens/Article/audio_player_floating.dart @@ -126,7 +126,9 @@ class _AudioPlayerFloatingContainerState extends State { var result = await showDialog( builder: (BuildContext dialogContext) => AlertDialog( - shape: RoundedRectangleBorder( + shape: const RoundedRectangleBorder( borderRadius: BorderRadius.all(Radius.circular(20.0)) ), - content: Container( + content: SizedBox( width: 400, height: 200, child: DownloadConfigurationWidget(configuration: configuration), ), - actions: [], + actions: const [], ), context: context ); isDialogOpen = false; diff --git a/lib/Services/downloadConfiguration.dart b/lib/Services/downloadConfiguration.dart index 03bf47f..26c921e 100644 --- a/lib/Services/downloadConfiguration.dart +++ b/lib/Services/downloadConfiguration.dart @@ -266,6 +266,40 @@ class _DownloadConfigurationWidgetState extends State( + valueListenable: currentResourceNbr, + builder: (context, valueNbr, _) { + return ValueListenableBuilder( + valueListenable: currentResourceIndex, + builder: (context, valueIndex, _) { + return Center( + child: Text( + textAlign: TextAlign.center, + valueIndex == valueNbr && valueNbr != -1 ? valueNbr == 0 ? + TranslationHelper.getFromLocale( + "upToDate", + appContext.getContext()) : TranslationHelper.getFromLocale( + "downloadFinish", + appContext.getContext()) : TranslationHelper.getFromLocale( + "downloadInProgress", + appContext.getContext()), + style: const TextStyle(fontSize: 20), + ), + ); + } + ); + } + ); + } + }), + ), ValueListenableBuilder( valueListenable: currentResourceNbr, builder: (context, valueNbr, _) { @@ -288,37 +322,6 @@ class _DownloadConfigurationWidgetState extends State( - valueListenable: currentResourceNbr, - builder: (context, valueNbr, _) { - return ValueListenableBuilder( - valueListenable: currentResourceIndex, - builder: (context, valueIndex, _) { - return Center( - child: Text( - valueIndex == valueNbr && valueNbr != -1 ? valueNbr == 0 ? - TranslationHelper.getFromLocale( - "upToDate", - appContext.getContext()) : TranslationHelper.getFromLocale( - "downloadFinish", - appContext.getContext()) : TranslationHelper.getFromLocale( - "downloadInProgress", - appContext.getContext()), - style: const TextStyle(fontSize: 20), - ), - ); - } - ); - } - ); - } - }), Spacer() ], ); diff --git a/lib/constants.dart b/lib/constants.dart index a7c47f2..7a34334 100644 --- a/lib/constants.dart +++ b/lib/constants.dart @@ -30,9 +30,9 @@ const kTextRed = Color(0xFFba0505); const kBackgroundGrey = Color(0xFFb5b7b9); const kBackgroundSecondGrey = Color(0xFF5b5b63); -const kMainColor0 = Color(0xFFe52122); // const kBlue0 = Color(0xFF306bac); -const kMainColor1 = Color(0xFFed7082); // const kBlue1 = Color(0xFF308aae); -const kMainColor2 = Color(0xFFed7082); // const kBlue2 = Color(0xFF309cb0); +const kMainColor0 = Color(0xFF306bac); // const kBlue0 = Color(0xFF306bac); +const kMainColor1 = Color(0xFF308aae); // const kBlue1 = Color(0xFF308aae); +const kMainColor2 = Color(0xFF309cb0); // const kBlue2 = Color(0xFF309cb0); const kBackgroundLight = Color(0xfff3f3f3); @@ -61,4 +61,4 @@ const kTextStyle = TextStyle( fontSize: 23, color: kPrimaryColor, fontWeight: FontWeight.w600, -);*/ \ No newline at end of file +);*/ diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt index af7a916..2f496b7 100644 --- a/linux/CMakeLists.txt +++ b/linux/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.10) project(runner LANGUAGES CXX) set(BINARY_NAME "mymuseum_visitapp") -set(APPLICATION_ID "be.unov.myinfomate.mdlf") +set(APPLICATION_ID "be.unov.mymuseum.fortsaintheribert") cmake_policy(SET CMP0063 NEW) diff --git a/pubspec.lock b/pubspec.lock index 05932d5..e2e4043 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -361,18 +361,18 @@ packages: dependency: "direct main" description: name: flutter_widget_from_html - sha256: e79144d8a37b7d1075fc1fdebc32708bd142ad9fdf1c7d9444f5e964cc03158b + sha256: "9e2a6201c4d2eb910b6b3ebb2a9f5c490fc61c9a1aa35eafdde38f0fc659cf4c" url: "https://pub.dev" source: hosted - version: "0.15.1" + version: "0.15.2" flutter_widget_from_html_core: dependency: transitive description: name: flutter_widget_from_html_core - sha256: df7c7c9e5ea144f7ab0adfbad733b4d4f7d408ab733c94e6e9fdcb327af92aa1 + sha256: b1048fd119a14762e2361bd057da608148a895477846d6149109b2151d2f7abf url: "https://pub.dev" source: hosted - version: "0.15.1" + version: "0.15.2" fluttertoast: dependency: "direct main" description: @@ -409,18 +409,18 @@ packages: dependency: transitive description: name: fwfh_just_audio - sha256: "4ff7927619ff4855567a61e126269e1fef985a9fe7e78682592da17bf658aabb" + sha256: "38dc2c55803bd3cef33042c473e0c40b891ad4548078424641a32032f6a1245f" url: "https://pub.dev" source: hosted - version: "0.15.1" + version: "0.15.2" fwfh_svg: dependency: transitive description: name: fwfh_svg - sha256: c6bb6b513f7ce2766aba76d7276caf9a96b6fee729ac3a492c366a42f82ef02e + sha256: "550b1014d12b5528d8bdb6e3b44b58721f3fb1f65d7a852d1623a817008bdfc4" url: "https://pub.dev" source: hosted - version: "0.8.2" + version: "0.8.3" fwfh_url_launcher: dependency: transitive description: @@ -433,10 +433,10 @@ packages: dependency: transitive description: name: fwfh_webview - sha256: "2cd2b1e463ddaf26b7d4f74e1a855126c4a836fdaff9551636693e07a07422b6" + sha256: f67890bc0d6278da98bd197469ae9511c859f7db327e92299fe0ea0cf46c4057 url: "https://pub.dev" source: hosted - version: "0.15.1" + version: "0.15.2" get: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 0fece74..348fedb 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -51,7 +51,7 @@ dependencies: get: ^4.6.6 permission_handler: ^11.3.1 diacritic: ^0.1.3 - flutter_widget_from_html: ^0.15.1 + flutter_widget_from_html: ^0.15.2 manager_api: path: manager_api