MISC
This commit is contained in:
parent
205f1ec933
commit
a54952e5f4
@ -15,6 +15,7 @@ String getSectionTypeName(SectionType? type) {
|
|||||||
case SectionType.Agenda: return 'Agenda';
|
case SectionType.Agenda: return 'Agenda';
|
||||||
case SectionType.Weather: return 'Météo';
|
case SectionType.Weather: return 'Météo';
|
||||||
case SectionType.Event: return 'Événement';
|
case SectionType.Event: return 'Événement';
|
||||||
|
case SectionType.Parcours: return 'Parcours';
|
||||||
default: return 'Section';
|
default: return 'Section';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -45,6 +46,8 @@ IconData getSectionIcon(elementType) {
|
|||||||
return Icons.sunny;
|
return Icons.sunny;
|
||||||
case SectionType.Event:
|
case SectionType.Event:
|
||||||
return Icons.event;
|
return Icons.event;
|
||||||
|
case SectionType.Parcours:
|
||||||
|
return Icons.route;
|
||||||
}
|
}
|
||||||
return Icons.question_mark;
|
return Icons.question_mark;
|
||||||
}
|
}
|
||||||
@ -66,7 +66,7 @@ class _GeolocInputContainerState extends State<GeolocInputContainer> {
|
|||||||
width: size.width *0.75,
|
width: size.width *0.75,
|
||||||
height: 350,
|
height: 350,
|
||||||
child: FlutterLocationPicker(
|
child: FlutterLocationPicker(
|
||||||
initZoom: 14,
|
initZoom: 14,
|
||||||
initPosition: localisation == null ? LatLong(50.429333, 4.891434) : LatLong(localisation!.latitude, localisation!.longitude),
|
initPosition: localisation == null ? LatLong(50.429333, 4.891434) : LatLong(localisation!.latitude, localisation!.longitude),
|
||||||
minZoomLevel: 0,
|
minZoomLevel: 0,
|
||||||
maxZoomLevel: 17,
|
maxZoomLevel: 17,
|
||||||
|
|||||||
@ -129,10 +129,10 @@ getTranslations(BuildContext context, AppContext appContext, String label, bool
|
|||||||
),
|
),
|
||||||
child: Center(child: AutoSizeText(language.toUpperCase()))
|
child: Center(child: AutoSizeText(language.toUpperCase()))
|
||||||
),*/
|
),*/
|
||||||
Padding(
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
padding: const EdgeInsets.only(left: 8.0),
|
padding: const EdgeInsets.only(left: 8.0),
|
||||||
child: Container(
|
child: Column(
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
@ -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!,
|
initialValue: newValues.where((element) => element.language == language).first.value == null ? null : newValues.where((element) => element.language == language).first.value!,
|
||||||
inResourceTypes: resourceTypes,
|
inResourceTypes: resourceTypes,
|
||||||
onChanged: (ResourceDTO resource) {
|
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(
|
)/*AudioInputContainer(
|
||||||
//label: "Audio :",
|
//label: "Audio :",
|
||||||
|
|||||||
@ -96,18 +96,40 @@ class _ResourceInputContainerState extends State<ResourceInputContainer> {
|
|||||||
width: widget.isSmall ? 60 : 120,
|
width: widget.isSmall ? 60 : 120,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: resourceIdToShow == null ? widget.color : Colors.transparent,
|
color: (resourceIdToShow == null || resourceIdToShow!.isEmpty) ? widget.color : Colors.transparent,
|
||||||
borderRadius: BorderRadius.circular(10),
|
borderRadius: BorderRadius.circular(10),
|
||||||
),
|
),
|
||||||
child: resourceIdToShow == null
|
child: (resourceIdToShow == null || resourceIdToShow!.isEmpty)
|
||||||
? Text(
|
? Padding(
|
||||||
"Choisir",
|
padding: const EdgeInsets.symmetric(horizontal: 4),
|
||||||
style: TextStyle(
|
child: FittedBox(
|
||||||
color: kWhite,
|
fit: BoxFit.scaleDown,
|
||||||
fontSize: widget.fontSize,
|
child: Text(
|
||||||
|
"Choisir",
|
||||||
|
style: TextStyle(
|
||||||
|
color: kWhite,
|
||||||
|
fontSize: widget.fontSize,
|
||||||
|
),
|
||||||
|
maxLines: 1,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
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?>(
|
: FutureBuilder<ResourceDTO?>(
|
||||||
future: (appContext.getContext() as ManagerAppContext)
|
future: (appContext.getContext() as ManagerAppContext)
|
||||||
.clientAPI!
|
.clientAPI!
|
||||||
@ -121,23 +143,70 @@ class _ResourceInputContainerState extends State<ResourceInputContainer> {
|
|||||||
child: CircularProgressIndicator(strokeWidth: 2),
|
child: CircularProgressIndicator(strokeWidth: 2),
|
||||||
);
|
);
|
||||||
} else if (snapshot.hasError || snapshot.data == null) {
|
} else if (snapshot.hasError || snapshot.data == null) {
|
||||||
return Text(
|
return Padding(
|
||||||
"Erreur",
|
padding: const EdgeInsets.symmetric(horizontal: 4),
|
||||||
style: TextStyle(
|
child: FittedBox(
|
||||||
color: kWhite,
|
fit: BoxFit.scaleDown,
|
||||||
fontSize: widget.fontSize,
|
child: Text(
|
||||||
|
"Erreur",
|
||||||
|
style: TextStyle(
|
||||||
|
color: kWhite,
|
||||||
|
fontSize: widget.fontSize,
|
||||||
|
),
|
||||||
|
maxLines: 1,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
maxLines: 1,
|
|
||||||
);
|
);
|
||||||
} else {
|
} 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(resource.url!),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
return Container(
|
return Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(10),
|
borderRadius: BorderRadius.circular(10),
|
||||||
image: DecorationImage(
|
gradient: const LinearGradient(
|
||||||
fit: widget.imageFit,
|
colors: [Color(0xFF2C3E50), Color(0xFF3498DB)],
|
||||||
image: NetworkImage(snapshot.data!.url!),
|
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,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -20,51 +20,49 @@ class TextFormInputContainer extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
Size size = MediaQuery.of(context).size;
|
return Row(
|
||||||
return Container(
|
children: [
|
||||||
child: Row(
|
Align(
|
||||||
children: [
|
alignment: AlignmentDirectional.centerStart,
|
||||||
Align(
|
child: Text(label, style: const TextStyle(fontSize: 20, fontWeight: FontWeight.w300)),
|
||||||
alignment: AlignmentDirectional.centerStart,
|
),
|
||||||
child: Text(label, style: TextStyle(fontSize: 20, fontWeight: FontWeight.w300))
|
Expanded(
|
||||||
),
|
child: Padding(
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.all(10.0),
|
padding: const EdgeInsets.all(10.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: color,
|
color: color,
|
||||||
borderRadius: BorderRadius.circular(5),
|
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(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(10.0),
|
padding: const EdgeInsets.all(10.0),
|
||||||
child: TextFormField (
|
child: TextFormField(
|
||||||
keyboardType: TextInputType.multiline,
|
keyboardType: TextInputType.multiline,
|
||||||
textInputAction: TextInputAction.newline,
|
textInputAction: TextInputAction.newline,
|
||||||
minLines: 1,
|
minLines: 1,
|
||||||
maxLines: maxLines,
|
maxLines: maxLines,
|
||||||
initialValue: initialValue,
|
initialValue: initialValue,
|
||||||
onChanged: onChanged,
|
onChanged: onChanged,
|
||||||
maxLength: isTitle ? 50 : 2000,
|
maxLength: isTitle ? 50 : 2000,
|
||||||
cursorColor: kPrimaryColor,
|
cursorColor: kPrimaryColor,
|
||||||
decoration: InputDecoration(
|
decoration: const InputDecoration(
|
||||||
enabledBorder: UnderlineInputBorder(
|
enabledBorder: UnderlineInputBorder(
|
||||||
borderSide: BorderSide(color: kPrimaryColor),
|
borderSide: BorderSide(color: kPrimaryColor),
|
||||||
),
|
),
|
||||||
focusedBorder: UnderlineInputBorder(
|
focusedBorder: UnderlineInputBorder(
|
||||||
borderSide: BorderSide(color: kSecond),
|
borderSide: BorderSide(color: kSecond),
|
||||||
),
|
),
|
||||||
border: UnderlineInputBorder(
|
border: UnderlineInputBorder(
|
||||||
borderSide: BorderSide(color: kPrimaryColor),
|
borderSide: BorderSide(color: kPrimaryColor),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_quill/flutter_quill.dart';
|
import 'package:flutter_quill/flutter_quill.dart';
|
||||||
import 'package:flutter_quill_delta_from_html/flutter_quill_delta_from_html.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_api_new/api.dart';
|
||||||
import 'package:manager_app/Components/resource_input_container.dart';
|
import 'package:manager_app/Components/resource_input_container.dart';
|
||||||
import 'package:manager_app/Components/rounded_button.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/Models/managerContext.dart' show ManagerAppContext;
|
||||||
import 'package:manager_app/Services/ai_translate_service.dart';
|
import 'package:manager_app/Services/ai_translate_service.dart';
|
||||||
import 'package:manager_app/app_context.dart';
|
import 'package:manager_app/app_context.dart';
|
||||||
@ -93,10 +93,7 @@ class _TranslationInputAndResourceContainerState
|
|||||||
}
|
}
|
||||||
|
|
||||||
String _controllerToHtml(QuillController controller) {
|
String _controllerToHtml(QuillController controller) {
|
||||||
final ops = controller.document.toDelta().toJson();
|
return quillOpsToHtml(controller.document.toDelta().toJson());
|
||||||
return QuillDeltaToHtmlConverter(
|
|
||||||
List<Map<String, dynamic>>.from(ops),
|
|
||||||
).convert();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _translateWithAI() async {
|
Future<void> _translateWithAI() async {
|
||||||
|
|||||||
@ -1,10 +1,12 @@
|
|||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_quill/flutter_quill.dart';
|
import 'package:flutter_quill/flutter_quill.dart';
|
||||||
import 'package:flutter_quill_delta_from_html/flutter_quill_delta_from_html.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_api_new/api.dart';
|
||||||
import 'package:manager_app/Components/resource_input_container.dart';
|
import 'package:manager_app/Components/resource_input_container.dart';
|
||||||
import 'package:manager_app/Components/rounded_button.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/Models/managerContext.dart' show ManagerAppContext;
|
||||||
import 'package:manager_app/Services/ai_translate_service.dart';
|
import 'package:manager_app/Services/ai_translate_service.dart';
|
||||||
import 'package:manager_app/constants.dart';
|
import 'package:manager_app/constants.dart';
|
||||||
@ -91,10 +93,7 @@ class _TranslationInputContainerState extends State<TranslationInputContainer> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String _controllerToHtml(QuillController controller) {
|
String _controllerToHtml(QuillController controller) {
|
||||||
final ops = controller.document.toDelta().toJson();
|
return quillOpsToHtml(controller.document.toDelta().toJson());
|
||||||
return QuillDeltaToHtmlConverter(
|
|
||||||
List<Map<String, dynamic>>.from(ops),
|
|
||||||
).convert();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _translateWithAI() async {
|
Future<void> _translateWithAI() async {
|
||||||
@ -158,20 +157,25 @@ class _TranslationInputContainerState extends State<TranslationInputContainer> {
|
|||||||
void _applyToAllLanguages() {
|
void _applyToAllLanguages() {
|
||||||
if (_controllers.isEmpty) return;
|
if (_controllers.isEmpty) return;
|
||||||
final firstLang = widget.newValues.first.language!;
|
final firstLang = widget.newValues.first.language!;
|
||||||
final html = _controllerToHtml(_controllers[firstLang]!);
|
final sourceOps = _controllers[firstLang]!.document.toDelta().toJson();
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
|
widget.newValues.firstWhere((e) => e.language == firstLang).value =
|
||||||
|
_controllerToHtml(_controllers[firstLang]!);
|
||||||
|
|
||||||
for (final translation in widget.newValues) {
|
for (final translation in widget.newValues) {
|
||||||
translation.value = html;
|
if (translation.language == firstLang) continue;
|
||||||
if (translation.language != firstLang) {
|
final opsCopy = List<Map<String, dynamic>>.from(
|
||||||
_controllers[translation.language!]?.dispose();
|
jsonDecode(jsonEncode(sourceOps)),
|
||||||
final controller = QuillController(
|
);
|
||||||
document: Document.fromJson(_htmlToDeltaJson(html)),
|
_controllers[translation.language!]?.dispose();
|
||||||
selection: const TextSelection.collapsed(offset: 0),
|
final controller = QuillController(
|
||||||
);
|
document: Document.fromJson(opsCopy),
|
||||||
_setupListener(translation.language!, controller);
|
selection: const TextSelection.collapsed(offset: 0),
|
||||||
_controllers[translation.language!] = controller;
|
);
|
||||||
}
|
_setupListener(translation.language!, controller);
|
||||||
|
_controllers[translation.language!] = controller;
|
||||||
|
translation.value = _controllerToHtml(controller);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
73
lib/Helpers/quill_html_converter.dart
Normal file
73
lib/Helpers/quill_html_converter.dart
Normal 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;
|
||||||
|
}
|
||||||
@ -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/number_input_container.dart';
|
||||||
import 'package:manager_app/Components/resource_input_container.dart';
|
import 'package:manager_app/Components/resource_input_container.dart';
|
||||||
import 'package:manager_api_new/api.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/constants.dart';
|
||||||
import 'package:manager_app/l10n/app_localizations.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.gameType = gameDTO.gameType ?? GameTypes.Puzzle;
|
||||||
gameDTO.messageDebut = gameDTO.messageDebut ?? [];
|
gameDTO.messageDebut = gameDTO.messageDebut ?? [];
|
||||||
gameDTO.messageFin = gameDTO.messageFin ?? [];
|
gameDTO.messageFin = gameDTO.messageFin ?? [];
|
||||||
gameDTO.guidedPaths = gameDTO.guidedPaths ?? [];
|
|
||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,11 +58,11 @@ class _GameConfigState extends State<GameConfig> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
int initialIndex = gameDTO.gameType?.value ?? 0;
|
int initialIndex = (gameDTO.gameType?.value ?? 0).clamp(0, 1);
|
||||||
|
|
||||||
return DefaultTabController(
|
return DefaultTabController(
|
||||||
key: ValueKey("${gameDTO.id}_$initialIndex"),
|
key: ValueKey("${gameDTO.id}_$initialIndex"),
|
||||||
length: 3,
|
length: 2,
|
||||||
initialIndex: initialIndex,
|
initialIndex: initialIndex,
|
||||||
child: Builder(builder: (context) {
|
child: Builder(builder: (context) {
|
||||||
final TabController controller = DefaultTabController.of(context);
|
final TabController controller = DefaultTabController.of(context);
|
||||||
@ -91,7 +89,6 @@ class _GameConfigState extends State<GameConfig> {
|
|||||||
tabs: [
|
tabs: [
|
||||||
Tab(icon: Icon(Icons.extension), text: "Puzzle"),
|
Tab(icon: Icon(Icons.extension), text: "Puzzle"),
|
||||||
Tab(icon: Icon(Icons.grid_on), text: "Puzzle Glissant"),
|
Tab(icon: Icon(Icons.grid_on), text: "Puzzle Glissant"),
|
||||||
Tab(icon: Icon(Icons.door_front_door), text: "Escape Game"),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
@ -100,18 +97,6 @@ class _GameConfigState extends State<GameConfig> {
|
|||||||
children: [
|
children: [
|
||||||
_buildPuzzleConfig(),
|
_buildPuzzleConfig(),
|
||||||
_buildPuzzleConfig(),
|
_buildPuzzleConfig(),
|
||||||
ParcoursConfig(
|
|
||||||
initialValue: gameDTO.guidedPaths ?? [],
|
|
||||||
parentId: gameDTO.id!,
|
|
||||||
isEvent: false,
|
|
||||||
isEscapeMode: true,
|
|
||||||
onChanged: (paths) {
|
|
||||||
setState(() {
|
|
||||||
gameDTO.guidedPaths = paths;
|
|
||||||
widget.onChanged(gameDTO);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -22,7 +22,6 @@ import 'package:manager_app/client.dart';
|
|||||||
import 'package:manager_app/constants.dart';
|
import 'package:manager_app/constants.dart';
|
||||||
import 'package:manager_app/l10n/app_localizations.dart';
|
import 'package:manager_app/l10n/app_localizations.dart';
|
||||||
import 'package:manager_api_new/api.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';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
@ -46,7 +45,6 @@ class MapConfig extends StatefulWidget {
|
|||||||
class _MapConfigState extends State<MapConfig> {
|
class _MapConfigState extends State<MapConfig> {
|
||||||
late MapDTO mapDTO;
|
late MapDTO mapDTO;
|
||||||
late List<GeoPointDTO> pointsToShow = [];
|
late List<GeoPointDTO> pointsToShow = [];
|
||||||
//List<String>? selectedCategories = [];
|
|
||||||
String mapType = "hybrid";
|
String mapType = "hybrid";
|
||||||
String mapTypeMapBox = "standard";
|
String mapTypeMapBox = "standard";
|
||||||
|
|
||||||
@ -56,10 +54,17 @@ class _MapConfigState extends State<MapConfig> {
|
|||||||
ValueNotifier([]);
|
ValueNotifier([]);
|
||||||
final ValueNotifier<String?> searchNotifier = 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
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
//mapDTO = MapDTO.fromJson(json.decode(widget.initialValue))!;
|
|
||||||
mapDTO = widget.initialValue;
|
mapDTO = widget.initialValue;
|
||||||
|
|
||||||
if (mapDTO.mapType != null) {
|
if (mapDTO.mapType != null) {
|
||||||
@ -107,6 +112,18 @@ class _MapConfigState extends State<MapConfig> {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
selectedCategoriesNotifier.value =
|
||||||
|
mapDTO.categories?.map((c) => c.id!).toList() ?? [];
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void didChangeDependencies() {
|
||||||
|
super.didChangeDependencies();
|
||||||
|
if (!_geoPointsInitialized) {
|
||||||
|
_geoPointsInitialized = true;
|
||||||
|
_geoPointsFuture = _loadGeoPoints();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -127,33 +144,17 @@ class _MapConfigState extends State<MapConfig> {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return DefaultTabController(
|
return Column(
|
||||||
length: 2,
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
_buildMapHeader(size, mapProviderIn),
|
_buildMapHeader(size, mapProviderIn),
|
||||||
TabBar(
|
SizedBox(
|
||||||
labelColor: kPrimaryColor,
|
height: 700,
|
||||||
unselectedLabelColor: Colors.grey,
|
child: SingleChildScrollView(
|
||||||
indicatorColor: kPrimaryColor,
|
child: Column(
|
||||||
tabs: [
|
|
||||||
Tab(icon: Icon(Icons.map), text: AppLocalizations.of(context)!.pointsOfInterestLabel),
|
|
||||||
Tab(icon: Icon(Icons.route), text: AppLocalizations.of(context)!.pathsLabel),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
height: 700,
|
|
||||||
child: TabBarView(
|
|
||||||
children: [
|
children: [
|
||||||
// Tab 1: Configuration & Points
|
|
||||||
SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
FutureBuilder(
|
FutureBuilder(
|
||||||
future: getGeoPoints(
|
future: _geoPointsFuture,
|
||||||
(appContext.getContext() as ManagerAppContext)
|
|
||||||
.clientAPI!),
|
|
||||||
builder: (context, AsyncSnapshot<dynamic> snapshot) {
|
builder: (context, AsyncSnapshot<dynamic> snapshot) {
|
||||||
if (snapshot.connectionState ==
|
if (snapshot.connectionState ==
|
||||||
ConnectionState.waiting) {
|
ConnectionState.waiting) {
|
||||||
@ -171,10 +172,6 @@ class _MapConfigState extends State<MapConfig> {
|
|||||||
.firstWhere((t) => t.language == 'FR')
|
.firstWhere((t) => t.language == 'FR')
|
||||||
.value!
|
.value!
|
||||||
.toLowerCase()));
|
.toLowerCase()));
|
||||||
selectedCategoriesNotifier.value = mapDTO
|
|
||||||
.categories!
|
|
||||||
.map((categorie) => categorie.id!)
|
|
||||||
.toList();
|
|
||||||
|
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
@ -348,6 +345,7 @@ class _MapConfigState extends State<MapConfig> {
|
|||||||
top: 0,
|
top: 0,
|
||||||
right: 150,
|
right: 150,
|
||||||
child: Container(
|
child: Container(
|
||||||
|
width: size.width * 0.2,
|
||||||
height: size.height * 0.1,
|
height: size.height * 0.1,
|
||||||
constraints:
|
constraints:
|
||||||
BoxConstraints(minHeight: 85),
|
BoxConstraints(minHeight: 85),
|
||||||
@ -384,8 +382,7 @@ class _MapConfigState extends State<MapConfig> {
|
|||||||
context,
|
context,
|
||||||
null);
|
null);
|
||||||
setState(() {
|
setState(() {
|
||||||
// refresh ui
|
_geoPointsFuture = _loadGeoPoints();
|
||||||
print("Refresh UI");
|
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
showNotification(
|
showNotification(
|
||||||
@ -435,25 +432,10 @@ 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);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -13,7 +13,7 @@ class ParcoursConfig extends StatefulWidget {
|
|||||||
final List<GuidedPathDTO> initialValue;
|
final List<GuidedPathDTO> initialValue;
|
||||||
final String parentId;
|
final String parentId;
|
||||||
final bool isEvent;
|
final bool isEvent;
|
||||||
final bool isEscapeMode;
|
final bool isParcours;
|
||||||
final ValueChanged<List<GuidedPathDTO>> onChanged;
|
final ValueChanged<List<GuidedPathDTO>> onChanged;
|
||||||
|
|
||||||
const ParcoursConfig({
|
const ParcoursConfig({
|
||||||
@ -21,7 +21,7 @@ class ParcoursConfig extends StatefulWidget {
|
|||||||
required this.initialValue,
|
required this.initialValue,
|
||||||
required this.parentId,
|
required this.parentId,
|
||||||
required this.isEvent,
|
required this.isEvent,
|
||||||
this.isEscapeMode = false,
|
this.isParcours = false,
|
||||||
required this.onChanged,
|
required this.onChanged,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
@ -42,13 +42,13 @@ class _ParcoursConfigState extends State<ParcoursConfig> {
|
|||||||
|
|
||||||
Future<void> _loadFromApi() async {
|
Future<void> _loadFromApi() async {
|
||||||
final appContext = Provider.of<AppContext>(context, listen: false);
|
final appContext = Provider.of<AppContext>(context, listen: false);
|
||||||
final api = (appContext.getContext() as ManagerAppContext)
|
final clientAPI = (appContext.getContext() as ManagerAppContext).clientAPI!;
|
||||||
.clientAPI!
|
|
||||||
.sectionMapApi!;
|
|
||||||
try {
|
try {
|
||||||
// Backend already includes steps + quiz questions via .Include()
|
final fetchedPaths = widget.isParcours
|
||||||
final fetchedPaths =
|
? await clientAPI.sectionParcoursApi!
|
||||||
await api.sectionMapGetAllGuidedPathFromSection(widget.parentId);
|
.sectionParcoursGetAllGuidedPathFromSection(widget.parentId)
|
||||||
|
: await clientAPI.sectionMapApi!
|
||||||
|
.sectionMapGetAllGuidedPathFromSection(widget.parentId);
|
||||||
if (fetchedPaths == null || !mounted) return;
|
if (fetchedPaths == null || !mounted) return;
|
||||||
|
|
||||||
fetchedPaths.sort((a, b) => (a.order ?? 0).compareTo(b.order ?? 0));
|
fetchedPaths.sort((a, b) => (a.order ?? 0).compareTo(b.order ?? 0));
|
||||||
@ -82,27 +82,26 @@ class _ParcoursConfigState extends State<ParcoursConfig> {
|
|||||||
null,
|
null,
|
||||||
widget.parentId,
|
widget.parentId,
|
||||||
widget.isEvent,
|
widget.isEvent,
|
||||||
widget.isEscapeMode,
|
|
||||||
(newPath) async {
|
(newPath) async {
|
||||||
try {
|
try {
|
||||||
newPath.order = paths.length;
|
newPath.order = paths.length;
|
||||||
newPath.instanceId =
|
newPath.instanceId =
|
||||||
(appContext.getContext() as ManagerAppContext)
|
(appContext.getContext() as ManagerAppContext)
|
||||||
.instanceId;
|
.instanceId;
|
||||||
if (widget.isEscapeMode) {
|
if (widget.isParcours) {
|
||||||
newPath.sectionGameId = widget.parentId;
|
newPath.sectionParcoursId = widget.parentId;
|
||||||
} else if (widget.isEvent) {
|
} else if (widget.isEvent) {
|
||||||
newPath.sectionEventId = widget.parentId;
|
newPath.sectionEventId = widget.parentId;
|
||||||
} else {
|
} else {
|
||||||
newPath.sectionMapId = widget.parentId;
|
newPath.sectionMapId = widget.parentId;
|
||||||
}
|
}
|
||||||
|
|
||||||
final createdPath =
|
final clientAPI = (appContext.getContext() as ManagerAppContext).clientAPI!;
|
||||||
await (appContext.getContext() as ManagerAppContext)
|
final createdPath = widget.isParcours
|
||||||
.clientAPI!
|
? await clientAPI.sectionParcoursApi!
|
||||||
.sectionMapApi!
|
.sectionParcoursCreateGuidedPath(widget.parentId, newPath)
|
||||||
.sectionMapCreateGuidedPath(
|
: await clientAPI.sectionMapApi!
|
||||||
widget.parentId, newPath);
|
.sectionMapCreateGuidedPath(widget.parentId, newPath);
|
||||||
|
|
||||||
if (createdPath != null) {
|
if (createdPath != null) {
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
@ -153,14 +152,12 @@ class _ParcoursConfigState extends State<ParcoursConfig> {
|
|||||||
|
|
||||||
final appContext =
|
final appContext =
|
||||||
Provider.of<AppContext>(context, listen: false);
|
Provider.of<AppContext>(context, listen: false);
|
||||||
final api = (appContext.getContext() as ManagerAppContext)
|
final clientAPI = (appContext.getContext() as ManagerAppContext).clientAPI!;
|
||||||
.clientAPI!
|
|
||||||
.sectionMapApi!;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Update all affected paths orders
|
await Future.wait(widget.isParcours
|
||||||
await Future.wait(
|
? paths.map((p) => clientAPI.sectionParcoursApi!.sectionParcoursUpdateGuidedPath(p))
|
||||||
paths.map((p) => api.sectionMapUpdateGuidedPath(p)));
|
: paths.map((p) => clientAPI.sectionMapApi!.sectionMapUpdateGuidedPath(p)));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
showNotification(
|
showNotification(
|
||||||
kError,
|
kError,
|
||||||
@ -204,16 +201,12 @@ class _ParcoursConfigState extends State<ParcoursConfig> {
|
|||||||
path,
|
path,
|
||||||
widget.parentId,
|
widget.parentId,
|
||||||
widget.isEvent,
|
widget.isEvent,
|
||||||
widget.isEscapeMode,
|
|
||||||
(updatedPath) async {
|
(updatedPath) async {
|
||||||
try {
|
try {
|
||||||
final api = (appContext.getContext()
|
final clientAPI = (appContext.getContext() as ManagerAppContext).clientAPI!;
|
||||||
as ManagerAppContext)
|
final result = widget.isParcours
|
||||||
.clientAPI!
|
? await clientAPI.sectionParcoursApi!.sectionParcoursUpdateGuidedPath(updatedPath)
|
||||||
.sectionMapApi!;
|
: await clientAPI.sectionMapApi!.sectionMapUpdateGuidedPath(updatedPath);
|
||||||
final result =
|
|
||||||
await api.sectionMapUpdateGuidedPath(
|
|
||||||
updatedPath);
|
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@ -249,11 +242,12 @@ class _ParcoursConfigState extends State<ParcoursConfig> {
|
|||||||
listen: false);
|
listen: false);
|
||||||
try {
|
try {
|
||||||
if (path.id != null) {
|
if (path.id != null) {
|
||||||
await (appContext.getContext()
|
final clientAPI = (appContext.getContext() as ManagerAppContext).clientAPI!;
|
||||||
as ManagerAppContext)
|
if (widget.isParcours) {
|
||||||
.clientAPI!
|
await clientAPI.sectionParcoursApi!.sectionParcoursDeleteGuidedPath(path.id!);
|
||||||
.sectionMapApi!
|
} else {
|
||||||
.sectionMapDeleteGuidedPath(path.id!);
|
await clientAPI.sectionMapApi!.sectionMapDeleteGuidedPath(path.id!);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|||||||
@ -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/rounded_button.dart';
|
||||||
import 'package:manager_app/Components/multi_string_input_container.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/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';
|
import 'showNewOrUpdateGuidedStep.dart';
|
||||||
|
|
||||||
void showNewOrUpdateGuidedPath(
|
void showNewOrUpdateGuidedPath(
|
||||||
@ -15,7 +18,6 @@ void showNewOrUpdateGuidedPath(
|
|||||||
GuidedPathDTO? path,
|
GuidedPathDTO? path,
|
||||||
String parentId,
|
String parentId,
|
||||||
bool isEvent,
|
bool isEvent,
|
||||||
bool isEscapeMode,
|
|
||||||
FutureOr<void> Function(GuidedPathDTO) onSave,
|
FutureOr<void> Function(GuidedPathDTO) onSave,
|
||||||
) {
|
) {
|
||||||
GuidedPathDTO workingPath = path != null
|
GuidedPathDTO workingPath = path != null
|
||||||
@ -28,6 +30,7 @@ void showNewOrUpdateGuidedPath(
|
|||||||
);
|
);
|
||||||
|
|
||||||
bool isSaving = false;
|
bool isSaving = false;
|
||||||
|
int stepsRevision = 0;
|
||||||
|
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
@ -69,6 +72,15 @@ void showNewOrUpdateGuidedPath(
|
|||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
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
|
// Titre + Description côte à côte
|
||||||
Row(
|
Row(
|
||||||
children: [
|
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),
|
Divider(height: 24),
|
||||||
// Étapes
|
// Étapes
|
||||||
Row(
|
Row(
|
||||||
@ -157,13 +253,16 @@ void showNewOrUpdateGuidedPath(
|
|||||||
context,
|
context,
|
||||||
null,
|
null,
|
||||||
workingPath.id ?? "temp",
|
workingPath.id ?? "temp",
|
||||||
isEscapeMode,
|
workingPath.isGameMode ?? false,
|
||||||
(newStep) async {
|
(newStep) async {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
newStep.order =
|
||||||
|
workingPath.steps?.length ?? 0;
|
||||||
workingPath.steps = [
|
workingPath.steps = [
|
||||||
...(workingPath.steps ?? []),
|
...(workingPath.steps ?? []),
|
||||||
newStep
|
newStep
|
||||||
];
|
];
|
||||||
|
stepsRevision++;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@ -182,12 +281,19 @@ void showNewOrUpdateGuidedPath(
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
ListView.builder(
|
ReorderableCustomList<GuidedStepDTO>(
|
||||||
|
key: ValueKey(stepsRevision),
|
||||||
|
items: workingPath.steps!,
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
onChanged: (updatedList) {
|
||||||
itemCount: workingPath.steps!.length,
|
setState(() {
|
||||||
itemBuilder: (context, index) {
|
for (var i = 0; i < updatedList.length; i++) {
|
||||||
final step = workingPath.steps![index];
|
updatedList[i].order = i;
|
||||||
|
}
|
||||||
|
workingPath.steps = List.from(updatedList);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
itemBuilder: (context, index, step) {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
leading:
|
leading:
|
||||||
CircleAvatar(child: Text("${index + 1}")),
|
CircleAvatar(child: Text("${index + 1}")),
|
||||||
@ -202,43 +308,43 @@ void showNewOrUpdateGuidedPath(
|
|||||||
"${AppLocalizations.of(context)!.stepFallback} $index"
|
"${AppLocalizations.of(context)!.stepFallback} $index"
|
||||||
: "${AppLocalizations.of(context)!.stepFallback} $index",
|
: "${AppLocalizations.of(context)!.stepFallback} $index",
|
||||||
),
|
),
|
||||||
subtitle: isEscapeMode
|
subtitle: workingPath.isGameMode ?? false
|
||||||
? Text(
|
? Text(
|
||||||
"${step.quizQuestions?.length ?? 0} question(s)")
|
"${step.quizQuestions?.length ?? 0} question(s)")
|
||||||
: null,
|
: null,
|
||||||
trailing: Row(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
IconButton(
|
|
||||||
icon: Icon(Icons.edit,
|
|
||||||
color: kPrimaryColor),
|
|
||||||
onPressed: () {
|
|
||||||
showNewOrUpdateGuidedStep(
|
|
||||||
context,
|
|
||||||
step,
|
|
||||||
workingPath.id ?? "temp",
|
|
||||||
isEscapeMode,
|
|
||||||
(updatedStep) async {
|
|
||||||
setState(() {
|
|
||||||
workingPath.steps![index] =
|
|
||||||
updatedStep;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
IconButton(
|
|
||||||
icon: Icon(Icons.delete, color: kError),
|
|
||||||
onPressed: () {
|
|
||||||
setState(() {
|
|
||||||
workingPath.steps!.removeAt(index);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
actions: [
|
||||||
|
(context, index, step) => IconButton(
|
||||||
|
icon: Icon(Icons.edit,
|
||||||
|
color: kPrimaryColor),
|
||||||
|
onPressed: () {
|
||||||
|
showNewOrUpdateGuidedStep(
|
||||||
|
context,
|
||||||
|
step,
|
||||||
|
workingPath.id ?? "temp",
|
||||||
|
workingPath.isGameMode ?? false,
|
||||||
|
(updatedStep) async {
|
||||||
|
setState(() {
|
||||||
|
updatedStep.order = step.order;
|
||||||
|
workingPath.steps![index] =
|
||||||
|
updatedStep;
|
||||||
|
stepsRevision++;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
(context, index, step) => IconButton(
|
||||||
|
icon: Icon(Icons.delete, color: kError),
|
||||||
|
onPressed: () {
|
||||||
|
setState(() {
|
||||||
|
workingPath.steps!.removeAt(index);
|
||||||
|
stepsRevision++;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@ -1,14 +1,20 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'package:flutter/material.dart';
|
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_api_new/api.dart';
|
||||||
import 'package:manager_app/Components/confirmation_dialog.dart';
|
import 'package:manager_app/Components/confirmation_dialog.dart';
|
||||||
import 'package:manager_app/Components/geometry_input_container.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/multi_string_input_container.dart';
|
||||||
import 'package:manager_app/Components/rounded_button.dart';
|
import 'package:manager_app/Components/rounded_button.dart';
|
||||||
import 'package:manager_app/Components/string_input_container.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/constants.dart';
|
||||||
import 'package:manager_app/l10n/app_localizations.dart';
|
import 'package:manager_app/l10n/app_localizations.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
import 'showNewOrUpdateQuizQuestion.dart';
|
import 'showNewOrUpdateQuizQuestion.dart';
|
||||||
|
|
||||||
void showNewOrUpdateGuidedStep(
|
void showNewOrUpdateGuidedStep(
|
||||||
@ -25,10 +31,16 @@ void showNewOrUpdateGuidedStep(
|
|||||||
title: [],
|
title: [],
|
||||||
description: [],
|
description: [],
|
||||||
quizQuestions: [],
|
quizQuestions: [],
|
||||||
|
audioIds: [],
|
||||||
|
contents: [],
|
||||||
order: 0,
|
order: 0,
|
||||||
);
|
);
|
||||||
|
workingStep.audioIds = List.from(workingStep.audioIds ?? []);
|
||||||
|
workingStep.contents = List.from(workingStep.contents ?? []);
|
||||||
|
workingStep.quizQuestions = List.from(workingStep.quizQuestions ?? []);
|
||||||
|
|
||||||
bool isSaving = false;
|
bool isSaving = false;
|
||||||
|
int questionsRevision = 0;
|
||||||
|
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
@ -41,6 +53,7 @@ void showNewOrUpdateGuidedStep(
|
|||||||
final double dialogWidth = screenWidth * 0.75;
|
final double dialogWidth = screenWidth * 0.75;
|
||||||
final double contentWidth = dialogWidth - 48;
|
final double contentWidth = dialogWidth - 48;
|
||||||
final double halfWidth = (contentWidth - 20) / 2;
|
final double halfWidth = (contentWidth - 20) / 2;
|
||||||
|
final appCtx = Provider.of<AppContext>(context, listen: false);
|
||||||
|
|
||||||
return Dialog(
|
return Dialog(
|
||||||
shape:
|
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),
|
Divider(height: 24),
|
||||||
// Comportement de l'étape
|
// Comportement de l'étape
|
||||||
Text("Comportement", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 15)),
|
Text("Comportement", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 15)),
|
||||||
@ -134,54 +168,75 @@ void showNewOrUpdateGuidedStep(
|
|||||||
activeThumbColor: kPrimaryColor,
|
activeThumbColor: kPrimaryColor,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
],
|
||||||
child: SwitchListTile(
|
),
|
||||||
dense: true,
|
Divider(height: 24),
|
||||||
title: Text("Timer"),
|
Text("Contenu riche", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 15)),
|
||||||
value: workingStep.isStepTimer ?? false,
|
SizedBox(height: 8),
|
||||||
onChanged: (val) => setState(() => workingStep.isStepTimer = val),
|
// Audio
|
||||||
activeThumbColor: kPrimaryColor,
|
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.isStepTimer == true) ...[
|
if (workingStep.contents!.isEmpty)
|
||||||
SizedBox(height: 8),
|
Padding(
|
||||||
Row(
|
padding: const EdgeInsets.only(bottom: 8),
|
||||||
children: [
|
child: Text(
|
||||||
SizedBox(
|
"Aucune image — cliquez + pour en ajouter",
|
||||||
width: halfWidth,
|
style: TextStyle(fontStyle: FontStyle.italic, color: Colors.grey[600], fontSize: 13),
|
||||||
child: StringInputContainer(
|
),
|
||||||
label: AppLocalizations.of(context)!.durationSecondsLabel,
|
)
|
||||||
initialValue: workingStep.timerSeconds?.toString() ?? "",
|
else
|
||||||
onChanged: (val) => setState(() =>
|
SizedBox(
|
||||||
workingStep.timerSeconds = int.tryParse(val)),
|
height: 250,
|
||||||
),
|
child: ReorderableListView(
|
||||||
),
|
scrollDirection: Axis.horizontal,
|
||||||
SizedBox(width: 20),
|
onReorderItem: (oldIndex, newIndex) {
|
||||||
SizedBox(
|
setState(() {
|
||||||
width: halfWidth,
|
final item = workingStep.contents!.removeAt(oldIndex);
|
||||||
child: MultiStringInputContainer(
|
workingStep.contents!.insert(newIndex, item);
|
||||||
label: "Message d'expiration :",
|
for (var i = 0; i < workingStep.contents!.length; i++) {
|
||||||
modalLabel: "Message d'expiration du timer",
|
workingStep.contents![i].order = i;
|
||||||
initialValue: workingStep.timerExpiredMessage ?? [],
|
}
|
||||||
onGetResult: (val) => setState(() =>
|
});
|
||||||
workingStep.timerExpiredMessage = val.isEmpty ? null : val),
|
},
|
||||||
maxLines: 2,
|
children: List.generate(workingStep.contents!.length, (i) => ListViewCardContent(
|
||||||
isTitle: false,
|
workingStep.contents!,
|
||||||
isHTML: false,
|
i,
|
||||||
),
|
Key('content_$i'),
|
||||||
),
|
appCtx,
|
||||||
],
|
(updated) => setState(() => workingStep.contents = List.from(updated)),
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
)),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
|
||||||
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
|
// Questions — uniquement en mode Escape Game
|
||||||
if (isEscapeMode) ...[
|
if (isEscapeMode) ...[
|
||||||
Divider(height: 24),
|
Divider(height: 24),
|
||||||
@ -203,11 +258,14 @@ void showNewOrUpdateGuidedStep(
|
|||||||
isEscapeMode,
|
isEscapeMode,
|
||||||
(newQuestion) {
|
(newQuestion) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
newQuestion.order =
|
||||||
|
workingStep.quizQuestions?.length ?? 0;
|
||||||
workingStep.quizQuestions = [
|
workingStep.quizQuestions = [
|
||||||
...(workingStep.quizQuestions ??
|
...(workingStep.quizQuestions ??
|
||||||
[]),
|
[]),
|
||||||
newQuestion
|
newQuestion
|
||||||
];
|
];
|
||||||
|
questionsRevision++;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@ -215,6 +273,48 @@ void showNewOrUpdateGuidedStep(
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
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(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
width: halfWidth,
|
||||||
|
child: StringInputContainer(
|
||||||
|
label: AppLocalizations.of(context)!.durationSecondsLabel,
|
||||||
|
initialValue: workingStep.timerSeconds?.toString() ?? "",
|
||||||
|
onChanged: (val) => setState(() =>
|
||||||
|
workingStep.timerSeconds = int.tryParse(val)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 20),
|
||||||
|
SizedBox(
|
||||||
|
width: halfWidth,
|
||||||
|
child: MultiStringInputContainer(
|
||||||
|
label: "Message d'expiration :",
|
||||||
|
modalLabel: "Message d'expiration du timer",
|
||||||
|
initialValue: workingStep.timerExpiredMessage ?? [],
|
||||||
|
onGetResult: (val) => setState(() =>
|
||||||
|
workingStep.timerExpiredMessage = val.isEmpty ? null : val),
|
||||||
|
maxLines: 2,
|
||||||
|
isTitle: false,
|
||||||
|
isHTML: true,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(height: 8),
|
||||||
|
],
|
||||||
if (workingStep.quizQuestions == null ||
|
if (workingStep.quizQuestions == null ||
|
||||||
workingStep.quizQuestions!.isEmpty)
|
workingStep.quizQuestions!.isEmpty)
|
||||||
Padding(
|
Padding(
|
||||||
@ -228,65 +328,77 @@ void showNewOrUpdateGuidedStep(
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
ListView.builder(
|
ReorderableCustomList<QuizQuestion>(
|
||||||
|
key: ValueKey(questionsRevision),
|
||||||
|
items: workingStep.quizQuestions!,
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
onChanged: (updatedList) {
|
||||||
itemCount: workingStep.quizQuestions!.length,
|
setState(() {
|
||||||
itemBuilder: (context, qIndex) {
|
for (var i = 0; i < updatedList.length; i++) {
|
||||||
final question =
|
updatedList[i].order = i;
|
||||||
workingStep.quizQuestions![qIndex];
|
}
|
||||||
|
workingStep.quizQuestions =
|
||||||
|
List.from(updatedList);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
itemBuilder: (context, qIndex, question) {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
dense: true,
|
dense: true,
|
||||||
title: Text(question.label.isNotEmpty
|
title: HtmlWidget(
|
||||||
? question.label
|
question.label.isNotEmpty
|
||||||
.firstWhere(
|
? question.label
|
||||||
(t) => t.language == 'FR',
|
.firstWhere(
|
||||||
orElse: () =>
|
(t) => t.language == 'FR',
|
||||||
question.label[0])
|
orElse: () =>
|
||||||
.value ??
|
question.label[0])
|
||||||
"Question $qIndex"
|
.value ??
|
||||||
: "Question $qIndex"),
|
"Question $qIndex"
|
||||||
|
: "Question $qIndex",
|
||||||
|
textStyle: TextStyle(fontSize: 14),
|
||||||
|
),
|
||||||
subtitle: Text(
|
subtitle: Text(
|
||||||
"Type: ${question.validationQuestionType?.value == 2 ? 'Puzzle' : question.validationQuestionType?.value == 1 ? 'QCM' : 'Texte'}"),
|
"Type: ${question.validationQuestionType?.value == 2 ? 'Puzzle' : question.validationQuestionType?.value == 1 ? 'QCM' : 'Texte'}"),
|
||||||
trailing: Row(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
IconButton(
|
|
||||||
icon: Icon(Icons.edit,
|
|
||||||
size: 18, color: kPrimaryColor),
|
|
||||||
onPressed: () {
|
|
||||||
showNewOrUpdateQuizQuestion(
|
|
||||||
context,
|
|
||||||
question,
|
|
||||||
workingStep.id ?? "temp",
|
|
||||||
isEscapeMode,
|
|
||||||
(updatedQuestion) {
|
|
||||||
setState(() {
|
|
||||||
workingStep.quizQuestions![
|
|
||||||
qIndex] = updatedQuestion;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
IconButton(
|
|
||||||
icon: Icon(Icons.delete,
|
|
||||||
size: 18, color: kError),
|
|
||||||
onPressed: () {
|
|
||||||
showConfirmationDialog(
|
|
||||||
"Supprimer cette question ?",
|
|
||||||
() {},
|
|
||||||
() => setState(() => workingStep
|
|
||||||
.quizQuestions!
|
|
||||||
.removeAt(qIndex)),
|
|
||||||
context,
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
actions: [
|
||||||
|
(context, qIndex, question) => IconButton(
|
||||||
|
icon: Icon(Icons.edit,
|
||||||
|
size: 18, color: kPrimaryColor),
|
||||||
|
onPressed: () {
|
||||||
|
showNewOrUpdateQuizQuestion(
|
||||||
|
context,
|
||||||
|
question,
|
||||||
|
workingStep.id ?? "temp",
|
||||||
|
isEscapeMode,
|
||||||
|
(updatedQuestion) {
|
||||||
|
setState(() {
|
||||||
|
updatedQuestion.order =
|
||||||
|
question.order;
|
||||||
|
workingStep.quizQuestions![
|
||||||
|
qIndex] = updatedQuestion;
|
||||||
|
questionsRevision++;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
(context, qIndex, question) => IconButton(
|
||||||
|
icon: Icon(Icons.delete,
|
||||||
|
size: 18, color: kError),
|
||||||
|
onPressed: () {
|
||||||
|
showConfirmationDialog(
|
||||||
|
"Supprimer cette question ?",
|
||||||
|
() {},
|
||||||
|
() => setState(() {
|
||||||
|
workingStep.quizQuestions!
|
||||||
|
.removeAt(qIndex);
|
||||||
|
questionsRevision++;
|
||||||
|
}),
|
||||||
|
context,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
@ -320,6 +432,15 @@ void showNewOrUpdateGuidedStep(
|
|||||||
workingStep.isHiddenInitially ??= false;
|
workingStep.isHiddenInitially ??= false;
|
||||||
workingStep.isStepTimer ??= false;
|
workingStep.isStepTimer ??= false;
|
||||||
workingStep.isStepLocked ??= 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 {
|
try {
|
||||||
await onSave(workingStep);
|
await onSave(workingStep);
|
||||||
if (context.mounted) Navigator.pop(context);
|
if (context.mounted) Navigator.pop(context);
|
||||||
|
|||||||
@ -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]),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -38,8 +38,11 @@ Future<ContentDTO?> showNewOrUpdateContentSlider(ContentDTO? inputContentDTO, Ap
|
|||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.all(Radius.circular(20.0))
|
borderRadius: BorderRadius.all(Radius.circular(20.0))
|
||||||
),
|
),
|
||||||
child: SizedBox(
|
child: ConstrainedBox(
|
||||||
width: 480,
|
constraints: BoxConstraints(
|
||||||
|
maxWidth: 480,
|
||||||
|
maxHeight: size.height * 0.85,
|
||||||
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(24, 20, 24, 24),
|
padding: const EdgeInsets.fromLTRB(24, 20, 24, 24),
|
||||||
child: Column(
|
child: Column(
|
||||||
|
|||||||
@ -40,6 +40,7 @@ import 'dart:html' as html;
|
|||||||
|
|
||||||
import 'SubSection/Weather/weather_config.dart';
|
import 'SubSection/Weather/weather_config.dart';
|
||||||
import 'SubSection/Event/event_config.dart';
|
import 'SubSection/Event/event_config.dart';
|
||||||
|
import 'SubSection/SectionParcours/section_parcours_config.dart';
|
||||||
|
|
||||||
class SectionDetailScreen extends StatefulWidget {
|
class SectionDetailScreen extends StatefulWidget {
|
||||||
final String id;
|
final String id;
|
||||||
@ -459,6 +460,11 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
|
|||||||
.sectionUpdate(sectionDetailDTO!);
|
.sectionUpdate(sectionDetailDTO!);
|
||||||
SectionDTO? section = SectionDTO.fromJson(sectionResult);
|
SectionDTO? section = SectionDTO.fromJson(sectionResult);
|
||||||
|
|
||||||
|
setState(() {
|
||||||
|
sectionDetailDTO = null;
|
||||||
|
_sectionFuture = Future.value(sectionResult);
|
||||||
|
});
|
||||||
|
|
||||||
ManagerAppContext managerAppContext = appContext.getContext();
|
ManagerAppContext managerAppContext = appContext.getContext();
|
||||||
managerAppContext.selectedSection = section;
|
managerAppContext.selectedSection = section;
|
||||||
appContext.setContext(managerAppContext);
|
appContext.setContext(managerAppContext);
|
||||||
@ -561,6 +567,13 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
|
|||||||
sectionDetailDTO = updatedEvent;
|
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:
|
case SectionType.Event:
|
||||||
sectionDetailDTO = SectionEventDTO.fromJson(rawSectionData)!;
|
sectionDetailDTO = SectionEventDTO.fromJson(rawSectionData)!;
|
||||||
break;
|
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).longitude = sectionDTO.longitude;
|
||||||
(sectionDetailDTO as SectionEventDTO).meterZoneGPS = sectionDTO.meterZoneGPS;
|
(sectionDetailDTO as SectionEventDTO).meterZoneGPS = sectionDTO.meterZoneGPS;
|
||||||
break;
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import 'package:manager_app/Components/common_loader.dart';
|
|||||||
import 'package:manager_app/Components/message_notification.dart';
|
import 'package:manager_app/Components/message_notification.dart';
|
||||||
import 'package:manager_app/l10n/app_localizations.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_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/Components/string_input_container.dart';
|
||||||
import 'package:manager_app/Helpers/FileHelper.dart';
|
import 'package:manager_app/Helpers/FileHelper.dart';
|
||||||
import 'package:manager_app/Models/managerContext.dart';
|
import 'package:manager_app/Models/managerContext.dart';
|
||||||
@ -191,6 +192,17 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
|
|||||||
onChanged: (value) => config.label = value,
|
onChanged: (value) => config.label = value,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 12),
|
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(
|
Wrap(
|
||||||
spacing: 24,
|
spacing: 24,
|
||||||
runSpacing: 12,
|
runSpacing: 12,
|
||||||
|
|||||||
@ -41,6 +41,9 @@ class Client {
|
|||||||
SectionEventApi? _sectionEventApi;
|
SectionEventApi? _sectionEventApi;
|
||||||
SectionEventApi? get sectionEventApi => _sectionEventApi;
|
SectionEventApi? get sectionEventApi => _sectionEventApi;
|
||||||
|
|
||||||
|
SectionParcoursApi? _sectionParcoursApi;
|
||||||
|
SectionParcoursApi? get sectionParcoursApi => _sectionParcoursApi;
|
||||||
|
|
||||||
StatsApi? _statsApi;
|
StatsApi? _statsApi;
|
||||||
StatsApi? get statsApi => _statsApi;
|
StatsApi? get statsApi => _statsApi;
|
||||||
|
|
||||||
@ -70,6 +73,7 @@ class Client {
|
|||||||
_sectionQuizApi = SectionQuizApi(_apiClient);
|
_sectionQuizApi = SectionQuizApi(_apiClient);
|
||||||
_sectionAgendaApi = SectionAgendaApi(_apiClient);
|
_sectionAgendaApi = SectionAgendaApi(_apiClient);
|
||||||
_sectionEventApi = SectionEventApi(_apiClient);
|
_sectionEventApi = SectionEventApi(_apiClient);
|
||||||
|
_sectionParcoursApi = SectionParcoursApi(_apiClient);
|
||||||
_statsApi = StatsApi(_apiClient);
|
_statsApi = StatsApi(_apiClient);
|
||||||
_apiKeyApi = ApiKeyApi(_apiClient);
|
_apiKeyApi = ApiKeyApi(_apiClient);
|
||||||
_notificationApi = NotificationApi(_apiClient);
|
_notificationApi = NotificationApi(_apiClient);
|
||||||
|
|||||||
@ -44,7 +44,7 @@ const kSectionLabelStyle = TextStyle(
|
|||||||
color: kTitleTextColor,
|
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> map_types = ["none", "normal", "satellite", "terrain", "hybrid"];
|
||||||
const List<String> languages = ["FR", "NL", "EN", "DE", "IT", "ES", "CN", "PL", "AR", "UK"];
|
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"];
|
const List<String> map_types_mapBox = ["standard", "streets", "outdoors", "light", "dark", "satellite", "satellite_streets"];
|
||||||
|
|||||||
@ -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)
|
|
||||||
|
|
||||||
|
|
||||||
@ -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)
|
|
||||||
|
|
||||||
|
|
||||||
@ -41,6 +41,7 @@ part 'api/section_api.dart';
|
|||||||
part 'api/section_agenda_api.dart';
|
part 'api/section_agenda_api.dart';
|
||||||
part 'api/section_event_api.dart';
|
part 'api/section_event_api.dart';
|
||||||
part 'api/section_map_api.dart';
|
part 'api/section_map_api.dart';
|
||||||
|
part 'api/section_parcours_api.dart';
|
||||||
part 'api/section_quiz_api.dart';
|
part 'api/section_quiz_api.dart';
|
||||||
part 'api/notification_api.dart';
|
part 'api/notification_api.dart';
|
||||||
part 'api/stats_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_path_section_map.dart';
|
||||||
part 'model/guided_step.dart';
|
part 'model/guided_step.dart';
|
||||||
part 'model/guided_step_dto.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_guided_path.dart';
|
||||||
part 'model/guided_step_trigger_geo_point.dart';
|
|
||||||
part 'model/instance.dart';
|
part 'model/instance.dart';
|
||||||
part 'model/instance_dto.dart';
|
part 'model/instance_dto.dart';
|
||||||
part 'model/instance_quota_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.dart';
|
||||||
part 'model/section_event_dto.dart';
|
part 'model/section_event_dto.dart';
|
||||||
part 'model/section_game.dart';
|
part 'model/section_game.dart';
|
||||||
|
part 'model/parcours_dto.dart';
|
||||||
part 'model/section_game_all_of_game_puzzle_image.dart';
|
part 'model/section_game_all_of_game_puzzle_image.dart';
|
||||||
part 'model/section_map.dart';
|
part 'model/section_map.dart';
|
||||||
part 'model/section_map_all_of_map_map_provider.dart';
|
part 'model/section_map_all_of_map_map_provider.dart';
|
||||||
|
|||||||
386
manager_api_new/lib/api/section_parcours_api.dart
Normal file
386
manager_api_new/lib/api/section_parcours_api.dart
Normal 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));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -353,12 +353,8 @@ class ApiClient {
|
|||||||
return GuidedStep.fromJson(value);
|
return GuidedStep.fromJson(value);
|
||||||
case 'GuidedStepDTO':
|
case 'GuidedStepDTO':
|
||||||
return GuidedStepDTO.fromJson(value);
|
return GuidedStepDTO.fromJson(value);
|
||||||
case 'GuidedStepDTOTriggerGeoPoint':
|
|
||||||
return GuidedStepDTOTriggerGeoPoint.fromJson(value);
|
|
||||||
case 'GuidedStepGuidedPath':
|
case 'GuidedStepGuidedPath':
|
||||||
return GuidedStepGuidedPath.fromJson(value);
|
return GuidedStepGuidedPath.fromJson(value);
|
||||||
case 'GuidedStepTriggerGeoPoint':
|
|
||||||
return GuidedStepTriggerGeoPoint.fromJson(value);
|
|
||||||
case 'Instance':
|
case 'Instance':
|
||||||
return Instance.fromJson(value);
|
return Instance.fromJson(value);
|
||||||
case 'InstanceDTO':
|
case 'InstanceDTO':
|
||||||
|
|||||||
@ -19,6 +19,7 @@ class AiChatRequest {
|
|||||||
this.configurationId,
|
this.configurationId,
|
||||||
this.language,
|
this.language,
|
||||||
this.history = const [],
|
this.history = const [],
|
||||||
|
this.isVoice = false,
|
||||||
});
|
});
|
||||||
|
|
||||||
String? message;
|
String? message;
|
||||||
@ -39,6 +40,9 @@ class AiChatRequest {
|
|||||||
|
|
||||||
List<AiChatMessage>? history;
|
List<AiChatMessage>? history;
|
||||||
|
|
||||||
|
/// true = interaction vocale (lunettes) — prompt audio-friendly, pas de navigation
|
||||||
|
bool? isVoice;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) =>
|
bool operator ==(Object other) =>
|
||||||
identical(this, other) ||
|
identical(this, other) ||
|
||||||
@ -96,6 +100,7 @@ class AiChatRequest {
|
|||||||
} else {
|
} else {
|
||||||
json[r'history'] = null;
|
json[r'history'] = null;
|
||||||
}
|
}
|
||||||
|
json[r'isVoice'] = this.isVoice ?? false;
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -16,6 +16,7 @@ class AiChatResponse {
|
|||||||
this.reply,
|
this.reply,
|
||||||
this.cards = const [],
|
this.cards = const [],
|
||||||
this.navigation,
|
this.navigation,
|
||||||
|
this.expectsReply = true,
|
||||||
});
|
});
|
||||||
|
|
||||||
String? reply;
|
String? reply;
|
||||||
@ -24,24 +25,28 @@ class AiChatResponse {
|
|||||||
|
|
||||||
AiChatResponseNavigation? navigation;
|
AiChatResponseNavigation? navigation;
|
||||||
|
|
||||||
|
bool? expectsReply;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) =>
|
bool operator ==(Object other) =>
|
||||||
identical(this, other) ||
|
identical(this, other) ||
|
||||||
other is AiChatResponse &&
|
other is AiChatResponse &&
|
||||||
other.reply == reply &&
|
other.reply == reply &&
|
||||||
_deepEquality.equals(other.cards, cards) &&
|
_deepEquality.equals(other.cards, cards) &&
|
||||||
other.navigation == navigation;
|
other.navigation == navigation &&
|
||||||
|
other.expectsReply == expectsReply;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
// ignore: unnecessary_parenthesis
|
// ignore: unnecessary_parenthesis
|
||||||
(reply == null ? 0 : reply!.hashCode) +
|
(reply == null ? 0 : reply!.hashCode) +
|
||||||
(cards == null ? 0 : cards!.hashCode) +
|
(cards == null ? 0 : cards!.hashCode) +
|
||||||
(navigation == null ? 0 : navigation!.hashCode);
|
(navigation == null ? 0 : navigation!.hashCode) +
|
||||||
|
(expectsReply == null ? 0 : expectsReply!.hashCode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() =>
|
String toString() =>
|
||||||
'AiChatResponse[reply=$reply, cards=$cards, navigation=$navigation]';
|
'AiChatResponse[reply=$reply, cards=$cards, navigation=$navigation, expectsReply=$expectsReply]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -60,6 +65,7 @@ class AiChatResponse {
|
|||||||
} else {
|
} else {
|
||||||
json[r'navigation'] = null;
|
json[r'navigation'] = null;
|
||||||
}
|
}
|
||||||
|
json[r'expectsReply'] = this.expectsReply;
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,6 +93,7 @@ class AiChatResponse {
|
|||||||
reply: mapValueOfType<String>(json, r'reply'),
|
reply: mapValueOfType<String>(json, r'reply'),
|
||||||
cards: AiCardDTO.listFromJson(json[r'cards']),
|
cards: AiCardDTO.listFromJson(json[r'cards']),
|
||||||
navigation: AiChatResponseNavigation.fromJson(json[r'navigation']),
|
navigation: AiChatResponseNavigation.fromJson(json[r'navigation']),
|
||||||
|
expectsReply: mapValueOfType<bool>(json, r'expectsReply') ?? true,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
part of openapi.api;
|
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 {
|
class AppType {
|
||||||
/// Instantiate a new enum with the provided [value].
|
/// Instantiate a new enum with the provided [value].
|
||||||
const AppType._(this.value);
|
const AppType._(this.value);
|
||||||
@ -27,6 +27,7 @@ class AppType {
|
|||||||
static const Tablet = AppType._(1);
|
static const Tablet = AppType._(1);
|
||||||
static const Web = AppType._(2);
|
static const Web = AppType._(2);
|
||||||
static const VR = AppType._(3);
|
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].
|
/// List of all possible values in this [enum][AppType].
|
||||||
static const values = <AppType>[
|
static const values = <AppType>[
|
||||||
@ -34,6 +35,7 @@ class AppType {
|
|||||||
Tablet,
|
Tablet,
|
||||||
Web,
|
Web,
|
||||||
VR,
|
VR,
|
||||||
|
Voice,
|
||||||
];
|
];
|
||||||
|
|
||||||
static AppType? fromJson(dynamic value) =>
|
static AppType? fromJson(dynamic value) =>
|
||||||
@ -82,6 +84,7 @@ class AppTypeTypeTransformer {
|
|||||||
case r'Tablet': return AppType.Tablet;
|
case r'Tablet': return AppType.Tablet;
|
||||||
case r'Web': return AppType.Web;
|
case r'Web': return AppType.Web;
|
||||||
case r'VR': return AppType.VR;
|
case r'VR': return AppType.VR;
|
||||||
|
case r'Voice': return AppType.Voice;
|
||||||
default:
|
default:
|
||||||
if (!allowNull) {
|
if (!allowNull) {
|
||||||
throw ArgumentError('Unknown enum value to decode: $data');
|
throw ArgumentError('Unknown enum value to decode: $data');
|
||||||
@ -94,6 +97,7 @@ class AppTypeTypeTransformer {
|
|||||||
case 1: return AppType.Tablet;
|
case 1: return AppType.Tablet;
|
||||||
case 2: return AppType.Web;
|
case 2: return AppType.Web;
|
||||||
case 3: return AppType.VR;
|
case 3: return AppType.VR;
|
||||||
|
case 4: return AppType.Voice;
|
||||||
default:
|
default:
|
||||||
if (!allowNull) {
|
if (!allowNull) {
|
||||||
throw ArgumentError('Unknown enum value to decode: $data');
|
throw ArgumentError('Unknown enum value to decode: $data');
|
||||||
|
|||||||
@ -39,7 +39,6 @@ class GameDTO {
|
|||||||
this.rows,
|
this.rows,
|
||||||
this.cols,
|
this.cols,
|
||||||
this.gameType,
|
this.gameType,
|
||||||
this.guidedPaths = const [],
|
|
||||||
});
|
});
|
||||||
|
|
||||||
String? id;
|
String? id;
|
||||||
@ -136,8 +135,6 @@ class GameDTO {
|
|||||||
///
|
///
|
||||||
GameTypes? gameType;
|
GameTypes? gameType;
|
||||||
|
|
||||||
List<GuidedPathDTO>? guidedPaths;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) =>
|
bool operator ==(Object other) =>
|
||||||
identical(this, other) ||
|
identical(this, other) ||
|
||||||
@ -167,8 +164,7 @@ class GameDTO {
|
|||||||
other.puzzleImageId == puzzleImageId &&
|
other.puzzleImageId == puzzleImageId &&
|
||||||
other.rows == rows &&
|
other.rows == rows &&
|
||||||
other.cols == cols &&
|
other.cols == cols &&
|
||||||
other.gameType == gameType &&
|
other.gameType == gameType;
|
||||||
_deepEquality.equals(other.guidedPaths, guidedPaths);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
@ -198,12 +194,11 @@ class GameDTO {
|
|||||||
(puzzleImageId == null ? 0 : puzzleImageId!.hashCode) +
|
(puzzleImageId == null ? 0 : puzzleImageId!.hashCode) +
|
||||||
(rows == null ? 0 : rows!.hashCode) +
|
(rows == null ? 0 : rows!.hashCode) +
|
||||||
(cols == null ? 0 : cols!.hashCode) +
|
(cols == null ? 0 : cols!.hashCode) +
|
||||||
(gameType == null ? 0 : gameType!.hashCode) +
|
(gameType == null ? 0 : gameType!.hashCode);
|
||||||
(guidedPaths == null ? 0 : guidedPaths!.hashCode);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() =>
|
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() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -338,11 +333,6 @@ class GameDTO {
|
|||||||
} else {
|
} else {
|
||||||
json[r'gameType'] = null;
|
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;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -394,7 +384,6 @@ class GameDTO {
|
|||||||
rows: mapValueOfType<int>(json, r'rows'),
|
rows: mapValueOfType<int>(json, r'rows'),
|
||||||
cols: mapValueOfType<int>(json, r'cols'),
|
cols: mapValueOfType<int>(json, r'cols'),
|
||||||
gameType: GameTypes.fromJson(json[r'gameType']),
|
gameType: GameTypes.fromJson(json[r'gameType']),
|
||||||
guidedPaths: GuidedPathDTO.listFromJson(json[r'guidedPaths']),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@ -19,11 +19,16 @@ class GuidedPathDTO {
|
|||||||
this.description = const [],
|
this.description = const [],
|
||||||
this.sectionMapId,
|
this.sectionMapId,
|
||||||
this.sectionEventId,
|
this.sectionEventId,
|
||||||
this.sectionGameId,
|
this.sectionParcoursId,
|
||||||
this.isLinear,
|
this.isLinear,
|
||||||
this.requireSuccessToAdvance,
|
this.requireSuccessToAdvance,
|
||||||
this.hideNextStepsUntilComplete,
|
this.hideNextStepsUntilComplete,
|
||||||
|
this.estimatedDurationMinutes,
|
||||||
|
this.imageResourceId,
|
||||||
this.order,
|
this.order,
|
||||||
|
this.isGameMode,
|
||||||
|
this.gameMessageDebut = const [],
|
||||||
|
this.gameMessageFin = const [],
|
||||||
this.steps = const [],
|
this.steps = const [],
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -39,7 +44,11 @@ class GuidedPathDTO {
|
|||||||
|
|
||||||
String? sectionEventId;
|
String? sectionEventId;
|
||||||
|
|
||||||
String? sectionGameId;
|
String? sectionParcoursId;
|
||||||
|
|
||||||
|
int? estimatedDurationMinutes;
|
||||||
|
|
||||||
|
String? imageResourceId;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Please note: This property should have been non-nullable! Since the specification file
|
/// Please note: This property should have been non-nullable! Since the specification file
|
||||||
@ -67,6 +76,12 @@ class GuidedPathDTO {
|
|||||||
|
|
||||||
int? order;
|
int? order;
|
||||||
|
|
||||||
|
bool? isGameMode;
|
||||||
|
|
||||||
|
List<TranslationAndResourceDTO>? gameMessageDebut;
|
||||||
|
|
||||||
|
List<TranslationAndResourceDTO>? gameMessageFin;
|
||||||
|
|
||||||
List<GuidedStepDTO>? steps;
|
List<GuidedStepDTO>? steps;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -79,11 +94,16 @@ class GuidedPathDTO {
|
|||||||
_deepEquality.equals(other.description, description) &&
|
_deepEquality.equals(other.description, description) &&
|
||||||
other.sectionMapId == sectionMapId &&
|
other.sectionMapId == sectionMapId &&
|
||||||
other.sectionEventId == sectionEventId &&
|
other.sectionEventId == sectionEventId &&
|
||||||
other.sectionGameId == sectionGameId &&
|
other.sectionParcoursId == sectionParcoursId &&
|
||||||
|
other.estimatedDurationMinutes == estimatedDurationMinutes &&
|
||||||
|
other.imageResourceId == imageResourceId &&
|
||||||
other.isLinear == isLinear &&
|
other.isLinear == isLinear &&
|
||||||
other.requireSuccessToAdvance == requireSuccessToAdvance &&
|
other.requireSuccessToAdvance == requireSuccessToAdvance &&
|
||||||
other.hideNextStepsUntilComplete == hideNextStepsUntilComplete &&
|
other.hideNextStepsUntilComplete == hideNextStepsUntilComplete &&
|
||||||
other.order == order &&
|
other.order == order &&
|
||||||
|
other.isGameMode == isGameMode &&
|
||||||
|
_deepEquality.equals(other.gameMessageDebut, gameMessageDebut) &&
|
||||||
|
_deepEquality.equals(other.gameMessageFin, gameMessageFin) &&
|
||||||
_deepEquality.equals(other.steps, steps);
|
_deepEquality.equals(other.steps, steps);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -95,7 +115,9 @@ class GuidedPathDTO {
|
|||||||
(description == null ? 0 : description!.hashCode) +
|
(description == null ? 0 : description!.hashCode) +
|
||||||
(sectionMapId == null ? 0 : sectionMapId!.hashCode) +
|
(sectionMapId == null ? 0 : sectionMapId!.hashCode) +
|
||||||
(sectionEventId == null ? 0 : sectionEventId!.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) +
|
(isLinear == null ? 0 : isLinear!.hashCode) +
|
||||||
(requireSuccessToAdvance == null
|
(requireSuccessToAdvance == null
|
||||||
? 0
|
? 0
|
||||||
@ -104,11 +126,14 @@ class GuidedPathDTO {
|
|||||||
? 0
|
? 0
|
||||||
: hideNextStepsUntilComplete!.hashCode) +
|
: hideNextStepsUntilComplete!.hashCode) +
|
||||||
(order == null ? 0 : order!.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);
|
(steps == null ? 0 : steps!.hashCode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() =>
|
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() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -142,10 +167,20 @@ class GuidedPathDTO {
|
|||||||
} else {
|
} else {
|
||||||
json[r'sectionEventId'] = null;
|
json[r'sectionEventId'] = null;
|
||||||
}
|
}
|
||||||
if (this.sectionGameId != null) {
|
if (this.sectionParcoursId != null) {
|
||||||
json[r'sectionGameId'] = this.sectionGameId;
|
json[r'sectionParcoursId'] = this.sectionParcoursId;
|
||||||
} else {
|
} 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) {
|
if (this.isLinear != null) {
|
||||||
json[r'isLinear'] = this.isLinear;
|
json[r'isLinear'] = this.isLinear;
|
||||||
@ -167,6 +202,23 @@ class GuidedPathDTO {
|
|||||||
} else {
|
} else {
|
||||||
json[r'order'] = null;
|
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) {
|
if (this.steps != null) {
|
||||||
json[r'steps'] = this.steps;
|
json[r'steps'] = this.steps;
|
||||||
} else {
|
} else {
|
||||||
@ -202,13 +254,20 @@ class GuidedPathDTO {
|
|||||||
description: TranslationDTO.listFromJson(json[r'description']),
|
description: TranslationDTO.listFromJson(json[r'description']),
|
||||||
sectionMapId: mapValueOfType<String>(json, r'sectionMapId'),
|
sectionMapId: mapValueOfType<String>(json, r'sectionMapId'),
|
||||||
sectionEventId: mapValueOfType<String>(json, r'sectionEventId'),
|
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'),
|
isLinear: mapValueOfType<bool>(json, r'isLinear'),
|
||||||
requireSuccessToAdvance:
|
requireSuccessToAdvance:
|
||||||
mapValueOfType<bool>(json, r'requireSuccessToAdvance'),
|
mapValueOfType<bool>(json, r'requireSuccessToAdvance'),
|
||||||
hideNextStepsUntilComplete:
|
hideNextStepsUntilComplete:
|
||||||
mapValueOfType<bool>(json, r'hideNextStepsUntilComplete'),
|
mapValueOfType<bool>(json, r'hideNextStepsUntilComplete'),
|
||||||
order: mapValueOfType<int>(json, r'order'),
|
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']),
|
steps: GuidedStepDTO.listFromJson(json[r'steps']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,10 +20,9 @@ class GuidedStep {
|
|||||||
this.order,
|
this.order,
|
||||||
this.description = const [],
|
this.description = const [],
|
||||||
this.geometry,
|
this.geometry,
|
||||||
|
this.isGeoTriggered,
|
||||||
this.zoneRadiusMeters,
|
this.zoneRadiusMeters,
|
||||||
this.imageUrl,
|
this.imageUrl,
|
||||||
this.triggerGeoPointId,
|
|
||||||
this.triggerGeoPoint,
|
|
||||||
this.isHiddenInitially,
|
this.isHiddenInitially,
|
||||||
this.quizQuestions = const [],
|
this.quizQuestions = const [],
|
||||||
this.isStepTimer,
|
this.isStepTimer,
|
||||||
@ -52,14 +51,18 @@ class GuidedStep {
|
|||||||
|
|
||||||
PointAllOfBoundary? geometry;
|
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;
|
double? zoneRadiusMeters;
|
||||||
|
|
||||||
String? imageUrl;
|
String? imageUrl;
|
||||||
|
|
||||||
int? triggerGeoPointId;
|
|
||||||
|
|
||||||
GuidedStepTriggerGeoPoint? triggerGeoPoint;
|
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Please note: This property should have been non-nullable! Since the specification file
|
/// 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
|
/// does not include a default value (using the "default:" property), however, the generated
|
||||||
@ -101,10 +104,9 @@ class GuidedStep {
|
|||||||
other.order == order &&
|
other.order == order &&
|
||||||
_deepEquality.equals(other.description, description) &&
|
_deepEquality.equals(other.description, description) &&
|
||||||
other.geometry == geometry &&
|
other.geometry == geometry &&
|
||||||
|
other.isGeoTriggered == isGeoTriggered &&
|
||||||
other.zoneRadiusMeters == zoneRadiusMeters &&
|
other.zoneRadiusMeters == zoneRadiusMeters &&
|
||||||
other.imageUrl == imageUrl &&
|
other.imageUrl == imageUrl &&
|
||||||
other.triggerGeoPointId == triggerGeoPointId &&
|
|
||||||
other.triggerGeoPoint == triggerGeoPoint &&
|
|
||||||
other.isHiddenInitially == isHiddenInitially &&
|
other.isHiddenInitially == isHiddenInitially &&
|
||||||
_deepEquality.equals(other.quizQuestions, quizQuestions) &&
|
_deepEquality.equals(other.quizQuestions, quizQuestions) &&
|
||||||
other.isStepTimer == isStepTimer &&
|
other.isStepTimer == isStepTimer &&
|
||||||
@ -122,10 +124,9 @@ class GuidedStep {
|
|||||||
(order == null ? 0 : order!.hashCode) +
|
(order == null ? 0 : order!.hashCode) +
|
||||||
(description == null ? 0 : description!.hashCode) +
|
(description == null ? 0 : description!.hashCode) +
|
||||||
(geometry == null ? 0 : geometry!.hashCode) +
|
(geometry == null ? 0 : geometry!.hashCode) +
|
||||||
|
(isGeoTriggered == null ? 0 : isGeoTriggered!.hashCode) +
|
||||||
(zoneRadiusMeters == null ? 0 : zoneRadiusMeters!.hashCode) +
|
(zoneRadiusMeters == null ? 0 : zoneRadiusMeters!.hashCode) +
|
||||||
(imageUrl == null ? 0 : imageUrl!.hashCode) +
|
(imageUrl == null ? 0 : imageUrl!.hashCode) +
|
||||||
(triggerGeoPointId == null ? 0 : triggerGeoPointId!.hashCode) +
|
|
||||||
(triggerGeoPoint == null ? 0 : triggerGeoPoint!.hashCode) +
|
|
||||||
(isHiddenInitially == null ? 0 : isHiddenInitially!.hashCode) +
|
(isHiddenInitially == null ? 0 : isHiddenInitially!.hashCode) +
|
||||||
(quizQuestions == null ? 0 : quizQuestions!.hashCode) +
|
(quizQuestions == null ? 0 : quizQuestions!.hashCode) +
|
||||||
(isStepTimer == null ? 0 : isStepTimer!.hashCode) +
|
(isStepTimer == null ? 0 : isStepTimer!.hashCode) +
|
||||||
@ -135,7 +136,7 @@ class GuidedStep {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() =>
|
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() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -166,6 +167,11 @@ class GuidedStep {
|
|||||||
} else {
|
} else {
|
||||||
json[r'geometry'] = null;
|
json[r'geometry'] = null;
|
||||||
}
|
}
|
||||||
|
if (this.isGeoTriggered != null) {
|
||||||
|
json[r'isGeoTriggered'] = this.isGeoTriggered;
|
||||||
|
} else {
|
||||||
|
json[r'isGeoTriggered'] = null;
|
||||||
|
}
|
||||||
if (this.zoneRadiusMeters != null) {
|
if (this.zoneRadiusMeters != null) {
|
||||||
json[r'zoneRadiusMeters'] = this.zoneRadiusMeters;
|
json[r'zoneRadiusMeters'] = this.zoneRadiusMeters;
|
||||||
} else {
|
} else {
|
||||||
@ -176,16 +182,6 @@ class GuidedStep {
|
|||||||
} else {
|
} else {
|
||||||
json[r'imageUrl'] = null;
|
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) {
|
if (this.isHiddenInitially != null) {
|
||||||
json[r'isHiddenInitially'] = this.isHiddenInitially;
|
json[r'isHiddenInitially'] = this.isHiddenInitially;
|
||||||
} else {
|
} else {
|
||||||
@ -247,11 +243,9 @@ class GuidedStep {
|
|||||||
order: mapValueOfType<int>(json, r'order'),
|
order: mapValueOfType<int>(json, r'order'),
|
||||||
description: TranslationDTO.listFromJson(json[r'description']),
|
description: TranslationDTO.listFromJson(json[r'description']),
|
||||||
geometry: PointAllOfBoundary.fromJson(json[r'geometry']),
|
geometry: PointAllOfBoundary.fromJson(json[r'geometry']),
|
||||||
|
isGeoTriggered: mapValueOfType<bool>(json, r'isGeoTriggered'),
|
||||||
zoneRadiusMeters: mapValueOfType<double>(json, r'zoneRadiusMeters'),
|
zoneRadiusMeters: mapValueOfType<double>(json, r'zoneRadiusMeters'),
|
||||||
imageUrl: mapValueOfType<String>(json, r'imageUrl'),
|
imageUrl: mapValueOfType<String>(json, r'imageUrl'),
|
||||||
triggerGeoPointId: mapValueOfType<int>(json, r'triggerGeoPointId'),
|
|
||||||
triggerGeoPoint:
|
|
||||||
GuidedStepTriggerGeoPoint.fromJson(json[r'triggerGeoPoint']),
|
|
||||||
isHiddenInitially: mapValueOfType<bool>(json, r'isHiddenInitially'),
|
isHiddenInitially: mapValueOfType<bool>(json, r'isHiddenInitially'),
|
||||||
quizQuestions: QuizQuestion.listFromJson(json[r'quizQuestions']),
|
quizQuestions: QuizQuestion.listFromJson(json[r'quizQuestions']),
|
||||||
isStepTimer: mapValueOfType<bool>(json, r'isStepTimer'),
|
isStepTimer: mapValueOfType<bool>(json, r'isStepTimer'),
|
||||||
|
|||||||
@ -19,15 +19,17 @@ class GuidedStepDTO {
|
|||||||
this.title = const [],
|
this.title = const [],
|
||||||
this.description = const [],
|
this.description = const [],
|
||||||
this.geometry,
|
this.geometry,
|
||||||
|
this.isGeoTriggered,
|
||||||
this.zoneRadiusMeters,
|
this.zoneRadiusMeters,
|
||||||
this.imageUrl,
|
this.imageUrl,
|
||||||
this.triggerGeoPointId,
|
|
||||||
this.triggerGeoPoint,
|
|
||||||
this.isHiddenInitially,
|
this.isHiddenInitially,
|
||||||
this.isStepTimer,
|
this.isStepTimer,
|
||||||
this.isStepLocked,
|
this.isStepLocked,
|
||||||
this.timerSeconds,
|
this.timerSeconds,
|
||||||
this.timerExpiredMessage = const [],
|
this.timerExpiredMessage = const [],
|
||||||
|
this.audioIds = const [],
|
||||||
|
this.contents = const [],
|
||||||
|
this.factContent = const [],
|
||||||
this.quizQuestions = const [],
|
this.quizQuestions = const [],
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -49,14 +51,18 @@ class GuidedStepDTO {
|
|||||||
|
|
||||||
GeometryDTO? geometry;
|
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;
|
double? zoneRadiusMeters;
|
||||||
|
|
||||||
String? imageUrl;
|
String? imageUrl;
|
||||||
|
|
||||||
int? triggerGeoPointId;
|
|
||||||
|
|
||||||
GuidedStepDTOTriggerGeoPoint? triggerGeoPoint;
|
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Please note: This property should have been non-nullable! Since the specification file
|
/// 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
|
/// does not include a default value (using the "default:" property), however, the generated
|
||||||
@ -85,6 +91,12 @@ class GuidedStepDTO {
|
|||||||
|
|
||||||
List<TranslationDTO>? timerExpiredMessage;
|
List<TranslationDTO>? timerExpiredMessage;
|
||||||
|
|
||||||
|
List<TranslationDTO>? audioIds;
|
||||||
|
|
||||||
|
List<ContentDTO>? contents;
|
||||||
|
|
||||||
|
List<TranslationDTO>? factContent;
|
||||||
|
|
||||||
List<QuizQuestion>? quizQuestions;
|
List<QuizQuestion>? quizQuestions;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -97,16 +109,18 @@ class GuidedStepDTO {
|
|||||||
_deepEquality.equals(other.title, title) &&
|
_deepEquality.equals(other.title, title) &&
|
||||||
_deepEquality.equals(other.description, description) &&
|
_deepEquality.equals(other.description, description) &&
|
||||||
other.geometry == geometry &&
|
other.geometry == geometry &&
|
||||||
|
other.isGeoTriggered == isGeoTriggered &&
|
||||||
other.zoneRadiusMeters == zoneRadiusMeters &&
|
other.zoneRadiusMeters == zoneRadiusMeters &&
|
||||||
other.imageUrl == imageUrl &&
|
other.imageUrl == imageUrl &&
|
||||||
other.triggerGeoPointId == triggerGeoPointId &&
|
|
||||||
other.triggerGeoPoint == triggerGeoPoint &&
|
|
||||||
other.isHiddenInitially == isHiddenInitially &&
|
other.isHiddenInitially == isHiddenInitially &&
|
||||||
other.isStepTimer == isStepTimer &&
|
other.isStepTimer == isStepTimer &&
|
||||||
other.isStepLocked == isStepLocked &&
|
other.isStepLocked == isStepLocked &&
|
||||||
other.timerSeconds == timerSeconds &&
|
other.timerSeconds == timerSeconds &&
|
||||||
_deepEquality.equals(
|
_deepEquality.equals(
|
||||||
other.timerExpiredMessage, timerExpiredMessage) &&
|
other.timerExpiredMessage, timerExpiredMessage) &&
|
||||||
|
_deepEquality.equals(other.audioIds, audioIds) &&
|
||||||
|
_deepEquality.equals(other.contents, contents) &&
|
||||||
|
_deepEquality.equals(other.factContent, factContent) &&
|
||||||
_deepEquality.equals(other.quizQuestions, quizQuestions);
|
_deepEquality.equals(other.quizQuestions, quizQuestions);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -118,20 +132,22 @@ class GuidedStepDTO {
|
|||||||
(title == null ? 0 : title!.hashCode) +
|
(title == null ? 0 : title!.hashCode) +
|
||||||
(description == null ? 0 : description!.hashCode) +
|
(description == null ? 0 : description!.hashCode) +
|
||||||
(geometry == null ? 0 : geometry!.hashCode) +
|
(geometry == null ? 0 : geometry!.hashCode) +
|
||||||
|
(isGeoTriggered == null ? 0 : isGeoTriggered!.hashCode) +
|
||||||
(zoneRadiusMeters == null ? 0 : zoneRadiusMeters!.hashCode) +
|
(zoneRadiusMeters == null ? 0 : zoneRadiusMeters!.hashCode) +
|
||||||
(imageUrl == null ? 0 : imageUrl!.hashCode) +
|
(imageUrl == null ? 0 : imageUrl!.hashCode) +
|
||||||
(triggerGeoPointId == null ? 0 : triggerGeoPointId!.hashCode) +
|
|
||||||
(triggerGeoPoint == null ? 0 : triggerGeoPoint!.hashCode) +
|
|
||||||
(isHiddenInitially == null ? 0 : isHiddenInitially!.hashCode) +
|
(isHiddenInitially == null ? 0 : isHiddenInitially!.hashCode) +
|
||||||
(isStepTimer == null ? 0 : isStepTimer!.hashCode) +
|
(isStepTimer == null ? 0 : isStepTimer!.hashCode) +
|
||||||
(isStepLocked == null ? 0 : isStepLocked!.hashCode) +
|
(isStepLocked == null ? 0 : isStepLocked!.hashCode) +
|
||||||
(timerSeconds == null ? 0 : timerSeconds!.hashCode) +
|
(timerSeconds == null ? 0 : timerSeconds!.hashCode) +
|
||||||
(timerExpiredMessage == null ? 0 : timerExpiredMessage!.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);
|
(quizQuestions == null ? 0 : quizQuestions!.hashCode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() =>
|
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() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -165,6 +181,11 @@ class GuidedStepDTO {
|
|||||||
} else {
|
} else {
|
||||||
json[r'geometry'] = null;
|
json[r'geometry'] = null;
|
||||||
}
|
}
|
||||||
|
if (this.isGeoTriggered != null) {
|
||||||
|
json[r'isGeoTriggered'] = this.isGeoTriggered;
|
||||||
|
} else {
|
||||||
|
json[r'isGeoTriggered'] = null;
|
||||||
|
}
|
||||||
if (this.zoneRadiusMeters != null) {
|
if (this.zoneRadiusMeters != null) {
|
||||||
json[r'zoneRadiusMeters'] = this.zoneRadiusMeters;
|
json[r'zoneRadiusMeters'] = this.zoneRadiusMeters;
|
||||||
} else {
|
} else {
|
||||||
@ -175,16 +196,6 @@ class GuidedStepDTO {
|
|||||||
} else {
|
} else {
|
||||||
json[r'imageUrl'] = null;
|
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) {
|
if (this.isHiddenInitially != null) {
|
||||||
json[r'isHiddenInitially'] = this.isHiddenInitially;
|
json[r'isHiddenInitially'] = this.isHiddenInitially;
|
||||||
} else {
|
} else {
|
||||||
@ -211,6 +222,21 @@ class GuidedStepDTO {
|
|||||||
} else {
|
} else {
|
||||||
json[r'timerExpiredMessage'] = null;
|
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) {
|
if (this.quizQuestions != null) {
|
||||||
json[r'quizQuestions'] =
|
json[r'quizQuestions'] =
|
||||||
this.quizQuestions!.map((v) => v.toJson()).toList();
|
this.quizQuestions!.map((v) => v.toJson()).toList();
|
||||||
@ -247,17 +273,18 @@ class GuidedStepDTO {
|
|||||||
title: TranslationDTO.listFromJson(json[r'title']),
|
title: TranslationDTO.listFromJson(json[r'title']),
|
||||||
description: TranslationDTO.listFromJson(json[r'description']),
|
description: TranslationDTO.listFromJson(json[r'description']),
|
||||||
geometry: GeometryDTO.fromJson(json[r'geometry']),
|
geometry: GeometryDTO.fromJson(json[r'geometry']),
|
||||||
|
isGeoTriggered: mapValueOfType<bool>(json, r'isGeoTriggered'),
|
||||||
zoneRadiusMeters: mapValueOfType<double>(json, r'zoneRadiusMeters'),
|
zoneRadiusMeters: mapValueOfType<double>(json, r'zoneRadiusMeters'),
|
||||||
imageUrl: mapValueOfType<String>(json, r'imageUrl'),
|
imageUrl: mapValueOfType<String>(json, r'imageUrl'),
|
||||||
triggerGeoPointId: mapValueOfType<int>(json, r'triggerGeoPointId'),
|
|
||||||
triggerGeoPoint:
|
|
||||||
GuidedStepDTOTriggerGeoPoint.fromJson(json[r'triggerGeoPoint']),
|
|
||||||
isHiddenInitially: mapValueOfType<bool>(json, r'isHiddenInitially'),
|
isHiddenInitially: mapValueOfType<bool>(json, r'isHiddenInitially'),
|
||||||
isStepTimer: mapValueOfType<bool>(json, r'isStepTimer'),
|
isStepTimer: mapValueOfType<bool>(json, r'isStepTimer'),
|
||||||
isStepLocked: mapValueOfType<bool>(json, r'isStepLocked'),
|
isStepLocked: mapValueOfType<bool>(json, r'isStepLocked'),
|
||||||
timerSeconds: mapValueOfType<int>(json, r'timerSeconds'),
|
timerSeconds: mapValueOfType<int>(json, r'timerSeconds'),
|
||||||
timerExpiredMessage:
|
timerExpiredMessage:
|
||||||
TranslationDTO.listFromJson(json[r'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']),
|
quizQuestions: QuizQuestion.listFromJson(json[r'quizQuestions']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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>{};
|
|
||||||
}
|
|
||||||
@ -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',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@ -44,7 +44,6 @@ class MapDTO {
|
|||||||
this.centerLatitude,
|
this.centerLatitude,
|
||||||
this.centerLongitude,
|
this.centerLongitude,
|
||||||
this.isParcours,
|
this.isParcours,
|
||||||
this.guidedPaths = const [],
|
|
||||||
});
|
});
|
||||||
|
|
||||||
String? id;
|
String? id;
|
||||||
@ -139,8 +138,6 @@ class MapDTO {
|
|||||||
|
|
||||||
bool? isParcours;
|
bool? isParcours;
|
||||||
|
|
||||||
List<GuidedPathDTO>? guidedPaths;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) =>
|
bool operator ==(Object other) =>
|
||||||
identical(this, other) ||
|
identical(this, other) ||
|
||||||
@ -175,8 +172,7 @@ class MapDTO {
|
|||||||
_deepEquality.equals(other.categories, categories) &&
|
_deepEquality.equals(other.categories, categories) &&
|
||||||
other.centerLatitude == centerLatitude &&
|
other.centerLatitude == centerLatitude &&
|
||||||
other.centerLongitude == centerLongitude &&
|
other.centerLongitude == centerLongitude &&
|
||||||
other.isParcours == isParcours &&
|
other.isParcours == isParcours;
|
||||||
_deepEquality.equals(other.guidedPaths, guidedPaths);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
@ -211,12 +207,11 @@ class MapDTO {
|
|||||||
(categories == null ? 0 : categories!.hashCode) +
|
(categories == null ? 0 : categories!.hashCode) +
|
||||||
(centerLatitude == null ? 0 : centerLatitude!.hashCode) +
|
(centerLatitude == null ? 0 : centerLatitude!.hashCode) +
|
||||||
(centerLongitude == null ? 0 : centerLongitude!.hashCode) +
|
(centerLongitude == null ? 0 : centerLongitude!.hashCode) +
|
||||||
(isParcours == null ? 0 : isParcours!.hashCode) +
|
(isParcours == null ? 0 : isParcours!.hashCode);
|
||||||
(guidedPaths == null ? 0 : guidedPaths!.hashCode);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() =>
|
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() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -375,11 +370,6 @@ class MapDTO {
|
|||||||
} else {
|
} else {
|
||||||
json[r'isParcours'] = null;
|
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;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -435,7 +425,6 @@ class MapDTO {
|
|||||||
centerLatitude: mapValueOfType<String>(json, r'centerLatitude'),
|
centerLatitude: mapValueOfType<String>(json, r'centerLatitude'),
|
||||||
centerLongitude: mapValueOfType<String>(json, r'centerLongitude'),
|
centerLongitude: mapValueOfType<String>(json, r'centerLongitude'),
|
||||||
isParcours: mapValueOfType<bool>(json, r'isParcours'),
|
isParcours: mapValueOfType<bool>(json, r'isParcours'),
|
||||||
guidedPaths: GuidedPathDTO.listFromJson(json[r'guidedPaths']),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
351
manager_api_new/lib/model/parcours_dto.dart
Normal file
351
manager_api_new/lib/model/parcours_dto.dart
Normal 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>{};
|
||||||
|
}
|
||||||
@ -20,10 +20,9 @@ class QuizQuestionGuidedStep {
|
|||||||
this.order,
|
this.order,
|
||||||
this.description = const [],
|
this.description = const [],
|
||||||
this.geometry,
|
this.geometry,
|
||||||
|
this.isGeoTriggered,
|
||||||
this.zoneRadiusMeters,
|
this.zoneRadiusMeters,
|
||||||
this.imageUrl,
|
this.imageUrl,
|
||||||
this.triggerGeoPointId,
|
|
||||||
this.triggerGeoPoint,
|
|
||||||
this.isHiddenInitially,
|
this.isHiddenInitially,
|
||||||
this.quizQuestions = const [],
|
this.quizQuestions = const [],
|
||||||
this.isStepTimer,
|
this.isStepTimer,
|
||||||
@ -52,14 +51,18 @@ class QuizQuestionGuidedStep {
|
|||||||
|
|
||||||
PointAllOfBoundary? geometry;
|
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;
|
double? zoneRadiusMeters;
|
||||||
|
|
||||||
String? imageUrl;
|
String? imageUrl;
|
||||||
|
|
||||||
int? triggerGeoPointId;
|
|
||||||
|
|
||||||
GuidedStepTriggerGeoPoint? triggerGeoPoint;
|
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Please note: This property should have been non-nullable! Since the specification file
|
/// 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
|
/// does not include a default value (using the "default:" property), however, the generated
|
||||||
@ -101,10 +104,9 @@ class QuizQuestionGuidedStep {
|
|||||||
other.order == order &&
|
other.order == order &&
|
||||||
_deepEquality.equals(other.description, description) &&
|
_deepEquality.equals(other.description, description) &&
|
||||||
other.geometry == geometry &&
|
other.geometry == geometry &&
|
||||||
|
other.isGeoTriggered == isGeoTriggered &&
|
||||||
other.zoneRadiusMeters == zoneRadiusMeters &&
|
other.zoneRadiusMeters == zoneRadiusMeters &&
|
||||||
other.imageUrl == imageUrl &&
|
other.imageUrl == imageUrl &&
|
||||||
other.triggerGeoPointId == triggerGeoPointId &&
|
|
||||||
other.triggerGeoPoint == triggerGeoPoint &&
|
|
||||||
other.isHiddenInitially == isHiddenInitially &&
|
other.isHiddenInitially == isHiddenInitially &&
|
||||||
_deepEquality.equals(other.quizQuestions, quizQuestions) &&
|
_deepEquality.equals(other.quizQuestions, quizQuestions) &&
|
||||||
other.isStepTimer == isStepTimer &&
|
other.isStepTimer == isStepTimer &&
|
||||||
@ -122,10 +124,9 @@ class QuizQuestionGuidedStep {
|
|||||||
(order == null ? 0 : order!.hashCode) +
|
(order == null ? 0 : order!.hashCode) +
|
||||||
(description == null ? 0 : description!.hashCode) +
|
(description == null ? 0 : description!.hashCode) +
|
||||||
(geometry == null ? 0 : geometry!.hashCode) +
|
(geometry == null ? 0 : geometry!.hashCode) +
|
||||||
|
(isGeoTriggered == null ? 0 : isGeoTriggered!.hashCode) +
|
||||||
(zoneRadiusMeters == null ? 0 : zoneRadiusMeters!.hashCode) +
|
(zoneRadiusMeters == null ? 0 : zoneRadiusMeters!.hashCode) +
|
||||||
(imageUrl == null ? 0 : imageUrl!.hashCode) +
|
(imageUrl == null ? 0 : imageUrl!.hashCode) +
|
||||||
(triggerGeoPointId == null ? 0 : triggerGeoPointId!.hashCode) +
|
|
||||||
(triggerGeoPoint == null ? 0 : triggerGeoPoint!.hashCode) +
|
|
||||||
(isHiddenInitially == null ? 0 : isHiddenInitially!.hashCode) +
|
(isHiddenInitially == null ? 0 : isHiddenInitially!.hashCode) +
|
||||||
(quizQuestions == null ? 0 : quizQuestions!.hashCode) +
|
(quizQuestions == null ? 0 : quizQuestions!.hashCode) +
|
||||||
(isStepTimer == null ? 0 : isStepTimer!.hashCode) +
|
(isStepTimer == null ? 0 : isStepTimer!.hashCode) +
|
||||||
@ -135,7 +136,7 @@ class QuizQuestionGuidedStep {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() =>
|
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() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -166,6 +167,11 @@ class QuizQuestionGuidedStep {
|
|||||||
} else {
|
} else {
|
||||||
json[r'geometry'] = null;
|
json[r'geometry'] = null;
|
||||||
}
|
}
|
||||||
|
if (this.isGeoTriggered != null) {
|
||||||
|
json[r'isGeoTriggered'] = this.isGeoTriggered;
|
||||||
|
} else {
|
||||||
|
json[r'isGeoTriggered'] = null;
|
||||||
|
}
|
||||||
if (this.zoneRadiusMeters != null) {
|
if (this.zoneRadiusMeters != null) {
|
||||||
json[r'zoneRadiusMeters'] = this.zoneRadiusMeters;
|
json[r'zoneRadiusMeters'] = this.zoneRadiusMeters;
|
||||||
} else {
|
} else {
|
||||||
@ -176,16 +182,6 @@ class QuizQuestionGuidedStep {
|
|||||||
} else {
|
} else {
|
||||||
json[r'imageUrl'] = null;
|
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) {
|
if (this.isHiddenInitially != null) {
|
||||||
json[r'isHiddenInitially'] = this.isHiddenInitially;
|
json[r'isHiddenInitially'] = this.isHiddenInitially;
|
||||||
} else {
|
} else {
|
||||||
@ -247,11 +243,9 @@ class QuizQuestionGuidedStep {
|
|||||||
order: mapValueOfType<int>(json, r'order'),
|
order: mapValueOfType<int>(json, r'order'),
|
||||||
description: TranslationDTO.listFromJson(json[r'description']),
|
description: TranslationDTO.listFromJson(json[r'description']),
|
||||||
geometry: PointAllOfBoundary.fromJson(json[r'geometry']),
|
geometry: PointAllOfBoundary.fromJson(json[r'geometry']),
|
||||||
|
isGeoTriggered: mapValueOfType<bool>(json, r'isGeoTriggered'),
|
||||||
zoneRadiusMeters: mapValueOfType<double>(json, r'zoneRadiusMeters'),
|
zoneRadiusMeters: mapValueOfType<double>(json, r'zoneRadiusMeters'),
|
||||||
imageUrl: mapValueOfType<String>(json, r'imageUrl'),
|
imageUrl: mapValueOfType<String>(json, r'imageUrl'),
|
||||||
triggerGeoPointId: mapValueOfType<int>(json, r'triggerGeoPointId'),
|
|
||||||
triggerGeoPoint:
|
|
||||||
GuidedStepTriggerGeoPoint.fromJson(json[r'triggerGeoPoint']),
|
|
||||||
isHiddenInitially: mapValueOfType<bool>(json, r'isHiddenInitially'),
|
isHiddenInitially: mapValueOfType<bool>(json, r'isHiddenInitially'),
|
||||||
quizQuestions: QuizQuestion.listFromJson(json[r'quizQuestions']),
|
quizQuestions: QuizQuestion.listFromJson(json[r'quizQuestions']),
|
||||||
isStepTimer: mapValueOfType<bool>(json, r'isStepTimer'),
|
isStepTimer: mapValueOfType<bool>(json, r'isStepTimer'),
|
||||||
|
|||||||
@ -35,6 +35,7 @@ class SectionType {
|
|||||||
static const Agenda = SectionType._(9);
|
static const Agenda = SectionType._(9);
|
||||||
static const Weather = SectionType._(10);
|
static const Weather = SectionType._(10);
|
||||||
static const Event = SectionType._(11);
|
static const Event = SectionType._(11);
|
||||||
|
static const Parcours = SectionType._(12);
|
||||||
|
|
||||||
/// List of all possible values in this [enum][SectionType].
|
/// List of all possible values in this [enum][SectionType].
|
||||||
static const values = <SectionType>[
|
static const values = <SectionType>[
|
||||||
@ -49,7 +50,8 @@ class SectionType {
|
|||||||
Game,
|
Game,
|
||||||
Agenda,
|
Agenda,
|
||||||
Weather,
|
Weather,
|
||||||
Event
|
Event,
|
||||||
|
Parcours,
|
||||||
];
|
];
|
||||||
|
|
||||||
static SectionType? fromJson(dynamic value) => SectionTypeTypeTransformer().decode(value);
|
static SectionType? fromJson(dynamic value) => SectionTypeTypeTransformer().decode(value);
|
||||||
@ -101,6 +103,7 @@ class SectionTypeTypeTransformer {
|
|||||||
case r'Agenda': return SectionType.Agenda;
|
case r'Agenda': return SectionType.Agenda;
|
||||||
case r'Weather': return SectionType.Weather;
|
case r'Weather': return SectionType.Weather;
|
||||||
case r'Event': return SectionType.Event;
|
case r'Event': return SectionType.Event;
|
||||||
|
case r'Parcours': return SectionType.Parcours;
|
||||||
default:
|
default:
|
||||||
if (!allowNull) {
|
if (!allowNull) {
|
||||||
throw ArgumentError('Unknown enum value to decode: $data');
|
throw ArgumentError('Unknown enum value to decode: $data');
|
||||||
@ -121,6 +124,7 @@ class SectionTypeTypeTransformer {
|
|||||||
case 9: return SectionType.Agenda;
|
case 9: return SectionType.Agenda;
|
||||||
case 10: return SectionType.Weather;
|
case 10: return SectionType.Weather;
|
||||||
case 11: return SectionType.Event;
|
case 11: return SectionType.Event;
|
||||||
|
case 12: return SectionType.Parcours;
|
||||||
default:
|
default:
|
||||||
if (!allowNull) {
|
if (!allowNull) {
|
||||||
throw ArgumentError('Unknown enum value to decode: $data');
|
throw ArgumentError('Unknown enum value to decode: $data');
|
||||||
|
|||||||
@ -56,16 +56,6 @@ void main() {
|
|||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
// int triggerGeoPointId
|
|
||||||
test('to test the property `triggerGeoPointId`', () async {
|
|
||||||
// TODO
|
|
||||||
});
|
|
||||||
|
|
||||||
// GuidedStepDTOTriggerGeoPoint triggerGeoPoint
|
|
||||||
test('to test the property `triggerGeoPoint`', () async {
|
|
||||||
// TODO
|
|
||||||
});
|
|
||||||
|
|
||||||
// bool isHiddenInitially
|
// bool isHiddenInitially
|
||||||
test('to test the property `isHiddenInitially`', () async {
|
test('to test the property `isHiddenInitially`', () async {
|
||||||
// TODO
|
// TODO
|
||||||
|
|||||||
@ -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
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@ -61,16 +61,6 @@ void main() {
|
|||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
// int triggerGeoPointId
|
|
||||||
test('to test the property `triggerGeoPointId`', () async {
|
|
||||||
// TODO
|
|
||||||
});
|
|
||||||
|
|
||||||
// GuidedStepTriggerGeoPoint triggerGeoPoint
|
|
||||||
test('to test the property `triggerGeoPoint`', () async {
|
|
||||||
// TODO
|
|
||||||
});
|
|
||||||
|
|
||||||
// bool isHiddenInitially
|
// bool isHiddenInitially
|
||||||
test('to test the property `isHiddenInitially`', () async {
|
test('to test the property `isHiddenInitially`', () async {
|
||||||
// TODO
|
// TODO
|
||||||
|
|||||||
@ -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
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@ -61,16 +61,6 @@ void main() {
|
|||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
// int triggerGeoPointId
|
|
||||||
test('to test the property `triggerGeoPointId`', () async {
|
|
||||||
// TODO
|
|
||||||
});
|
|
||||||
|
|
||||||
// GuidedStepTriggerGeoPoint triggerGeoPoint
|
|
||||||
test('to test the property `triggerGeoPoint`', () async {
|
|
||||||
// TODO
|
|
||||||
});
|
|
||||||
|
|
||||||
// bool isHiddenInitially
|
// bool isHiddenInitially
|
||||||
test('to test the property `isHiddenInitially`', () async {
|
test('to test the property `isHiddenInitially`', () async {
|
||||||
// TODO
|
// TODO
|
||||||
|
|||||||
30
pubspec.lock
30
pubspec.lock
@ -189,10 +189,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: characters
|
name: characters
|
||||||
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
|
sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.4.0"
|
version: "1.4.1"
|
||||||
charcode:
|
charcode:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -599,10 +599,10 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: flutter_quill
|
name: flutter_quill
|
||||||
sha256: b96bb8525afdeaaea52f5d02f525e05cc34acd176467ab6d6f35d434cf14fde2
|
sha256: "3ee7125b2dd3f3bce3ebdaac722a72f0c8aff3db9aa19053a9d777db12d71c98"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "11.5.0"
|
version: "11.5.1"
|
||||||
flutter_quill_delta_from_html:
|
flutter_quill_delta_from_html:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -774,7 +774,7 @@ packages:
|
|||||||
source: hosted
|
source: hosted
|
||||||
version: "2.3.1"
|
version: "2.3.1"
|
||||||
html:
|
html:
|
||||||
dependency: transitive
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: html
|
name: html
|
||||||
sha256: "6d1264f2dffa1b1101c25a91dff0dc2daee4c18e87cd8538729773c073dbf602"
|
sha256: "6d1264f2dffa1b1101c25a91dff0dc2daee4c18e87cd8538729773c073dbf602"
|
||||||
@ -968,18 +968,18 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: matcher
|
name: matcher
|
||||||
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
|
sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.17"
|
version: "0.12.19"
|
||||||
material_color_utilities:
|
material_color_utilities:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: material_color_utilities
|
name: material_color_utilities
|
||||||
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
|
sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.11.1"
|
version: "0.13.0"
|
||||||
material_segmented_control:
|
material_segmented_control:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -992,10 +992,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
|
sha256: "1741988757a65eb6b36abe716829688cf01910bbf91c34354ff7ec1c3de2b349"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.16.0"
|
version: "1.18.0"
|
||||||
mgrs_dart:
|
mgrs_dart:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -1477,10 +1477,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00"
|
sha256: "949a932224383300f01be9221c39180316445ecb8e7547f70a41a35bf421fb9e"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.7.6"
|
version: "0.7.11"
|
||||||
timing:
|
timing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -1810,5 +1810,5 @@ packages:
|
|||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.1"
|
version: "3.1.1"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=3.8.0 <4.0.0"
|
dart: ">=3.12.0 <4.0.0"
|
||||||
flutter: ">=3.32.0"
|
flutter: ">=3.44.0"
|
||||||
|
|||||||
@ -71,9 +71,10 @@ dependencies:
|
|||||||
# The following adds the Cupertino Icons font to your application.
|
# The following adds the Cupertino Icons font to your application.
|
||||||
# Use with the CupertinoIcons class for iOS style icons.
|
# Use with the CupertinoIcons class for iOS style icons.
|
||||||
cupertino_icons: ^1.0.6
|
cupertino_icons: ^1.0.6
|
||||||
flutter_quill: ^11.5.0
|
flutter_quill: 11.5.1
|
||||||
vsc_quill_delta_to_html: ^1.0.5
|
vsc_quill_delta_to_html: ^1.0.5
|
||||||
flutter_quill_delta_from_html: ^1.5.3
|
flutter_quill_delta_from_html: ^1.5.3
|
||||||
|
html: ^0.15.6
|
||||||
responsive_framework: ^1.4.0
|
responsive_framework: ^1.4.0
|
||||||
tab_container: ^2.0.0
|
tab_container: ^2.0.0
|
||||||
flutter_widget_from_html: ^0.15.3
|
flutter_widget_from_html: ^0.15.3
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user