This commit is contained in:
Thomas Fransolet 2026-07-10 16:54:26 +02:00
parent 205f1ec933
commit a54952e5f4
44 changed files with 1774 additions and 1327 deletions

View File

@ -15,6 +15,7 @@ String getSectionTypeName(SectionType? type) {
case SectionType.Agenda: return 'Agenda';
case SectionType.Weather: return 'Météo';
case SectionType.Event: return 'Événement';
case SectionType.Parcours: return 'Parcours';
default: return 'Section';
}
}
@ -45,6 +46,8 @@ IconData getSectionIcon(elementType) {
return Icons.sunny;
case SectionType.Event:
return Icons.event;
case SectionType.Parcours:
return Icons.route;
}
return Icons.question_mark;
}

View File

@ -129,9 +129,9 @@ getTranslations(BuildContext context, AppContext appContext, String label, bool
),
child: Center(child: AutoSizeText(language.toUpperCase()))
),*/
Padding(
Expanded(
child: Padding(
padding: const EdgeInsets.only(left: 8.0),
child: Container(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.center,
@ -156,7 +156,9 @@ getTranslations(BuildContext context, AppContext appContext, String label, bool
initialValue: newValues.where((element) => element.language == language).first.value == null ? null : newValues.where((element) => element.language == language).first.value!,
inResourceTypes: resourceTypes,
onChanged: (ResourceDTO resource) {
newValues.where((element) => element.language == language).first.value = resource.id;
final storeUrl = resourceTypes.every((t) => t == ResourceType.Audio);
newValues.where((element) => element.language == language).first.value =
storeUrl ? resource.url : resource.id;
},
)/*AudioInputContainer(
//label: "Audio :",

View File

@ -96,17 +96,39 @@ class _ResourceInputContainerState extends State<ResourceInputContainer> {
width: widget.isSmall ? 60 : 120,
alignment: Alignment.center,
decoration: BoxDecoration(
color: resourceIdToShow == null ? widget.color : Colors.transparent,
color: (resourceIdToShow == null || resourceIdToShow!.isEmpty) ? widget.color : Colors.transparent,
borderRadius: BorderRadius.circular(10),
),
child: resourceIdToShow == null
? Text(
child: (resourceIdToShow == null || resourceIdToShow!.isEmpty)
? Padding(
padding: const EdgeInsets.symmetric(horizontal: 4),
child: FittedBox(
fit: BoxFit.scaleDown,
child: Text(
"Choisir",
style: TextStyle(
color: kWhite,
fontSize: widget.fontSize,
),
maxLines: 1,
),
),
)
: resourceIdToShow!.startsWith('http')
? Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
gradient: const LinearGradient(
colors: [Color(0xFF2C3E50), Color(0xFF3498DB)],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
),
child: Icon(
Icons.audiotrack,
color: Colors.white,
size: widget.isSmall ? 16 : 28,
),
)
: FutureBuilder<ResourceDTO?>(
future: (appContext.getContext() as ManagerAppContext)
@ -121,25 +143,72 @@ class _ResourceInputContainerState extends State<ResourceInputContainer> {
child: CircularProgressIndicator(strokeWidth: 2),
);
} else if (snapshot.hasError || snapshot.data == null) {
return Text(
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 4),
child: FittedBox(
fit: BoxFit.scaleDown,
child: Text(
"Erreur",
style: TextStyle(
color: kWhite,
fontSize: widget.fontSize,
),
maxLines: 1,
),
),
);
} else {
final resource = snapshot.data!;
final isImage = resource.type == ResourceType.Image ||
resource.type == ResourceType.ImageUrl;
if (isImage) {
return Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
image: DecorationImage(
fit: widget.imageFit,
image: NetworkImage(snapshot.data!.url!),
image: NetworkImage(resource.url!),
),
),
);
}
return Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
gradient: const LinearGradient(
colors: [Color(0xFF2C3E50), Color(0xFF3498DB)],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
resource.type == ResourceType.Audio
? Icons.audiotrack
: Icons.insert_drive_file,
color: Colors.white,
size: widget.isSmall ? 16 : 28,
),
if (!widget.isSmall && resource.label != null)
Padding(
padding: const EdgeInsets.only(top: 4, left: 4, right: 4),
child: Text(
resource.label!,
style: const TextStyle(
color: Colors.white,
fontSize: 10,
),
maxLines: 2,
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.center,
),
),
],
),
);
}
},
),
),

View File

@ -20,23 +20,21 @@ class TextFormInputContainer extends StatelessWidget {
@override
Widget build(BuildContext context) {
Size size = MediaQuery.of(context).size;
return Container(
child: Row(
return Row(
children: [
Align(
alignment: AlignmentDirectional.centerStart,
child: Text(label, style: TextStyle(fontSize: 20, fontWeight: FontWeight.w300))
child: Text(label, style: const TextStyle(fontSize: 20, fontWeight: FontWeight.w300)),
),
Padding(
Expanded(
child: Padding(
padding: const EdgeInsets.all(10.0),
child: Container(
decoration: BoxDecoration(
color: color,
borderRadius: BorderRadius.circular(5),
border: Border.all(width: 0.5, color: kSecond)
border: Border.all(width: 0.5, color: kSecond),
),
width: size.width *0.3,
child: Padding(
padding: const EdgeInsets.all(10.0),
child: TextFormField(
@ -48,7 +46,7 @@ class TextFormInputContainer extends StatelessWidget {
onChanged: onChanged,
maxLength: isTitle ? 50 : 2000,
cursorColor: kPrimaryColor,
decoration: InputDecoration(
decoration: const InputDecoration(
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(color: kPrimaryColor),
),
@ -58,13 +56,13 @@ class TextFormInputContainer extends StatelessWidget {
border: UnderlineInputBorder(
borderSide: BorderSide(color: kPrimaryColor),
),
)
),
),
),
),
),
),
],
),
);
}
}

View File

@ -1,10 +1,10 @@
import 'package:flutter/material.dart';
import 'package:flutter_quill/flutter_quill.dart';
import 'package:flutter_quill_delta_from_html/flutter_quill_delta_from_html.dart';
import 'package:vsc_quill_delta_to_html/vsc_quill_delta_to_html.dart';
import 'package:manager_api_new/api.dart';
import 'package:manager_app/Components/resource_input_container.dart';
import 'package:manager_app/Components/rounded_button.dart';
import 'package:manager_app/Helpers/quill_html_converter.dart';
import 'package:manager_app/Models/managerContext.dart' show ManagerAppContext;
import 'package:manager_app/Services/ai_translate_service.dart';
import 'package:manager_app/app_context.dart';
@ -93,10 +93,7 @@ class _TranslationInputAndResourceContainerState
}
String _controllerToHtml(QuillController controller) {
final ops = controller.document.toDelta().toJson();
return QuillDeltaToHtmlConverter(
List<Map<String, dynamic>>.from(ops),
).convert();
return quillOpsToHtml(controller.document.toDelta().toJson());
}
Future<void> _translateWithAI() async {

View File

@ -1,10 +1,12 @@
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter_quill/flutter_quill.dart';
import 'package:flutter_quill_delta_from_html/flutter_quill_delta_from_html.dart';
import 'package:vsc_quill_delta_to_html/vsc_quill_delta_to_html.dart';
import 'package:manager_api_new/api.dart';
import 'package:manager_app/Components/resource_input_container.dart';
import 'package:manager_app/Components/rounded_button.dart';
import 'package:manager_app/Helpers/quill_html_converter.dart';
import 'package:manager_app/Models/managerContext.dart' show ManagerAppContext;
import 'package:manager_app/Services/ai_translate_service.dart';
import 'package:manager_app/constants.dart';
@ -91,10 +93,7 @@ class _TranslationInputContainerState extends State<TranslationInputContainer> {
}
String _controllerToHtml(QuillController controller) {
final ops = controller.document.toDelta().toJson();
return QuillDeltaToHtmlConverter(
List<Map<String, dynamic>>.from(ops),
).convert();
return quillOpsToHtml(controller.document.toDelta().toJson());
}
Future<void> _translateWithAI() async {
@ -158,20 +157,25 @@ class _TranslationInputContainerState extends State<TranslationInputContainer> {
void _applyToAllLanguages() {
if (_controllers.isEmpty) return;
final firstLang = widget.newValues.first.language!;
final html = _controllerToHtml(_controllers[firstLang]!);
final sourceOps = _controllers[firstLang]!.document.toDelta().toJson();
setState(() {
widget.newValues.firstWhere((e) => e.language == firstLang).value =
_controllerToHtml(_controllers[firstLang]!);
for (final translation in widget.newValues) {
translation.value = html;
if (translation.language != firstLang) {
if (translation.language == firstLang) continue;
final opsCopy = List<Map<String, dynamic>>.from(
jsonDecode(jsonEncode(sourceOps)),
);
_controllers[translation.language!]?.dispose();
final controller = QuillController(
document: Document.fromJson(_htmlToDeltaJson(html)),
document: Document.fromJson(opsCopy),
selection: const TextSelection.collapsed(offset: 0),
);
_setupListener(translation.language!, controller);
_controllers[translation.language!] = controller;
}
translation.value = _controllerToHtml(controller);
}
});

View File

@ -0,0 +1,73 @@
import 'package:vsc_quill_delta_to_html/vsc_quill_delta_to_html.dart';
import 'package:html/parser.dart' as html_parser;
import 'package:html/dom.dart' as dom;
/// Converts a Quill Delta (as JSON ops) into an HTML string that survives a
/// round-trip back through [HtmlToDelta] (see translation_input_container.dart).
///
/// Two issues in the underlying libraries are worked around here:
/// - flutter_quill stores colors as 8-digit ARGB hex (#AARRGGBB), which
/// vsc_quill_delta_to_html's sanitizer silently drops unless truncated to
/// #RRGGBB (colors picked in this editor are always opaque).
/// - vsc_quill_delta_to_html attaches a `style` attribute (color/background)
/// to whichever inline tag (e.g. <strong>) comes first, but
/// flutter_quill_delta_from_html only reads `style` off <span> elements.
/// Combined bold/italic + color would otherwise render fine everywhere
/// else but vanish when the editor reopens the HTML. Wrapping any styled
/// non-span element in a <span> fixes the round-trip.
String quillOpsToHtml(List<dynamic> ops) {
final normalizedOps = _normalizeColors(ops);
final html = QuillDeltaToHtmlConverter(
List<Map<String, dynamic>>.from(normalizedOps),
ConverterOptions(
converterOptions: OpConverterOptions(inlineStylesFlag: true),
),
).convert();
return _moveStyleToWrappingSpan(html);
}
List<Map<String, dynamic>> _normalizeColors(List<dynamic> ops) {
return ops.map((op) {
final copy = Map<String, dynamic>.from(op);
final attrs = copy['attributes'];
if (attrs is Map) {
final attrsCopy = Map<String, dynamic>.from(attrs);
for (final key in ['color', 'background']) {
final value = attrsCopy[key];
if (value is String && value.length == 9 && value.startsWith('#')) {
attrsCopy[key] = '#${value.substring(3)}';
}
}
copy['attributes'] = attrsCopy;
}
return copy;
}).toList();
}
String _moveStyleToWrappingSpan(String htmlStr) {
final fragment = html_parser.parseFragment(htmlStr);
void visit(dom.Node node) {
if (node is dom.Element) {
if (node.localName != 'span' && node.attributes.containsKey('style')) {
final style = node.attributes.remove('style');
final span = dom.Element.tag('span')..attributes['style'] = style!;
final parent = node.parent!;
final index = parent.nodes.indexOf(node);
parent.nodes
..removeAt(index)
..insert(index, span);
span.nodes.add(node);
}
for (final child in List<dom.Node>.from(node.nodes)) {
visit(child);
}
}
}
for (final child in List<dom.Node>.from(fragment.nodes)) {
visit(child);
}
return fragment.outerHtml;
}

View File

@ -4,7 +4,6 @@ import 'package:manager_app/Components/multi_string_input_and_resource_container
import 'package:manager_app/Components/number_input_container.dart';
import 'package:manager_app/Components/resource_input_container.dart';
import 'package:manager_api_new/api.dart';
import 'package:manager_app/Screens/Configurations/Section/SubSection/Parcours/parcours_config.dart';
import 'package:manager_app/constants.dart';
import 'package:manager_app/l10n/app_localizations.dart';
@ -36,7 +35,6 @@ class _GameConfigState extends State<GameConfig> {
gameDTO.gameType = gameDTO.gameType ?? GameTypes.Puzzle;
gameDTO.messageDebut = gameDTO.messageDebut ?? [];
gameDTO.messageFin = gameDTO.messageFin ?? [];
gameDTO.guidedPaths = gameDTO.guidedPaths ?? [];
super.initState();
}
@ -60,11 +58,11 @@ class _GameConfigState extends State<GameConfig> {
@override
Widget build(BuildContext context) {
int initialIndex = gameDTO.gameType?.value ?? 0;
int initialIndex = (gameDTO.gameType?.value ?? 0).clamp(0, 1);
return DefaultTabController(
key: ValueKey("${gameDTO.id}_$initialIndex"),
length: 3,
length: 2,
initialIndex: initialIndex,
child: Builder(builder: (context) {
final TabController controller = DefaultTabController.of(context);
@ -91,7 +89,6 @@ class _GameConfigState extends State<GameConfig> {
tabs: [
Tab(icon: Icon(Icons.extension), text: "Puzzle"),
Tab(icon: Icon(Icons.grid_on), text: "Puzzle Glissant"),
Tab(icon: Icon(Icons.door_front_door), text: "Escape Game"),
],
),
Container(
@ -100,18 +97,6 @@ class _GameConfigState extends State<GameConfig> {
children: [
_buildPuzzleConfig(),
_buildPuzzleConfig(),
ParcoursConfig(
initialValue: gameDTO.guidedPaths ?? [],
parentId: gameDTO.id!,
isEvent: false,
isEscapeMode: true,
onChanged: (paths) {
setState(() {
gameDTO.guidedPaths = paths;
widget.onChanged(gameDTO);
});
},
),
],
),
),

View File

@ -22,7 +22,6 @@ import 'package:manager_app/client.dart';
import 'package:manager_app/constants.dart';
import 'package:manager_app/l10n/app_localizations.dart';
import 'package:manager_api_new/api.dart';
import 'package:manager_app/Screens/Configurations/Section/SubSection/Parcours/parcours_config.dart';
import 'package:provider/provider.dart';
@ -46,7 +45,6 @@ class MapConfig extends StatefulWidget {
class _MapConfigState extends State<MapConfig> {
late MapDTO mapDTO;
late List<GeoPointDTO> pointsToShow = [];
//List<String>? selectedCategories = [];
String mapType = "hybrid";
String mapTypeMapBox = "standard";
@ -56,10 +54,17 @@ class _MapConfigState extends State<MapConfig> {
ValueNotifier([]);
final ValueNotifier<String?> searchNotifier = ValueNotifier("");
late Future<List<GeoPointDTO>?> _geoPointsFuture;
bool _geoPointsInitialized = false;
Future<List<GeoPointDTO>?> _loadGeoPoints() {
final appContext = Provider.of<AppContext>(context, listen: false);
return getGeoPoints((appContext.getContext() as ManagerAppContext).clientAPI!);
}
@override
void initState() {
super.initState();
//mapDTO = MapDTO.fromJson(json.decode(widget.initialValue))!;
mapDTO = widget.initialValue;
if (mapDTO.mapType != null) {
@ -107,6 +112,18 @@ class _MapConfigState extends State<MapConfig> {
break;
}
}
selectedCategoriesNotifier.value =
mapDTO.categories?.map((c) => c.id!).toList() ?? [];
}
@override
void didChangeDependencies() {
super.didChangeDependencies();
if (!_geoPointsInitialized) {
_geoPointsInitialized = true;
_geoPointsFuture = _loadGeoPoints();
}
}
@override
@ -127,33 +144,17 @@ class _MapConfigState extends State<MapConfig> {
break;
}
return DefaultTabController(
length: 2,
child: Column(
return Column(
mainAxisSize: MainAxisSize.min,
children: [
_buildMapHeader(size, mapProviderIn),
TabBar(
labelColor: kPrimaryColor,
unselectedLabelColor: Colors.grey,
indicatorColor: kPrimaryColor,
tabs: [
Tab(icon: Icon(Icons.map), text: AppLocalizations.of(context)!.pointsOfInterestLabel),
Tab(icon: Icon(Icons.route), text: AppLocalizations.of(context)!.pathsLabel),
],
),
Container(
SizedBox(
height: 700,
child: TabBarView(
children: [
// Tab 1: Configuration & Points
SingleChildScrollView(
child: SingleChildScrollView(
child: Column(
children: [
FutureBuilder(
future: getGeoPoints(
(appContext.getContext() as ManagerAppContext)
.clientAPI!),
future: _geoPointsFuture,
builder: (context, AsyncSnapshot<dynamic> snapshot) {
if (snapshot.connectionState ==
ConnectionState.waiting) {
@ -171,10 +172,6 @@ class _MapConfigState extends State<MapConfig> {
.firstWhere((t) => t.language == 'FR')
.value!
.toLowerCase()));
selectedCategoriesNotifier.value = mapDTO
.categories!
.map((categorie) => categorie.id!)
.toList();
return Padding(
padding: const EdgeInsets.all(8.0),
@ -348,6 +345,7 @@ class _MapConfigState extends State<MapConfig> {
top: 0,
right: 150,
child: Container(
width: size.width * 0.2,
height: size.height * 0.1,
constraints:
BoxConstraints(minHeight: 85),
@ -384,8 +382,7 @@ class _MapConfigState extends State<MapConfig> {
context,
null);
setState(() {
// refresh ui
print("Refresh UI");
_geoPointsFuture = _loadGeoPoints();
});
} catch (e) {
showNotification(
@ -437,23 +434,8 @@ class _MapConfigState extends State<MapConfig> {
],
),
),
// Tab 2: Parcours
ParcoursConfig(
initialValue: mapDTO.guidedPaths ?? [],
parentId: mapDTO.id!,
isEvent: false,
onChanged: (paths) {
setState(() {
mapDTO.guidedPaths = paths;
widget.onChanged(mapDTO);
});
},
),
],
),
),
],
),
);
}

View File

@ -13,7 +13,7 @@ class ParcoursConfig extends StatefulWidget {
final List<GuidedPathDTO> initialValue;
final String parentId;
final bool isEvent;
final bool isEscapeMode;
final bool isParcours;
final ValueChanged<List<GuidedPathDTO>> onChanged;
const ParcoursConfig({
@ -21,7 +21,7 @@ class ParcoursConfig extends StatefulWidget {
required this.initialValue,
required this.parentId,
required this.isEvent,
this.isEscapeMode = false,
this.isParcours = false,
required this.onChanged,
}) : super(key: key);
@ -42,13 +42,13 @@ class _ParcoursConfigState extends State<ParcoursConfig> {
Future<void> _loadFromApi() async {
final appContext = Provider.of<AppContext>(context, listen: false);
final api = (appContext.getContext() as ManagerAppContext)
.clientAPI!
.sectionMapApi!;
final clientAPI = (appContext.getContext() as ManagerAppContext).clientAPI!;
try {
// Backend already includes steps + quiz questions via .Include()
final fetchedPaths =
await api.sectionMapGetAllGuidedPathFromSection(widget.parentId);
final fetchedPaths = widget.isParcours
? await clientAPI.sectionParcoursApi!
.sectionParcoursGetAllGuidedPathFromSection(widget.parentId)
: await clientAPI.sectionMapApi!
.sectionMapGetAllGuidedPathFromSection(widget.parentId);
if (fetchedPaths == null || !mounted) return;
fetchedPaths.sort((a, b) => (a.order ?? 0).compareTo(b.order ?? 0));
@ -82,27 +82,26 @@ class _ParcoursConfigState extends State<ParcoursConfig> {
null,
widget.parentId,
widget.isEvent,
widget.isEscapeMode,
(newPath) async {
try {
newPath.order = paths.length;
newPath.instanceId =
(appContext.getContext() as ManagerAppContext)
.instanceId;
if (widget.isEscapeMode) {
newPath.sectionGameId = widget.parentId;
if (widget.isParcours) {
newPath.sectionParcoursId = widget.parentId;
} else if (widget.isEvent) {
newPath.sectionEventId = widget.parentId;
} else {
newPath.sectionMapId = widget.parentId;
}
final createdPath =
await (appContext.getContext() as ManagerAppContext)
.clientAPI!
.sectionMapApi!
.sectionMapCreateGuidedPath(
widget.parentId, newPath);
final clientAPI = (appContext.getContext() as ManagerAppContext).clientAPI!;
final createdPath = widget.isParcours
? await clientAPI.sectionParcoursApi!
.sectionParcoursCreateGuidedPath(widget.parentId, newPath)
: await clientAPI.sectionMapApi!
.sectionMapCreateGuidedPath(widget.parentId, newPath);
if (createdPath != null) {
if (mounted) {
@ -153,14 +152,12 @@ class _ParcoursConfigState extends State<ParcoursConfig> {
final appContext =
Provider.of<AppContext>(context, listen: false);
final api = (appContext.getContext() as ManagerAppContext)
.clientAPI!
.sectionMapApi!;
final clientAPI = (appContext.getContext() as ManagerAppContext).clientAPI!;
try {
// Update all affected paths orders
await Future.wait(
paths.map((p) => api.sectionMapUpdateGuidedPath(p)));
await Future.wait(widget.isParcours
? paths.map((p) => clientAPI.sectionParcoursApi!.sectionParcoursUpdateGuidedPath(p))
: paths.map((p) => clientAPI.sectionMapApi!.sectionMapUpdateGuidedPath(p)));
} catch (e) {
showNotification(
kError,
@ -204,16 +201,12 @@ class _ParcoursConfigState extends State<ParcoursConfig> {
path,
widget.parentId,
widget.isEvent,
widget.isEscapeMode,
(updatedPath) async {
try {
final api = (appContext.getContext()
as ManagerAppContext)
.clientAPI!
.sectionMapApi!;
final result =
await api.sectionMapUpdateGuidedPath(
updatedPath);
final clientAPI = (appContext.getContext() as ManagerAppContext).clientAPI!;
final result = widget.isParcours
? await clientAPI.sectionParcoursApi!.sectionParcoursUpdateGuidedPath(updatedPath)
: await clientAPI.sectionMapApi!.sectionMapUpdateGuidedPath(updatedPath);
if (result != null) {
if (mounted) {
setState(() {
@ -249,11 +242,12 @@ class _ParcoursConfigState extends State<ParcoursConfig> {
listen: false);
try {
if (path.id != null) {
await (appContext.getContext()
as ManagerAppContext)
.clientAPI!
.sectionMapApi!
.sectionMapDeleteGuidedPath(path.id!);
final clientAPI = (appContext.getContext() as ManagerAppContext).clientAPI!;
if (widget.isParcours) {
await clientAPI.sectionParcoursApi!.sectionParcoursDeleteGuidedPath(path.id!);
} else {
await clientAPI.sectionMapApi!.sectionMapDeleteGuidedPath(path.id!);
}
}
setState(() {

View File

@ -8,6 +8,9 @@ import 'package:manager_app/l10n/app_localizations.dart';
import 'package:manager_app/Components/rounded_button.dart';
import 'package:manager_app/Components/multi_string_input_container.dart';
import 'package:manager_app/Components/check_input_container.dart';
import 'package:manager_app/Components/string_input_container.dart';
import 'package:manager_app/Components/resource_input_container.dart';
import 'package:manager_app/Components/reorderable_custom_list.dart';
import 'showNewOrUpdateGuidedStep.dart';
void showNewOrUpdateGuidedPath(
@ -15,7 +18,6 @@ void showNewOrUpdateGuidedPath(
GuidedPathDTO? path,
String parentId,
bool isEvent,
bool isEscapeMode,
FutureOr<void> Function(GuidedPathDTO) onSave,
) {
GuidedPathDTO workingPath = path != null
@ -28,6 +30,7 @@ void showNewOrUpdateGuidedPath(
);
bool isSaving = false;
int stepsRevision = 0;
showDialog(
context: context,
@ -69,6 +72,15 @@ void showNewOrUpdateGuidedPath(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Image du parcours
ResourceInputContainer(
label: "Image :",
color: kPrimaryColor,
initialValue: workingPath.imageResourceId,
onChanged: (resourceDTO) => setState(
() => workingPath.imageResourceId = resourceDTO.id),
),
SizedBox(height: 16),
// Titre + Description côte à côte
Row(
children: [
@ -140,6 +152,90 @@ void showNewOrUpdateGuidedPath(
),
],
),
SizedBox(height: 8),
SizedBox(
width: thirdWidth,
child: StringInputContainer(
label: "Durée estimée (min) :",
initialValue: workingPath.estimatedDurationMinutes?.toString() ?? "",
onChanged: (val) => setState(() =>
workingPath.estimatedDurationMinutes = int.tryParse(val)),
),
),
Divider(height: 24),
// Mode jeu
CheckInputContainer(
label: "Mode jeu (escape game / chasse au trésor)",
isChecked: workingPath.isGameMode ?? false,
onChanged: (val) =>
setState(() => workingPath.isGameMode = val),
),
if (workingPath.isGameMode == true) ...[
SizedBox(height: 8),
Row(
children: [
Expanded(
child: MultiStringInputContainer(
label: "Message de début :",
modalLabel: "Message d'introduction du jeu",
color: kPrimaryColor,
initialValue: (workingPath.gameMessageDebut ?? [])
.map((t) => TranslationDTO(language: t.language, value: t.value))
.toList(),
onGetResult: (val) {
setState(() {
workingPath.gameMessageDebut = val.map((t) {
final prev = (workingPath.gameMessageDebut ?? []).firstWhere(
(e) => e.language == t.language,
orElse: () => TranslationAndResourceDTO(),
);
return TranslationAndResourceDTO(
language: t.language,
value: t.value,
resourceId: prev.resourceId,
resource: prev.resource,
);
}).toList();
});
},
maxLines: 2,
isTitle: false,
isHTML: true,
),
),
SizedBox(width: 20),
Expanded(
child: MultiStringInputContainer(
label: "Message de fin :",
modalLabel: "Message de félicitations du jeu",
color: kPrimaryColor,
initialValue: (workingPath.gameMessageFin ?? [])
.map((t) => TranslationDTO(language: t.language, value: t.value))
.toList(),
onGetResult: (val) {
setState(() {
workingPath.gameMessageFin = val.map((t) {
final prev = (workingPath.gameMessageFin ?? []).firstWhere(
(e) => e.language == t.language,
orElse: () => TranslationAndResourceDTO(),
);
return TranslationAndResourceDTO(
language: t.language,
value: t.value,
resourceId: prev.resourceId,
resource: prev.resource,
);
}).toList();
});
},
maxLines: 2,
isTitle: false,
isHTML: true,
),
),
],
),
],
Divider(height: 24),
// Étapes
Row(
@ -157,13 +253,16 @@ void showNewOrUpdateGuidedPath(
context,
null,
workingPath.id ?? "temp",
isEscapeMode,
workingPath.isGameMode ?? false,
(newStep) async {
setState(() {
newStep.order =
workingPath.steps?.length ?? 0;
workingPath.steps = [
...(workingPath.steps ?? []),
newStep
];
stepsRevision++;
});
},
);
@ -182,12 +281,19 @@ void showNewOrUpdateGuidedPath(
),
)
else
ListView.builder(
ReorderableCustomList<GuidedStepDTO>(
key: ValueKey(stepsRevision),
items: workingPath.steps!,
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemCount: workingPath.steps!.length,
itemBuilder: (context, index) {
final step = workingPath.steps![index];
onChanged: (updatedList) {
setState(() {
for (var i = 0; i < updatedList.length; i++) {
updatedList[i].order = i;
}
workingPath.steps = List.from(updatedList);
});
},
itemBuilder: (context, index, step) {
return ListTile(
leading:
CircleAvatar(child: Text("${index + 1}")),
@ -202,14 +308,14 @@ void showNewOrUpdateGuidedPath(
"${AppLocalizations.of(context)!.stepFallback} $index"
: "${AppLocalizations.of(context)!.stepFallback} $index",
),
subtitle: isEscapeMode
subtitle: workingPath.isGameMode ?? false
? Text(
"${step.quizQuestions?.length ?? 0} question(s)")
: null,
trailing: Row(
mainAxisSize: MainAxisSize.min,
children: [
IconButton(
);
},
actions: [
(context, index, step) => IconButton(
icon: Icon(Icons.edit,
color: kPrimaryColor),
onPressed: () {
@ -217,29 +323,29 @@ void showNewOrUpdateGuidedPath(
context,
step,
workingPath.id ?? "temp",
isEscapeMode,
workingPath.isGameMode ?? false,
(updatedStep) async {
setState(() {
updatedStep.order = step.order;
workingPath.steps![index] =
updatedStep;
stepsRevision++;
});
},
);
},
),
IconButton(
(context, index, step) => IconButton(
icon: Icon(Icons.delete, color: kError),
onPressed: () {
setState(() {
workingPath.steps!.removeAt(index);
stepsRevision++;
});
},
),
],
),
);
},
),
],
),
),

View File

@ -1,14 +1,20 @@
import 'dart:async';
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter_widget_from_html/flutter_widget_from_html.dart';
import 'package:manager_api_new/api.dart';
import 'package:manager_app/Components/confirmation_dialog.dart';
import 'package:manager_app/Components/geometry_input_container.dart';
import 'package:manager_app/Components/reorderable_custom_list.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';
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';
import 'package:manager_app/constants.dart';
import 'package:manager_app/l10n/app_localizations.dart';
import 'package:provider/provider.dart';
import 'showNewOrUpdateQuizQuestion.dart';
void showNewOrUpdateGuidedStep(
@ -25,10 +31,16 @@ void showNewOrUpdateGuidedStep(
title: [],
description: [],
quizQuestions: [],
audioIds: [],
contents: [],
order: 0,
);
workingStep.audioIds = List.from(workingStep.audioIds ?? []);
workingStep.contents = List.from(workingStep.contents ?? []);
workingStep.quizQuestions = List.from(workingStep.quizQuestions ?? []);
bool isSaving = false;
int questionsRevision = 0;
showDialog(
context: context,
@ -41,6 +53,7 @@ void showNewOrUpdateGuidedStep(
final double dialogWidth = screenWidth * 0.75;
final double contentWidth = dialogWidth - 48;
final double halfWidth = (contentWidth - 20) / 2;
final appCtx = Provider.of<AppContext>(context, listen: false);
return Dialog(
shape:
@ -110,6 +123,27 @@ void showNewOrUpdateGuidedStep(
});
},
),
SizedBox(height: 8),
SwitchListTile(
dense: true,
contentPadding: EdgeInsets.zero,
title: Text("Déclenchement géolocalisé"),
value: workingStep.isGeoTriggered ?? false,
onChanged: (val) => setState(() => workingStep.isGeoTriggered = val),
activeThumbColor: kPrimaryColor,
),
if (workingStep.isGeoTriggered == true) ...[
SizedBox(height: 8),
SizedBox(
width: halfWidth,
child: StringInputContainer(
label: "Rayon (mètres) :",
initialValue: workingStep.zoneRadiusMeters?.toString() ?? "",
onChanged: (val) => setState(() =>
workingStep.zoneRadiusMeters = double.tryParse(val)),
),
),
],
Divider(height: 24),
// Comportement de l'étape
Text("Comportement", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 15)),
@ -134,17 +168,122 @@ void showNewOrUpdateGuidedStep(
activeThumbColor: kPrimaryColor,
),
),
Expanded(
],
),
Divider(height: 24),
Text("Contenu riche", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 15)),
SizedBox(height: 8),
// Audio
MultiStringInputContainer(
label: "Audio :",
resourceTypes: [ResourceType.Audio],
modalLabel: "Audio du guide",
initialValue: workingStep.audioIds!,
onGetResult: (val) => setState(() => workingStep.audioIds = val.isEmpty ? null : val),
maxLines: 1,
isTitle: false,
isHTML: false,
),
SizedBox(height: 12),
// Images
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("Images :", style: TextStyle(fontSize: 14, fontWeight: FontWeight.w500)),
IconButton(
icon: Icon(Icons.add_circle_outline, color: kSuccess),
onPressed: () async {
final result = await showNewOrUpdateContentSlider(null, appCtx, context, true, false);
if (result != null) {
setState(() {
result.order = workingStep.contents!.length;
workingStep.contents = [...workingStep.contents!, result];
});
}
},
),
],
),
if (workingStep.contents!.isEmpty)
Padding(
padding: const EdgeInsets.only(bottom: 8),
child: Text(
"Aucune image — cliquez + pour en ajouter",
style: TextStyle(fontStyle: FontStyle.italic, color: Colors.grey[600], fontSize: 13),
),
)
else
SizedBox(
height: 250,
child: ReorderableListView(
scrollDirection: Axis.horizontal,
onReorderItem: (oldIndex, newIndex) {
setState(() {
final item = workingStep.contents!.removeAt(oldIndex);
workingStep.contents!.insert(newIndex, item);
for (var i = 0; i < workingStep.contents!.length; i++) {
workingStep.contents![i].order = i;
}
});
},
children: List.generate(workingStep.contents!.length, (i) => ListViewCardContent(
workingStep.contents!,
i,
Key('content_$i'),
appCtx,
(updated) => setState(() => workingStep.contents = List.from(updated)),
true,
false,
)),
),
),
// Questions uniquement en mode Escape Game
if (isEscapeMode) ...[
Divider(height: 24),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(AppLocalizations.of(context)!.questionsChallengesLabel,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 15)),
IconButton(
icon: Icon(Icons.add_circle_outline,
color: kSuccess),
onPressed: () {
showNewOrUpdateQuizQuestion(
context,
null,
workingStep.id ?? "temp",
isEscapeMode,
(newQuestion) {
setState(() {
newQuestion.order =
workingStep.quizQuestions?.length ?? 0;
workingStep.quizQuestions = [
...(workingStep.quizQuestions ??
[]),
newQuestion
];
questionsRevision++;
});
},
);
},
),
],
),
SizedBox(
width: halfWidth,
child: SwitchListTile(
dense: true,
contentPadding: EdgeInsets.zero,
title: Text("Timer"),
value: workingStep.isStepTimer ?? false,
onChanged: (val) => setState(() => workingStep.isStepTimer = val),
activeThumbColor: kPrimaryColor,
),
),
],
),
if (workingStep.isStepTimer == true) ...[
SizedBox(height: 8),
Row(
@ -169,52 +308,13 @@ void showNewOrUpdateGuidedStep(
workingStep.timerExpiredMessage = val.isEmpty ? null : val),
maxLines: 2,
isTitle: false,
isHTML: false,
isHTML: true,
),
),
],
),
],
SizedBox(height: 8),
StringInputContainer(
label: AppLocalizations.of(context)!.triggerGeopointLabel,
initialValue: workingStep.triggerGeoPointId?.toString() ?? "",
onChanged: (val) => setState(() =>
workingStep.triggerGeoPointId = int.tryParse(val)),
),
// Questions uniquement en mode Escape Game
if (isEscapeMode) ...[
Divider(height: 24),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(AppLocalizations.of(context)!.questionsChallengesLabel,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 15)),
IconButton(
icon: Icon(Icons.add_circle_outline,
color: kSuccess),
onPressed: () {
showNewOrUpdateQuizQuestion(
context,
null,
workingStep.id ?? "temp",
isEscapeMode,
(newQuestion) {
setState(() {
workingStep.quizQuestions = [
...(workingStep.quizQuestions ??
[]),
newQuestion
];
});
},
);
},
),
],
),
if (workingStep.quizQuestions == null ||
workingStep.quizQuestions!.isEmpty)
Padding(
@ -228,16 +328,24 @@ void showNewOrUpdateGuidedStep(
),
)
else
ListView.builder(
ReorderableCustomList<QuizQuestion>(
key: ValueKey(questionsRevision),
items: workingStep.quizQuestions!,
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemCount: workingStep.quizQuestions!.length,
itemBuilder: (context, qIndex) {
final question =
workingStep.quizQuestions![qIndex];
onChanged: (updatedList) {
setState(() {
for (var i = 0; i < updatedList.length; i++) {
updatedList[i].order = i;
}
workingStep.quizQuestions =
List.from(updatedList);
});
},
itemBuilder: (context, qIndex, question) {
return ListTile(
dense: true,
title: Text(question.label.isNotEmpty
title: HtmlWidget(
question.label.isNotEmpty
? question.label
.firstWhere(
(t) => t.language == 'FR',
@ -245,13 +353,15 @@ void showNewOrUpdateGuidedStep(
question.label[0])
.value ??
"Question $qIndex"
: "Question $qIndex"),
: "Question $qIndex",
textStyle: TextStyle(fontSize: 14),
),
subtitle: Text(
"Type: ${question.validationQuestionType?.value == 2 ? 'Puzzle' : question.validationQuestionType?.value == 1 ? 'QCM' : 'Texte'}"),
trailing: Row(
mainAxisSize: MainAxisSize.min,
children: [
IconButton(
);
},
actions: [
(context, qIndex, question) => IconButton(
icon: Icon(Icons.edit,
size: 18, color: kPrimaryColor),
onPressed: () {
@ -262,32 +372,34 @@ void showNewOrUpdateGuidedStep(
isEscapeMode,
(updatedQuestion) {
setState(() {
updatedQuestion.order =
question.order;
workingStep.quizQuestions![
qIndex] = updatedQuestion;
questionsRevision++;
});
},
);
},
),
IconButton(
(context, qIndex, question) => IconButton(
icon: Icon(Icons.delete,
size: 18, color: kError),
onPressed: () {
showConfirmationDialog(
"Supprimer cette question ?",
() {},
() => setState(() => workingStep
.quizQuestions!
.removeAt(qIndex)),
() => setState(() {
workingStep.quizQuestions!
.removeAt(qIndex);
questionsRevision++;
}),
context,
);
},
),
],
),
);
},
),
],
],
),
@ -320,6 +432,15 @@ void showNewOrUpdateGuidedStep(
workingStep.isHiddenInitially ??= false;
workingStep.isStepTimer ??= false;
workingStep.isStepLocked ??= false;
workingStep.isGeoTriggered ??= false;
if (workingStep.isGeoTriggered != true) {
workingStep.zoneRadiusMeters = null;
}
if (!isEscapeMode) {
workingStep.isStepTimer = false;
workingStep.timerSeconds = null;
workingStep.timerExpiredMessage = null;
}
try {
await onSave(workingStep);
if (context.mounted) Navigator.pop(context);

View File

@ -0,0 +1,127 @@
import 'package:flutter/material.dart';
import 'package:manager_api_new/api.dart';
import 'package:provider/provider.dart';
import 'package:manager_app/app_context.dart';
import 'package:manager_app/Models/managerContext.dart';
import 'package:manager_app/Components/check_input_container.dart';
import 'package:manager_app/Screens/Configurations/Section/SubSection/Parcours/parcours_config.dart';
class SectionParcoursConfig extends StatefulWidget {
final ParcoursDTO initialValue;
final ValueChanged<ParcoursDTO> onChanged;
const SectionParcoursConfig({
Key? key,
required this.initialValue,
required this.onChanged,
}) : super(key: key);
@override
_SectionParcoursConfigState createState() => _SectionParcoursConfigState();
}
class _SectionParcoursConfigState extends State<SectionParcoursConfig> {
late ParcoursDTO parcoursDTO;
List<SectionDTO> availableMaps = [];
@override
void initState() {
super.initState();
parcoursDTO = widget.initialValue;
WidgetsBinding.instance.addPostFrameCallback((_) => _loadAvailableMaps());
}
Future<void> _loadAvailableMaps() async {
if (parcoursDTO.configurationId == null || !mounted) return;
final appContext = Provider.of<AppContext>(context, listen: false);
final api = (appContext.getContext() as ManagerAppContext).clientAPI!.sectionApi!;
try {
final sections = await api.sectionGetFromConfiguration(parcoursDTO.configurationId!);
if (sections == null || !mounted) return;
setState(() {
availableMaps = sections.where((s) => s.type == SectionType.Map).toList();
});
} catch (e) {
// Silently keep empty on error
}
}
@override
Widget build(BuildContext context) {
return Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Options carte
Padding(
padding: const EdgeInsets.fromLTRB(16, 16, 16, 0),
child: Row(
children: [
Expanded(
child: CheckInputContainer(
label: "Afficher la carte",
isChecked: parcoursDTO.showMap ?? true,
onChanged: (val) {
setState(() => parcoursDTO.showMap = val);
widget.onChanged(parcoursDTO);
},
),
),
if (parcoursDTO.showMap == true && availableMaps.isNotEmpty)
Expanded(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Carte de base (optionnel)",
style: TextStyle(fontWeight: FontWeight.w500)),
DropdownButton<String?>(
isExpanded: true,
value: parcoursDTO.baseSectionMapId,
items: [
DropdownMenuItem<String?>(
value: null, child: Text("Aucune")),
...availableMaps.map((m) => DropdownMenuItem<String?>(
value: m.id,
child: Text(m.label ?? m.id ?? ''))),
],
onChanged: (val) {
setState(() => parcoursDTO.baseSectionMapId = val);
widget.onChanged(parcoursDTO);
},
),
],
),
),
),
],
),
),
// Liste des parcours
if (parcoursDTO.id != null)
SizedBox(
height: 500,
child: ParcoursConfig(
initialValue: parcoursDTO.guidedPaths ?? [],
parentId: parcoursDTO.id!,
isEvent: false,
isParcours: true,
onChanged: (paths) {
setState(() => parcoursDTO.guidedPaths = paths);
widget.onChanged(parcoursDTO);
},
),
)
else
Padding(
padding: const EdgeInsets.all(16),
child: Text(
"Sauvegardez d'abord la section pour gérer les parcours.",
style: TextStyle(fontStyle: FontStyle.italic, color: Colors.grey[600]),
),
),
],
);
}
}

View File

@ -38,8 +38,11 @@ Future<ContentDTO?> showNewOrUpdateContentSlider(ContentDTO? inputContentDTO, Ap
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(20.0))
),
child: SizedBox(
width: 480,
child: ConstrainedBox(
constraints: BoxConstraints(
maxWidth: 480,
maxHeight: size.height * 0.85,
),
child: Padding(
padding: const EdgeInsets.fromLTRB(24, 20, 24, 24),
child: Column(

View File

@ -40,6 +40,7 @@ import 'dart:html' as html;
import 'SubSection/Weather/weather_config.dart';
import 'SubSection/Event/event_config.dart';
import 'SubSection/SectionParcours/section_parcours_config.dart';
class SectionDetailScreen extends StatefulWidget {
final String id;
@ -459,6 +460,11 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
.sectionUpdate(sectionDetailDTO!);
SectionDTO? section = SectionDTO.fromJson(sectionResult);
setState(() {
sectionDetailDTO = null;
_sectionFuture = Future.value(sectionResult);
});
ManagerAppContext managerAppContext = appContext.getContext();
managerAppContext.selectedSection = section;
appContext.setContext(managerAppContext);
@ -561,6 +567,13 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
sectionDetailDTO = updatedEvent;
},
);
case SectionType.Parcours:
return SectionParcoursConfig(
initialValue: sectionDetailDTO as ParcoursDTO,
onChanged: (ParcoursDTO updatedParcours) {
sectionDetailDTO = updatedParcours;
},
);
}
}
@ -605,6 +618,9 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
case SectionType.Event:
sectionDetailDTO = SectionEventDTO.fromJson(rawSectionData)!;
break;
case SectionType.Parcours:
sectionDetailDTO = ParcoursDTO.fromJson(rawSectionData)!;
break;
}
}
@ -852,6 +868,26 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
(sectionDetailDTO as SectionEventDTO).longitude = sectionDTO.longitude;
(sectionDetailDTO as SectionEventDTO).meterZoneGPS = sectionDTO.meterZoneGPS;
break;
case SectionType.Parcours:
(sectionDetailDTO as ParcoursDTO).id = sectionDTO.id;
(sectionDetailDTO as ParcoursDTO).order = sectionDTO.order;
(sectionDetailDTO as ParcoursDTO).dateCreation = sectionDTO.dateCreation;
(sectionDetailDTO as ParcoursDTO).type = sectionDTO.type;
(sectionDetailDTO as ParcoursDTO).instanceId = sectionDTO.instanceId;
(sectionDetailDTO as ParcoursDTO).configurationId = sectionDTO.configurationId;
(sectionDetailDTO as ParcoursDTO).isSubSection = sectionDTO.isSubSection;
(sectionDetailDTO as ParcoursDTO).parentId = sectionDTO.parentId;
(sectionDetailDTO as ParcoursDTO).label = sectionDTO.label;
(sectionDetailDTO as ParcoursDTO).title = sectionDTO.title;
(sectionDetailDTO as ParcoursDTO).description = sectionDTO.description;
(sectionDetailDTO as ParcoursDTO).imageId = sectionDTO.imageId;
(sectionDetailDTO as ParcoursDTO).imageSource = sectionDTO.imageSource;
(sectionDetailDTO as ParcoursDTO).isBeacon = sectionDTO.isBeacon;
(sectionDetailDTO as ParcoursDTO).beaconId = sectionDTO.beaconId;
(sectionDetailDTO as ParcoursDTO).latitude = sectionDTO.latitude;
(sectionDetailDTO as ParcoursDTO).longitude = sectionDTO.longitude;
(sectionDetailDTO as ParcoursDTO).meterZoneGPS = sectionDTO.meterZoneGPS;
break;
}
}
}

View File

@ -10,6 +10,7 @@ import 'package:manager_app/Components/common_loader.dart';
import 'package:manager_app/Components/message_notification.dart';
import 'package:manager_app/l10n/app_localizations.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/string_input_container.dart';
import 'package:manager_app/Helpers/FileHelper.dart';
import 'package:manager_app/Models/managerContext.dart';
@ -191,6 +192,17 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
onChanged: (value) => config.label = value,
),
const SizedBox(height: 12),
MultiStringInputContainer(
label: l.displayTitleLabel,
modalLabel: l.messageTitle,
initialValue: config.title ?? [],
isTitle: true,
isHTML: true,
isMandatory: false,
maxLines: 1,
onGetResult: (value) => config.title = value,
),
const SizedBox(height: 12),
Wrap(
spacing: 24,
runSpacing: 12,

View File

@ -41,6 +41,9 @@ class Client {
SectionEventApi? _sectionEventApi;
SectionEventApi? get sectionEventApi => _sectionEventApi;
SectionParcoursApi? _sectionParcoursApi;
SectionParcoursApi? get sectionParcoursApi => _sectionParcoursApi;
StatsApi? _statsApi;
StatsApi? get statsApi => _statsApi;
@ -70,6 +73,7 @@ class Client {
_sectionQuizApi = SectionQuizApi(_apiClient);
_sectionAgendaApi = SectionAgendaApi(_apiClient);
_sectionEventApi = SectionEventApi(_apiClient);
_sectionParcoursApi = SectionParcoursApi(_apiClient);
_statsApi = StatsApi(_apiClient);
_apiKeyApi = ApiKeyApi(_apiClient);
_notificationApi = NotificationApi(_apiClient);

View File

@ -44,7 +44,7 @@ const kSectionLabelStyle = TextStyle(
color: kTitleTextColor,
);
const List<String> section_types = ["Map", "Slider", "Video", "Web", "Menu", "Quiz", "Article", "PDF", "Game", "Agenda", "Weather", "Event"];
const List<String> section_types = ["Map", "Slider", "Video", "Web", "Menu", "Quiz", "Article", "PDF", "Game", "Agenda", "Weather", "Event", "Parcours"];
const List<String> map_types = ["none", "normal", "satellite", "terrain", "hybrid"];
const List<String> languages = ["FR", "NL", "EN", "DE", "IT", "ES", "CN", "PL", "AR", "UK"];
const List<String> map_types_mapBox = ["standard", "streets", "outdoors", "light", "dark", "satellite", "satellite_streets"];

View File

@ -1,30 +0,0 @@
# manager_api_new.model.GuidedStepDTOTriggerGeoPoint
## Load the model package
```dart
import 'package:manager_api_new/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**contents** | [**List<ContentDTO>**](ContentDTO.md) | | [optional] [default to const []]
**categorieId** | **int** | | [optional]
**imageResourceId** | **String** | | [optional]
**imageUrl** | **String** | | [optional]
**schedules** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**prices** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**phone** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**email** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**site** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**geometry** | [**EventAddressDTOGeometry**](EventAddressDTOGeometry.md) | | [optional]
**polyColor** | **String** | | [optional]
**sectionMapId** | **String** | | [optional]
**sectionEventId** | **String** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,32 +0,0 @@
# manager_api_new.model.GuidedStepTriggerGeoPoint
## Load the model package
```dart
import 'package:manager_api_new/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | |
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [default to const []]
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [default to const []]
**contents** | [**List<ContentDTO>**](ContentDTO.md) | | [default to const []]
**schedules** | [**List<TranslationDTO>**](TranslationDTO.md) | | [default to const []]
**prices** | [**List<TranslationDTO>**](TranslationDTO.md) | | [default to const []]
**phone** | [**List<TranslationDTO>**](TranslationDTO.md) | | [default to const []]
**email** | [**List<TranslationDTO>**](TranslationDTO.md) | | [default to const []]
**site** | [**List<TranslationDTO>**](TranslationDTO.md) | | [default to const []]
**categorieId** | **int** | | [optional]
**geometry** | [**PointAllOfBoundary**](PointAllOfBoundary.md) | | [optional]
**polyColor** | **String** | | [optional]
**imageResourceId** | **String** | | [optional]
**imageUrl** | **String** | | [optional]
**sectionMapId** | **String** | | [optional]
**sectionMap** | [**GuidedPathSectionMap**](GuidedPathSectionMap.md) | | [optional]
**sectionEventId** | **String** | | [optional]
**sectionEvent** | [**ApplicationInstanceSectionEvent**](ApplicationInstanceSectionEvent.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -41,6 +41,7 @@ part 'api/section_api.dart';
part 'api/section_agenda_api.dart';
part 'api/section_event_api.dart';
part 'api/section_map_api.dart';
part 'api/section_parcours_api.dart';
part 'api/section_quiz_api.dart';
part 'api/notification_api.dart';
part 'api/stats_api.dart';
@ -112,9 +113,7 @@ part 'model/guided_path_section_game.dart';
part 'model/guided_path_section_map.dart';
part 'model/guided_step.dart';
part 'model/guided_step_dto.dart';
part 'model/guided_step_dto_trigger_geo_point.dart';
part 'model/guided_step_guided_path.dart';
part 'model/guided_step_trigger_geo_point.dart';
part 'model/instance.dart';
part 'model/instance_dto.dart';
part 'model/instance_quota_dto.dart';
@ -167,6 +166,7 @@ part 'model/section_dto.dart';
part 'model/section_event.dart';
part 'model/section_event_dto.dart';
part 'model/section_game.dart';
part 'model/parcours_dto.dart';
part 'model/section_game_all_of_game_puzzle_image.dart';
part 'model/section_map.dart';
part 'model/section_map_all_of_map_map_provider.dart';

View File

@ -0,0 +1,386 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class SectionParcoursApi {
SectionParcoursApi([ApiClient? apiClient])
: apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// Performs an HTTP 'GET /api/SectionParcours/{sectionParcoursId}/guided-path' operation and returns the [Response].
Future<Response> sectionParcoursGetAllGuidedPathFromSectionWithHttpInfo(
String sectionParcoursId,
) async {
// ignore: prefer_const_declarations
final path = r'/api/SectionParcours/{sectionParcoursId}/guided-path'
.replaceAll('{sectionParcoursId}', sectionParcoursId);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<List<GuidedPathDTO>?> sectionParcoursGetAllGuidedPathFromSection(
String sectionParcoursId,
) async {
final response =
await sectionParcoursGetAllGuidedPathFromSectionWithHttpInfo(
sectionParcoursId,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<GuidedPathDTO>') as List)
.cast<GuidedPathDTO>()
.toList(growable: false);
}
return null;
}
/// Performs an HTTP 'POST /api/SectionParcours/{sectionParcoursId}/guided-path' operation and returns the [Response].
Future<Response> sectionParcoursCreateGuidedPathWithHttpInfo(
String sectionParcoursId,
GuidedPathDTO guidedPathDTO,
) async {
// ignore: prefer_const_declarations
final path = r'/api/SectionParcours/{sectionParcoursId}/guided-path'
.replaceAll('{sectionParcoursId}', sectionParcoursId);
// ignore: prefer_final_locals
Object? postBody = guidedPathDTO;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<GuidedPathDTO?> sectionParcoursCreateGuidedPath(
String sectionParcoursId,
GuidedPathDTO guidedPathDTO,
) async {
final response = await sectionParcoursCreateGuidedPathWithHttpInfo(
sectionParcoursId,
guidedPathDTO,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'GuidedPathDTO',
) as GuidedPathDTO;
}
return null;
}
/// Performs an HTTP 'PUT /api/SectionParcours/guided-path' operation and returns the [Response].
Future<Response> sectionParcoursUpdateGuidedPathWithHttpInfo(
GuidedPathDTO guidedPathDTO,
) async {
// ignore: prefer_const_declarations
final path = r'/api/SectionParcours/guided-path';
// ignore: prefer_final_locals
Object? postBody = guidedPathDTO;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'PUT',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<GuidedPathDTO?> sectionParcoursUpdateGuidedPath(
GuidedPathDTO guidedPathDTO,
) async {
final response = await sectionParcoursUpdateGuidedPathWithHttpInfo(
guidedPathDTO,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'GuidedPathDTO',
) as GuidedPathDTO;
}
return null;
}
/// Performs an HTTP 'DELETE /api/SectionParcours/guided-path/{guidedPathId}' operation and returns the [Response].
Future<Response> sectionParcoursDeleteGuidedPathWithHttpInfo(
String guidedPathId,
) async {
// ignore: prefer_const_declarations
final path = r'/api/SectionParcours/guided-path/{guidedPathId}'
.replaceAll('{guidedPathId}', guidedPathId);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'DELETE',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<void> sectionParcoursDeleteGuidedPath(
String guidedPathId,
) async {
final response = await sectionParcoursDeleteGuidedPathWithHttpInfo(
guidedPathId,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}
/// Performs an HTTP 'GET /api/SectionParcours/guided-path/{guidedPathId}/guided-step' operation and returns the [Response].
Future<Response> sectionParcoursGetAllGuidedStepFromGuidedPathWithHttpInfo(
String guidedPathId,
) async {
// ignore: prefer_const_declarations
final path =
r'/api/SectionParcours/guided-path/{guidedPathId}/guided-step'
.replaceAll('{guidedPathId}', guidedPathId);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<List<GuidedStepDTO>?> sectionParcoursGetAllGuidedStepFromGuidedPath(
String guidedPathId,
) async {
final response =
await sectionParcoursGetAllGuidedStepFromGuidedPathWithHttpInfo(
guidedPathId,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<GuidedStepDTO>') as List)
.cast<GuidedStepDTO>()
.toList(growable: false);
}
return null;
}
/// Performs an HTTP 'POST /api/SectionParcours/guided-path/{guidedPathId}/guided-step' operation and returns the [Response].
Future<Response> sectionParcoursCreateGuidedStepWithHttpInfo(
String guidedPathId,
GuidedStepDTO guidedStepDTO,
) async {
// ignore: prefer_const_declarations
final path =
r'/api/SectionParcours/guided-path/{guidedPathId}/guided-step'
.replaceAll('{guidedPathId}', guidedPathId);
// ignore: prefer_final_locals
Object? postBody = guidedStepDTO;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<GuidedStepDTO?> sectionParcoursCreateGuidedStep(
String guidedPathId,
GuidedStepDTO guidedStepDTO,
) async {
final response = await sectionParcoursCreateGuidedStepWithHttpInfo(
guidedPathId,
guidedStepDTO,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'GuidedStepDTO',
) as GuidedStepDTO;
}
return null;
}
/// Performs an HTTP 'PUT /api/SectionParcours/guided-step' operation and returns the [Response].
Future<Response> sectionParcoursUpdateGuidedStepWithHttpInfo(
GuidedStepDTO guidedStepDTO,
) async {
// ignore: prefer_const_declarations
final path = r'/api/SectionParcours/guided-step';
// ignore: prefer_final_locals
Object? postBody = guidedStepDTO;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'PUT',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<GuidedStepDTO?> sectionParcoursUpdateGuidedStep(
GuidedStepDTO guidedStepDTO,
) async {
final response = await sectionParcoursUpdateGuidedStepWithHttpInfo(
guidedStepDTO,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'GuidedStepDTO',
) as GuidedStepDTO;
}
return null;
}
/// Performs an HTTP 'DELETE /api/SectionParcours/guided-step/{guidedStepId}' operation and returns the [Response].
Future<Response> sectionParcoursDeleteGuidedStepWithHttpInfo(
String guidedStepId,
) async {
// ignore: prefer_const_declarations
final path = r'/api/SectionParcours/guided-step/{guidedStepId}'
.replaceAll('{guidedStepId}', guidedStepId);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'DELETE',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<void> sectionParcoursDeleteGuidedStep(
String guidedStepId,
) async {
final response = await sectionParcoursDeleteGuidedStepWithHttpInfo(
guidedStepId,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}
}

View File

@ -353,12 +353,8 @@ class ApiClient {
return GuidedStep.fromJson(value);
case 'GuidedStepDTO':
return GuidedStepDTO.fromJson(value);
case 'GuidedStepDTOTriggerGeoPoint':
return GuidedStepDTOTriggerGeoPoint.fromJson(value);
case 'GuidedStepGuidedPath':
return GuidedStepGuidedPath.fromJson(value);
case 'GuidedStepTriggerGeoPoint':
return GuidedStepTriggerGeoPoint.fromJson(value);
case 'Instance':
return Instance.fromJson(value);
case 'InstanceDTO':

View File

@ -19,6 +19,7 @@ class AiChatRequest {
this.configurationId,
this.language,
this.history = const [],
this.isVoice = false,
});
String? message;
@ -39,6 +40,9 @@ class AiChatRequest {
List<AiChatMessage>? history;
/// true = interaction vocale (lunettes) prompt audio-friendly, pas de navigation
bool? isVoice;
@override
bool operator ==(Object other) =>
identical(this, other) ||
@ -96,6 +100,7 @@ class AiChatRequest {
} else {
json[r'history'] = null;
}
json[r'isVoice'] = this.isVoice ?? false;
return json;
}

View File

@ -16,6 +16,7 @@ class AiChatResponse {
this.reply,
this.cards = const [],
this.navigation,
this.expectsReply = true,
});
String? reply;
@ -24,24 +25,28 @@ class AiChatResponse {
AiChatResponseNavigation? navigation;
bool? expectsReply;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is AiChatResponse &&
other.reply == reply &&
_deepEquality.equals(other.cards, cards) &&
other.navigation == navigation;
other.navigation == navigation &&
other.expectsReply == expectsReply;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(reply == null ? 0 : reply!.hashCode) +
(cards == null ? 0 : cards!.hashCode) +
(navigation == null ? 0 : navigation!.hashCode);
(navigation == null ? 0 : navigation!.hashCode) +
(expectsReply == null ? 0 : expectsReply!.hashCode);
@override
String toString() =>
'AiChatResponse[reply=$reply, cards=$cards, navigation=$navigation]';
'AiChatResponse[reply=$reply, cards=$cards, navigation=$navigation, expectsReply=$expectsReply]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@ -60,6 +65,7 @@ class AiChatResponse {
} else {
json[r'navigation'] = null;
}
json[r'expectsReply'] = this.expectsReply;
return json;
}
@ -87,6 +93,7 @@ class AiChatResponse {
reply: mapValueOfType<String>(json, r'reply'),
cards: AiCardDTO.listFromJson(json[r'cards']),
navigation: AiChatResponseNavigation.fromJson(json[r'navigation']),
expectsReply: mapValueOfType<bool>(json, r'expectsReply') ?? true,
);
}
return null;

View File

@ -10,7 +10,7 @@
part of openapi.api;
/// 0 = Mobile 1 = Tablet 2 = Web 3 = VR
/// 0 = Mobile 1 = Tablet 2 = Web 3 = VR 4 = Voice (lunettes / interface vocale)
class AppType {
/// Instantiate a new enum with the provided [value].
const AppType._(this.value);
@ -27,6 +27,7 @@ class AppType {
static const Tablet = AppType._(1);
static const Web = AppType._(2);
static const VR = AppType._(3);
static const Voice = AppType._(4); // Lunettes Ray-Ban Meta / interface vocale
/// List of all possible values in this [enum][AppType].
static const values = <AppType>[
@ -34,6 +35,7 @@ class AppType {
Tablet,
Web,
VR,
Voice,
];
static AppType? fromJson(dynamic value) =>
@ -82,6 +84,7 @@ class AppTypeTypeTransformer {
case r'Tablet': return AppType.Tablet;
case r'Web': return AppType.Web;
case r'VR': return AppType.VR;
case r'Voice': return AppType.Voice;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
@ -94,6 +97,7 @@ class AppTypeTypeTransformer {
case 1: return AppType.Tablet;
case 2: return AppType.Web;
case 3: return AppType.VR;
case 4: return AppType.Voice;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');

View File

@ -39,7 +39,6 @@ class GameDTO {
this.rows,
this.cols,
this.gameType,
this.guidedPaths = const [],
});
String? id;
@ -136,8 +135,6 @@ class GameDTO {
///
GameTypes? gameType;
List<GuidedPathDTO>? guidedPaths;
@override
bool operator ==(Object other) =>
identical(this, other) ||
@ -167,8 +164,7 @@ class GameDTO {
other.puzzleImageId == puzzleImageId &&
other.rows == rows &&
other.cols == cols &&
other.gameType == gameType &&
_deepEquality.equals(other.guidedPaths, guidedPaths);
other.gameType == gameType;
@override
int get hashCode =>
@ -198,12 +194,11 @@ class GameDTO {
(puzzleImageId == null ? 0 : puzzleImageId!.hashCode) +
(rows == null ? 0 : rows!.hashCode) +
(cols == null ? 0 : cols!.hashCode) +
(gameType == null ? 0 : gameType!.hashCode) +
(guidedPaths == null ? 0 : guidedPaths!.hashCode);
(gameType == null ? 0 : gameType!.hashCode);
@override
String toString() =>
'GameDTO[id=$id, label=$label, title=$title, description=$description, isActive=$isActive, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId, messageDebut=$messageDebut, messageFin=$messageFin, puzzleImage=$puzzleImage, puzzleImageId=$puzzleImageId, rows=$rows, cols=$cols, gameType=$gameType, guidedPaths=$guidedPaths]';
'GameDTO[id=$id, label=$label, title=$title, description=$description, isActive=$isActive, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId, messageDebut=$messageDebut, messageFin=$messageFin, puzzleImage=$puzzleImage, puzzleImageId=$puzzleImageId, rows=$rows, cols=$cols, gameType=$gameType]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@ -338,11 +333,6 @@ class GameDTO {
} else {
json[r'gameType'] = null;
}
if (this.guidedPaths != null) {
json[r'guidedPaths'] = this.guidedPaths!.map((v) => v.toJson()).toList();
} else {
json[r'guidedPaths'] = null;
}
return json;
}
@ -394,7 +384,6 @@ class GameDTO {
rows: mapValueOfType<int>(json, r'rows'),
cols: mapValueOfType<int>(json, r'cols'),
gameType: GameTypes.fromJson(json[r'gameType']),
guidedPaths: GuidedPathDTO.listFromJson(json[r'guidedPaths']),
);
}
return null;

View File

@ -19,11 +19,16 @@ class GuidedPathDTO {
this.description = const [],
this.sectionMapId,
this.sectionEventId,
this.sectionGameId,
this.sectionParcoursId,
this.isLinear,
this.requireSuccessToAdvance,
this.hideNextStepsUntilComplete,
this.estimatedDurationMinutes,
this.imageResourceId,
this.order,
this.isGameMode,
this.gameMessageDebut = const [],
this.gameMessageFin = const [],
this.steps = const [],
});
@ -39,7 +44,11 @@ class GuidedPathDTO {
String? sectionEventId;
String? sectionGameId;
String? sectionParcoursId;
int? estimatedDurationMinutes;
String? imageResourceId;
///
/// Please note: This property should have been non-nullable! Since the specification file
@ -67,6 +76,12 @@ class GuidedPathDTO {
int? order;
bool? isGameMode;
List<TranslationAndResourceDTO>? gameMessageDebut;
List<TranslationAndResourceDTO>? gameMessageFin;
List<GuidedStepDTO>? steps;
@override
@ -79,11 +94,16 @@ class GuidedPathDTO {
_deepEquality.equals(other.description, description) &&
other.sectionMapId == sectionMapId &&
other.sectionEventId == sectionEventId &&
other.sectionGameId == sectionGameId &&
other.sectionParcoursId == sectionParcoursId &&
other.estimatedDurationMinutes == estimatedDurationMinutes &&
other.imageResourceId == imageResourceId &&
other.isLinear == isLinear &&
other.requireSuccessToAdvance == requireSuccessToAdvance &&
other.hideNextStepsUntilComplete == hideNextStepsUntilComplete &&
other.order == order &&
other.isGameMode == isGameMode &&
_deepEquality.equals(other.gameMessageDebut, gameMessageDebut) &&
_deepEquality.equals(other.gameMessageFin, gameMessageFin) &&
_deepEquality.equals(other.steps, steps);
@override
@ -95,7 +115,9 @@ class GuidedPathDTO {
(description == null ? 0 : description!.hashCode) +
(sectionMapId == null ? 0 : sectionMapId!.hashCode) +
(sectionEventId == null ? 0 : sectionEventId!.hashCode) +
(sectionGameId == null ? 0 : sectionGameId!.hashCode) +
(sectionParcoursId == null ? 0 : sectionParcoursId!.hashCode) +
(estimatedDurationMinutes == null ? 0 : estimatedDurationMinutes!.hashCode) +
(imageResourceId == null ? 0 : imageResourceId!.hashCode) +
(isLinear == null ? 0 : isLinear!.hashCode) +
(requireSuccessToAdvance == null
? 0
@ -104,11 +126,14 @@ class GuidedPathDTO {
? 0
: hideNextStepsUntilComplete!.hashCode) +
(order == null ? 0 : order!.hashCode) +
(isGameMode == null ? 0 : isGameMode!.hashCode) +
(gameMessageDebut == null ? 0 : gameMessageDebut!.hashCode) +
(gameMessageFin == null ? 0 : gameMessageFin!.hashCode) +
(steps == null ? 0 : steps!.hashCode);
@override
String toString() =>
'GuidedPathDTO[id=$id, instanceId=$instanceId, title=$title, description=$description, sectionMapId=$sectionMapId, sectionEventId=$sectionEventId, sectionGameId=$sectionGameId, isLinear=$isLinear, requireSuccessToAdvance=$requireSuccessToAdvance, hideNextStepsUntilComplete=$hideNextStepsUntilComplete, order=$order, steps=$steps]';
'GuidedPathDTO[id=$id, instanceId=$instanceId, title=$title, description=$description, sectionMapId=$sectionMapId, sectionEventId=$sectionEventId, sectionParcoursId=$sectionParcoursId, estimatedDurationMinutes=$estimatedDurationMinutes, imageResourceId=$imageResourceId, isLinear=$isLinear, requireSuccessToAdvance=$requireSuccessToAdvance, hideNextStepsUntilComplete=$hideNextStepsUntilComplete, order=$order, isGameMode=$isGameMode, gameMessageDebut=$gameMessageDebut, gameMessageFin=$gameMessageFin, steps=$steps]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@ -142,10 +167,20 @@ class GuidedPathDTO {
} else {
json[r'sectionEventId'] = null;
}
if (this.sectionGameId != null) {
json[r'sectionGameId'] = this.sectionGameId;
if (this.sectionParcoursId != null) {
json[r'sectionParcoursId'] = this.sectionParcoursId;
} else {
json[r'sectionGameId'] = null;
json[r'sectionParcoursId'] = null;
}
if (this.estimatedDurationMinutes != null) {
json[r'estimatedDurationMinutes'] = this.estimatedDurationMinutes;
} else {
json[r'estimatedDurationMinutes'] = null;
}
if (this.imageResourceId != null) {
json[r'imageResourceId'] = this.imageResourceId;
} else {
json[r'imageResourceId'] = null;
}
if (this.isLinear != null) {
json[r'isLinear'] = this.isLinear;
@ -167,6 +202,23 @@ class GuidedPathDTO {
} else {
json[r'order'] = null;
}
if (this.isGameMode != null) {
json[r'isGameMode'] = this.isGameMode;
} else {
json[r'isGameMode'] = null;
}
if (this.gameMessageDebut != null) {
json[r'gameMessageDebut'] =
this.gameMessageDebut!.map((v) => v.toJson()).toList();
} else {
json[r'gameMessageDebut'] = null;
}
if (this.gameMessageFin != null) {
json[r'gameMessageFin'] =
this.gameMessageFin!.map((v) => v.toJson()).toList();
} else {
json[r'gameMessageFin'] = null;
}
if (this.steps != null) {
json[r'steps'] = this.steps;
} else {
@ -202,13 +254,20 @@ class GuidedPathDTO {
description: TranslationDTO.listFromJson(json[r'description']),
sectionMapId: mapValueOfType<String>(json, r'sectionMapId'),
sectionEventId: mapValueOfType<String>(json, r'sectionEventId'),
sectionGameId: mapValueOfType<String>(json, r'sectionGameId'),
sectionParcoursId: mapValueOfType<String>(json, r'sectionParcoursId'),
estimatedDurationMinutes: mapValueOfType<int>(json, r'estimatedDurationMinutes'),
imageResourceId: mapValueOfType<String>(json, r'imageResourceId'),
isLinear: mapValueOfType<bool>(json, r'isLinear'),
requireSuccessToAdvance:
mapValueOfType<bool>(json, r'requireSuccessToAdvance'),
hideNextStepsUntilComplete:
mapValueOfType<bool>(json, r'hideNextStepsUntilComplete'),
order: mapValueOfType<int>(json, r'order'),
isGameMode: mapValueOfType<bool>(json, r'isGameMode'),
gameMessageDebut:
TranslationAndResourceDTO.listFromJson(json[r'gameMessageDebut']),
gameMessageFin:
TranslationAndResourceDTO.listFromJson(json[r'gameMessageFin']),
steps: GuidedStepDTO.listFromJson(json[r'steps']),
);
}

View File

@ -20,10 +20,9 @@ class GuidedStep {
this.order,
this.description = const [],
this.geometry,
this.isGeoTriggered,
this.zoneRadiusMeters,
this.imageUrl,
this.triggerGeoPointId,
this.triggerGeoPoint,
this.isHiddenInitially,
this.quizQuestions = const [],
this.isStepTimer,
@ -52,14 +51,18 @@ class GuidedStep {
PointAllOfBoundary? geometry;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
bool? isGeoTriggered;
double? zoneRadiusMeters;
String? imageUrl;
int? triggerGeoPointId;
GuidedStepTriggerGeoPoint? triggerGeoPoint;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@ -101,10 +104,9 @@ class GuidedStep {
other.order == order &&
_deepEquality.equals(other.description, description) &&
other.geometry == geometry &&
other.isGeoTriggered == isGeoTriggered &&
other.zoneRadiusMeters == zoneRadiusMeters &&
other.imageUrl == imageUrl &&
other.triggerGeoPointId == triggerGeoPointId &&
other.triggerGeoPoint == triggerGeoPoint &&
other.isHiddenInitially == isHiddenInitially &&
_deepEquality.equals(other.quizQuestions, quizQuestions) &&
other.isStepTimer == isStepTimer &&
@ -122,10 +124,9 @@ class GuidedStep {
(order == null ? 0 : order!.hashCode) +
(description == null ? 0 : description!.hashCode) +
(geometry == null ? 0 : geometry!.hashCode) +
(isGeoTriggered == null ? 0 : isGeoTriggered!.hashCode) +
(zoneRadiusMeters == null ? 0 : zoneRadiusMeters!.hashCode) +
(imageUrl == null ? 0 : imageUrl!.hashCode) +
(triggerGeoPointId == null ? 0 : triggerGeoPointId!.hashCode) +
(triggerGeoPoint == null ? 0 : triggerGeoPoint!.hashCode) +
(isHiddenInitially == null ? 0 : isHiddenInitially!.hashCode) +
(quizQuestions == null ? 0 : quizQuestions!.hashCode) +
(isStepTimer == null ? 0 : isStepTimer!.hashCode) +
@ -135,7 +136,7 @@ class GuidedStep {
@override
String toString() =>
'GuidedStep[guidedPathId=$guidedPathId, title=$title, id=$id, guidedPath=$guidedPath, order=$order, description=$description, geometry=$geometry, zoneRadiusMeters=$zoneRadiusMeters, imageUrl=$imageUrl, triggerGeoPointId=$triggerGeoPointId, triggerGeoPoint=$triggerGeoPoint, isHiddenInitially=$isHiddenInitially, quizQuestions=$quizQuestions, isStepTimer=$isStepTimer, isStepLocked=$isStepLocked, timerSeconds=$timerSeconds, timerExpiredMessage=$timerExpiredMessage]';
'GuidedStep[guidedPathId=$guidedPathId, title=$title, id=$id, guidedPath=$guidedPath, order=$order, description=$description, geometry=$geometry, isGeoTriggered=$isGeoTriggered, zoneRadiusMeters=$zoneRadiusMeters, imageUrl=$imageUrl, isHiddenInitially=$isHiddenInitially, quizQuestions=$quizQuestions, isStepTimer=$isStepTimer, isStepLocked=$isStepLocked, timerSeconds=$timerSeconds, timerExpiredMessage=$timerExpiredMessage]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@ -166,6 +167,11 @@ class GuidedStep {
} else {
json[r'geometry'] = null;
}
if (this.isGeoTriggered != null) {
json[r'isGeoTriggered'] = this.isGeoTriggered;
} else {
json[r'isGeoTriggered'] = null;
}
if (this.zoneRadiusMeters != null) {
json[r'zoneRadiusMeters'] = this.zoneRadiusMeters;
} else {
@ -176,16 +182,6 @@ class GuidedStep {
} else {
json[r'imageUrl'] = null;
}
if (this.triggerGeoPointId != null) {
json[r'triggerGeoPointId'] = this.triggerGeoPointId;
} else {
json[r'triggerGeoPointId'] = null;
}
if (this.triggerGeoPoint != null) {
json[r'triggerGeoPoint'] = this.triggerGeoPoint;
} else {
json[r'triggerGeoPoint'] = null;
}
if (this.isHiddenInitially != null) {
json[r'isHiddenInitially'] = this.isHiddenInitially;
} else {
@ -247,11 +243,9 @@ class GuidedStep {
order: mapValueOfType<int>(json, r'order'),
description: TranslationDTO.listFromJson(json[r'description']),
geometry: PointAllOfBoundary.fromJson(json[r'geometry']),
isGeoTriggered: mapValueOfType<bool>(json, r'isGeoTriggered'),
zoneRadiusMeters: mapValueOfType<double>(json, r'zoneRadiusMeters'),
imageUrl: mapValueOfType<String>(json, r'imageUrl'),
triggerGeoPointId: mapValueOfType<int>(json, r'triggerGeoPointId'),
triggerGeoPoint:
GuidedStepTriggerGeoPoint.fromJson(json[r'triggerGeoPoint']),
isHiddenInitially: mapValueOfType<bool>(json, r'isHiddenInitially'),
quizQuestions: QuizQuestion.listFromJson(json[r'quizQuestions']),
isStepTimer: mapValueOfType<bool>(json, r'isStepTimer'),

View File

@ -19,15 +19,17 @@ class GuidedStepDTO {
this.title = const [],
this.description = const [],
this.geometry,
this.isGeoTriggered,
this.zoneRadiusMeters,
this.imageUrl,
this.triggerGeoPointId,
this.triggerGeoPoint,
this.isHiddenInitially,
this.isStepTimer,
this.isStepLocked,
this.timerSeconds,
this.timerExpiredMessage = const [],
this.audioIds = const [],
this.contents = const [],
this.factContent = const [],
this.quizQuestions = const [],
});
@ -49,14 +51,18 @@ class GuidedStepDTO {
GeometryDTO? geometry;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
bool? isGeoTriggered;
double? zoneRadiusMeters;
String? imageUrl;
int? triggerGeoPointId;
GuidedStepDTOTriggerGeoPoint? triggerGeoPoint;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@ -85,6 +91,12 @@ class GuidedStepDTO {
List<TranslationDTO>? timerExpiredMessage;
List<TranslationDTO>? audioIds;
List<ContentDTO>? contents;
List<TranslationDTO>? factContent;
List<QuizQuestion>? quizQuestions;
@override
@ -97,16 +109,18 @@ class GuidedStepDTO {
_deepEquality.equals(other.title, title) &&
_deepEquality.equals(other.description, description) &&
other.geometry == geometry &&
other.isGeoTriggered == isGeoTriggered &&
other.zoneRadiusMeters == zoneRadiusMeters &&
other.imageUrl == imageUrl &&
other.triggerGeoPointId == triggerGeoPointId &&
other.triggerGeoPoint == triggerGeoPoint &&
other.isHiddenInitially == isHiddenInitially &&
other.isStepTimer == isStepTimer &&
other.isStepLocked == isStepLocked &&
other.timerSeconds == timerSeconds &&
_deepEquality.equals(
other.timerExpiredMessage, timerExpiredMessage) &&
_deepEquality.equals(other.audioIds, audioIds) &&
_deepEquality.equals(other.contents, contents) &&
_deepEquality.equals(other.factContent, factContent) &&
_deepEquality.equals(other.quizQuestions, quizQuestions);
@override
@ -118,20 +132,22 @@ class GuidedStepDTO {
(title == null ? 0 : title!.hashCode) +
(description == null ? 0 : description!.hashCode) +
(geometry == null ? 0 : geometry!.hashCode) +
(isGeoTriggered == null ? 0 : isGeoTriggered!.hashCode) +
(zoneRadiusMeters == null ? 0 : zoneRadiusMeters!.hashCode) +
(imageUrl == null ? 0 : imageUrl!.hashCode) +
(triggerGeoPointId == null ? 0 : triggerGeoPointId!.hashCode) +
(triggerGeoPoint == null ? 0 : triggerGeoPoint!.hashCode) +
(isHiddenInitially == null ? 0 : isHiddenInitially!.hashCode) +
(isStepTimer == null ? 0 : isStepTimer!.hashCode) +
(isStepLocked == null ? 0 : isStepLocked!.hashCode) +
(timerSeconds == null ? 0 : timerSeconds!.hashCode) +
(timerExpiredMessage == null ? 0 : timerExpiredMessage!.hashCode) +
(audioIds == null ? 0 : audioIds!.hashCode) +
(contents == null ? 0 : contents!.hashCode) +
(factContent == null ? 0 : factContent!.hashCode) +
(quizQuestions == null ? 0 : quizQuestions!.hashCode);
@override
String toString() =>
'GuidedStepDTO[id=$id, guidedPathId=$guidedPathId, order=$order, title=$title, description=$description, geometry=$geometry, zoneRadiusMeters=$zoneRadiusMeters, imageUrl=$imageUrl, triggerGeoPointId=$triggerGeoPointId, triggerGeoPoint=$triggerGeoPoint, isHiddenInitially=$isHiddenInitially, isStepTimer=$isStepTimer, isStepLocked=$isStepLocked, timerSeconds=$timerSeconds, timerExpiredMessage=$timerExpiredMessage, quizQuestions=$quizQuestions]';
'GuidedStepDTO[id=$id, guidedPathId=$guidedPathId, order=$order, title=$title, description=$description, geometry=$geometry, isGeoTriggered=$isGeoTriggered, zoneRadiusMeters=$zoneRadiusMeters, imageUrl=$imageUrl, isHiddenInitially=$isHiddenInitially, isStepTimer=$isStepTimer, isStepLocked=$isStepLocked, timerSeconds=$timerSeconds, timerExpiredMessage=$timerExpiredMessage, audioIds=$audioIds, contents=$contents, factContent=$factContent, quizQuestions=$quizQuestions]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@ -165,6 +181,11 @@ class GuidedStepDTO {
} else {
json[r'geometry'] = null;
}
if (this.isGeoTriggered != null) {
json[r'isGeoTriggered'] = this.isGeoTriggered;
} else {
json[r'isGeoTriggered'] = null;
}
if (this.zoneRadiusMeters != null) {
json[r'zoneRadiusMeters'] = this.zoneRadiusMeters;
} else {
@ -175,16 +196,6 @@ class GuidedStepDTO {
} else {
json[r'imageUrl'] = null;
}
if (this.triggerGeoPointId != null) {
json[r'triggerGeoPointId'] = this.triggerGeoPointId;
} else {
json[r'triggerGeoPointId'] = null;
}
if (this.triggerGeoPoint != null) {
json[r'triggerGeoPoint'] = this.triggerGeoPoint;
} else {
json[r'triggerGeoPoint'] = null;
}
if (this.isHiddenInitially != null) {
json[r'isHiddenInitially'] = this.isHiddenInitially;
} else {
@ -211,6 +222,21 @@ class GuidedStepDTO {
} else {
json[r'timerExpiredMessage'] = null;
}
if (this.audioIds != null) {
json[r'audioIds'] = this.audioIds!.map((v) => v.toJson()).toList();
} else {
json[r'audioIds'] = null;
}
if (this.contents != null) {
json[r'contents'] = this.contents!.map((v) => v.toJson()).toList();
} else {
json[r'contents'] = null;
}
if (this.factContent != null) {
json[r'factContent'] = this.factContent!.map((v) => v.toJson()).toList();
} else {
json[r'factContent'] = null;
}
if (this.quizQuestions != null) {
json[r'quizQuestions'] =
this.quizQuestions!.map((v) => v.toJson()).toList();
@ -247,17 +273,18 @@ class GuidedStepDTO {
title: TranslationDTO.listFromJson(json[r'title']),
description: TranslationDTO.listFromJson(json[r'description']),
geometry: GeometryDTO.fromJson(json[r'geometry']),
isGeoTriggered: mapValueOfType<bool>(json, r'isGeoTriggered'),
zoneRadiusMeters: mapValueOfType<double>(json, r'zoneRadiusMeters'),
imageUrl: mapValueOfType<String>(json, r'imageUrl'),
triggerGeoPointId: mapValueOfType<int>(json, r'triggerGeoPointId'),
triggerGeoPoint:
GuidedStepDTOTriggerGeoPoint.fromJson(json[r'triggerGeoPoint']),
isHiddenInitially: mapValueOfType<bool>(json, r'isHiddenInitially'),
isStepTimer: mapValueOfType<bool>(json, r'isStepTimer'),
isStepLocked: mapValueOfType<bool>(json, r'isStepLocked'),
timerSeconds: mapValueOfType<int>(json, r'timerSeconds'),
timerExpiredMessage:
TranslationDTO.listFromJson(json[r'timerExpiredMessage']),
audioIds: TranslationDTO.listFromJson(json[r'audioIds']),
contents: ContentDTO.listFromJson(json[r'contents']),
factContent: TranslationDTO.listFromJson(json[r'factContent']),
quizQuestions: QuizQuestion.listFromJson(json[r'quizQuestions']),
);
}

View File

@ -1,289 +0,0 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class GuidedStepDTOTriggerGeoPoint {
/// Returns a new [GuidedStepDTOTriggerGeoPoint] instance.
GuidedStepDTOTriggerGeoPoint({
this.id,
this.title = const [],
this.description = const [],
this.contents = const [],
this.categorieId,
this.imageResourceId,
this.imageUrl,
this.schedules = const [],
this.prices = const [],
this.phone = const [],
this.email = const [],
this.site = const [],
this.geometry,
this.polyColor,
this.sectionMapId,
this.sectionEventId,
});
int? id;
List<TranslationDTO>? title;
List<TranslationDTO>? description;
List<ContentDTO>? contents;
int? categorieId;
String? imageResourceId;
String? imageUrl;
List<TranslationDTO>? schedules;
List<TranslationDTO>? prices;
List<TranslationDTO>? phone;
List<TranslationDTO>? email;
List<TranslationDTO>? site;
EventAddressDTOGeometry? geometry;
String? polyColor;
String? sectionMapId;
String? sectionEventId;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is GuidedStepDTOTriggerGeoPoint &&
other.id == id &&
_deepEquality.equals(other.title, title) &&
_deepEquality.equals(other.description, description) &&
_deepEquality.equals(other.contents, contents) &&
other.categorieId == categorieId &&
other.imageResourceId == imageResourceId &&
other.imageUrl == imageUrl &&
_deepEquality.equals(other.schedules, schedules) &&
_deepEquality.equals(other.prices, prices) &&
_deepEquality.equals(other.phone, phone) &&
_deepEquality.equals(other.email, email) &&
_deepEquality.equals(other.site, site) &&
other.geometry == geometry &&
other.polyColor == polyColor &&
other.sectionMapId == sectionMapId &&
other.sectionEventId == sectionEventId;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(id == null ? 0 : id!.hashCode) +
(title == null ? 0 : title!.hashCode) +
(description == null ? 0 : description!.hashCode) +
(contents == null ? 0 : contents!.hashCode) +
(categorieId == null ? 0 : categorieId!.hashCode) +
(imageResourceId == null ? 0 : imageResourceId!.hashCode) +
(imageUrl == null ? 0 : imageUrl!.hashCode) +
(schedules == null ? 0 : schedules!.hashCode) +
(prices == null ? 0 : prices!.hashCode) +
(phone == null ? 0 : phone!.hashCode) +
(email == null ? 0 : email!.hashCode) +
(site == null ? 0 : site!.hashCode) +
(geometry == null ? 0 : geometry!.hashCode) +
(polyColor == null ? 0 : polyColor!.hashCode) +
(sectionMapId == null ? 0 : sectionMapId!.hashCode) +
(sectionEventId == null ? 0 : sectionEventId!.hashCode);
@override
String toString() =>
'GuidedStepDTOTriggerGeoPoint[id=$id, title=$title, description=$description, contents=$contents, categorieId=$categorieId, imageResourceId=$imageResourceId, imageUrl=$imageUrl, schedules=$schedules, prices=$prices, phone=$phone, email=$email, site=$site, geometry=$geometry, polyColor=$polyColor, sectionMapId=$sectionMapId, sectionEventId=$sectionEventId]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.id != null) {
json[r'id'] = this.id;
} else {
json[r'id'] = null;
}
if (this.title != null) {
json[r'title'] = this.title;
} else {
json[r'title'] = null;
}
if (this.description != null) {
json[r'description'] = this.description;
} else {
json[r'description'] = null;
}
if (this.contents != null) {
json[r'contents'] = this.contents;
} else {
json[r'contents'] = null;
}
if (this.categorieId != null) {
json[r'categorieId'] = this.categorieId;
} else {
json[r'categorieId'] = null;
}
if (this.imageResourceId != null) {
json[r'imageResourceId'] = this.imageResourceId;
} else {
json[r'imageResourceId'] = null;
}
if (this.imageUrl != null) {
json[r'imageUrl'] = this.imageUrl;
} else {
json[r'imageUrl'] = null;
}
if (this.schedules != null) {
json[r'schedules'] = this.schedules;
} else {
json[r'schedules'] = null;
}
if (this.prices != null) {
json[r'prices'] = this.prices;
} else {
json[r'prices'] = null;
}
if (this.phone != null) {
json[r'phone'] = this.phone;
} else {
json[r'phone'] = null;
}
if (this.email != null) {
json[r'email'] = this.email;
} else {
json[r'email'] = null;
}
if (this.site != null) {
json[r'site'] = this.site;
} else {
json[r'site'] = null;
}
if (this.geometry != null) {
json[r'geometry'] = this.geometry;
} else {
json[r'geometry'] = null;
}
if (this.polyColor != null) {
json[r'polyColor'] = this.polyColor;
} else {
json[r'polyColor'] = null;
}
if (this.sectionMapId != null) {
json[r'sectionMapId'] = this.sectionMapId;
} else {
json[r'sectionMapId'] = null;
}
if (this.sectionEventId != null) {
json[r'sectionEventId'] = this.sectionEventId;
} else {
json[r'sectionEventId'] = null;
}
return json;
}
/// Returns a new [GuidedStepDTOTriggerGeoPoint] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static GuidedStepDTOTriggerGeoPoint? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key),
'Required key "GuidedStepDTOTriggerGeoPoint[$key]" is missing from JSON.');
assert(json[key] != null,
'Required key "GuidedStepDTOTriggerGeoPoint[$key]" has a null value in JSON.');
});
return true;
}());
return GuidedStepDTOTriggerGeoPoint(
id: mapValueOfType<int>(json, r'id'),
title: TranslationDTO.listFromJson(json[r'title']),
description: TranslationDTO.listFromJson(json[r'description']),
contents: ContentDTO.listFromJson(json[r'contents']),
categorieId: mapValueOfType<int>(json, r'categorieId'),
imageResourceId: mapValueOfType<String>(json, r'imageResourceId'),
imageUrl: mapValueOfType<String>(json, r'imageUrl'),
schedules: TranslationDTO.listFromJson(json[r'schedules']),
prices: TranslationDTO.listFromJson(json[r'prices']),
phone: TranslationDTO.listFromJson(json[r'phone']),
email: TranslationDTO.listFromJson(json[r'email']),
site: TranslationDTO.listFromJson(json[r'site']),
geometry: EventAddressDTOGeometry.fromJson(json[r'geometry']),
polyColor: mapValueOfType<String>(json, r'polyColor'),
sectionMapId: mapValueOfType<String>(json, r'sectionMapId'),
sectionEventId: mapValueOfType<String>(json, r'sectionEventId'),
);
}
return null;
}
static List<GuidedStepDTOTriggerGeoPoint> listFromJson(
dynamic json, {
bool growable = false,
}) {
final result = <GuidedStepDTOTriggerGeoPoint>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = GuidedStepDTOTriggerGeoPoint.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, GuidedStepDTOTriggerGeoPoint> mapFromJson(dynamic json) {
final map = <String, GuidedStepDTOTriggerGeoPoint>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = GuidedStepDTOTriggerGeoPoint.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of GuidedStepDTOTriggerGeoPoint-objects as value to a dart map
static Map<String, List<GuidedStepDTOTriggerGeoPoint>> mapListFromJson(
dynamic json, {
bool growable = false,
}) {
final map = <String, List<GuidedStepDTOTriggerGeoPoint>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = GuidedStepDTOTriggerGeoPoint.listFromJson(
entry.value,
growable: growable,
);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{};
}

View File

@ -1,286 +0,0 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class GuidedStepTriggerGeoPoint {
/// Returns a new [GuidedStepTriggerGeoPoint] instance.
GuidedStepTriggerGeoPoint({
required this.id,
this.title = const [],
this.description = const [],
this.contents = const [],
this.schedules = const [],
this.prices = const [],
this.phone = const [],
this.email = const [],
this.site = const [],
this.categorieId,
this.geometry,
this.polyColor,
this.imageResourceId,
this.imageUrl,
this.sectionMapId,
this.sectionMap,
this.sectionEventId,
this.sectionEvent,
});
int id;
List<TranslationDTO> title;
List<TranslationDTO> description;
List<ContentDTO> contents;
List<TranslationDTO> schedules;
List<TranslationDTO> prices;
List<TranslationDTO> phone;
List<TranslationDTO> email;
List<TranslationDTO> site;
int? categorieId;
PointAllOfBoundary? geometry;
String? polyColor;
String? imageResourceId;
String? imageUrl;
String? sectionMapId;
GuidedPathSectionMap? sectionMap;
String? sectionEventId;
ApplicationInstanceSectionEvent? sectionEvent;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is GuidedStepTriggerGeoPoint &&
other.id == id &&
_deepEquality.equals(other.title, title) &&
_deepEquality.equals(other.description, description) &&
_deepEquality.equals(other.contents, contents) &&
_deepEquality.equals(other.schedules, schedules) &&
_deepEquality.equals(other.prices, prices) &&
_deepEquality.equals(other.phone, phone) &&
_deepEquality.equals(other.email, email) &&
_deepEquality.equals(other.site, site) &&
other.categorieId == categorieId &&
other.geometry == geometry &&
other.polyColor == polyColor &&
other.imageResourceId == imageResourceId &&
other.imageUrl == imageUrl &&
other.sectionMapId == sectionMapId &&
other.sectionMap == sectionMap &&
other.sectionEventId == sectionEventId &&
other.sectionEvent == sectionEvent;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(id.hashCode) +
(title.hashCode) +
(description.hashCode) +
(contents.hashCode) +
(schedules.hashCode) +
(prices.hashCode) +
(phone.hashCode) +
(email.hashCode) +
(site.hashCode) +
(categorieId == null ? 0 : categorieId!.hashCode) +
(geometry == null ? 0 : geometry!.hashCode) +
(polyColor == null ? 0 : polyColor!.hashCode) +
(imageResourceId == null ? 0 : imageResourceId!.hashCode) +
(imageUrl == null ? 0 : imageUrl!.hashCode) +
(sectionMapId == null ? 0 : sectionMapId!.hashCode) +
(sectionMap == null ? 0 : sectionMap!.hashCode) +
(sectionEventId == null ? 0 : sectionEventId!.hashCode) +
(sectionEvent == null ? 0 : sectionEvent!.hashCode);
@override
String toString() =>
'GuidedStepTriggerGeoPoint[id=$id, title=$title, description=$description, contents=$contents, schedules=$schedules, prices=$prices, phone=$phone, email=$email, site=$site, categorieId=$categorieId, geometry=$geometry, polyColor=$polyColor, imageResourceId=$imageResourceId, imageUrl=$imageUrl, sectionMapId=$sectionMapId, sectionMap=$sectionMap, sectionEventId=$sectionEventId, sectionEvent=$sectionEvent]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'id'] = this.id;
json[r'title'] = this.title;
json[r'description'] = this.description;
json[r'contents'] = this.contents;
json[r'schedules'] = this.schedules;
json[r'prices'] = this.prices;
json[r'phone'] = this.phone;
json[r'email'] = this.email;
json[r'site'] = this.site;
if (this.categorieId != null) {
json[r'categorieId'] = this.categorieId;
} else {
json[r'categorieId'] = null;
}
if (this.geometry != null) {
json[r'geometry'] = this.geometry;
} else {
json[r'geometry'] = null;
}
if (this.polyColor != null) {
json[r'polyColor'] = this.polyColor;
} else {
json[r'polyColor'] = null;
}
if (this.imageResourceId != null) {
json[r'imageResourceId'] = this.imageResourceId;
} else {
json[r'imageResourceId'] = null;
}
if (this.imageUrl != null) {
json[r'imageUrl'] = this.imageUrl;
} else {
json[r'imageUrl'] = null;
}
if (this.sectionMapId != null) {
json[r'sectionMapId'] = this.sectionMapId;
} else {
json[r'sectionMapId'] = null;
}
if (this.sectionMap != null) {
json[r'sectionMap'] = this.sectionMap;
} else {
json[r'sectionMap'] = null;
}
if (this.sectionEventId != null) {
json[r'sectionEventId'] = this.sectionEventId;
} else {
json[r'sectionEventId'] = null;
}
if (this.sectionEvent != null) {
json[r'sectionEvent'] = this.sectionEvent;
} else {
json[r'sectionEvent'] = null;
}
return json;
}
/// Returns a new [GuidedStepTriggerGeoPoint] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static GuidedStepTriggerGeoPoint? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key),
'Required key "GuidedStepTriggerGeoPoint[$key]" is missing from JSON.');
assert(json[key] != null,
'Required key "GuidedStepTriggerGeoPoint[$key]" has a null value in JSON.');
});
return true;
}());
return GuidedStepTriggerGeoPoint(
id: mapValueOfType<int>(json, r'id')!,
title: TranslationDTO.listFromJson(json[r'title']),
description: TranslationDTO.listFromJson(json[r'description']),
contents: ContentDTO.listFromJson(json[r'contents']),
schedules: TranslationDTO.listFromJson(json[r'schedules']),
prices: TranslationDTO.listFromJson(json[r'prices']),
phone: TranslationDTO.listFromJson(json[r'phone']),
email: TranslationDTO.listFromJson(json[r'email']),
site: TranslationDTO.listFromJson(json[r'site']),
categorieId: mapValueOfType<int>(json, r'categorieId'),
geometry: PointAllOfBoundary.fromJson(json[r'geometry']),
polyColor: mapValueOfType<String>(json, r'polyColor'),
imageResourceId: mapValueOfType<String>(json, r'imageResourceId'),
imageUrl: mapValueOfType<String>(json, r'imageUrl'),
sectionMapId: mapValueOfType<String>(json, r'sectionMapId'),
sectionMap: GuidedPathSectionMap.fromJson(json[r'sectionMap']),
sectionEventId: mapValueOfType<String>(json, r'sectionEventId'),
sectionEvent:
ApplicationInstanceSectionEvent.fromJson(json[r'sectionEvent']),
);
}
return null;
}
static List<GuidedStepTriggerGeoPoint> listFromJson(
dynamic json, {
bool growable = false,
}) {
final result = <GuidedStepTriggerGeoPoint>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = GuidedStepTriggerGeoPoint.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, GuidedStepTriggerGeoPoint> mapFromJson(dynamic json) {
final map = <String, GuidedStepTriggerGeoPoint>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = GuidedStepTriggerGeoPoint.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of GuidedStepTriggerGeoPoint-objects as value to a dart map
static Map<String, List<GuidedStepTriggerGeoPoint>> mapListFromJson(
dynamic json, {
bool growable = false,
}) {
final map = <String, List<GuidedStepTriggerGeoPoint>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = GuidedStepTriggerGeoPoint.listFromJson(
entry.value,
growable: growable,
);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'id',
'title',
'description',
'contents',
'schedules',
'prices',
'phone',
'email',
'site',
};
}

View File

@ -44,7 +44,6 @@ class MapDTO {
this.centerLatitude,
this.centerLongitude,
this.isParcours,
this.guidedPaths = const [],
});
String? id;
@ -139,8 +138,6 @@ class MapDTO {
bool? isParcours;
List<GuidedPathDTO>? guidedPaths;
@override
bool operator ==(Object other) =>
identical(this, other) ||
@ -175,8 +172,7 @@ class MapDTO {
_deepEquality.equals(other.categories, categories) &&
other.centerLatitude == centerLatitude &&
other.centerLongitude == centerLongitude &&
other.isParcours == isParcours &&
_deepEquality.equals(other.guidedPaths, guidedPaths);
other.isParcours == isParcours;
@override
int get hashCode =>
@ -211,12 +207,11 @@ class MapDTO {
(categories == null ? 0 : categories!.hashCode) +
(centerLatitude == null ? 0 : centerLatitude!.hashCode) +
(centerLongitude == null ? 0 : centerLongitude!.hashCode) +
(isParcours == null ? 0 : isParcours!.hashCode) +
(guidedPaths == null ? 0 : guidedPaths!.hashCode);
(isParcours == null ? 0 : isParcours!.hashCode);
@override
String toString() =>
'MapDTO[id=$id, label=$label, title=$title, description=$description, isActive=$isActive, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId, zoom=$zoom, mapType=$mapType, mapTypeMapbox=$mapTypeMapbox, mapProvider=$mapProvider, points=$points, iconResourceId=$iconResourceId, iconSource=$iconSource, categories=$categories, centerLatitude=$centerLatitude, centerLongitude=$centerLongitude, isParcours=$isParcours, guidedPaths=$guidedPaths]';
'MapDTO[id=$id, label=$label, title=$title, description=$description, isActive=$isActive, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId, zoom=$zoom, mapType=$mapType, mapTypeMapbox=$mapTypeMapbox, mapProvider=$mapProvider, points=$points, iconResourceId=$iconResourceId, iconSource=$iconSource, categories=$categories, centerLatitude=$centerLatitude, centerLongitude=$centerLongitude, isParcours=$isParcours]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@ -375,11 +370,6 @@ class MapDTO {
} else {
json[r'isParcours'] = null;
}
if (this.guidedPaths != null) {
json[r'guidedPaths'] = this.guidedPaths!.map((v) => v.toJson()).toList();
} else {
json[r'guidedPaths'] = null;
}
return json;
}
@ -435,7 +425,6 @@ class MapDTO {
centerLatitude: mapValueOfType<String>(json, r'centerLatitude'),
centerLongitude: mapValueOfType<String>(json, r'centerLongitude'),
isParcours: mapValueOfType<bool>(json, r'isParcours'),
guidedPaths: GuidedPathDTO.listFromJson(json[r'guidedPaths']),
);
}
return null;

View File

@ -0,0 +1,351 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class ParcoursDTO {
/// Returns a new [ParcoursDTO] instance.
ParcoursDTO({
this.id,
this.label,
this.title = const [],
this.description = const [],
this.isActive,
this.imageId,
this.imageSource,
this.configurationId,
this.isSubSection,
this.parentId,
this.type,
this.dateCreation,
this.order,
this.instanceId,
this.latitude,
this.longitude,
this.meterZoneGPS,
this.isBeacon,
this.beaconId,
this.showMap,
this.baseSectionMapId,
this.guidedPaths = const [],
});
String? id;
String? label;
List<TranslationDTO>? title;
List<TranslationDTO>? description;
bool? isActive;
String? imageId;
String? imageSource;
String? configurationId;
bool? isSubSection;
String? parentId;
SectionType? type;
DateTime? dateCreation;
int? order;
String? instanceId;
String? latitude;
String? longitude;
int? meterZoneGPS;
bool? isBeacon;
int? beaconId;
bool? showMap;
String? baseSectionMapId;
List<GuidedPathDTO>? guidedPaths;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is ParcoursDTO &&
other.id == id &&
other.label == label &&
_deepEquality.equals(other.title, title) &&
_deepEquality.equals(other.description, description) &&
other.isActive == isActive &&
other.imageId == imageId &&
other.imageSource == imageSource &&
other.configurationId == configurationId &&
other.isSubSection == isSubSection &&
other.parentId == parentId &&
other.type == type &&
other.dateCreation == dateCreation &&
other.order == order &&
other.instanceId == instanceId &&
other.latitude == latitude &&
other.longitude == longitude &&
other.meterZoneGPS == meterZoneGPS &&
other.isBeacon == isBeacon &&
other.beaconId == beaconId &&
other.showMap == showMap &&
other.baseSectionMapId == baseSectionMapId &&
_deepEquality.equals(other.guidedPaths, guidedPaths);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(id == null ? 0 : id!.hashCode) +
(label == null ? 0 : label!.hashCode) +
(title == null ? 0 : title!.hashCode) +
(description == null ? 0 : description!.hashCode) +
(isActive == null ? 0 : isActive!.hashCode) +
(imageId == null ? 0 : imageId!.hashCode) +
(imageSource == null ? 0 : imageSource!.hashCode) +
(configurationId == null ? 0 : configurationId!.hashCode) +
(isSubSection == null ? 0 : isSubSection!.hashCode) +
(parentId == null ? 0 : parentId!.hashCode) +
(type == null ? 0 : type!.hashCode) +
(dateCreation == null ? 0 : dateCreation!.hashCode) +
(order == null ? 0 : order!.hashCode) +
(instanceId == null ? 0 : instanceId!.hashCode) +
(latitude == null ? 0 : latitude!.hashCode) +
(longitude == null ? 0 : longitude!.hashCode) +
(meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) +
(isBeacon == null ? 0 : isBeacon!.hashCode) +
(beaconId == null ? 0 : beaconId!.hashCode) +
(showMap == null ? 0 : showMap!.hashCode) +
(baseSectionMapId == null ? 0 : baseSectionMapId!.hashCode) +
(guidedPaths == null ? 0 : guidedPaths!.hashCode);
@override
String toString() =>
'ParcoursDTO[id=$id, label=$label, title=$title, description=$description, isActive=$isActive, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, showMap=$showMap, baseSectionMapId=$baseSectionMapId, guidedPaths=$guidedPaths]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.id != null) {
json[r'id'] = this.id;
} else {
json[r'id'] = null;
}
if (this.label != null) {
json[r'label'] = this.label;
} else {
json[r'label'] = null;
}
if (this.title != null) {
json[r'title'] = this.title!.map((v) => v.toJson()).toList();
} else {
json[r'title'] = null;
}
if (this.description != null) {
json[r'description'] = this.description!.map((v) => v.toJson()).toList();
} else {
json[r'description'] = null;
}
if (this.isActive != null) {
json[r'isActive'] = this.isActive;
} else {
json[r'isActive'] = null;
}
if (this.imageId != null) {
json[r'imageId'] = this.imageId;
} else {
json[r'imageId'] = null;
}
if (this.imageSource != null) {
json[r'imageSource'] = this.imageSource;
} else {
json[r'imageSource'] = null;
}
if (this.configurationId != null) {
json[r'configurationId'] = this.configurationId;
} else {
json[r'configurationId'] = null;
}
if (this.isSubSection != null) {
json[r'isSubSection'] = this.isSubSection;
} else {
json[r'isSubSection'] = null;
}
if (this.parentId != null) {
json[r'parentId'] = this.parentId;
} else {
json[r'parentId'] = null;
}
if (this.type != null) {
json[r'type'] = this.type;
} else {
json[r'type'] = null;
}
if (this.dateCreation != null) {
json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String();
} else {
json[r'dateCreation'] = null;
}
if (this.order != null) {
json[r'order'] = this.order;
} else {
json[r'order'] = null;
}
if (this.instanceId != null) {
json[r'instanceId'] = this.instanceId;
} else {
json[r'instanceId'] = null;
}
if (this.latitude != null) {
json[r'latitude'] = this.latitude;
} else {
json[r'latitude'] = null;
}
if (this.longitude != null) {
json[r'longitude'] = this.longitude;
} else {
json[r'longitude'] = null;
}
if (this.meterZoneGPS != null) {
json[r'meterZoneGPS'] = this.meterZoneGPS;
} else {
json[r'meterZoneGPS'] = null;
}
if (this.isBeacon != null) {
json[r'isBeacon'] = this.isBeacon;
} else {
json[r'isBeacon'] = null;
}
if (this.beaconId != null) {
json[r'beaconId'] = this.beaconId;
} else {
json[r'beaconId'] = null;
}
if (this.showMap != null) {
json[r'showMap'] = this.showMap;
} else {
json[r'showMap'] = null;
}
if (this.baseSectionMapId != null) {
json[r'baseSectionMapId'] = this.baseSectionMapId;
} else {
json[r'baseSectionMapId'] = null;
}
if (this.guidedPaths != null) {
json[r'guidedPaths'] = this.guidedPaths!.map((v) => v.toJson()).toList();
} else {
json[r'guidedPaths'] = null;
}
return json;
}
/// Returns a new [ParcoursDTO] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static ParcoursDTO? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key),
'Required key "ParcoursDTO[$key]" is missing from JSON.');
assert(json[key] != null,
'Required key "ParcoursDTO[$key]" has a null value in JSON.');
});
return true;
}());
return ParcoursDTO(
id: mapValueOfType<String>(json, r'id'),
label: mapValueOfType<String>(json, r'label'),
title: TranslationDTO.listFromJson(json[r'title']),
description: TranslationDTO.listFromJson(json[r'description']),
isActive: mapValueOfType<bool>(json, r'isActive'),
imageId: mapValueOfType<String>(json, r'imageId'),
imageSource: mapValueOfType<String>(json, r'imageSource'),
configurationId: mapValueOfType<String>(json, r'configurationId'),
isSubSection: mapValueOfType<bool>(json, r'isSubSection'),
parentId: mapValueOfType<String>(json, r'parentId'),
type: SectionType.fromJson(json[r'type']),
dateCreation: mapDateTime(json, r'dateCreation', r''),
order: mapValueOfType<int>(json, r'order'),
instanceId: mapValueOfType<String>(json, r'instanceId'),
latitude: mapValueOfType<String>(json, r'latitude'),
longitude: mapValueOfType<String>(json, r'longitude'),
meterZoneGPS: mapValueOfType<int>(json, r'meterZoneGPS'),
isBeacon: mapValueOfType<bool>(json, r'isBeacon'),
beaconId: mapValueOfType<int>(json, r'beaconId'),
showMap: mapValueOfType<bool>(json, r'showMap'),
baseSectionMapId: mapValueOfType<String>(json, r'baseSectionMapId'),
guidedPaths: GuidedPathDTO.listFromJson(json[r'guidedPaths']),
);
}
return null;
}
static List<ParcoursDTO> listFromJson(
dynamic json, {
bool growable = false,
}) {
final result = <ParcoursDTO>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = ParcoursDTO.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, ParcoursDTO> mapFromJson(dynamic json) {
final map = <String, ParcoursDTO>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = ParcoursDTO.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
static Map<String, List<ParcoursDTO>> mapListFromJson(
dynamic json, {
bool growable = false,
}) {
final map = <String, List<ParcoursDTO>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = ParcoursDTO.listFromJson(
entry.value,
growable: growable,
);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{};
}

View File

@ -20,10 +20,9 @@ class QuizQuestionGuidedStep {
this.order,
this.description = const [],
this.geometry,
this.isGeoTriggered,
this.zoneRadiusMeters,
this.imageUrl,
this.triggerGeoPointId,
this.triggerGeoPoint,
this.isHiddenInitially,
this.quizQuestions = const [],
this.isStepTimer,
@ -52,14 +51,18 @@ class QuizQuestionGuidedStep {
PointAllOfBoundary? geometry;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
bool? isGeoTriggered;
double? zoneRadiusMeters;
String? imageUrl;
int? triggerGeoPointId;
GuidedStepTriggerGeoPoint? triggerGeoPoint;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@ -101,10 +104,9 @@ class QuizQuestionGuidedStep {
other.order == order &&
_deepEquality.equals(other.description, description) &&
other.geometry == geometry &&
other.isGeoTriggered == isGeoTriggered &&
other.zoneRadiusMeters == zoneRadiusMeters &&
other.imageUrl == imageUrl &&
other.triggerGeoPointId == triggerGeoPointId &&
other.triggerGeoPoint == triggerGeoPoint &&
other.isHiddenInitially == isHiddenInitially &&
_deepEquality.equals(other.quizQuestions, quizQuestions) &&
other.isStepTimer == isStepTimer &&
@ -122,10 +124,9 @@ class QuizQuestionGuidedStep {
(order == null ? 0 : order!.hashCode) +
(description == null ? 0 : description!.hashCode) +
(geometry == null ? 0 : geometry!.hashCode) +
(isGeoTriggered == null ? 0 : isGeoTriggered!.hashCode) +
(zoneRadiusMeters == null ? 0 : zoneRadiusMeters!.hashCode) +
(imageUrl == null ? 0 : imageUrl!.hashCode) +
(triggerGeoPointId == null ? 0 : triggerGeoPointId!.hashCode) +
(triggerGeoPoint == null ? 0 : triggerGeoPoint!.hashCode) +
(isHiddenInitially == null ? 0 : isHiddenInitially!.hashCode) +
(quizQuestions == null ? 0 : quizQuestions!.hashCode) +
(isStepTimer == null ? 0 : isStepTimer!.hashCode) +
@ -135,7 +136,7 @@ class QuizQuestionGuidedStep {
@override
String toString() =>
'QuizQuestionGuidedStep[guidedPathId=$guidedPathId, title=$title, id=$id, guidedPath=$guidedPath, order=$order, description=$description, geometry=$geometry, zoneRadiusMeters=$zoneRadiusMeters, imageUrl=$imageUrl, triggerGeoPointId=$triggerGeoPointId, triggerGeoPoint=$triggerGeoPoint, isHiddenInitially=$isHiddenInitially, quizQuestions=$quizQuestions, isStepTimer=$isStepTimer, isStepLocked=$isStepLocked, timerSeconds=$timerSeconds, timerExpiredMessage=$timerExpiredMessage]';
'QuizQuestionGuidedStep[guidedPathId=$guidedPathId, title=$title, id=$id, guidedPath=$guidedPath, order=$order, description=$description, geometry=$geometry, isGeoTriggered=$isGeoTriggered, zoneRadiusMeters=$zoneRadiusMeters, imageUrl=$imageUrl, isHiddenInitially=$isHiddenInitially, quizQuestions=$quizQuestions, isStepTimer=$isStepTimer, isStepLocked=$isStepLocked, timerSeconds=$timerSeconds, timerExpiredMessage=$timerExpiredMessage]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@ -166,6 +167,11 @@ class QuizQuestionGuidedStep {
} else {
json[r'geometry'] = null;
}
if (this.isGeoTriggered != null) {
json[r'isGeoTriggered'] = this.isGeoTriggered;
} else {
json[r'isGeoTriggered'] = null;
}
if (this.zoneRadiusMeters != null) {
json[r'zoneRadiusMeters'] = this.zoneRadiusMeters;
} else {
@ -176,16 +182,6 @@ class QuizQuestionGuidedStep {
} else {
json[r'imageUrl'] = null;
}
if (this.triggerGeoPointId != null) {
json[r'triggerGeoPointId'] = this.triggerGeoPointId;
} else {
json[r'triggerGeoPointId'] = null;
}
if (this.triggerGeoPoint != null) {
json[r'triggerGeoPoint'] = this.triggerGeoPoint;
} else {
json[r'triggerGeoPoint'] = null;
}
if (this.isHiddenInitially != null) {
json[r'isHiddenInitially'] = this.isHiddenInitially;
} else {
@ -247,11 +243,9 @@ class QuizQuestionGuidedStep {
order: mapValueOfType<int>(json, r'order'),
description: TranslationDTO.listFromJson(json[r'description']),
geometry: PointAllOfBoundary.fromJson(json[r'geometry']),
isGeoTriggered: mapValueOfType<bool>(json, r'isGeoTriggered'),
zoneRadiusMeters: mapValueOfType<double>(json, r'zoneRadiusMeters'),
imageUrl: mapValueOfType<String>(json, r'imageUrl'),
triggerGeoPointId: mapValueOfType<int>(json, r'triggerGeoPointId'),
triggerGeoPoint:
GuidedStepTriggerGeoPoint.fromJson(json[r'triggerGeoPoint']),
isHiddenInitially: mapValueOfType<bool>(json, r'isHiddenInitially'),
quizQuestions: QuizQuestion.listFromJson(json[r'quizQuestions']),
isStepTimer: mapValueOfType<bool>(json, r'isStepTimer'),

View File

@ -35,6 +35,7 @@ class SectionType {
static const Agenda = SectionType._(9);
static const Weather = SectionType._(10);
static const Event = SectionType._(11);
static const Parcours = SectionType._(12);
/// List of all possible values in this [enum][SectionType].
static const values = <SectionType>[
@ -49,7 +50,8 @@ class SectionType {
Game,
Agenda,
Weather,
Event
Event,
Parcours,
];
static SectionType? fromJson(dynamic value) => SectionTypeTypeTransformer().decode(value);
@ -101,6 +103,7 @@ class SectionTypeTypeTransformer {
case r'Agenda': return SectionType.Agenda;
case r'Weather': return SectionType.Weather;
case r'Event': return SectionType.Event;
case r'Parcours': return SectionType.Parcours;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
@ -121,6 +124,7 @@ class SectionTypeTypeTransformer {
case 9: return SectionType.Agenda;
case 10: return SectionType.Weather;
case 11: return SectionType.Event;
case 12: return SectionType.Parcours;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');

View File

@ -56,16 +56,6 @@ void main() {
// TODO
});
// int triggerGeoPointId
test('to test the property `triggerGeoPointId`', () async {
// TODO
});
// GuidedStepDTOTriggerGeoPoint triggerGeoPoint
test('to test the property `triggerGeoPoint`', () async {
// TODO
});
// bool isHiddenInitially
test('to test the property `isHiddenInitially`', () async {
// TODO

View File

@ -1,99 +0,0 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
import 'package:manager_api_new/api.dart';
import 'package:test/test.dart';
// tests for GuidedStepDTOTriggerGeoPoint
void main() {
// final instance = GuidedStepDTOTriggerGeoPoint();
group('test GuidedStepDTOTriggerGeoPoint', () {
// int id
test('to test the property `id`', () async {
// TODO
});
// List<TranslationDTO> title (default value: const [])
test('to test the property `title`', () async {
// TODO
});
// List<TranslationDTO> description (default value: const [])
test('to test the property `description`', () async {
// TODO
});
// List<ContentDTO> contents (default value: const [])
test('to test the property `contents`', () async {
// TODO
});
// int categorieId
test('to test the property `categorieId`', () async {
// TODO
});
// String imageResourceId
test('to test the property `imageResourceId`', () async {
// TODO
});
// String imageUrl
test('to test the property `imageUrl`', () async {
// TODO
});
// List<TranslationDTO> schedules (default value: const [])
test('to test the property `schedules`', () async {
// TODO
});
// List<TranslationDTO> prices (default value: const [])
test('to test the property `prices`', () async {
// TODO
});
// List<TranslationDTO> phone (default value: const [])
test('to test the property `phone`', () async {
// TODO
});
// List<TranslationDTO> email (default value: const [])
test('to test the property `email`', () async {
// TODO
});
// List<TranslationDTO> site (default value: const [])
test('to test the property `site`', () async {
// TODO
});
// EventAddressDTOGeometry geometry
test('to test the property `geometry`', () async {
// TODO
});
// String polyColor
test('to test the property `polyColor`', () async {
// TODO
});
// String sectionMapId
test('to test the property `sectionMapId`', () async {
// TODO
});
// String sectionEventId
test('to test the property `sectionEventId`', () async {
// TODO
});
});
}

View File

@ -61,16 +61,6 @@ void main() {
// TODO
});
// int triggerGeoPointId
test('to test the property `triggerGeoPointId`', () async {
// TODO
});
// GuidedStepTriggerGeoPoint triggerGeoPoint
test('to test the property `triggerGeoPoint`', () async {
// TODO
});
// bool isHiddenInitially
test('to test the property `isHiddenInitially`', () async {
// TODO

View File

@ -1,109 +0,0 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
import 'package:manager_api_new/api.dart';
import 'package:test/test.dart';
// tests for GuidedStepTriggerGeoPoint
void main() {
// final instance = GuidedStepTriggerGeoPoint();
group('test GuidedStepTriggerGeoPoint', () {
// int id
test('to test the property `id`', () async {
// TODO
});
// List<TranslationDTO> title (default value: const [])
test('to test the property `title`', () async {
// TODO
});
// List<TranslationDTO> description (default value: const [])
test('to test the property `description`', () async {
// TODO
});
// List<ContentDTO> contents (default value: const [])
test('to test the property `contents`', () async {
// TODO
});
// List<TranslationDTO> schedules (default value: const [])
test('to test the property `schedules`', () async {
// TODO
});
// List<TranslationDTO> prices (default value: const [])
test('to test the property `prices`', () async {
// TODO
});
// List<TranslationDTO> phone (default value: const [])
test('to test the property `phone`', () async {
// TODO
});
// List<TranslationDTO> email (default value: const [])
test('to test the property `email`', () async {
// TODO
});
// List<TranslationDTO> site (default value: const [])
test('to test the property `site`', () async {
// TODO
});
// int categorieId
test('to test the property `categorieId`', () async {
// TODO
});
// PointAllOfBoundary geometry
test('to test the property `geometry`', () async {
// TODO
});
// String polyColor
test('to test the property `polyColor`', () async {
// TODO
});
// String imageResourceId
test('to test the property `imageResourceId`', () async {
// TODO
});
// String imageUrl
test('to test the property `imageUrl`', () async {
// TODO
});
// String sectionMapId
test('to test the property `sectionMapId`', () async {
// TODO
});
// GuidedPathSectionMap sectionMap
test('to test the property `sectionMap`', () async {
// TODO
});
// String sectionEventId
test('to test the property `sectionEventId`', () async {
// TODO
});
// ApplicationInstanceSectionEvent sectionEvent
test('to test the property `sectionEvent`', () async {
// TODO
});
});
}

View File

@ -61,16 +61,6 @@ void main() {
// TODO
});
// int triggerGeoPointId
test('to test the property `triggerGeoPointId`', () async {
// TODO
});
// GuidedStepTriggerGeoPoint triggerGeoPoint
test('to test the property `triggerGeoPoint`', () async {
// TODO
});
// bool isHiddenInitially
test('to test the property `isHiddenInitially`', () async {
// TODO

View File

@ -189,10 +189,10 @@ packages:
dependency: transitive
description:
name: characters
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b
url: "https://pub.dev"
source: hosted
version: "1.4.0"
version: "1.4.1"
charcode:
dependency: transitive
description:
@ -599,10 +599,10 @@ packages:
dependency: "direct main"
description:
name: flutter_quill
sha256: b96bb8525afdeaaea52f5d02f525e05cc34acd176467ab6d6f35d434cf14fde2
sha256: "3ee7125b2dd3f3bce3ebdaac722a72f0c8aff3db9aa19053a9d777db12d71c98"
url: "https://pub.dev"
source: hosted
version: "11.5.0"
version: "11.5.1"
flutter_quill_delta_from_html:
dependency: "direct main"
description:
@ -774,7 +774,7 @@ packages:
source: hosted
version: "2.3.1"
html:
dependency: transitive
dependency: "direct main"
description:
name: html
sha256: "6d1264f2dffa1b1101c25a91dff0dc2daee4c18e87cd8538729773c073dbf602"
@ -968,18 +968,18 @@ packages:
dependency: transitive
description:
name: matcher
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861
url: "https://pub.dev"
source: hosted
version: "0.12.17"
version: "0.12.19"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b"
url: "https://pub.dev"
source: hosted
version: "0.11.1"
version: "0.13.0"
material_segmented_control:
dependency: "direct main"
description:
@ -992,10 +992,10 @@ packages:
dependency: transitive
description:
name: meta
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
sha256: "1741988757a65eb6b36abe716829688cf01910bbf91c34354ff7ec1c3de2b349"
url: "https://pub.dev"
source: hosted
version: "1.16.0"
version: "1.18.0"
mgrs_dart:
dependency: transitive
description:
@ -1477,10 +1477,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00"
sha256: "949a932224383300f01be9221c39180316445ecb8e7547f70a41a35bf421fb9e"
url: "https://pub.dev"
source: hosted
version: "0.7.6"
version: "0.7.11"
timing:
dependency: transitive
description:
@ -1810,5 +1810,5 @@ packages:
source: hosted
version: "3.1.1"
sdks:
dart: ">=3.8.0 <4.0.0"
flutter: ">=3.32.0"
dart: ">=3.12.0 <4.0.0"
flutter: ">=3.44.0"

View File

@ -71,9 +71,10 @@ dependencies:
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.6
flutter_quill: ^11.5.0
flutter_quill: 11.5.1
vsc_quill_delta_to_html: ^1.0.5
flutter_quill_delta_from_html: ^1.5.3
html: ^0.15.6
responsive_framework: ^1.4.0
tab_container: ^2.0.0
flutter_widget_from_html: ^0.15.3