diff --git a/.flutter-plugins b/.flutter-plugins index ff84368..b1b955c 100644 --- a/.flutter-plugins +++ b/.flutter-plugins @@ -1,12 +1,12 @@ # This is a generated file; do not edit or check into version control. -audio_session=/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/audio_session-0.1.13/ -just_audio=/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/just_audio-0.9.31/ -just_audio_web=/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/just_audio_web-0.4.7/ -path_provider=/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-2.0.11/ -path_provider_android=/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_android-2.0.22/ -path_provider_ios=/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_ios-2.0.11/ -path_provider_linux=/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-2.1.7/ -path_provider_macos=/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-2.0.7/ -path_provider_windows=/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-2.1.3/ -qr_code_scanner=/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/qr_code_scanner-1.0.1/ -sqflite=/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-2.2.3/ +audio_session=C:\\Users\\thoma\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\audio_session-0.1.13\\ +just_audio=C:\\Users\\thoma\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\just_audio-0.9.31\\ +just_audio_web=C:\\Users\\thoma\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\just_audio_web-0.4.7\\ +path_provider=C:\\Users\\thoma\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\path_provider-2.0.11\\ +path_provider_android=C:\\Users\\thoma\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\path_provider_android-2.0.22\\ +path_provider_ios=C:\\Users\\thoma\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\path_provider_ios-2.0.11\\ +path_provider_linux=C:\\Users\\thoma\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\path_provider_linux-2.1.7\\ +path_provider_macos=C:\\Users\\thoma\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\path_provider_macos-2.0.7\\ +path_provider_windows=C:\\Users\\thoma\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\path_provider_windows-2.1.3\\ +qr_code_scanner=C:\\Users\\thoma\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\qr_code_scanner-1.0.1\\ +sqflite=C:\\Users\\thoma\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\sqflite-2.2.3\\ diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index 9c99393..dfb0573 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"audio_session","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/audio_session-0.1.13/","native_build":true,"dependencies":[]},{"name":"just_audio","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/just_audio-0.9.31/","native_build":true,"dependencies":["audio_session"]},{"name":"path_provider_ios","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_ios-2.0.11/","native_build":true,"dependencies":[]},{"name":"qr_code_scanner","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/qr_code_scanner-1.0.1/","native_build":true,"dependencies":[]},{"name":"sqflite","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-2.2.3/","native_build":true,"dependencies":[]}],"android":[{"name":"audio_session","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/audio_session-0.1.13/","native_build":true,"dependencies":[]},{"name":"just_audio","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/just_audio-0.9.31/","native_build":true,"dependencies":["audio_session"]},{"name":"path_provider_android","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_android-2.0.22/","native_build":true,"dependencies":[]},{"name":"qr_code_scanner","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/qr_code_scanner-1.0.1/","native_build":true,"dependencies":[]},{"name":"sqflite","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-2.2.3/","native_build":true,"dependencies":[]}],"macos":[{"name":"audio_session","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/audio_session-0.1.13/","native_build":true,"dependencies":[]},{"name":"just_audio","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/just_audio-0.9.31/","native_build":true,"dependencies":["audio_session"]},{"name":"path_provider_macos","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-2.0.7/","native_build":true,"dependencies":[]},{"name":"sqflite","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-2.2.3/","native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-2.1.7/","native_build":false,"dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-2.1.3/","native_build":false,"dependencies":[]}],"web":[{"name":"audio_session","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/audio_session-0.1.13/","dependencies":[]},{"name":"just_audio_web","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/just_audio_web-0.4.7/","dependencies":[]}]},"dependencyGraph":[{"name":"audio_session","dependencies":[]},{"name":"just_audio","dependencies":["just_audio_web","audio_session","path_provider"]},{"name":"just_audio_web","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_ios","path_provider_linux","path_provider_macos","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_ios","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"qr_code_scanner","dependencies":[]},{"name":"sqflite","dependencies":[]}],"date_created":"2023-01-22 17:43:39.812446","version":"3.3.9"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"audio_session","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\audio_session-0.1.13\\\\","native_build":true,"dependencies":[]},{"name":"just_audio","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\just_audio-0.9.31\\\\","native_build":true,"dependencies":["audio_session"]},{"name":"path_provider_ios","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_ios-2.0.11\\\\","native_build":true,"dependencies":[]},{"name":"qr_code_scanner","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\qr_code_scanner-1.0.1\\\\","native_build":true,"dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-2.2.3\\\\","native_build":true,"dependencies":[]}],"android":[{"name":"audio_session","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\audio_session-0.1.13\\\\","native_build":true,"dependencies":[]},{"name":"just_audio","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\just_audio-0.9.31\\\\","native_build":true,"dependencies":["audio_session"]},{"name":"path_provider_android","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_android-2.0.22\\\\","native_build":true,"dependencies":[]},{"name":"qr_code_scanner","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\qr_code_scanner-1.0.1\\\\","native_build":true,"dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-2.2.3\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"audio_session","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\audio_session-0.1.13\\\\","native_build":true,"dependencies":[]},{"name":"just_audio","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\just_audio-0.9.31\\\\","native_build":true,"dependencies":["audio_session"]},{"name":"path_provider_macos","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_macos-2.0.7\\\\","native_build":true,"dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-2.2.3\\\\","native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-2.1.7\\\\","native_build":false,"dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_windows-2.1.3\\\\","native_build":false,"dependencies":[]}],"web":[{"name":"audio_session","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\audio_session-0.1.13\\\\","dependencies":[]},{"name":"just_audio_web","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\just_audio_web-0.4.7\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"audio_session","dependencies":[]},{"name":"just_audio","dependencies":["just_audio_web","audio_session","path_provider"]},{"name":"just_audio_web","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_ios","path_provider_linux","path_provider_macos","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_ios","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"qr_code_scanner","dependencies":[]},{"name":"sqflite","dependencies":[]}],"date_created":"2023-01-22 20:14:50.014974","version":"3.3.10"} \ No newline at end of file diff --git a/lib/Components/ShowImagePopup.dart b/lib/Components/ShowImagePopup.dart index c8af645..5580fea 100644 --- a/lib/Components/ShowImagePopup.dart +++ b/lib/Components/ShowImagePopup.dart @@ -18,18 +18,19 @@ void showImagePopup(ImageDTO imageDTO, ResourceModel resourceModel, AppContext a content: SingleChildScrollView( child: Column( children: [ - Padding( - padding: const EdgeInsets.only(top: 5.0, left:8.0, right: 8.0), - child: Text( - TranslationHelper.get(imageDTO.title, appContext), - style: const TextStyle(fontSize: kArticleContentSize, fontWeight: FontWeight.w400)), - ), + if(TranslationHelper.get(imageDTO.title, appContext).isNotEmpty) + Padding( + padding: const EdgeInsets.only(top: 8.0, left:8.0, right: 8.0), + child: Text( + TranslationHelper.get(imageDTO.title, appContext), + style: const TextStyle(fontSize: kArticleContentSize, fontWeight: FontWeight.w400)), + ), SizedBox( - height: size.height *0.3, - width: size.width * 0.9, + height: size.height * 0.5, + width: size.width * 0.95, child: Center( child: Padding( - padding: const EdgeInsets.only(left:8.0, right: 8.0), + padding: const EdgeInsets.only(left:8.0, right: 8.0, bottom: 8.0, top: 8.0), child: PhotoView( imageProvider: (appContext.getContext() as VisitAppContext).configuration!.isOffline! ? Image.memory(base64Decode(resourceModel.data!)).image : diff --git a/lib/Components/SliderImages.dart b/lib/Components/SliderImages.dart index 40af43c..8a72651 100644 --- a/lib/Components/SliderImages.dart +++ b/lib/Components/SliderImages.dart @@ -42,129 +42,124 @@ class _SliderImagesWidget extends State { final appContext = Provider.of(context); VisitAppContext visitAppContext = appContext.getContext() as VisitAppContext; Size size = MediaQuery.of(context).size; - return Stack( - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.spaceEvenly, + return Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Stack( children: [ - if(resourcesInWidget.isNotEmpty) - CarouselSlider( - carouselController: sliderController, - options: CarouselOptions( - onPageChanged: (int index, CarouselPageChangedReason reason) { - setState(() { - print("SET STATE"); - currentIndex = index + 1; - }); - }, - // height: widget.height * 0.95, - enlargeCenterPage: true, - reverse: false, - ), - items: resourcesInWidget.map((i) { - return Builder( - builder: (BuildContext context) { - //print(widget.imagesDTO[currentIndex-1]); - return InkWell( - onTap: () { - showImagePopup(widget.imagesDTO[currentIndex-1]!, i!, appContext, context, size); - }, - child: Container( - //color: Colors.red, - //height: widget.height * 1, - //width: size.width * 0.95, - child: ClipRRect( - borderRadius: BorderRadius.circular(15.0), - child: visitAppContext.configuration!.isOffline! ? - Image.memory(base64Decode(i!.data!)) : - Image.network( - i!.source!, - loadingBuilder: (BuildContext context, Widget child, - ImageChunkEvent? loadingProgress) { - if (loadingProgress == null) { - return child; - } - return Center( - child: CircularProgressIndicator( - color: kBlue1, - value: loadingProgress.expectedTotalBytes != null - ? loadingProgress.cumulativeBytesLoaded / - loadingProgress.expectedTotalBytes! - : null, + Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + if(resourcesInWidget.isNotEmpty) + CarouselSlider( + carouselController: sliderController, + options: CarouselOptions( + onPageChanged: (int index, CarouselPageChangedReason reason) { + setState(() { + print("SET STATE"); + currentIndex = index + 1; + }); + }, + height: widget.height * 0.86, + enlargeCenterPage: true, + reverse: false, + ), + items: resourcesInWidget.map((i) { + return Builder( + builder: (BuildContext context) { + //print(widget.imagesDTO[currentIndex-1]); + return Padding( + padding: const EdgeInsets.only(top: 5.0), + child: InkWell( + onTap: () { + showImagePopup(widget.imagesDTO[currentIndex-1]!, i!, appContext, context, size); + }, + child: ClipRRect( + borderRadius: BorderRadius.circular(15.0), + child: visitAppContext.configuration!.isOffline! ? + Image.memory(base64Decode(i!.data!)) : + Image.network( + i!.source!, + loadingBuilder: (BuildContext context, Widget child, + ImageChunkEvent? loadingProgress) { + if (loadingProgress == null) { + return child; + } + return Center( + child: CircularProgressIndicator( + color: kBlue1, + value: loadingProgress.expectedTotalBytes != null + ? loadingProgress.cumulativeBytesLoaded / + loadingProgress.expectedTotalBytes! + : null, + ), + ); + }, + ) /*PhotoView( + imageProvider: Image.memory(base64Decode(i!.data!)).image, + minScale: PhotoViewComputedScale.contained * 0.8, + maxScale: PhotoViewComputedScale.contained * 3.0, + backgroundDecoration: BoxDecoration( + color: Colors.transparent, + /*shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(15.0),*/ ), - ); - }, - ) /*PhotoView( - imageProvider: Image.memory(base64Decode(i!.data!)).image, - minScale: PhotoViewComputedScale.contained * 0.8, - maxScale: PhotoViewComputedScale.contained * 3.0, - backgroundDecoration: BoxDecoration( - color: Colors.transparent, - /*shape: BoxShape.rectangle, - borderRadius: BorderRadius.circular(15.0),*/ + )*/, ), - )*/, - ), - ), + ), + ); + }, ); - }, - ); - }).toList(), - ), - ], - ), - if(resourcesInWidget.length > 1) - Positioned( - top: widget.height * 0.45, - right: 0, - child: InkWell( - onTap: () { - sliderController!.nextPage(duration: const Duration(milliseconds: 500), curve: Curves.fastOutSlowIn); - }, - child: const Icon( - Icons.chevron_right, - size: 45, - color: kBlue2, - ), - ) - ), - if(resourcesInWidget.length > 1) - Positioned( - top: widget.height * 0.45, - left: 0, - child: InkWell( - onTap: () { - if (resourcesInWidget.isNotEmpty) { - sliderController!.previousPage(duration: const Duration(milliseconds: 500), curve: Curves.fastOutSlowIn); - } - }, - child: const Icon( - Icons.chevron_left, - size: 45, - color: kBlue2, - ), - ) - ), - if(resourcesInWidget.isNotEmpty) - Padding( - padding: const EdgeInsets.only(bottom: 0), - child: Align( - alignment: Alignment.bottomCenter, + }).toList(), + ), + ], + ), + if(resourcesInWidget.length > 1) + Positioned( + top: widget.height * 0.4, + right: 0, child: InkWell( onTap: () { sliderController!.nextPage(duration: const Duration(milliseconds: 500), curve: Curves.fastOutSlowIn); }, - child: Text( - currentIndex.toString()+'/'+resourcesInWidget.length.toString(), - style: const TextStyle(fontSize: kArticleContentSize, fontWeight: FontWeight.w500, color: kBlue2), + child: const Icon( + Icons.chevron_right, + size: 45, + color: kBlue2, ), ) ), - ), - if(resourcesInWidget.isEmpty) - const Center(child: Text("Aucune image à afficher", style: TextStyle(fontSize: kNoneInfoOrIncorrect),)) - ] + if(resourcesInWidget.length > 1) + Positioned( + top: widget.height * 0.4, + left: 0, + child: InkWell( + onTap: () { + if (resourcesInWidget.isNotEmpty) { + sliderController!.previousPage(duration: const Duration(milliseconds: 500), curve: Curves.fastOutSlowIn); + } + }, + child: const Icon( + Icons.chevron_left, + size: 45, + color: kBlue2, + ), + ) + ), + if(resourcesInWidget.isEmpty) + const Center(child: Text("Aucune image à afficher", style: TextStyle(fontSize: kNoneInfoOrIncorrect))) + ] + ), + if(resourcesInWidget.isNotEmpty) + Align( + alignment: Alignment.bottomCenter, + child: Text( + currentIndex.toString()+'/'+resourcesInWidget.length.toString(), + style: const TextStyle(fontSize: kArticleContentSize, fontWeight: FontWeight.w500, color: kBlue2), + ) + ), + ], ); } } \ No newline at end of file diff --git a/lib/Screens/Home/configurations_list.dart b/lib/Screens/Home/configurations_list.dart index dbc1d6c..2d6454d 100644 --- a/lib/Screens/Home/configurations_list.dart +++ b/lib/Screens/Home/configurations_list.dart @@ -135,13 +135,15 @@ class _ConfigurationsListState extends State { alignment: Alignment.topLeft, child: Container( width: size.width*0.45, - child: Padding( - padding: const EdgeInsets.only(top: 45, left: 10), - child: AutoSizeText( - TranslationHelper.get(configurations[index].title, appContext), - style: const TextStyle(fontSize: kMenuTitleDetailSize), - maxFontSize: 20, - maxLines: 2, + child: Center( + child: Padding( + padding: const EdgeInsets.only(left: 10), + child: AutoSizeText( + TranslationHelper.get(configurations[index].title, appContext), + style: const TextStyle(fontSize: kMenuTitleDetailSize), + maxFontSize: 18, + maxLines: 2, + ), ), ), ),