diff --git a/README.md b/README.md index e86c3f5..e1af99d 100644 --- a/README.md +++ b/README.md @@ -14,3 +14,22 @@ A few resources to get you started if this is your first Flutter project: For help getting started with Flutter, view our [online documentation](https://flutter.dev/docs), which offers tutorials, samples, guidance on mobile development, and a full API reference. + +# OPENAPI Generation cmd + +flutter pub run build_runner build --delete-conflicting-outputs + +Le fichier est dans le projet. + +# Publication sur docker - WEB DEMO + +docker build -t demo-manager . + +Pour tester en local : +docker run -d -p 8080:80 –name demo-manager demo-manager + +Image tag: +docker image tag demo-manager registry.unov.be/mymuseum/demo:latest + +Docker push: +docker image push registry.unov.be/mymuseum/demo:latest \ No newline at end of file diff --git a/lib/Screens/MainView/main_view.dart b/lib/Screens/MainView/main_view.dart index 619b971..590b43b 100644 --- a/lib/Screens/MainView/main_view.dart +++ b/lib/Screens/MainView/main_view.dart @@ -120,21 +120,22 @@ class _MainViewWidget extends State { alignment: Alignment.centerLeft, child: AutoSizeText( sectionSelected!.title!.firstWhere((translation) => translation.language == appContext.getContext().language).value!, - style: new TextStyle(fontSize: kSectionTitleDetailSize), + style: new TextStyle(fontSize: kIsWeb ? kWebSectionTitleDetailSize : kSectionTitleDetailSize), maxLines: 1, ), ) ), - Expanded( - child: Align( - alignment: Alignment.centerLeft, - child: AutoSizeText( - sectionSelected!.description!.firstWhere((translation) => translation.language == appContext.getContext().language).value!, - style: new TextStyle(fontSize: kIsWeb? kWebSectionDescriptionDetailSize : kSectionDescriptionDetailSize), - maxLines: 2, - ), + if(sectionSelected!.description!.firstWhere((translation) => translation.language == appContext.getContext().language).value != null && sectionSelected!.description!.firstWhere((translation) => translation.language == appContext.getContext().language).value!.trim().isNotEmpty) + Expanded( + child: Align( + alignment: Alignment.centerLeft, + child: AutoSizeText( + sectionSelected!.description!.firstWhere((translation) => translation.language == appContext.getContext().language).value!, + style: new TextStyle(fontSize: kIsWeb? kWebSectionDescriptionDetailSize : kSectionDescriptionDetailSize), + maxLines: 2, + ), + ) ) - ) ], ), ) @@ -306,7 +307,7 @@ boxDecoration(SectionDTO section, bool isSelected) { borderRadius: BorderRadius.circular(30.0), image: section.imageSource != null ? new DecorationImage( fit: !isSelected || kIsWeb ? BoxFit.cover : BoxFit.contain, - colorFilter: !isSelected? new ColorFilter.mode(Colors.black.withOpacity(0.3), BlendMode.dstATop) : null, + colorFilter: !isSelected? new ColorFilter.mode(Colors.black.withOpacity(kIsWeb ? 0.3 : 0.5), BlendMode.dstATop) : null, image: new NetworkImage( section.imageSource!, ), diff --git a/lib/Screens/Map/google_map_view.dart b/lib/Screens/Map/google_map_view.dart index 43e9359..1f101e7 100644 --- a/lib/Screens/Map/google_map_view.dart +++ b/lib/Screens/Map/google_map_view.dart @@ -96,31 +96,33 @@ class _GoogleMapViewState extends State { //print(mapTypeApp.toString()); MapType type = MapType.hybrid; - if(widget.mapDTO!.mapType != null) { - switch(widget.mapDTO!.mapType!.value) { - case 0: - type = MapType.none; - break; - case 1: - type = MapType.normal; - break; - case 2: - type = MapType.satellite; - break; - case 3: - type = MapType.terrain; - break; - case 4: - type = MapType.hybrid; - break; + if(kIsWeb) { + if(widget.mapDTO!.mapType != null) { + switch(widget.mapDTO!.mapType!.value) { + case 0: + type = MapType.none; + break; + case 1: + type = MapType.normal; + break; + case 2: + type = MapType.satellite; + break; + case 3: + type = MapType.terrain; + break; + case 4: + type = MapType.hybrid; + break; + } } + } else { + type = EnumToString.fromString(MapType.values, widget.mapDTO!.mapType.toString()) != null ? EnumToString.fromString(MapType.values, widget.mapDTO!.mapType.toString())! : MapType.hybrid; } - - //MapType type = EnumToString.fromString(MapType.values, widget.mapDTO!.mapType.toString()) != null ? EnumToString.fromString(MapType.values, widget.mapDTO!.mapType.toString())! : MapType.hybrid; return GoogleMap( - mapType: type, + mapType: type, // widget.mapDTO!.mapType != null ? EnumToString.fromString(MapType.values, widget.mapDTO!.mapType.toString())!: MapType.hybrid, mapToolbarEnabled: false, initialCameraPosition: CameraPosition( target: LatLng(50.465503, 4.865105), // MDLF 50.416639, 4.879169 / Namur 50.465503, 4.865105 diff --git a/lib/Screens/Menu/menu_view.dart b/lib/Screens/Menu/menu_view.dart index 28fc2d1..6705690 100644 --- a/lib/Screens/Menu/menu_view.dart +++ b/lib/Screens/Menu/menu_view.dart @@ -104,7 +104,7 @@ class _MenuViewWidget extends State { ), ), Padding( - padding: const EdgeInsets.only(bottom: 20, right: 20), + padding: const EdgeInsets.only(bottom: kIsWeb ? 5: 20, right: kIsWeb ? 5: 20), child: Align( alignment: Alignment.bottomRight, child: InkWell( @@ -156,11 +156,11 @@ class _MenuViewWidget extends State { child: Container( decoration: boxDecoration(menuDTO.sections![index], false), padding: const EdgeInsets.all(25), - margin: EdgeInsets.symmetric(vertical: 25, horizontal: 25), + margin: EdgeInsets.symmetric(vertical: kIsWeb ? 15 : 25, horizontal: kIsWeb ? 15 : 25), child: Align( alignment: Alignment.bottomRight, child: FractionallySizedBox( - heightFactor: 0.4, + heightFactor: kIsWeb ? 0.3 : 0.4, child: Column( children: [ Align( @@ -198,8 +198,8 @@ boxDecoration(SectionDTO section, bool isSelected) { shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(30.0), image: section.imageSource != null ? new DecorationImage( - fit: BoxFit.contain, - colorFilter: !isSelected? new ColorFilter.mode(Colors.black.withOpacity(0.5), BlendMode.dstATop) : null, + fit: kIsWeb ? BoxFit.cover : BoxFit.contain, + colorFilter: !isSelected? new ColorFilter.mode(Colors.black.withOpacity(kIsWeb ? 0.3 : 0.5), BlendMode.dstATop) : null, image: new NetworkImage( section.imageSource!, ), diff --git a/manager_api/lib/model/section_type.dart b/manager_api/lib/model/section_type.dart index 8f40eb5..f853f81 100644 --- a/manager_api/lib/model/section_type.dart +++ b/manager_api/lib/model/section_type.dart @@ -77,9 +77,9 @@ class SectionTypeTypeTransformer { /// and users are still using an old app with the old code. SectionType? decode(dynamic data, {bool allowNull = true}) { if (data != null) { - print("data.toString()"); + /*print("data.toString()"); print(data.toString()); - print(data.runtimeType); + print(data.runtimeType);*/ if(data.runtimeType == String) { switch (data.toString()) { case r'Map': return SectionType.map; @@ -96,7 +96,7 @@ class SectionTypeTypeTransformer { } } else { if(data.runtimeType == int) { - print("HELLOWWWWW INT"); + //print("HELLOWWWWW INT"); switch (data) { case 0: print("RETURN MAP");