Compare commits
No commits in common. "30d88df7b645ad83b4aa3059da7263bba1a74510" and "1fddd6363fd8ad75986fd5143d9aac21a2ee990e" have entirely different histories.
30d88df7b6
...
1fddd6363f
@ -42,8 +42,8 @@ apply plugin: 'com.google.gms.google-services'*/
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
namespace "be.unov.myinfomate.tablet"
|
namespace "be.unov.myinfomate.tablet"
|
||||||
compileSdkVersion 36
|
|
||||||
ndkVersion "27.0.12077973"
|
compileSdkVersion 34
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -77,10 +77,6 @@ android {
|
|||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
|
|
||||||
ndk {
|
|
||||||
abiFilters "arm64-v8a"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
|
|||||||
@ -2,7 +2,4 @@ org.gradle.jvmargs=-Xmx1536M
|
|||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
android.enableJetifier=true
|
android.enableJetifier=true
|
||||||
android.enableR8=true
|
android.enableR8=true
|
||||||
SDK_REGISTRY_TOKEN=sk.eyJ1IjoidGZyYW5zb2xldCIsImEiOiJjbHRpcTF1d28wYmxmMmxwNjRleXpodGY0In0.qr-jo1vAb08bL3WRDEB4pw
|
SDK_REGISTRY_TOKEN=sk.eyJ1IjoidGZyYW5zb2xldCIsImEiOiJjbHRpcTF1d28wYmxmMmxwNjRleXpodGY0In0.qr-jo1vAb08bL3WRDEB4pw
|
||||||
android.bundle.enableUncompressedNativeLibs=false
|
|
||||||
android.experimental.enable16kApk=true
|
|
||||||
android.useNewNativePlugin=true
|
|
||||||
@ -1,325 +0,0 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:tablet_app/Models/AssistantResponse.dart';
|
|
||||||
import 'package:tablet_app/Models/tabletContext.dart';
|
|
||||||
import 'package:tablet_app/Services/assistantService.dart';
|
|
||||||
import 'package:tablet_app/constants.dart';
|
|
||||||
|
|
||||||
class AssistantChatView extends StatefulWidget {
|
|
||||||
final TabletAppContext tabletAppContext;
|
|
||||||
final String? configurationId;
|
|
||||||
final void Function(String sectionId, String sectionTitle)? onNavigateToSection;
|
|
||||||
|
|
||||||
const AssistantChatView({
|
|
||||||
Key? key,
|
|
||||||
required this.tabletAppContext,
|
|
||||||
this.configurationId,
|
|
||||||
this.onNavigateToSection,
|
|
||||||
}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<AssistantChatView> createState() => _AssistantChatViewState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _AssistantChatViewState extends State<AssistantChatView> {
|
|
||||||
late AssistantService _assistantService;
|
|
||||||
final TextEditingController _controller = TextEditingController();
|
|
||||||
final ScrollController _scrollController = ScrollController();
|
|
||||||
final List<Widget> _bubbles = [];
|
|
||||||
bool _isLoading = false;
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
_assistantService = AssistantService(tabletAppContext: widget.tabletAppContext);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> _send() async {
|
|
||||||
final text = _controller.text.trim();
|
|
||||||
if (text.isEmpty || _isLoading) return;
|
|
||||||
|
|
||||||
_controller.clear();
|
|
||||||
setState(() {
|
|
||||||
_bubbles.add(_ChatBubble(text: text, isUser: true));
|
|
||||||
_isLoading = true;
|
|
||||||
});
|
|
||||||
_scrollToBottom();
|
|
||||||
|
|
||||||
try {
|
|
||||||
final response = await _assistantService.chat(
|
|
||||||
message: text,
|
|
||||||
configurationId: widget.configurationId,
|
|
||||||
);
|
|
||||||
setState(() {
|
|
||||||
_bubbles.add(_AssistantMessage(
|
|
||||||
response: response,
|
|
||||||
onNavigate: widget.onNavigateToSection,
|
|
||||||
));
|
|
||||||
});
|
|
||||||
} catch (_) {
|
|
||||||
setState(() {
|
|
||||||
_bubbles.add(_ChatBubble(text: "Une erreur est survenue, réessayez.", isUser: false));
|
|
||||||
});
|
|
||||||
} finally {
|
|
||||||
setState(() => _isLoading = false);
|
|
||||||
_scrollToBottom();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void _scrollToBottom() {
|
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
||||||
if (_scrollController.hasClients) {
|
|
||||||
_scrollController.animateTo(
|
|
||||||
_scrollController.position.maxScrollExtent,
|
|
||||||
duration: const Duration(milliseconds: 300),
|
|
||||||
curve: Curves.easeOut,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
width: 480,
|
|
||||||
height: double.infinity,
|
|
||||||
decoration: const BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
borderRadius: BorderRadius.horizontal(left: Radius.circular(20)),
|
|
||||||
boxShadow: [
|
|
||||||
BoxShadow(color: Colors.black26, blurRadius: 12, offset: Offset(-4, 0)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
// Header
|
|
||||||
Container(
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 16),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: kMainGrey,
|
|
||||||
borderRadius: const BorderRadius.only(topLeft: Radius.circular(20)),
|
|
||||||
),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
const Icon(Icons.chat_bubble_outline, color: Colors.white, size: 22),
|
|
||||||
const SizedBox(width: 10),
|
|
||||||
const Expanded(
|
|
||||||
child: Text(
|
|
||||||
"Assistant",
|
|
||||||
style: TextStyle(color: Colors.white, fontSize: 20, fontWeight: FontWeight.w600),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
IconButton(
|
|
||||||
icon: const Icon(Icons.close, color: Colors.white),
|
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
// Messages
|
|
||||||
Expanded(
|
|
||||||
child: _bubbles.isEmpty
|
|
||||||
? Center(
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(32),
|
|
||||||
child: Text(
|
|
||||||
"Bonjour ! Posez-moi vos questions sur cette visite.",
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(color: Colors.grey[500], fontSize: 18),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
: ListView.builder(
|
|
||||||
controller: _scrollController,
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
|
||||||
itemCount: _bubbles.length,
|
|
||||||
itemBuilder: (_, i) => _bubbles[i],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
// Loading
|
|
||||||
if (_isLoading)
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 4),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
SizedBox(
|
|
||||||
width: 22, height: 22,
|
|
||||||
child: CircularProgressIndicator(strokeWidth: 2, color: kMainGrey),
|
|
||||||
),
|
|
||||||
const SizedBox(width: 10),
|
|
||||||
Text("...", style: TextStyle(color: Colors.grey[400], fontSize: 16)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
// Input
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.all(12),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: TextField(
|
|
||||||
controller: _controller,
|
|
||||||
textCapitalization: TextCapitalization.sentences,
|
|
||||||
style: const TextStyle(fontSize: 16),
|
|
||||||
decoration: InputDecoration(
|
|
||||||
hintText: "Votre question...",
|
|
||||||
filled: true,
|
|
||||||
fillColor: Colors.grey[100],
|
|
||||||
border: OutlineInputBorder(
|
|
||||||
borderRadius: BorderRadius.circular(24),
|
|
||||||
borderSide: BorderSide.none,
|
|
||||||
),
|
|
||||||
contentPadding: const EdgeInsets.symmetric(horizontal: 18, vertical: 12),
|
|
||||||
),
|
|
||||||
onSubmitted: (_) => _send(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(width: 10),
|
|
||||||
CircleAvatar(
|
|
||||||
radius: 26,
|
|
||||||
backgroundColor: kMainGrey,
|
|
||||||
child: IconButton(
|
|
||||||
icon: const Icon(Icons.send, color: Colors.white, size: 20),
|
|
||||||
onPressed: _send,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class _ChatBubble extends StatelessWidget {
|
|
||||||
final String text;
|
|
||||||
final bool isUser;
|
|
||||||
|
|
||||||
const _ChatBubble({required this.text, required this.isUser});
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Align(
|
|
||||||
alignment: isUser ? Alignment.centerRight : Alignment.centerLeft,
|
|
||||||
child: Container(
|
|
||||||
margin: const EdgeInsets.symmetric(vertical: 5),
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
|
||||||
constraints: BoxConstraints(maxWidth: MediaQuery.of(context).size.width * 0.65),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: isUser ? kMainGrey : Colors.grey[100],
|
|
||||||
borderRadius: BorderRadius.only(
|
|
||||||
topLeft: const Radius.circular(18),
|
|
||||||
topRight: const Radius.circular(18),
|
|
||||||
bottomLeft: isUser ? const Radius.circular(18) : const Radius.circular(4),
|
|
||||||
bottomRight: isUser ? const Radius.circular(4) : const Radius.circular(18),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: Text(
|
|
||||||
text,
|
|
||||||
style: TextStyle(
|
|
||||||
color: isUser ? Colors.white : kSecondGrey,
|
|
||||||
fontSize: 15,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class _AssistantMessage extends StatelessWidget {
|
|
||||||
final AssistantResponse response;
|
|
||||||
final void Function(String sectionId, String sectionTitle)? onNavigate;
|
|
||||||
|
|
||||||
const _AssistantMessage({required this.response, this.onNavigate});
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(vertical: 5),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
// Text bubble
|
|
||||||
_ChatBubble(text: response.reply, isUser: false),
|
|
||||||
|
|
||||||
// Cards
|
|
||||||
if (response.cards != null && response.cards!.isNotEmpty)
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.only(top: 6, left: 4, right: 32),
|
|
||||||
child: Column(
|
|
||||||
children: response.cards!
|
|
||||||
.map((card) => _AiCardWidget(card: card))
|
|
||||||
.toList(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
// Navigation button
|
|
||||||
if (response.navigation != null && onNavigate != null)
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.only(top: 8, left: 4),
|
|
||||||
child: ElevatedButton.icon(
|
|
||||||
onPressed: () => onNavigate!(
|
|
||||||
response.navigation!.sectionId,
|
|
||||||
response.navigation!.sectionTitle,
|
|
||||||
),
|
|
||||||
icon: const Icon(Icons.arrow_forward, size: 18),
|
|
||||||
label: Text(response.navigation!.sectionTitle),
|
|
||||||
style: ElevatedButton.styleFrom(
|
|
||||||
backgroundColor: kMainGrey,
|
|
||||||
foregroundColor: Colors.white,
|
|
||||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class _AiCardWidget extends StatelessWidget {
|
|
||||||
final AiCard card;
|
|
||||||
|
|
||||||
const _AiCardWidget({required this.card});
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
margin: const EdgeInsets.only(bottom: 6),
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 10),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
borderRadius: BorderRadius.circular(12),
|
|
||||||
border: Border.all(color: Colors.grey[200]!),
|
|
||||||
boxShadow: [
|
|
||||||
BoxShadow(color: Colors.black.withOpacity(0.05), blurRadius: 4, offset: const Offset(0, 2)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
if (card.icon != null) ...[
|
|
||||||
Text(card.icon!, style: const TextStyle(fontSize: 20)),
|
|
||||||
const SizedBox(width: 10),
|
|
||||||
],
|
|
||||||
Expanded(
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
card.title,
|
|
||||||
style: TextStyle(fontWeight: FontWeight.w600, fontSize: 14, color: kSecondGrey),
|
|
||||||
),
|
|
||||||
if (card.subtitle.isNotEmpty)
|
|
||||||
Text(
|
|
||||||
card.subtitle,
|
|
||||||
style: TextStyle(fontSize: 12, color: Colors.grey[500]),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,56 +0,0 @@
|
|||||||
class AiCard {
|
|
||||||
final String title;
|
|
||||||
final String subtitle;
|
|
||||||
final String? icon;
|
|
||||||
|
|
||||||
const AiCard({required this.title, required this.subtitle, this.icon});
|
|
||||||
|
|
||||||
factory AiCard.fromJson(Map<String, dynamic> json) => AiCard(
|
|
||||||
title: json['title'] as String? ?? '',
|
|
||||||
subtitle: json['subtitle'] as String? ?? '',
|
|
||||||
icon: json['icon'] as String?,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
class AssistantNavigationAction {
|
|
||||||
final String sectionId;
|
|
||||||
final String sectionTitle;
|
|
||||||
final String sectionType;
|
|
||||||
|
|
||||||
const AssistantNavigationAction({
|
|
||||||
required this.sectionId,
|
|
||||||
required this.sectionTitle,
|
|
||||||
required this.sectionType,
|
|
||||||
});
|
|
||||||
|
|
||||||
factory AssistantNavigationAction.fromJson(Map<String, dynamic> json) =>
|
|
||||||
AssistantNavigationAction(
|
|
||||||
sectionId: json['sectionId'] as String? ?? '',
|
|
||||||
sectionTitle: json['sectionTitle'] as String? ?? '',
|
|
||||||
sectionType: json['sectionType'] as String? ?? '',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
class AssistantResponse {
|
|
||||||
final String reply;
|
|
||||||
final List<AiCard>? cards;
|
|
||||||
final AssistantNavigationAction? navigation;
|
|
||||||
|
|
||||||
const AssistantResponse({
|
|
||||||
required this.reply,
|
|
||||||
this.cards,
|
|
||||||
this.navigation,
|
|
||||||
});
|
|
||||||
|
|
||||||
factory AssistantResponse.fromJson(Map<String, dynamic> json) =>
|
|
||||||
AssistantResponse(
|
|
||||||
reply: json['reply'] as String? ?? '',
|
|
||||||
cards: (json['cards'] as List<dynamic>?)
|
|
||||||
?.map((e) => AiCard.fromJson(e as Map<String, dynamic>))
|
|
||||||
.toList(),
|
|
||||||
navigation: json['navigation'] != null
|
|
||||||
? AssistantNavigationAction.fromJson(
|
|
||||||
json['navigation'] as Map<String, dynamic>)
|
|
||||||
: null,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -3,7 +3,6 @@ import 'package:manager_api_new/api.dart';
|
|||||||
//import 'package:mqtt_client/mqtt_browser_client.dart';
|
//import 'package:mqtt_client/mqtt_browser_client.dart';
|
||||||
import 'package:mqtt_client/mqtt_server_client.dart';
|
import 'package:mqtt_client/mqtt_server_client.dart';
|
||||||
import 'package:tablet_app/client.dart';
|
import 'package:tablet_app/client.dart';
|
||||||
import 'package:tablet_app/Services/statisticsService.dart';
|
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
|
|
||||||
@ -19,8 +18,6 @@ class TabletAppContext with ChangeNotifier{
|
|||||||
String? instanceId;
|
String? instanceId;
|
||||||
Size? puzzleSize;
|
Size? puzzleSize;
|
||||||
String? localPath;
|
String? localPath;
|
||||||
ApplicationInstanceDTO? applicationInstanceDTO;
|
|
||||||
StatisticsService? statisticsService;
|
|
||||||
|
|
||||||
TabletAppContext({this.id, this.deviceId, this.host, this.configuration, this.language, this.instanceId, this.clientAPI});
|
TabletAppContext({this.id, this.deviceId, this.host, this.configuration, this.language, this.instanceId, this.clientAPI});
|
||||||
|
|
||||||
|
|||||||
@ -150,11 +150,6 @@ class _AgendaView extends State<AgendaView> {
|
|||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
print("${eventAgenda.name}");
|
print("${eventAgenda.name}");
|
||||||
(Provider.of<AppContext>(context, listen: false).getContext() as TabletAppContext)
|
|
||||||
.statisticsService?.track(
|
|
||||||
VisitEventType.agendaEventTap,
|
|
||||||
metadata: {'eventId': eventAgenda.name, 'eventTitle': eventAgenda.name},
|
|
||||||
);
|
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
|
|||||||
@ -15,7 +15,6 @@ import 'package:manager_api_new/api.dart';
|
|||||||
import 'package:package_info_plus/package_info_plus.dart';
|
import 'package:package_info_plus/package_info_plus.dart';
|
||||||
import 'package:path_provider/path_provider.dart';
|
import 'package:path_provider/path_provider.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:tablet_app/Services/statisticsService.dart';
|
|
||||||
import 'package:tablet_app/Components/loading_common.dart';
|
import 'package:tablet_app/Components/loading_common.dart';
|
||||||
import 'package:tablet_app/Helpers/DatabaseHelper.dart';
|
import 'package:tablet_app/Helpers/DatabaseHelper.dart';
|
||||||
import 'package:tablet_app/Helpers/ImageCustomProvider.dart';
|
import 'package:tablet_app/Helpers/ImageCustomProvider.dart';
|
||||||
@ -43,7 +42,6 @@ import 'package:http/http.dart' as http;
|
|||||||
import 'package:image/image.dart' as IMG;
|
import 'package:image/image.dart' as IMG;
|
||||||
import 'dart:ui' as ui;
|
import 'dart:ui' as ui;
|
||||||
|
|
||||||
import 'package:tablet_app/Components/assistant_chat_view.dart';
|
|
||||||
import '../Quizz/quizz_view.dart';
|
import '../Quizz/quizz_view.dart';
|
||||||
import 'language_selection.dart';
|
import 'language_selection.dart';
|
||||||
|
|
||||||
@ -196,49 +194,7 @@ class _MainViewWidget extends State<MainViewWidget> {
|
|||||||
}
|
}
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
),
|
)
|
||||||
if (tabletAppContext.applicationInstanceDTO?.isAssistant == true)
|
|
||||||
Positioned(
|
|
||||||
bottom: 24,
|
|
||||||
right: 24,
|
|
||||||
child: FloatingActionButton.extended(
|
|
||||||
backgroundColor: kMainGrey,
|
|
||||||
icon: const Icon(Icons.chat_bubble_outline, color: Colors.white),
|
|
||||||
label: const Text("Assistant", style: TextStyle(color: Colors.white, fontSize: 16)),
|
|
||||||
onPressed: () {
|
|
||||||
showGeneralDialog(
|
|
||||||
context: context,
|
|
||||||
barrierDismissible: true,
|
|
||||||
barrierLabel: 'Assistant',
|
|
||||||
barrierColor: Colors.black45,
|
|
||||||
transitionDuration: const Duration(milliseconds: 250),
|
|
||||||
pageBuilder: (dialogContext, __, ___) => Align(
|
|
||||||
alignment: Alignment.centerRight,
|
|
||||||
child: AssistantChatView(
|
|
||||||
tabletAppContext: tabletAppContext,
|
|
||||||
configurationId: tabletAppContext.configuration?.id,
|
|
||||||
onNavigateToSection: (sectionId, sectionTitle) {
|
|
||||||
Navigator.of(dialogContext).pop();
|
|
||||||
final index = sectionsLocal?.indexWhere((s) => s.id == sectionId) ?? -1;
|
|
||||||
if (index >= 0) {
|
|
||||||
Navigator.push(context, MaterialPageRoute(
|
|
||||||
builder: (_) => SectionPageDetail(
|
|
||||||
configurationDTO: configurationDTO,
|
|
||||||
sectionDTO: sectionsLocal![index],
|
|
||||||
textColor: textColor,
|
|
||||||
isImageBackground: isImageBackground,
|
|
||||||
elementToShow: getContent(tabletAppContext, sectionsLocal![index], isImageBackground, rawSectionsData[index]),
|
|
||||||
isFromMenu: false,
|
|
||||||
),
|
|
||||||
));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
)
|
|
||||||
/*if(configurationDTO.weatherCity != null && configurationDTO.weatherCity!.length > 2 && configurationDTO.weatherResult != null)
|
/*if(configurationDTO.weatherCity != null && configurationDTO.weatherCity!.length > 2 && configurationDTO.weatherResult != null)
|
||||||
Positioned(
|
Positioned(
|
||||||
bottom: 0,
|
bottom: 0,
|
||||||
@ -321,35 +277,6 @@ class _MainViewWidget extends State<MainViewWidget> {
|
|||||||
|
|
||||||
await getCurrentConfiguration(appContext);
|
await getCurrentConfiguration(appContext);
|
||||||
|
|
||||||
// Load applicationInstanceDTO to check if assistant/statistics are enabled
|
|
||||||
try {
|
|
||||||
if (tabletAppContext.instanceId != null) {
|
|
||||||
final instanceDTO = await tabletAppContext.clientAPI!.instanceApi!.instanceGetDetail(tabletAppContext.instanceId!);
|
|
||||||
if (instanceDTO != null && instanceDTO.applicationInstanceDTOs != null) {
|
|
||||||
final tabletInstance = instanceDTO.applicationInstanceDTOs!
|
|
||||||
.where((a) => a.appType == AppType.Tablet)
|
|
||||||
.firstOrNull;
|
|
||||||
if (tabletInstance != null) {
|
|
||||||
if (instanceDTO.isAssistant == true) {
|
|
||||||
tabletAppContext.applicationInstanceDTO = tabletInstance;
|
|
||||||
}
|
|
||||||
if (tabletInstance.isStatistic == true) {
|
|
||||||
tabletAppContext.statisticsService = StatisticsService(
|
|
||||||
clientAPI: tabletAppContext.clientAPI!,
|
|
||||||
instanceId: tabletAppContext.instanceId,
|
|
||||||
configurationId: tabletAppContext.configuration?.id,
|
|
||||||
appType: 'Tablet',
|
|
||||||
language: tabletAppContext.language,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
appContext.setContext(tabletAppContext);
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
print('Failed to load applicationInstanceDTO: $e');
|
|
||||||
}
|
|
||||||
|
|
||||||
print(sectionsLocal);
|
print(sectionsLocal);
|
||||||
|
|
||||||
if(isInit) {
|
if(isInit) {
|
||||||
|
|||||||
@ -18,7 +18,6 @@ import 'package:tablet_app/Screens/Map/geo_point_filter.dart';
|
|||||||
import 'package:tablet_app/Screens/Map/map_context.dart';
|
import 'package:tablet_app/Screens/Map/map_context.dart';
|
||||||
import 'package:html/parser.dart' show parse;
|
import 'package:html/parser.dart' show parse;
|
||||||
import 'package:tablet_app/Screens/Menu/menu_view.dart';
|
import 'package:tablet_app/Screens/Menu/menu_view.dart';
|
||||||
import 'package:tablet_app/Services/statisticsService.dart';
|
|
||||||
import 'package:tablet_app/app_context.dart';
|
import 'package:tablet_app/app_context.dart';
|
||||||
import 'package:tablet_app/constants.dart';
|
import 'package:tablet_app/constants.dart';
|
||||||
|
|
||||||
@ -47,35 +46,6 @@ class SectionPageDetail extends StatefulWidget {
|
|||||||
|
|
||||||
class _SectionPageDetailState extends State<SectionPageDetail> {
|
class _SectionPageDetailState extends State<SectionPageDetail> {
|
||||||
bool init = false;
|
bool init = false;
|
||||||
DateTime? _sectionOpenTime;
|
|
||||||
StatisticsService? _statisticsService;
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
_sectionOpenTime = DateTime.now();
|
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
||||||
final tabletAppContext = Provider.of<AppContext>(context, listen: false).getContext() as TabletAppContext;
|
|
||||||
_statisticsService = tabletAppContext.statisticsService;
|
|
||||||
_statisticsService?.track(
|
|
||||||
VisitEventType.sectionView,
|
|
||||||
sectionId: widget.sectionDTO.id,
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
final duration = _sectionOpenTime != null
|
|
||||||
? DateTime.now().difference(_sectionOpenTime!).inSeconds
|
|
||||||
: null;
|
|
||||||
_statisticsService?.track(
|
|
||||||
VisitEventType.sectionLeave,
|
|
||||||
sectionId: widget.sectionDTO.id,
|
|
||||||
durationSeconds: duration,
|
|
||||||
);
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|||||||
@ -69,14 +69,6 @@ class _GoogleMapViewState extends State<GoogleMapView> {
|
|||||||
mapContext.setSelectedPoint(point);
|
mapContext.setSelectedPoint(point);
|
||||||
//mapContext.setSelectedPointForNavigate(point);
|
//mapContext.setSelectedPointForNavigate(point);
|
||||||
//});
|
//});
|
||||||
(Provider.of<AppContext>(context, listen: false).getContext() as TabletAppContext)
|
|
||||||
.statisticsService?.track(
|
|
||||||
VisitEventType.mapPoiTap,
|
|
||||||
metadata: {
|
|
||||||
'geoPointId': point.id,
|
|
||||||
'geoPointTitle': parse(textSansHTML.body!.text).documentElement!.text,
|
|
||||||
},
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
infoWindow: InfoWindow.noText));
|
infoWindow: InfoWindow.noText));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -69,11 +69,6 @@ class _MenuView extends State<MenuView> {
|
|||||||
SectionDTO section = subSections[index];
|
SectionDTO section = subSections[index];
|
||||||
var rawSectionData = rawSubSectionsData[index];
|
var rawSectionData = rawSubSectionsData[index];
|
||||||
|
|
||||||
tabletAppContext.statisticsService?.track(
|
|
||||||
VisitEventType.menuItemTap,
|
|
||||||
metadata: {'targetSectionId': section.id, 'menuItemTitle': section.title?.where((t) => t.language == tabletAppContext.language).firstOrNull?.value},
|
|
||||||
);
|
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
//selectedSection = section;
|
//selectedSection = section;
|
||||||
//selectedSection = menuDTO.sections![index];
|
//selectedSection = menuDTO.sections![index];
|
||||||
|
|||||||
@ -28,7 +28,6 @@ class _PuzzleView extends State<PuzzleView> {
|
|||||||
|
|
||||||
int allInPlaceCount = 0;
|
int allInPlaceCount = 0;
|
||||||
bool isFinished = false;
|
bool isFinished = false;
|
||||||
DateTime? _puzzleStartTime;
|
|
||||||
GlobalKey _widgetKey = GlobalKey();
|
GlobalKey _widgetKey = GlobalKey();
|
||||||
Size? realWidgetSize;
|
Size? realWidgetSize;
|
||||||
List<Widget> pieces = [];
|
List<Widget> pieces = [];
|
||||||
@ -41,7 +40,6 @@ class _PuzzleView extends State<PuzzleView> {
|
|||||||
puzzleDTO = widget.section;
|
puzzleDTO = widget.section;
|
||||||
puzzleDTO.rows = puzzleDTO.rows != null ? puzzleDTO.rows : 3;
|
puzzleDTO.rows = puzzleDTO.rows != null ? puzzleDTO.rows : 3;
|
||||||
puzzleDTO.cols = puzzleDTO.cols != null ? puzzleDTO.cols : 3;
|
puzzleDTO.cols = puzzleDTO.cols != null ? puzzleDTO.cols : 3;
|
||||||
_puzzleStartTime = DateTime.now();
|
|
||||||
|
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
Size size = MediaQuery.of(context).size;
|
Size size = MediaQuery.of(context).size;
|
||||||
@ -193,11 +191,6 @@ class _PuzzleView extends State<PuzzleView> {
|
|||||||
Size size = MediaQuery.of(context).size;
|
Size size = MediaQuery.of(context).size;
|
||||||
final appContext = Provider.of<AppContext>(context, listen: false);
|
final appContext = Provider.of<AppContext>(context, listen: false);
|
||||||
TabletAppContext tabletAppContext = appContext.getContext();
|
TabletAppContext tabletAppContext = appContext.getContext();
|
||||||
final duration = _puzzleStartTime != null ? DateTime.now().difference(_puzzleStartTime!).inSeconds : 0;
|
|
||||||
tabletAppContext.statisticsService?.track(
|
|
||||||
VisitEventType.gameComplete,
|
|
||||||
metadata: {'gameType': 'Puzzle', 'durationSeconds': duration},
|
|
||||||
);
|
|
||||||
TranslationAndResourceDTO? messageFin = puzzleDTO.messageFin != null && puzzleDTO.messageFin!.length > 0 ? puzzleDTO.messageFin!.where((message) => message.language!.toUpperCase() == tabletAppContext.language!.toUpperCase()).firstOrNull : null;
|
TranslationAndResourceDTO? messageFin = puzzleDTO.messageFin != null && puzzleDTO.messageFin!.length > 0 ? puzzleDTO.messageFin!.where((message) => message.language!.toUpperCase() == tabletAppContext.language!.toUpperCase()).firstOrNull : null;
|
||||||
|
|
||||||
if(messageFin != null) {
|
if(messageFin != null) {
|
||||||
|
|||||||
@ -407,12 +407,6 @@ class _QuizzView extends State<QuizzView> {
|
|||||||
{
|
{
|
||||||
showResult = true;
|
showResult = true;
|
||||||
_controllerCenter!.play(); // TODO Maybe show only confetti on super score ..
|
_controllerCenter!.play(); // TODO Maybe show only confetti on super score ..
|
||||||
final goodResponses = _questionsSubDTO.where((q) => q.chosen == q.responsesSubDTO!.indexWhere((r) => r.isGood!)).length;
|
|
||||||
(Provider.of<AppContext>(context, listen: false).getContext() as TabletAppContext)
|
|
||||||
.statisticsService?.track(
|
|
||||||
VisitEventType.quizComplete,
|
|
||||||
metadata: {'score': goodResponses, 'totalQuestions': _questionsSubDTO.length},
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
sliderController!.nextPage(duration: new Duration(milliseconds: 650), curve: Curves.fastOutSlowIn);
|
sliderController!.nextPage(duration: new Duration(milliseconds: 650), curve: Curves.fastOutSlowIn);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,43 +0,0 @@
|
|||||||
import 'dart:convert';
|
|
||||||
import 'package:http/http.dart' as http;
|
|
||||||
import 'package:tablet_app/Models/tabletContext.dart';
|
|
||||||
import 'package:tablet_app/Models/AssistantResponse.dart';
|
|
||||||
|
|
||||||
class AssistantService {
|
|
||||||
final TabletAppContext tabletAppContext;
|
|
||||||
final List<Map<String, String>> _history = [];
|
|
||||||
|
|
||||||
AssistantService({required this.tabletAppContext});
|
|
||||||
|
|
||||||
Future<AssistantResponse> chat({required String message, String? configurationId}) async {
|
|
||||||
final host = tabletAppContext.host ?? '';
|
|
||||||
final instanceId = tabletAppContext.instanceId ?? '';
|
|
||||||
final language = tabletAppContext.language ?? 'FR';
|
|
||||||
|
|
||||||
_history.add({'role': 'user', 'content': message});
|
|
||||||
|
|
||||||
final body = {
|
|
||||||
'message': message,
|
|
||||||
'instanceId': instanceId,
|
|
||||||
'appType': 'Tablet',
|
|
||||||
'configurationId': configurationId,
|
|
||||||
'language': language,
|
|
||||||
'history': _history.take(10).toList(),
|
|
||||||
};
|
|
||||||
|
|
||||||
final response = await http.post(
|
|
||||||
Uri.parse('$host/api/ai/chat'),
|
|
||||||
headers: {'Content-Type': 'application/json'},
|
|
||||||
body: jsonEncode(body),
|
|
||||||
);
|
|
||||||
|
|
||||||
if (response.statusCode == 200) {
|
|
||||||
final data = jsonDecode(response.body) as Map<String, dynamic>;
|
|
||||||
final result = AssistantResponse.fromJson(data);
|
|
||||||
_history.add({'role': 'assistant', 'content': result.reply});
|
|
||||||
return result;
|
|
||||||
} else {
|
|
||||||
throw Exception('Assistant error: ${response.statusCode}');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,52 +0,0 @@
|
|||||||
import 'dart:convert';
|
|
||||||
import 'dart:math';
|
|
||||||
|
|
||||||
import 'package:manager_api_new/api.dart';
|
|
||||||
import 'package:tablet_app/client.dart';
|
|
||||||
|
|
||||||
class StatisticsService {
|
|
||||||
final Client clientAPI;
|
|
||||||
final String? instanceId;
|
|
||||||
final String? configurationId;
|
|
||||||
final String? appType; // "Mobile" or "Tablet"
|
|
||||||
final String? language;
|
|
||||||
final String sessionId;
|
|
||||||
|
|
||||||
StatisticsService({
|
|
||||||
required this.clientAPI,
|
|
||||||
required this.instanceId,
|
|
||||||
required this.configurationId,
|
|
||||||
this.appType = 'Tablet',
|
|
||||||
this.language,
|
|
||||||
}) : sessionId = _generateSessionId();
|
|
||||||
|
|
||||||
static String _generateSessionId() {
|
|
||||||
final rand = Random();
|
|
||||||
final bytes = List<int>.generate(16, (_) => rand.nextInt(256));
|
|
||||||
return bytes.map((b) => b.toRadixString(16).padLeft(2, '0')).join();
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> track(
|
|
||||||
String eventType, {
|
|
||||||
String? sectionId,
|
|
||||||
int? durationSeconds,
|
|
||||||
Map<String, dynamic>? metadata,
|
|
||||||
}) async {
|
|
||||||
try {
|
|
||||||
await clientAPI.statsApi!.statsTrackEvent(VisitEventDTO(
|
|
||||||
instanceId: instanceId ?? '',
|
|
||||||
configurationId: configurationId,
|
|
||||||
sectionId: sectionId,
|
|
||||||
sessionId: sessionId,
|
|
||||||
eventType: eventType,
|
|
||||||
appType: appType,
|
|
||||||
language: language,
|
|
||||||
durationSeconds: durationSeconds,
|
|
||||||
metadata: metadata != null ? jsonEncode(metadata) : null,
|
|
||||||
timestamp: DateTime.now(),
|
|
||||||
));
|
|
||||||
} catch (_) {
|
|
||||||
// fire-and-forget — never block the UI on stats errors
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -26,12 +26,6 @@ class Client {
|
|||||||
DeviceApi? _deviceApi;
|
DeviceApi? _deviceApi;
|
||||||
DeviceApi? get deviceApi => _deviceApi;
|
DeviceApi? get deviceApi => _deviceApi;
|
||||||
|
|
||||||
ApplicationInstanceApi? _applicationInstanceApi;
|
|
||||||
ApplicationInstanceApi? get applicationInstanceApi => _applicationInstanceApi;
|
|
||||||
|
|
||||||
StatsApi? _statsApi;
|
|
||||||
StatsApi? get statsApi => _statsApi;
|
|
||||||
|
|
||||||
Client(String path) {
|
Client(String path) {
|
||||||
_apiClient = ApiClient(
|
_apiClient = ApiClient(
|
||||||
basePath: path); // "http://192.168.31.96"
|
basePath: path); // "http://192.168.31.96"
|
||||||
@ -43,7 +37,5 @@ class Client {
|
|||||||
_sectionApi = SectionApi(_apiClient);
|
_sectionApi = SectionApi(_apiClient);
|
||||||
_resourceApi = ResourceApi(_apiClient);
|
_resourceApi = ResourceApi(_apiClient);
|
||||||
_deviceApi = DeviceApi(_apiClient);
|
_deviceApi = DeviceApi(_apiClient);
|
||||||
_applicationInstanceApi = ApplicationInstanceApi(_apiClient);
|
|
||||||
_statsApi = StatsApi(_apiClient);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -14,11 +14,10 @@ import just_audio
|
|||||||
import package_info_plus
|
import package_info_plus
|
||||||
import path_provider_foundation
|
import path_provider_foundation
|
||||||
import shared_preferences_foundation
|
import shared_preferences_foundation
|
||||||
import sqflite_darwin
|
import sqflite
|
||||||
import url_launcher_macos
|
import url_launcher_macos
|
||||||
import video_player_avfoundation
|
import video_player_avfoundation
|
||||||
import wakelock_plus
|
import wakelock_plus
|
||||||
import webview_flutter_wkwebview
|
|
||||||
|
|
||||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||||
AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin"))
|
AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin"))
|
||||||
@ -34,5 +33,4 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
|||||||
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
|
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
|
||||||
FVPVideoPlayerPlugin.register(with: registry.registrar(forPlugin: "FVPVideoPlayerPlugin"))
|
FVPVideoPlayerPlugin.register(with: registry.registrar(forPlugin: "FVPVideoPlayerPlugin"))
|
||||||
WakelockPlusMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockPlusMacosPlugin"))
|
WakelockPlusMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockPlusMacosPlugin"))
|
||||||
WebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "WebViewFlutterPlugin"))
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,12 +0,0 @@
|
|||||||
// This is a generated file; do not edit or check into version control.
|
|
||||||
FLUTTER_ROOT=C:\PROJ\flutter
|
|
||||||
FLUTTER_APPLICATION_PATH=C:\Users\ThomasFransolet\Documents\Documents\Perso\GITEA\tablet-app
|
|
||||||
COCOAPODS_PARALLEL_CODE_SIGN=true
|
|
||||||
FLUTTER_BUILD_DIR=build
|
|
||||||
FLUTTER_BUILD_NAME=2.1.5
|
|
||||||
FLUTTER_BUILD_NUMBER=26
|
|
||||||
FLUTTER_CLI_BUILD_MODE=debug
|
|
||||||
DART_OBFUSCATION=false
|
|
||||||
TRACK_WIDGET_CREATION=true
|
|
||||||
TREE_SHAKE_ICONS=false
|
|
||||||
PACKAGE_CONFIG=.dart_tool/package_config.json
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# This is a generated file; do not edit or check into version control.
|
|
||||||
export "FLUTTER_ROOT=C:\PROJ\flutter"
|
|
||||||
export "FLUTTER_APPLICATION_PATH=C:\Users\ThomasFransolet\Documents\Documents\Perso\GITEA\tablet-app"
|
|
||||||
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
|
|
||||||
export "FLUTTER_BUILD_DIR=build"
|
|
||||||
export "FLUTTER_BUILD_NAME=2.1.5"
|
|
||||||
export "FLUTTER_BUILD_NUMBER=26"
|
|
||||||
export "FLUTTER_CLI_BUILD_MODE=debug"
|
|
||||||
export "DART_OBFUSCATION=false"
|
|
||||||
export "TRACK_WIDGET_CREATION=true"
|
|
||||||
export "TREE_SHAKE_ICONS=false"
|
|
||||||
export "PACKAGE_CONFIG=.dart_tool/package_config.json"
|
|
||||||
@ -91,19 +91,6 @@ part 'model/user_detail_dto.dart';
|
|||||||
part 'model/video_dto.dart';
|
part 'model/video_dto.dart';
|
||||||
part 'model/weather_dto.dart';
|
part 'model/weather_dto.dart';
|
||||||
part 'model/web_dto.dart';
|
part 'model/web_dto.dart';
|
||||||
part 'model/map_annotation.dart';
|
|
||||||
part 'model/programme_block.dart';
|
|
||||||
part 'model/app_configuration_link_configuration.dart';
|
|
||||||
part 'model/app_configuration_link_device.dart';
|
|
||||||
part 'model/app_configuration_link.dart';
|
|
||||||
part 'model/app_configuration_link_application_instance.dart';
|
|
||||||
part 'model/app_type.dart';
|
|
||||||
part 'model/layout_main_page_type.dart';
|
|
||||||
part 'model/application_instance_dto.dart';
|
|
||||||
part 'model/application_instance_dto_section_event_dto.dart';
|
|
||||||
part 'model/application_instance_section_event.dart';
|
|
||||||
part 'model/section_event.dart';
|
|
||||||
part 'model/section_event_dto.dart';
|
|
||||||
|
|
||||||
/// An [ApiClient] instance that uses the default values obtained from
|
/// An [ApiClient] instance that uses the default values obtained from
|
||||||
/// the OpenAPI specification file.
|
/// the OpenAPI specification file.
|
||||||
|
|||||||
@ -1,369 +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 AppConfigurationLink {
|
|
||||||
/// Returns a new [AppConfigurationLink] instance.
|
|
||||||
AppConfigurationLink({
|
|
||||||
required this.configurationId,
|
|
||||||
required this.applicationInstanceId,
|
|
||||||
this.id,
|
|
||||||
this.order,
|
|
||||||
this.isActive,
|
|
||||||
this.weightMasonryGrid,
|
|
||||||
this.isDate,
|
|
||||||
this.isHour,
|
|
||||||
this.roundedValue,
|
|
||||||
this.screenPercentageSectionsMainPage,
|
|
||||||
this.isSectionImageBackground,
|
|
||||||
this.layoutMainPage,
|
|
||||||
this.loaderImageId,
|
|
||||||
this.loaderImageUrl,
|
|
||||||
this.primaryColor,
|
|
||||||
this.secondaryColor,
|
|
||||||
this.configuration,
|
|
||||||
this.applicationInstance,
|
|
||||||
this.deviceId,
|
|
||||||
this.device,
|
|
||||||
});
|
|
||||||
|
|
||||||
String configurationId;
|
|
||||||
|
|
||||||
String applicationInstanceId;
|
|
||||||
|
|
||||||
String? id;
|
|
||||||
|
|
||||||
int? order;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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? isActive;
|
|
||||||
|
|
||||||
int? weightMasonryGrid;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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? isDate;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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? isHour;
|
|
||||||
|
|
||||||
int? roundedValue;
|
|
||||||
|
|
||||||
int? screenPercentageSectionsMainPage;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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? isSectionImageBackground;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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.
|
|
||||||
///
|
|
||||||
LayoutMainPageType? layoutMainPage;
|
|
||||||
|
|
||||||
String? loaderImageId;
|
|
||||||
|
|
||||||
String? loaderImageUrl;
|
|
||||||
|
|
||||||
String? primaryColor;
|
|
||||||
|
|
||||||
String? secondaryColor;
|
|
||||||
|
|
||||||
AppConfigurationLinkConfiguration? configuration;
|
|
||||||
|
|
||||||
AppConfigurationLinkApplicationInstance? applicationInstance;
|
|
||||||
|
|
||||||
String? deviceId;
|
|
||||||
|
|
||||||
AppConfigurationLinkDevice? device;
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool operator ==(Object other) =>
|
|
||||||
identical(this, other) ||
|
|
||||||
other is AppConfigurationLink &&
|
|
||||||
other.configurationId == configurationId &&
|
|
||||||
other.applicationInstanceId == applicationInstanceId &&
|
|
||||||
other.id == id &&
|
|
||||||
other.order == order &&
|
|
||||||
other.isActive == isActive &&
|
|
||||||
other.weightMasonryGrid == weightMasonryGrid &&
|
|
||||||
other.isDate == isDate &&
|
|
||||||
other.isHour == isHour &&
|
|
||||||
other.roundedValue == roundedValue &&
|
|
||||||
other.screenPercentageSectionsMainPage ==
|
|
||||||
screenPercentageSectionsMainPage &&
|
|
||||||
other.isSectionImageBackground == isSectionImageBackground &&
|
|
||||||
other.layoutMainPage == layoutMainPage &&
|
|
||||||
other.loaderImageId == loaderImageId &&
|
|
||||||
other.loaderImageUrl == loaderImageUrl &&
|
|
||||||
other.primaryColor == primaryColor &&
|
|
||||||
other.secondaryColor == secondaryColor &&
|
|
||||||
other.configuration == configuration &&
|
|
||||||
other.applicationInstance == applicationInstance &&
|
|
||||||
other.deviceId == deviceId &&
|
|
||||||
other.device == device;
|
|
||||||
|
|
||||||
@override
|
|
||||||
int get hashCode =>
|
|
||||||
// ignore: unnecessary_parenthesis
|
|
||||||
(configurationId.hashCode) +
|
|
||||||
(applicationInstanceId.hashCode) +
|
|
||||||
(id == null ? 0 : id!.hashCode) +
|
|
||||||
(order == null ? 0 : order!.hashCode) +
|
|
||||||
(isActive == null ? 0 : isActive!.hashCode) +
|
|
||||||
(weightMasonryGrid == null ? 0 : weightMasonryGrid!.hashCode) +
|
|
||||||
(isDate == null ? 0 : isDate!.hashCode) +
|
|
||||||
(isHour == null ? 0 : isHour!.hashCode) +
|
|
||||||
(roundedValue == null ? 0 : roundedValue!.hashCode) +
|
|
||||||
(screenPercentageSectionsMainPage == null
|
|
||||||
? 0
|
|
||||||
: screenPercentageSectionsMainPage!.hashCode) +
|
|
||||||
(isSectionImageBackground == null
|
|
||||||
? 0
|
|
||||||
: isSectionImageBackground!.hashCode) +
|
|
||||||
(layoutMainPage == null ? 0 : layoutMainPage!.hashCode) +
|
|
||||||
(loaderImageId == null ? 0 : loaderImageId!.hashCode) +
|
|
||||||
(loaderImageUrl == null ? 0 : loaderImageUrl!.hashCode) +
|
|
||||||
(primaryColor == null ? 0 : primaryColor!.hashCode) +
|
|
||||||
(secondaryColor == null ? 0 : secondaryColor!.hashCode) +
|
|
||||||
(configuration == null ? 0 : configuration!.hashCode) +
|
|
||||||
(applicationInstance == null ? 0 : applicationInstance!.hashCode) +
|
|
||||||
(deviceId == null ? 0 : deviceId!.hashCode) +
|
|
||||||
(device == null ? 0 : device!.hashCode);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() =>
|
|
||||||
'AppConfigurationLink[configurationId=$configurationId, applicationInstanceId=$applicationInstanceId, id=$id, order=$order, isActive=$isActive, weightMasonryGrid=$weightMasonryGrid, isDate=$isDate, isHour=$isHour, roundedValue=$roundedValue, screenPercentageSectionsMainPage=$screenPercentageSectionsMainPage, isSectionImageBackground=$isSectionImageBackground, layoutMainPage=$layoutMainPage, loaderImageId=$loaderImageId, loaderImageUrl=$loaderImageUrl, primaryColor=$primaryColor, secondaryColor=$secondaryColor, configuration=$configuration, applicationInstance=$applicationInstance, deviceId=$deviceId, device=$device]';
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
final json = <String, dynamic>{};
|
|
||||||
json[r'configurationId'] = this.configurationId;
|
|
||||||
json[r'applicationInstanceId'] = this.applicationInstanceId;
|
|
||||||
if (this.id != null) {
|
|
||||||
json[r'id'] = this.id;
|
|
||||||
} else {
|
|
||||||
json[r'id'] = null;
|
|
||||||
}
|
|
||||||
if (this.order != null) {
|
|
||||||
json[r'order'] = this.order;
|
|
||||||
} else {
|
|
||||||
json[r'order'] = null;
|
|
||||||
}
|
|
||||||
if (this.isActive != null) {
|
|
||||||
json[r'isActive'] = this.isActive;
|
|
||||||
} else {
|
|
||||||
json[r'isActive'] = null;
|
|
||||||
}
|
|
||||||
if (this.weightMasonryGrid != null) {
|
|
||||||
json[r'weightMasonryGrid'] = this.weightMasonryGrid;
|
|
||||||
} else {
|
|
||||||
json[r'weightMasonryGrid'] = null;
|
|
||||||
}
|
|
||||||
if (this.isDate != null) {
|
|
||||||
json[r'isDate'] = this.isDate;
|
|
||||||
} else {
|
|
||||||
json[r'isDate'] = null;
|
|
||||||
}
|
|
||||||
if (this.isHour != null) {
|
|
||||||
json[r'isHour'] = this.isHour;
|
|
||||||
} else {
|
|
||||||
json[r'isHour'] = null;
|
|
||||||
}
|
|
||||||
if (this.roundedValue != null) {
|
|
||||||
json[r'roundedValue'] = this.roundedValue;
|
|
||||||
} else {
|
|
||||||
json[r'roundedValue'] = null;
|
|
||||||
}
|
|
||||||
if (this.screenPercentageSectionsMainPage != null) {
|
|
||||||
json[r'screenPercentageSectionsMainPage'] =
|
|
||||||
this.screenPercentageSectionsMainPage;
|
|
||||||
} else {
|
|
||||||
json[r'screenPercentageSectionsMainPage'] = null;
|
|
||||||
}
|
|
||||||
if (this.isSectionImageBackground != null) {
|
|
||||||
json[r'isSectionImageBackground'] = this.isSectionImageBackground;
|
|
||||||
} else {
|
|
||||||
json[r'isSectionImageBackground'] = null;
|
|
||||||
}
|
|
||||||
if (this.layoutMainPage != null) {
|
|
||||||
json[r'layoutMainPage'] = this.layoutMainPage;
|
|
||||||
} else {
|
|
||||||
json[r'layoutMainPage'] = null;
|
|
||||||
}
|
|
||||||
if (this.loaderImageId != null) {
|
|
||||||
json[r'loaderImageId'] = this.loaderImageId;
|
|
||||||
} else {
|
|
||||||
json[r'loaderImageId'] = null;
|
|
||||||
}
|
|
||||||
if (this.loaderImageUrl != null) {
|
|
||||||
json[r'loaderImageUrl'] = this.loaderImageUrl;
|
|
||||||
} else {
|
|
||||||
json[r'loaderImageUrl'] = null;
|
|
||||||
}
|
|
||||||
if (this.primaryColor != null) {
|
|
||||||
json[r'primaryColor'] = this.primaryColor;
|
|
||||||
} else {
|
|
||||||
json[r'primaryColor'] = null;
|
|
||||||
}
|
|
||||||
if (this.secondaryColor != null) {
|
|
||||||
json[r'secondaryColor'] = this.secondaryColor;
|
|
||||||
} else {
|
|
||||||
json[r'secondaryColor'] = null;
|
|
||||||
}
|
|
||||||
if (this.configuration != null) {
|
|
||||||
json[r'configuration'] = this.configuration;
|
|
||||||
} else {
|
|
||||||
json[r'configuration'] = null;
|
|
||||||
}
|
|
||||||
if (this.applicationInstance != null) {
|
|
||||||
json[r'applicationInstance'] = this.applicationInstance;
|
|
||||||
} else {
|
|
||||||
json[r'applicationInstance'] = null;
|
|
||||||
}
|
|
||||||
if (this.deviceId != null) {
|
|
||||||
json[r'deviceId'] = this.deviceId;
|
|
||||||
} else {
|
|
||||||
json[r'deviceId'] = null;
|
|
||||||
}
|
|
||||||
if (this.device != null) {
|
|
||||||
json[r'device'] = this.device;
|
|
||||||
} else {
|
|
||||||
json[r'device'] = null;
|
|
||||||
}
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns a new [AppConfigurationLink] instance and imports its values from
|
|
||||||
/// [value] if it's a [Map], null otherwise.
|
|
||||||
// ignore: prefer_constructors_over_static_methods
|
|
||||||
static AppConfigurationLink? 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 "AppConfigurationLink[$key]" is missing from JSON.');
|
|
||||||
assert(json[key] != null,
|
|
||||||
'Required key "AppConfigurationLink[$key]" has a null value in JSON.');
|
|
||||||
});
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AppConfigurationLink(
|
|
||||||
configurationId: mapValueOfType<String>(json, r'configurationId')!,
|
|
||||||
applicationInstanceId:
|
|
||||||
mapValueOfType<String>(json, r'applicationInstanceId')!,
|
|
||||||
id: mapValueOfType<String>(json, r'id'),
|
|
||||||
order: mapValueOfType<int>(json, r'order'),
|
|
||||||
isActive: mapValueOfType<bool>(json, r'isActive'),
|
|
||||||
weightMasonryGrid: mapValueOfType<int>(json, r'weightMasonryGrid'),
|
|
||||||
isDate: mapValueOfType<bool>(json, r'isDate'),
|
|
||||||
isHour: mapValueOfType<bool>(json, r'isHour'),
|
|
||||||
roundedValue: mapValueOfType<int>(json, r'roundedValue'),
|
|
||||||
screenPercentageSectionsMainPage:
|
|
||||||
mapValueOfType<int>(json, r'screenPercentageSectionsMainPage'),
|
|
||||||
isSectionImageBackground:
|
|
||||||
mapValueOfType<bool>(json, r'isSectionImageBackground'),
|
|
||||||
layoutMainPage: LayoutMainPageType.fromJson(json[r'layoutMainPage']),
|
|
||||||
loaderImageId: mapValueOfType<String>(json, r'loaderImageId'),
|
|
||||||
loaderImageUrl: mapValueOfType<String>(json, r'loaderImageUrl'),
|
|
||||||
primaryColor: mapValueOfType<String>(json, r'primaryColor'),
|
|
||||||
secondaryColor: mapValueOfType<String>(json, r'secondaryColor'),
|
|
||||||
configuration:
|
|
||||||
AppConfigurationLinkConfiguration.fromJson(json[r'configuration']),
|
|
||||||
applicationInstance: AppConfigurationLinkApplicationInstance.fromJson(
|
|
||||||
json[r'applicationInstance']),
|
|
||||||
deviceId: mapValueOfType<String>(json, r'deviceId'),
|
|
||||||
device: AppConfigurationLinkDevice.fromJson(json[r'device']),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
static List<AppConfigurationLink> listFromJson(
|
|
||||||
dynamic json, {
|
|
||||||
bool growable = false,
|
|
||||||
}) {
|
|
||||||
final result = <AppConfigurationLink>[];
|
|
||||||
if (json is List && json.isNotEmpty) {
|
|
||||||
for (final row in json) {
|
|
||||||
final value = AppConfigurationLink.fromJson(row);
|
|
||||||
if (value != null) {
|
|
||||||
result.add(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result.toList(growable: growable);
|
|
||||||
}
|
|
||||||
|
|
||||||
static Map<String, AppConfigurationLink> mapFromJson(dynamic json) {
|
|
||||||
final map = <String, AppConfigurationLink>{};
|
|
||||||
if (json is Map && json.isNotEmpty) {
|
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
|
||||||
for (final entry in json.entries) {
|
|
||||||
final value = AppConfigurationLink.fromJson(entry.value);
|
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
// maps a json object with a list of AppConfigurationLink-objects as value to a dart map
|
|
||||||
static Map<String, List<AppConfigurationLink>> mapListFromJson(
|
|
||||||
dynamic json, {
|
|
||||||
bool growable = false,
|
|
||||||
}) {
|
|
||||||
final map = <String, List<AppConfigurationLink>>{};
|
|
||||||
if (json is Map && json.isNotEmpty) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
json = json.cast<String, dynamic>();
|
|
||||||
for (final entry in json.entries) {
|
|
||||||
map[entry.key] = AppConfigurationLink.listFromJson(
|
|
||||||
entry.value,
|
|
||||||
growable: growable,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The list of required keys that must be present in a JSON.
|
|
||||||
static const requiredKeys = <String>{
|
|
||||||
'configurationId',
|
|
||||||
'applicationInstanceId',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@ -1,277 +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 AppConfigurationLinkApplicationInstance {
|
|
||||||
/// Returns a new [AppConfigurationLinkApplicationInstance] instance.
|
|
||||||
AppConfigurationLinkApplicationInstance({
|
|
||||||
required this.instanceId,
|
|
||||||
required this.appType,
|
|
||||||
this.id,
|
|
||||||
this.configurations = const [],
|
|
||||||
this.mainImageId,
|
|
||||||
this.mainImageUrl,
|
|
||||||
this.loaderImageId,
|
|
||||||
this.loaderImageUrl,
|
|
||||||
this.primaryColor,
|
|
||||||
this.secondaryColor,
|
|
||||||
this.layoutMainPage,
|
|
||||||
this.languages = const [],
|
|
||||||
this.sectionEventId,
|
|
||||||
this.sectionEvent,
|
|
||||||
});
|
|
||||||
|
|
||||||
String instanceId;
|
|
||||||
|
|
||||||
AppType appType;
|
|
||||||
|
|
||||||
String? id;
|
|
||||||
|
|
||||||
List<AppConfigurationLink>? configurations;
|
|
||||||
|
|
||||||
String? mainImageId;
|
|
||||||
|
|
||||||
String? mainImageUrl;
|
|
||||||
|
|
||||||
String? loaderImageId;
|
|
||||||
|
|
||||||
String? loaderImageUrl;
|
|
||||||
|
|
||||||
String? primaryColor;
|
|
||||||
|
|
||||||
String? secondaryColor;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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.
|
|
||||||
///
|
|
||||||
LayoutMainPageType? layoutMainPage;
|
|
||||||
|
|
||||||
List<String>? languages;
|
|
||||||
|
|
||||||
String? sectionEventId;
|
|
||||||
|
|
||||||
ApplicationInstanceSectionEvent? sectionEvent;
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool operator ==(Object other) =>
|
|
||||||
identical(this, other) ||
|
|
||||||
other is AppConfigurationLinkApplicationInstance &&
|
|
||||||
other.instanceId == instanceId &&
|
|
||||||
other.appType == appType &&
|
|
||||||
other.id == id &&
|
|
||||||
_deepEquality.equals(other.configurations, configurations) &&
|
|
||||||
other.mainImageId == mainImageId &&
|
|
||||||
other.mainImageUrl == mainImageUrl &&
|
|
||||||
other.loaderImageId == loaderImageId &&
|
|
||||||
other.loaderImageUrl == loaderImageUrl &&
|
|
||||||
other.primaryColor == primaryColor &&
|
|
||||||
other.secondaryColor == secondaryColor &&
|
|
||||||
other.layoutMainPage == layoutMainPage &&
|
|
||||||
_deepEquality.equals(other.languages, languages) &&
|
|
||||||
other.sectionEventId == sectionEventId &&
|
|
||||||
other.sectionEvent == sectionEvent;
|
|
||||||
|
|
||||||
@override
|
|
||||||
int get hashCode =>
|
|
||||||
// ignore: unnecessary_parenthesis
|
|
||||||
(instanceId.hashCode) +
|
|
||||||
(appType.hashCode) +
|
|
||||||
(id == null ? 0 : id!.hashCode) +
|
|
||||||
(configurations == null ? 0 : configurations!.hashCode) +
|
|
||||||
(mainImageId == null ? 0 : mainImageId!.hashCode) +
|
|
||||||
(mainImageUrl == null ? 0 : mainImageUrl!.hashCode) +
|
|
||||||
(loaderImageId == null ? 0 : loaderImageId!.hashCode) +
|
|
||||||
(loaderImageUrl == null ? 0 : loaderImageUrl!.hashCode) +
|
|
||||||
(primaryColor == null ? 0 : primaryColor!.hashCode) +
|
|
||||||
(secondaryColor == null ? 0 : secondaryColor!.hashCode) +
|
|
||||||
(layoutMainPage == null ? 0 : layoutMainPage!.hashCode) +
|
|
||||||
(languages == null ? 0 : languages!.hashCode) +
|
|
||||||
(sectionEventId == null ? 0 : sectionEventId!.hashCode) +
|
|
||||||
(sectionEvent == null ? 0 : sectionEvent!.hashCode);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() =>
|
|
||||||
'AppConfigurationLinkApplicationInstance[instanceId=$instanceId, appType=$appType, id=$id, configurations=$configurations, mainImageId=$mainImageId, mainImageUrl=$mainImageUrl, loaderImageId=$loaderImageId, loaderImageUrl=$loaderImageUrl, primaryColor=$primaryColor, secondaryColor=$secondaryColor, layoutMainPage=$layoutMainPage, languages=$languages, sectionEventId=$sectionEventId, sectionEvent=$sectionEvent]';
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
final json = <String, dynamic>{};
|
|
||||||
json[r'instanceId'] = this.instanceId;
|
|
||||||
json[r'appType'] = this.appType;
|
|
||||||
if (this.id != null) {
|
|
||||||
json[r'id'] = this.id;
|
|
||||||
} else {
|
|
||||||
json[r'id'] = null;
|
|
||||||
}
|
|
||||||
if (this.configurations != null) {
|
|
||||||
json[r'configurations'] = this.configurations;
|
|
||||||
} else {
|
|
||||||
json[r'configurations'] = null;
|
|
||||||
}
|
|
||||||
if (this.mainImageId != null) {
|
|
||||||
json[r'mainImageId'] = this.mainImageId;
|
|
||||||
} else {
|
|
||||||
json[r'mainImageId'] = null;
|
|
||||||
}
|
|
||||||
if (this.mainImageUrl != null) {
|
|
||||||
json[r'mainImageUrl'] = this.mainImageUrl;
|
|
||||||
} else {
|
|
||||||
json[r'mainImageUrl'] = null;
|
|
||||||
}
|
|
||||||
if (this.loaderImageId != null) {
|
|
||||||
json[r'loaderImageId'] = this.loaderImageId;
|
|
||||||
} else {
|
|
||||||
json[r'loaderImageId'] = null;
|
|
||||||
}
|
|
||||||
if (this.loaderImageUrl != null) {
|
|
||||||
json[r'loaderImageUrl'] = this.loaderImageUrl;
|
|
||||||
} else {
|
|
||||||
json[r'loaderImageUrl'] = null;
|
|
||||||
}
|
|
||||||
if (this.primaryColor != null) {
|
|
||||||
json[r'primaryColor'] = this.primaryColor;
|
|
||||||
} else {
|
|
||||||
json[r'primaryColor'] = null;
|
|
||||||
}
|
|
||||||
if (this.secondaryColor != null) {
|
|
||||||
json[r'secondaryColor'] = this.secondaryColor;
|
|
||||||
} else {
|
|
||||||
json[r'secondaryColor'] = null;
|
|
||||||
}
|
|
||||||
if (this.layoutMainPage != null) {
|
|
||||||
json[r'layoutMainPage'] = this.layoutMainPage;
|
|
||||||
} else {
|
|
||||||
json[r'layoutMainPage'] = null;
|
|
||||||
}
|
|
||||||
if (this.languages != null) {
|
|
||||||
json[r'languages'] = this.languages;
|
|
||||||
} else {
|
|
||||||
json[r'languages'] = 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 [AppConfigurationLinkApplicationInstance] instance and imports its values from
|
|
||||||
/// [value] if it's a [Map], null otherwise.
|
|
||||||
// ignore: prefer_constructors_over_static_methods
|
|
||||||
static AppConfigurationLinkApplicationInstance? 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 "AppConfigurationLinkApplicationInstance[$key]" is missing from JSON.');
|
|
||||||
assert(json[key] != null,
|
|
||||||
'Required key "AppConfigurationLinkApplicationInstance[$key]" has a null value in JSON.');
|
|
||||||
});
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AppConfigurationLinkApplicationInstance(
|
|
||||||
instanceId: mapValueOfType<String>(json, r'instanceId')!,
|
|
||||||
appType: AppType.fromJson(json[r'appType'])!,
|
|
||||||
id: mapValueOfType<String>(json, r'id'),
|
|
||||||
configurations:
|
|
||||||
AppConfigurationLink.listFromJson(json[r'configurations']),
|
|
||||||
mainImageId: mapValueOfType<String>(json, r'mainImageId'),
|
|
||||||
mainImageUrl: mapValueOfType<String>(json, r'mainImageUrl'),
|
|
||||||
loaderImageId: mapValueOfType<String>(json, r'loaderImageId'),
|
|
||||||
loaderImageUrl: mapValueOfType<String>(json, r'loaderImageUrl'),
|
|
||||||
primaryColor: mapValueOfType<String>(json, r'primaryColor'),
|
|
||||||
secondaryColor: mapValueOfType<String>(json, r'secondaryColor'),
|
|
||||||
layoutMainPage: LayoutMainPageType.fromJson(json[r'layoutMainPage']),
|
|
||||||
languages: json[r'languages'] is Iterable
|
|
||||||
? (json[r'languages'] as Iterable)
|
|
||||||
.cast<String>()
|
|
||||||
.toList(growable: false)
|
|
||||||
: const [],
|
|
||||||
sectionEventId: mapValueOfType<String>(json, r'sectionEventId'),
|
|
||||||
sectionEvent:
|
|
||||||
ApplicationInstanceSectionEvent.fromJson(json[r'sectionEvent']),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
static List<AppConfigurationLinkApplicationInstance> listFromJson(
|
|
||||||
dynamic json, {
|
|
||||||
bool growable = false,
|
|
||||||
}) {
|
|
||||||
final result = <AppConfigurationLinkApplicationInstance>[];
|
|
||||||
if (json is List && json.isNotEmpty) {
|
|
||||||
for (final row in json) {
|
|
||||||
final value = AppConfigurationLinkApplicationInstance.fromJson(row);
|
|
||||||
if (value != null) {
|
|
||||||
result.add(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result.toList(growable: growable);
|
|
||||||
}
|
|
||||||
|
|
||||||
static Map<String, AppConfigurationLinkApplicationInstance> mapFromJson(
|
|
||||||
dynamic json) {
|
|
||||||
final map = <String, AppConfigurationLinkApplicationInstance>{};
|
|
||||||
if (json is Map && json.isNotEmpty) {
|
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
|
||||||
for (final entry in json.entries) {
|
|
||||||
final value =
|
|
||||||
AppConfigurationLinkApplicationInstance.fromJson(entry.value);
|
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
// maps a json object with a list of AppConfigurationLinkApplicationInstance-objects as value to a dart map
|
|
||||||
static Map<String, List<AppConfigurationLinkApplicationInstance>>
|
|
||||||
mapListFromJson(
|
|
||||||
dynamic json, {
|
|
||||||
bool growable = false,
|
|
||||||
}) {
|
|
||||||
final map = <String, List<AppConfigurationLinkApplicationInstance>>{};
|
|
||||||
if (json is Map && json.isNotEmpty) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
json = json.cast<String, dynamic>();
|
|
||||||
for (final entry in json.entries) {
|
|
||||||
map[entry.key] = AppConfigurationLinkApplicationInstance.listFromJson(
|
|
||||||
entry.value,
|
|
||||||
growable: growable,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The list of required keys that must be present in a JSON.
|
|
||||||
static const requiredKeys = <String>{
|
|
||||||
'instanceId',
|
|
||||||
'appType',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@ -1,21 +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 AppConfigurationLinkConfiguration {
|
|
||||||
AppConfigurationLinkConfiguration({this.id});
|
|
||||||
String? id;
|
|
||||||
|
|
||||||
static AppConfigurationLinkConfiguration? fromJson(dynamic value) =>
|
|
||||||
value is Map ? AppConfigurationLinkConfiguration() : null;
|
|
||||||
|
|
||||||
static const requiredKeys = <String>{};
|
|
||||||
}
|
|
||||||
@ -1,21 +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 AppConfigurationLinkDevice {
|
|
||||||
AppConfigurationLinkDevice({this.id});
|
|
||||||
String? id;
|
|
||||||
|
|
||||||
static AppConfigurationLinkDevice? fromJson(dynamic value) =>
|
|
||||||
value is Map ? AppConfigurationLinkDevice() : null;
|
|
||||||
|
|
||||||
static const requiredKeys = <String>{};
|
|
||||||
}
|
|
||||||
@ -1,110 +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;
|
|
||||||
|
|
||||||
/// 0 = Mobile 1 = Tablet 2 = Web 3 = VR
|
|
||||||
class AppType {
|
|
||||||
/// Instantiate a new enum with the provided [value].
|
|
||||||
const AppType._(this.value);
|
|
||||||
|
|
||||||
/// The underlying value of this enum member.
|
|
||||||
final int value;
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() => value.toString();
|
|
||||||
|
|
||||||
int toJson() => value;
|
|
||||||
|
|
||||||
static const Mobile = AppType._(0);
|
|
||||||
static const Tablet = AppType._(1);
|
|
||||||
static const Web = AppType._(2);
|
|
||||||
static const VR = AppType._(3);
|
|
||||||
|
|
||||||
/// List of all possible values in this [enum][AppType].
|
|
||||||
static const values = <AppType>[
|
|
||||||
Mobile,
|
|
||||||
Tablet,
|
|
||||||
Web,
|
|
||||||
VR,
|
|
||||||
];
|
|
||||||
|
|
||||||
static AppType? fromJson(dynamic value) =>
|
|
||||||
AppTypeTypeTransformer().decode(value);
|
|
||||||
|
|
||||||
static List<AppType> listFromJson(
|
|
||||||
dynamic json, {
|
|
||||||
bool growable = false,
|
|
||||||
}) {
|
|
||||||
final result = <AppType>[];
|
|
||||||
if (json is List && json.isNotEmpty) {
|
|
||||||
for (final row in json) {
|
|
||||||
final value = AppType.fromJson(row);
|
|
||||||
if (value != null) {
|
|
||||||
result.add(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result.toList(growable: growable);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Transformation class that can [encode] an instance of [AppType] to int,
|
|
||||||
/// and [decode] dynamic data back to [AppType].
|
|
||||||
class AppTypeTypeTransformer {
|
|
||||||
factory AppTypeTypeTransformer() =>
|
|
||||||
_instance ??= const AppTypeTypeTransformer._();
|
|
||||||
|
|
||||||
const AppTypeTypeTransformer._();
|
|
||||||
|
|
||||||
int encode(AppType data) => data.value;
|
|
||||||
|
|
||||||
/// Decodes a [dynamic value][data] to a AppType.
|
|
||||||
///
|
|
||||||
/// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully,
|
|
||||||
/// then null is returned. However, if [allowNull] is false and the [dynamic value][data]
|
|
||||||
/// cannot be decoded successfully, then an [UnimplementedError] is thrown.
|
|
||||||
///
|
|
||||||
/// The [allowNull] is very handy when an API changes and a new enum value is added or removed,
|
|
||||||
/// and users are still using an old app with the old code.
|
|
||||||
AppType? decode(dynamic data, {bool allowNull = true}) {
|
|
||||||
if (data != null) {
|
|
||||||
if(data.runtimeType == String) {
|
|
||||||
switch (data.toString()) {
|
|
||||||
case r'Mobile': return AppType.Mobile;
|
|
||||||
case r'Tablet': return AppType.Tablet;
|
|
||||||
case r'Web': return AppType.Web;
|
|
||||||
case r'VR': return AppType.VR;
|
|
||||||
default:
|
|
||||||
if (!allowNull) {
|
|
||||||
throw ArgumentError('Unknown enum value to decode: $data');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if(data.runtimeType == int) {
|
|
||||||
switch (data) {
|
|
||||||
case 0: return AppType.Mobile;
|
|
||||||
case 1: return AppType.Tablet;
|
|
||||||
case 2: return AppType.Web;
|
|
||||||
case 3: return AppType.VR;
|
|
||||||
default:
|
|
||||||
if (!allowNull) {
|
|
||||||
throw ArgumentError('Unknown enum value to decode: $data');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Singleton [AppTypeTypeTransformer] instance.
|
|
||||||
static AppTypeTypeTransformer? _instance;
|
|
||||||
}
|
|
||||||
@ -1,295 +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 ApplicationInstanceDTO {
|
|
||||||
/// Returns a new [ApplicationInstanceDTO] instance.
|
|
||||||
ApplicationInstanceDTO({
|
|
||||||
this.id,
|
|
||||||
this.instanceId,
|
|
||||||
this.appType,
|
|
||||||
this.configurations = const [],
|
|
||||||
this.mainImageId,
|
|
||||||
this.mainImageUrl,
|
|
||||||
this.loaderImageId,
|
|
||||||
this.loaderImageUrl,
|
|
||||||
this.primaryColor,
|
|
||||||
this.secondaryColor,
|
|
||||||
this.layoutMainPage,
|
|
||||||
this.languages = const [],
|
|
||||||
this.sectionEventId,
|
|
||||||
this.sectionEventDTO,
|
|
||||||
this.isAssistant,
|
|
||||||
});
|
|
||||||
|
|
||||||
String? id;
|
|
||||||
|
|
||||||
String? instanceId;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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.
|
|
||||||
///
|
|
||||||
AppType? appType;
|
|
||||||
|
|
||||||
List<AppConfigurationLink>? configurations;
|
|
||||||
|
|
||||||
String? mainImageId;
|
|
||||||
|
|
||||||
String? mainImageUrl;
|
|
||||||
|
|
||||||
String? loaderImageId;
|
|
||||||
|
|
||||||
String? loaderImageUrl;
|
|
||||||
|
|
||||||
String? primaryColor;
|
|
||||||
|
|
||||||
String? secondaryColor;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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.
|
|
||||||
///
|
|
||||||
LayoutMainPageType? layoutMainPage;
|
|
||||||
|
|
||||||
List<String>? languages;
|
|
||||||
|
|
||||||
String? sectionEventId;
|
|
||||||
|
|
||||||
SectionEventDTO? sectionEventDTO;
|
|
||||||
|
|
||||||
bool? isAssistant;
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool operator ==(Object other) =>
|
|
||||||
identical(this, other) ||
|
|
||||||
other is ApplicationInstanceDTO &&
|
|
||||||
other.id == id &&
|
|
||||||
other.instanceId == instanceId &&
|
|
||||||
other.appType == appType &&
|
|
||||||
_deepEquality.equals(other.configurations, configurations) &&
|
|
||||||
other.mainImageId == mainImageId &&
|
|
||||||
other.mainImageUrl == mainImageUrl &&
|
|
||||||
other.loaderImageId == loaderImageId &&
|
|
||||||
other.loaderImageUrl == loaderImageUrl &&
|
|
||||||
other.primaryColor == primaryColor &&
|
|
||||||
other.secondaryColor == secondaryColor &&
|
|
||||||
other.layoutMainPage == layoutMainPage &&
|
|
||||||
_deepEquality.equals(other.languages, languages) &&
|
|
||||||
other.sectionEventId == sectionEventId &&
|
|
||||||
other.sectionEventDTO == sectionEventDTO &&
|
|
||||||
other.isAssistant == isAssistant;
|
|
||||||
|
|
||||||
@override
|
|
||||||
int get hashCode =>
|
|
||||||
// ignore: unnecessary_parenthesis
|
|
||||||
(id == null ? 0 : id!.hashCode) +
|
|
||||||
(instanceId == null ? 0 : instanceId!.hashCode) +
|
|
||||||
(appType == null ? 0 : appType!.hashCode) +
|
|
||||||
(configurations == null ? 0 : configurations!.hashCode) +
|
|
||||||
(mainImageId == null ? 0 : mainImageId!.hashCode) +
|
|
||||||
(mainImageUrl == null ? 0 : mainImageUrl!.hashCode) +
|
|
||||||
(loaderImageId == null ? 0 : loaderImageId!.hashCode) +
|
|
||||||
(loaderImageUrl == null ? 0 : loaderImageUrl!.hashCode) +
|
|
||||||
(primaryColor == null ? 0 : primaryColor!.hashCode) +
|
|
||||||
(secondaryColor == null ? 0 : secondaryColor!.hashCode) +
|
|
||||||
(layoutMainPage == null ? 0 : layoutMainPage!.hashCode) +
|
|
||||||
(languages == null ? 0 : languages!.hashCode) +
|
|
||||||
(sectionEventId == null ? 0 : sectionEventId!.hashCode) +
|
|
||||||
(sectionEventDTO == null ? 0 : sectionEventDTO!.hashCode) +
|
|
||||||
(isAssistant == null ? 0 : isAssistant!.hashCode);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() =>
|
|
||||||
'ApplicationInstanceDTO[id=$id, instanceId=$instanceId, appType=$appType, configurations=$configurations, mainImageId=$mainImageId, mainImageUrl=$mainImageUrl, loaderImageId=$loaderImageId, loaderImageUrl=$loaderImageUrl, primaryColor=$primaryColor, secondaryColor=$secondaryColor, layoutMainPage=$layoutMainPage, languages=$languages, sectionEventId=$sectionEventId, sectionEventDTO=$sectionEventDTO, isAssistant=$isAssistant]';
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
final json = <String, dynamic>{};
|
|
||||||
if (this.id != null) {
|
|
||||||
json[r'id'] = this.id;
|
|
||||||
} else {
|
|
||||||
json[r'id'] = null;
|
|
||||||
}
|
|
||||||
if (this.instanceId != null) {
|
|
||||||
json[r'instanceId'] = this.instanceId;
|
|
||||||
} else {
|
|
||||||
json[r'instanceId'] = null;
|
|
||||||
}
|
|
||||||
if (this.appType != null) {
|
|
||||||
json[r'appType'] = this.appType;
|
|
||||||
} else {
|
|
||||||
json[r'appType'] = null;
|
|
||||||
}
|
|
||||||
if (this.configurations != null) {
|
|
||||||
json[r'configurations'] = this.configurations;
|
|
||||||
} else {
|
|
||||||
json[r'configurations'] = null;
|
|
||||||
}
|
|
||||||
if (this.mainImageId != null) {
|
|
||||||
json[r'mainImageId'] = this.mainImageId;
|
|
||||||
} else {
|
|
||||||
json[r'mainImageId'] = null;
|
|
||||||
}
|
|
||||||
if (this.mainImageUrl != null) {
|
|
||||||
json[r'mainImageUrl'] = this.mainImageUrl;
|
|
||||||
} else {
|
|
||||||
json[r'mainImageUrl'] = null;
|
|
||||||
}
|
|
||||||
if (this.loaderImageId != null) {
|
|
||||||
json[r'loaderImageId'] = this.loaderImageId;
|
|
||||||
} else {
|
|
||||||
json[r'loaderImageId'] = null;
|
|
||||||
}
|
|
||||||
if (this.loaderImageUrl != null) {
|
|
||||||
json[r'loaderImageUrl'] = this.loaderImageUrl;
|
|
||||||
} else {
|
|
||||||
json[r'loaderImageUrl'] = null;
|
|
||||||
}
|
|
||||||
if (this.primaryColor != null) {
|
|
||||||
json[r'primaryColor'] = this.primaryColor;
|
|
||||||
} else {
|
|
||||||
json[r'primaryColor'] = null;
|
|
||||||
}
|
|
||||||
if (this.secondaryColor != null) {
|
|
||||||
json[r'secondaryColor'] = this.secondaryColor;
|
|
||||||
} else {
|
|
||||||
json[r'secondaryColor'] = null;
|
|
||||||
}
|
|
||||||
if (this.layoutMainPage != null) {
|
|
||||||
json[r'layoutMainPage'] = this.layoutMainPage;
|
|
||||||
} else {
|
|
||||||
json[r'layoutMainPage'] = null;
|
|
||||||
}
|
|
||||||
if (this.languages != null) {
|
|
||||||
json[r'languages'] = this.languages;
|
|
||||||
} else {
|
|
||||||
json[r'languages'] = null;
|
|
||||||
}
|
|
||||||
if (this.sectionEventId != null) {
|
|
||||||
json[r'sectionEventId'] = this.sectionEventId;
|
|
||||||
} else {
|
|
||||||
json[r'sectionEventId'] = null;
|
|
||||||
}
|
|
||||||
if (this.sectionEventDTO != null) {
|
|
||||||
json[r'sectionEventDTO'] = this.sectionEventDTO;
|
|
||||||
} else {
|
|
||||||
json[r'sectionEventDTO'] = null;
|
|
||||||
}
|
|
||||||
if (this.isAssistant != null) {
|
|
||||||
json[r'isAssistant'] = this.isAssistant;
|
|
||||||
} else {
|
|
||||||
json[r'isAssistant'] = null;
|
|
||||||
}
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns a new [ApplicationInstanceDTO] instance and imports its values from
|
|
||||||
/// [value] if it's a [Map], null otherwise.
|
|
||||||
// ignore: prefer_constructors_over_static_methods
|
|
||||||
static ApplicationInstanceDTO? 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 "ApplicationInstanceDTO[$key]" is missing from JSON.');
|
|
||||||
assert(json[key] != null,
|
|
||||||
'Required key "ApplicationInstanceDTO[$key]" has a null value in JSON.');
|
|
||||||
});
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return ApplicationInstanceDTO(
|
|
||||||
id: mapValueOfType<String>(json, r'id'),
|
|
||||||
instanceId: mapValueOfType<String>(json, r'instanceId'),
|
|
||||||
appType: AppType.fromJson(json[r'appType']),
|
|
||||||
configurations:
|
|
||||||
AppConfigurationLink.listFromJson(json[r'configurations']),
|
|
||||||
mainImageId: mapValueOfType<String>(json, r'mainImageId'),
|
|
||||||
mainImageUrl: mapValueOfType<String>(json, r'mainImageUrl'),
|
|
||||||
loaderImageId: mapValueOfType<String>(json, r'loaderImageId'),
|
|
||||||
loaderImageUrl: mapValueOfType<String>(json, r'loaderImageUrl'),
|
|
||||||
primaryColor: mapValueOfType<String>(json, r'primaryColor'),
|
|
||||||
secondaryColor: mapValueOfType<String>(json, r'secondaryColor'),
|
|
||||||
layoutMainPage: LayoutMainPageType.fromJson(json[r'layoutMainPage']),
|
|
||||||
languages: json[r'languages'] is Iterable
|
|
||||||
? (json[r'languages'] as Iterable)
|
|
||||||
.cast<String>()
|
|
||||||
.toList(growable: false)
|
|
||||||
: const [],
|
|
||||||
sectionEventId: mapValueOfType<String>(json, r'sectionEventId'),
|
|
||||||
sectionEventDTO: SectionEventDTO.fromJson(json[r'sectionEventDTO']),
|
|
||||||
isAssistant: mapValueOfType<bool>(json, r'isAssistant'),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
static List<ApplicationInstanceDTO> listFromJson(
|
|
||||||
dynamic json, {
|
|
||||||
bool growable = false,
|
|
||||||
}) {
|
|
||||||
final result = <ApplicationInstanceDTO>[];
|
|
||||||
if (json is List && json.isNotEmpty) {
|
|
||||||
for (final row in json) {
|
|
||||||
final value = ApplicationInstanceDTO.fromJson(row);
|
|
||||||
if (value != null) {
|
|
||||||
result.add(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result.toList(growable: growable);
|
|
||||||
}
|
|
||||||
|
|
||||||
static Map<String, ApplicationInstanceDTO> mapFromJson(dynamic json) {
|
|
||||||
final map = <String, ApplicationInstanceDTO>{};
|
|
||||||
if (json is Map && json.isNotEmpty) {
|
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
|
||||||
for (final entry in json.entries) {
|
|
||||||
final value = ApplicationInstanceDTO.fromJson(entry.value);
|
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
// maps a json object with a list of ApplicationInstanceDTO-objects as value to a dart map
|
|
||||||
static Map<String, List<ApplicationInstanceDTO>> mapListFromJson(
|
|
||||||
dynamic json, {
|
|
||||||
bool growable = false,
|
|
||||||
}) {
|
|
||||||
final map = <String, List<ApplicationInstanceDTO>>{};
|
|
||||||
if (json is Map && json.isNotEmpty) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
json = json.cast<String, dynamic>();
|
|
||||||
for (final entry in json.entries) {
|
|
||||||
map[entry.key] = ApplicationInstanceDTO.listFromJson(
|
|
||||||
entry.value,
|
|
||||||
growable: growable,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The list of required keys that must be present in a JSON.
|
|
||||||
static const requiredKeys = <String>{};
|
|
||||||
}
|
|
||||||
@ -1,409 +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 ApplicationInstanceDTOSectionEventDTO {
|
|
||||||
/// Returns a new [ApplicationInstanceDTOSectionEventDTO] instance.
|
|
||||||
ApplicationInstanceDTOSectionEventDTO({
|
|
||||||
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.startDate,
|
|
||||||
this.endDate,
|
|
||||||
this.parcoursIds = const [],
|
|
||||||
this.programme = const [],
|
|
||||||
});
|
|
||||||
|
|
||||||
String? id;
|
|
||||||
|
|
||||||
String? label;
|
|
||||||
|
|
||||||
List<TranslationDTO>? title;
|
|
||||||
|
|
||||||
List<TranslationDTO>? description;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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? isActive;
|
|
||||||
|
|
||||||
String? imageId;
|
|
||||||
|
|
||||||
String? imageSource;
|
|
||||||
|
|
||||||
String? configurationId;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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? isSubSection;
|
|
||||||
|
|
||||||
String? parentId;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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.
|
|
||||||
///
|
|
||||||
SectionType? type;
|
|
||||||
|
|
||||||
DateTime? dateCreation;
|
|
||||||
|
|
||||||
int? order;
|
|
||||||
|
|
||||||
String? instanceId;
|
|
||||||
|
|
||||||
String? latitude;
|
|
||||||
|
|
||||||
String? longitude;
|
|
||||||
|
|
||||||
int? meterZoneGPS;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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? isBeacon;
|
|
||||||
|
|
||||||
int? beaconId;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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.
|
|
||||||
///
|
|
||||||
DateTime? startDate;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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.
|
|
||||||
///
|
|
||||||
DateTime? endDate;
|
|
||||||
|
|
||||||
List<String>? parcoursIds;
|
|
||||||
|
|
||||||
List<ProgrammeBlock>? programme;
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool operator ==(Object other) =>
|
|
||||||
identical(this, other) ||
|
|
||||||
other is ApplicationInstanceDTOSectionEventDTO &&
|
|
||||||
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.startDate == startDate &&
|
|
||||||
other.endDate == endDate &&
|
|
||||||
_deepEquality.equals(other.parcoursIds, parcoursIds) &&
|
|
||||||
_deepEquality.equals(other.programme, programme);
|
|
||||||
|
|
||||||
@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) +
|
|
||||||
(startDate == null ? 0 : startDate!.hashCode) +
|
|
||||||
(endDate == null ? 0 : endDate!.hashCode) +
|
|
||||||
(parcoursIds == null ? 0 : parcoursIds!.hashCode) +
|
|
||||||
(programme == null ? 0 : programme!.hashCode);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() =>
|
|
||||||
'ApplicationInstanceDTOSectionEventDTO[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, startDate=$startDate, endDate=$endDate, parcoursIds=$parcoursIds, programme=$programme]';
|
|
||||||
|
|
||||||
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;
|
|
||||||
} else {
|
|
||||||
json[r'title'] = null;
|
|
||||||
}
|
|
||||||
if (this.description != null) {
|
|
||||||
json[r'description'] = this.description;
|
|
||||||
} 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.startDate != null) {
|
|
||||||
json[r'startDate'] = this.startDate!.toUtc().toIso8601String();
|
|
||||||
} else {
|
|
||||||
json[r'startDate'] = null;
|
|
||||||
}
|
|
||||||
if (this.endDate != null) {
|
|
||||||
json[r'endDate'] = this.endDate!.toUtc().toIso8601String();
|
|
||||||
} else {
|
|
||||||
json[r'endDate'] = null;
|
|
||||||
}
|
|
||||||
if (this.parcoursIds != null) {
|
|
||||||
json[r'parcoursIds'] = this.parcoursIds;
|
|
||||||
} else {
|
|
||||||
json[r'parcoursIds'] = null;
|
|
||||||
}
|
|
||||||
if (this.programme != null) {
|
|
||||||
json[r'programme'] = this.programme;
|
|
||||||
} else {
|
|
||||||
json[r'programme'] = null;
|
|
||||||
}
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns a new [ApplicationInstanceDTOSectionEventDTO] instance and imports its values from
|
|
||||||
/// [value] if it's a [Map], null otherwise.
|
|
||||||
// ignore: prefer_constructors_over_static_methods
|
|
||||||
static ApplicationInstanceDTOSectionEventDTO? 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 "ApplicationInstanceDTOSectionEventDTO[$key]" is missing from JSON.');
|
|
||||||
assert(json[key] != null,
|
|
||||||
'Required key "ApplicationInstanceDTOSectionEventDTO[$key]" has a null value in JSON.');
|
|
||||||
});
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return ApplicationInstanceDTOSectionEventDTO(
|
|
||||||
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'),
|
|
||||||
startDate: mapDateTime(json, r'startDate', r''),
|
|
||||||
endDate: mapDateTime(json, r'endDate', r''),
|
|
||||||
parcoursIds: json[r'parcoursIds'] is Iterable
|
|
||||||
? (json[r'parcoursIds'] as Iterable)
|
|
||||||
.cast<String>()
|
|
||||||
.toList(growable: false)
|
|
||||||
: const [],
|
|
||||||
programme: ProgrammeBlock.listFromJson(json[r'programme']),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
static List<ApplicationInstanceDTOSectionEventDTO> listFromJson(
|
|
||||||
dynamic json, {
|
|
||||||
bool growable = false,
|
|
||||||
}) {
|
|
||||||
final result = <ApplicationInstanceDTOSectionEventDTO>[];
|
|
||||||
if (json is List && json.isNotEmpty) {
|
|
||||||
for (final row in json) {
|
|
||||||
final value = ApplicationInstanceDTOSectionEventDTO.fromJson(row);
|
|
||||||
if (value != null) {
|
|
||||||
result.add(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result.toList(growable: growable);
|
|
||||||
}
|
|
||||||
|
|
||||||
static Map<String, ApplicationInstanceDTOSectionEventDTO> mapFromJson(
|
|
||||||
dynamic json) {
|
|
||||||
final map = <String, ApplicationInstanceDTOSectionEventDTO>{};
|
|
||||||
if (json is Map && json.isNotEmpty) {
|
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
|
||||||
for (final entry in json.entries) {
|
|
||||||
final value =
|
|
||||||
ApplicationInstanceDTOSectionEventDTO.fromJson(entry.value);
|
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
// maps a json object with a list of ApplicationInstanceDTOSectionEventDTO-objects as value to a dart map
|
|
||||||
static Map<String, List<ApplicationInstanceDTOSectionEventDTO>>
|
|
||||||
mapListFromJson(
|
|
||||||
dynamic json, {
|
|
||||||
bool growable = false,
|
|
||||||
}) {
|
|
||||||
final map = <String, List<ApplicationInstanceDTOSectionEventDTO>>{};
|
|
||||||
if (json is Map && json.isNotEmpty) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
json = json.cast<String, dynamic>();
|
|
||||||
for (final entry in json.entries) {
|
|
||||||
map[entry.key] = ApplicationInstanceDTOSectionEventDTO.listFromJson(
|
|
||||||
entry.value,
|
|
||||||
growable: growable,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The list of required keys that must be present in a JSON.
|
|
||||||
static const requiredKeys = <String>{};
|
|
||||||
}
|
|
||||||
@ -1,387 +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 ApplicationInstanceSectionEvent {
|
|
||||||
/// Returns a new [ApplicationInstanceSectionEvent] instance.
|
|
||||||
ApplicationInstanceSectionEvent({
|
|
||||||
required this.id,
|
|
||||||
required this.label,
|
|
||||||
this.title = const [],
|
|
||||||
required this.configurationId,
|
|
||||||
required this.type,
|
|
||||||
required this.isSubSection,
|
|
||||||
required this.instanceId,
|
|
||||||
this.description = const [],
|
|
||||||
this.order,
|
|
||||||
this.imageId,
|
|
||||||
this.imageSource,
|
|
||||||
this.parentId,
|
|
||||||
this.dateCreation,
|
|
||||||
this.isBeacon,
|
|
||||||
this.beaconId,
|
|
||||||
this.latitude,
|
|
||||||
this.longitude,
|
|
||||||
this.meterZoneGPS,
|
|
||||||
this.isActive,
|
|
||||||
this.startDate,
|
|
||||||
this.endDate,
|
|
||||||
this.programme = const [],
|
|
||||||
this.parcoursIds = const [],
|
|
||||||
});
|
|
||||||
|
|
||||||
String id;
|
|
||||||
|
|
||||||
String label;
|
|
||||||
|
|
||||||
List<TranslationDTO> title;
|
|
||||||
|
|
||||||
String configurationId;
|
|
||||||
|
|
||||||
SectionType type;
|
|
||||||
|
|
||||||
bool isSubSection;
|
|
||||||
|
|
||||||
String instanceId;
|
|
||||||
|
|
||||||
List<TranslationDTO>? description;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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.
|
|
||||||
///
|
|
||||||
int? order;
|
|
||||||
|
|
||||||
String? imageId;
|
|
||||||
|
|
||||||
String? imageSource;
|
|
||||||
|
|
||||||
String? parentId;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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.
|
|
||||||
///
|
|
||||||
DateTime? dateCreation;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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? isBeacon;
|
|
||||||
|
|
||||||
int? beaconId;
|
|
||||||
|
|
||||||
String? latitude;
|
|
||||||
|
|
||||||
String? longitude;
|
|
||||||
|
|
||||||
int? meterZoneGPS;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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? isActive;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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.
|
|
||||||
///
|
|
||||||
DateTime? startDate;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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.
|
|
||||||
///
|
|
||||||
DateTime? endDate;
|
|
||||||
|
|
||||||
List<ProgrammeBlock>? programme;
|
|
||||||
|
|
||||||
List<String>? parcoursIds;
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool operator ==(Object other) =>
|
|
||||||
identical(this, other) ||
|
|
||||||
other is ApplicationInstanceSectionEvent &&
|
|
||||||
other.id == id &&
|
|
||||||
other.label == label &&
|
|
||||||
_deepEquality.equals(other.title, title) &&
|
|
||||||
other.configurationId == configurationId &&
|
|
||||||
other.type == type &&
|
|
||||||
other.isSubSection == isSubSection &&
|
|
||||||
other.instanceId == instanceId &&
|
|
||||||
_deepEquality.equals(other.description, description) &&
|
|
||||||
other.order == order &&
|
|
||||||
other.imageId == imageId &&
|
|
||||||
other.imageSource == imageSource &&
|
|
||||||
other.parentId == parentId &&
|
|
||||||
other.dateCreation == dateCreation &&
|
|
||||||
other.isBeacon == isBeacon &&
|
|
||||||
other.beaconId == beaconId &&
|
|
||||||
other.latitude == latitude &&
|
|
||||||
other.longitude == longitude &&
|
|
||||||
other.meterZoneGPS == meterZoneGPS &&
|
|
||||||
other.isActive == isActive &&
|
|
||||||
other.startDate == startDate &&
|
|
||||||
other.endDate == endDate &&
|
|
||||||
_deepEquality.equals(other.programme, programme) &&
|
|
||||||
_deepEquality.equals(other.parcoursIds, parcoursIds);
|
|
||||||
|
|
||||||
@override
|
|
||||||
int get hashCode =>
|
|
||||||
// ignore: unnecessary_parenthesis
|
|
||||||
(id.hashCode) +
|
|
||||||
(label.hashCode) +
|
|
||||||
(title.hashCode) +
|
|
||||||
(configurationId.hashCode) +
|
|
||||||
(type.hashCode) +
|
|
||||||
(isSubSection.hashCode) +
|
|
||||||
(instanceId.hashCode) +
|
|
||||||
(description == null ? 0 : description!.hashCode) +
|
|
||||||
(order == null ? 0 : order!.hashCode) +
|
|
||||||
(imageId == null ? 0 : imageId!.hashCode) +
|
|
||||||
(imageSource == null ? 0 : imageSource!.hashCode) +
|
|
||||||
(parentId == null ? 0 : parentId!.hashCode) +
|
|
||||||
(dateCreation == null ? 0 : dateCreation!.hashCode) +
|
|
||||||
(isBeacon == null ? 0 : isBeacon!.hashCode) +
|
|
||||||
(beaconId == null ? 0 : beaconId!.hashCode) +
|
|
||||||
(latitude == null ? 0 : latitude!.hashCode) +
|
|
||||||
(longitude == null ? 0 : longitude!.hashCode) +
|
|
||||||
(meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) +
|
|
||||||
(isActive == null ? 0 : isActive!.hashCode) +
|
|
||||||
(startDate == null ? 0 : startDate!.hashCode) +
|
|
||||||
(endDate == null ? 0 : endDate!.hashCode) +
|
|
||||||
(programme == null ? 0 : programme!.hashCode) +
|
|
||||||
(parcoursIds == null ? 0 : parcoursIds!.hashCode);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() =>
|
|
||||||
'ApplicationInstanceSectionEvent[id=$id, label=$label, title=$title, configurationId=$configurationId, type=$type, isSubSection=$isSubSection, instanceId=$instanceId, description=$description, order=$order, imageId=$imageId, imageSource=$imageSource, parentId=$parentId, dateCreation=$dateCreation, isBeacon=$isBeacon, beaconId=$beaconId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isActive=$isActive, startDate=$startDate, endDate=$endDate, programme=$programme, parcoursIds=$parcoursIds]';
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
final json = <String, dynamic>{};
|
|
||||||
json[r'id'] = this.id;
|
|
||||||
json[r'label'] = this.label;
|
|
||||||
json[r'title'] = this.title;
|
|
||||||
json[r'configurationId'] = this.configurationId;
|
|
||||||
json[r'type'] = this.type;
|
|
||||||
json[r'isSubSection'] = this.isSubSection;
|
|
||||||
json[r'instanceId'] = this.instanceId;
|
|
||||||
if (this.description != null) {
|
|
||||||
json[r'description'] = this.description;
|
|
||||||
} else {
|
|
||||||
json[r'description'] = null;
|
|
||||||
}
|
|
||||||
if (this.order != null) {
|
|
||||||
json[r'order'] = this.order;
|
|
||||||
} else {
|
|
||||||
json[r'order'] = 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.parentId != null) {
|
|
||||||
json[r'parentId'] = this.parentId;
|
|
||||||
} else {
|
|
||||||
json[r'parentId'] = null;
|
|
||||||
}
|
|
||||||
if (this.dateCreation != null) {
|
|
||||||
json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String();
|
|
||||||
} else {
|
|
||||||
json[r'dateCreation'] = 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.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.isActive != null) {
|
|
||||||
json[r'isActive'] = this.isActive;
|
|
||||||
} else {
|
|
||||||
json[r'isActive'] = null;
|
|
||||||
}
|
|
||||||
if (this.startDate != null) {
|
|
||||||
json[r'startDate'] = this.startDate!.toUtc().toIso8601String();
|
|
||||||
} else {
|
|
||||||
json[r'startDate'] = null;
|
|
||||||
}
|
|
||||||
if (this.endDate != null) {
|
|
||||||
json[r'endDate'] = this.endDate!.toUtc().toIso8601String();
|
|
||||||
} else {
|
|
||||||
json[r'endDate'] = null;
|
|
||||||
}
|
|
||||||
if (this.programme != null) {
|
|
||||||
json[r'programme'] = this.programme;
|
|
||||||
} else {
|
|
||||||
json[r'programme'] = null;
|
|
||||||
}
|
|
||||||
if (this.parcoursIds != null) {
|
|
||||||
json[r'parcoursIds'] = this.parcoursIds;
|
|
||||||
} else {
|
|
||||||
json[r'parcoursIds'] = null;
|
|
||||||
}
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns a new [ApplicationInstanceSectionEvent] instance and imports its values from
|
|
||||||
/// [value] if it's a [Map], null otherwise.
|
|
||||||
// ignore: prefer_constructors_over_static_methods
|
|
||||||
static ApplicationInstanceSectionEvent? 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 "ApplicationInstanceSectionEvent[$key]" is missing from JSON.');
|
|
||||||
assert(json[key] != null,
|
|
||||||
'Required key "ApplicationInstanceSectionEvent[$key]" has a null value in JSON.');
|
|
||||||
});
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return ApplicationInstanceSectionEvent(
|
|
||||||
id: mapValueOfType<String>(json, r'id')!,
|
|
||||||
label: mapValueOfType<String>(json, r'label')!,
|
|
||||||
title: TranslationDTO.listFromJson(json[r'title']),
|
|
||||||
configurationId: mapValueOfType<String>(json, r'configurationId')!,
|
|
||||||
type: SectionType.fromJson(json[r'type'])!,
|
|
||||||
isSubSection: mapValueOfType<bool>(json, r'isSubSection')!,
|
|
||||||
instanceId: mapValueOfType<String>(json, r'instanceId')!,
|
|
||||||
description: TranslationDTO.listFromJson(json[r'description']),
|
|
||||||
order: mapValueOfType<int>(json, r'order'),
|
|
||||||
imageId: mapValueOfType<String>(json, r'imageId'),
|
|
||||||
imageSource: mapValueOfType<String>(json, r'imageSource'),
|
|
||||||
parentId: mapValueOfType<String>(json, r'parentId'),
|
|
||||||
dateCreation: mapDateTime(json, r'dateCreation', r''),
|
|
||||||
isBeacon: mapValueOfType<bool>(json, r'isBeacon'),
|
|
||||||
beaconId: mapValueOfType<int>(json, r'beaconId'),
|
|
||||||
latitude: mapValueOfType<String>(json, r'latitude'),
|
|
||||||
longitude: mapValueOfType<String>(json, r'longitude'),
|
|
||||||
meterZoneGPS: mapValueOfType<int>(json, r'meterZoneGPS'),
|
|
||||||
isActive: mapValueOfType<bool>(json, r'isActive'),
|
|
||||||
startDate: mapDateTime(json, r'startDate', r''),
|
|
||||||
endDate: mapDateTime(json, r'endDate', r''),
|
|
||||||
programme: ProgrammeBlock.listFromJson(json[r'programme']),
|
|
||||||
parcoursIds: json[r'parcoursIds'] is Iterable
|
|
||||||
? (json[r'parcoursIds'] as Iterable)
|
|
||||||
.cast<String>()
|
|
||||||
.toList(growable: false)
|
|
||||||
: const [],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
static List<ApplicationInstanceSectionEvent> listFromJson(
|
|
||||||
dynamic json, {
|
|
||||||
bool growable = false,
|
|
||||||
}) {
|
|
||||||
final result = <ApplicationInstanceSectionEvent>[];
|
|
||||||
if (json is List && json.isNotEmpty) {
|
|
||||||
for (final row in json) {
|
|
||||||
final value = ApplicationInstanceSectionEvent.fromJson(row);
|
|
||||||
if (value != null) {
|
|
||||||
result.add(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result.toList(growable: growable);
|
|
||||||
}
|
|
||||||
|
|
||||||
static Map<String, ApplicationInstanceSectionEvent> mapFromJson(
|
|
||||||
dynamic json) {
|
|
||||||
final map = <String, ApplicationInstanceSectionEvent>{};
|
|
||||||
if (json is Map && json.isNotEmpty) {
|
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
|
||||||
for (final entry in json.entries) {
|
|
||||||
final value = ApplicationInstanceSectionEvent.fromJson(entry.value);
|
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
// maps a json object with a list of ApplicationInstanceSectionEvent-objects as value to a dart map
|
|
||||||
static Map<String, List<ApplicationInstanceSectionEvent>> mapListFromJson(
|
|
||||||
dynamic json, {
|
|
||||||
bool growable = false,
|
|
||||||
}) {
|
|
||||||
final map = <String, List<ApplicationInstanceSectionEvent>>{};
|
|
||||||
if (json is Map && json.isNotEmpty) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
json = json.cast<String, dynamic>();
|
|
||||||
for (final entry in json.entries) {
|
|
||||||
map[entry.key] = ApplicationInstanceSectionEvent.listFromJson(
|
|
||||||
entry.value,
|
|
||||||
growable: growable,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The list of required keys that must be present in a JSON.
|
|
||||||
static const requiredKeys = <String>{
|
|
||||||
'id',
|
|
||||||
'label',
|
|
||||||
'title',
|
|
||||||
'configurationId',
|
|
||||||
'type',
|
|
||||||
'isSubSection',
|
|
||||||
'instanceId',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@ -17,14 +17,6 @@ class InstanceDTO {
|
|||||||
this.name,
|
this.name,
|
||||||
this.dateCreation,
|
this.dateCreation,
|
||||||
this.pinCode,
|
this.pinCode,
|
||||||
this.isPushNotification,
|
|
||||||
this.isStatistic,
|
|
||||||
this.isMobile,
|
|
||||||
this.isTablet,
|
|
||||||
this.isWeb,
|
|
||||||
this.isVR,
|
|
||||||
this.isAssistant,
|
|
||||||
this.applicationInstanceDTOs = const [],
|
|
||||||
});
|
});
|
||||||
|
|
||||||
String? id;
|
String? id;
|
||||||
@ -35,58 +27,6 @@ class InstanceDTO {
|
|||||||
|
|
||||||
String? pinCode;
|
String? pinCode;
|
||||||
|
|
||||||
///
|
|
||||||
/// 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? isPushNotification;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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? isStatistic;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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? isMobile;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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? isTablet;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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? isWeb;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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? isVR;
|
|
||||||
|
|
||||||
bool? isAssistant;
|
|
||||||
|
|
||||||
List<ApplicationInstanceDTO>? applicationInstanceDTOs;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) =>
|
bool operator ==(Object other) =>
|
||||||
identical(this, other) ||
|
identical(this, other) ||
|
||||||
@ -94,16 +34,7 @@ class InstanceDTO {
|
|||||||
other.id == id &&
|
other.id == id &&
|
||||||
other.name == name &&
|
other.name == name &&
|
||||||
other.dateCreation == dateCreation &&
|
other.dateCreation == dateCreation &&
|
||||||
other.pinCode == pinCode &&
|
other.pinCode == pinCode;
|
||||||
other.isPushNotification == isPushNotification &&
|
|
||||||
other.isStatistic == isStatistic &&
|
|
||||||
other.isMobile == isMobile &&
|
|
||||||
other.isTablet == isTablet &&
|
|
||||||
other.isWeb == isWeb &&
|
|
||||||
other.isVR == isVR &&
|
|
||||||
other.isAssistant == isAssistant &&
|
|
||||||
_deepEquality.equals(
|
|
||||||
other.applicationInstanceDTOs, applicationInstanceDTOs);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
@ -111,19 +42,11 @@ class InstanceDTO {
|
|||||||
(id == null ? 0 : id!.hashCode) +
|
(id == null ? 0 : id!.hashCode) +
|
||||||
(name == null ? 0 : name!.hashCode) +
|
(name == null ? 0 : name!.hashCode) +
|
||||||
(dateCreation == null ? 0 : dateCreation!.hashCode) +
|
(dateCreation == null ? 0 : dateCreation!.hashCode) +
|
||||||
(pinCode == null ? 0 : pinCode!.hashCode) +
|
(pinCode == null ? 0 : pinCode!.hashCode);
|
||||||
(isPushNotification == null ? 0 : isPushNotification!.hashCode) +
|
|
||||||
(isStatistic == null ? 0 : isStatistic!.hashCode) +
|
|
||||||
(isMobile == null ? 0 : isMobile!.hashCode) +
|
|
||||||
(isTablet == null ? 0 : isTablet!.hashCode) +
|
|
||||||
(isWeb == null ? 0 : isWeb!.hashCode) +
|
|
||||||
(isVR == null ? 0 : isVR!.hashCode) +
|
|
||||||
(isAssistant == null ? 0 : isAssistant!.hashCode) +
|
|
||||||
(applicationInstanceDTOs == null ? 0 : applicationInstanceDTOs!.hashCode);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() =>
|
String toString() =>
|
||||||
'InstanceDTO[id=$id, name=$name, dateCreation=$dateCreation, pinCode=$pinCode, isPushNotification=$isPushNotification, isStatistic=$isStatistic, isMobile=$isMobile, isTablet=$isTablet, isWeb=$isWeb, isVR=$isVR, isAssistant=$isAssistant, applicationInstanceDTOs=$applicationInstanceDTOs]';
|
'InstanceDTO[id=$id, name=$name, dateCreation=$dateCreation, pinCode=$pinCode]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -147,46 +70,6 @@ class InstanceDTO {
|
|||||||
} else {
|
} else {
|
||||||
json[r'pinCode'] = null;
|
json[r'pinCode'] = null;
|
||||||
}
|
}
|
||||||
if (this.isPushNotification != null) {
|
|
||||||
json[r'isPushNotification'] = this.isPushNotification;
|
|
||||||
} else {
|
|
||||||
json[r'isPushNotification'] = null;
|
|
||||||
}
|
|
||||||
if (this.isStatistic != null) {
|
|
||||||
json[r'isStatistic'] = this.isStatistic;
|
|
||||||
} else {
|
|
||||||
json[r'isStatistic'] = null;
|
|
||||||
}
|
|
||||||
if (this.isMobile != null) {
|
|
||||||
json[r'isMobile'] = this.isMobile;
|
|
||||||
} else {
|
|
||||||
json[r'isMobile'] = null;
|
|
||||||
}
|
|
||||||
if (this.isTablet != null) {
|
|
||||||
json[r'isTablet'] = this.isTablet;
|
|
||||||
} else {
|
|
||||||
json[r'isTablet'] = null;
|
|
||||||
}
|
|
||||||
if (this.isWeb != null) {
|
|
||||||
json[r'isWeb'] = this.isWeb;
|
|
||||||
} else {
|
|
||||||
json[r'isWeb'] = null;
|
|
||||||
}
|
|
||||||
if (this.isVR != null) {
|
|
||||||
json[r'isVR'] = this.isVR;
|
|
||||||
} else {
|
|
||||||
json[r'isVR'] = null;
|
|
||||||
}
|
|
||||||
if (this.isAssistant != null) {
|
|
||||||
json[r'isAssistant'] = this.isAssistant;
|
|
||||||
} else {
|
|
||||||
json[r'isAssistant'] = null;
|
|
||||||
}
|
|
||||||
if (this.applicationInstanceDTOs != null) {
|
|
||||||
json[r'applicationInstanceDTOs'] = this.applicationInstanceDTOs;
|
|
||||||
} else {
|
|
||||||
json[r'applicationInstanceDTOs'] = null;
|
|
||||||
}
|
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -215,15 +98,6 @@ class InstanceDTO {
|
|||||||
name: mapValueOfType<String>(json, r'name'),
|
name: mapValueOfType<String>(json, r'name'),
|
||||||
dateCreation: mapDateTime(json, r'dateCreation', r''),
|
dateCreation: mapDateTime(json, r'dateCreation', r''),
|
||||||
pinCode: mapValueOfType<String>(json, r'pinCode'),
|
pinCode: mapValueOfType<String>(json, r'pinCode'),
|
||||||
isPushNotification: mapValueOfType<bool>(json, r'isPushNotification'),
|
|
||||||
isStatistic: mapValueOfType<bool>(json, r'isStatistic'),
|
|
||||||
isMobile: mapValueOfType<bool>(json, r'isMobile'),
|
|
||||||
isTablet: mapValueOfType<bool>(json, r'isTablet'),
|
|
||||||
isWeb: mapValueOfType<bool>(json, r'isWeb'),
|
|
||||||
isVR: mapValueOfType<bool>(json, r'isVR'),
|
|
||||||
isAssistant: mapValueOfType<bool>(json, r'isAssistant'),
|
|
||||||
applicationInstanceDTOs: ApplicationInstanceDTO.listFromJson(
|
|
||||||
json[r'applicationInstanceDTOs']),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@ -1,102 +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;
|
|
||||||
|
|
||||||
/// 0 = SimpleGrid 1 = MasonryGrid
|
|
||||||
class LayoutMainPageType {
|
|
||||||
/// Instantiate a new enum with the provided [value].
|
|
||||||
const LayoutMainPageType._(this.value);
|
|
||||||
|
|
||||||
/// The underlying value of this enum member.
|
|
||||||
final int value;
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() => value.toString();
|
|
||||||
|
|
||||||
int toJson() => value;
|
|
||||||
|
|
||||||
static const SimpleGrid = LayoutMainPageType._(0);
|
|
||||||
static const MasonryGrid = LayoutMainPageType._(1);
|
|
||||||
|
|
||||||
/// List of all possible values in this [enum][LayoutMainPageType].
|
|
||||||
static const values = <LayoutMainPageType>[
|
|
||||||
SimpleGrid,
|
|
||||||
MasonryGrid,
|
|
||||||
];
|
|
||||||
|
|
||||||
static LayoutMainPageType? fromJson(dynamic value) =>
|
|
||||||
LayoutMainPageTypeTypeTransformer().decode(value);
|
|
||||||
|
|
||||||
static List<LayoutMainPageType> listFromJson(
|
|
||||||
dynamic json, {
|
|
||||||
bool growable = false,
|
|
||||||
}) {
|
|
||||||
final result = <LayoutMainPageType>[];
|
|
||||||
if (json is List && json.isNotEmpty) {
|
|
||||||
for (final row in json) {
|
|
||||||
final value = LayoutMainPageType.fromJson(row);
|
|
||||||
if (value != null) {
|
|
||||||
result.add(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result.toList(growable: growable);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Transformation class that can [encode] an instance of [LayoutMainPageType] to int,
|
|
||||||
/// and [decode] dynamic data back to [LayoutMainPageType].
|
|
||||||
class LayoutMainPageTypeTypeTransformer {
|
|
||||||
factory LayoutMainPageTypeTypeTransformer() =>
|
|
||||||
_instance ??= const LayoutMainPageTypeTypeTransformer._();
|
|
||||||
|
|
||||||
const LayoutMainPageTypeTypeTransformer._();
|
|
||||||
|
|
||||||
int encode(LayoutMainPageType data) => data.value;
|
|
||||||
|
|
||||||
/// Decodes a [dynamic value][data] to a LayoutMainPageType.
|
|
||||||
///
|
|
||||||
/// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully,
|
|
||||||
/// then null is returned. However, if [allowNull] is false and the [dynamic value][data]
|
|
||||||
/// cannot be decoded successfully, then an [UnimplementedError] is thrown.
|
|
||||||
///
|
|
||||||
/// The [allowNull] is very handy when an API changes and a new enum value is added or removed,
|
|
||||||
/// and users are still using an old app with the old code.
|
|
||||||
LayoutMainPageType? decode(dynamic data, {bool allowNull = true}) {
|
|
||||||
if (data != null) {
|
|
||||||
if(data.runtimeType == String) {
|
|
||||||
switch (data.toString()) {
|
|
||||||
case r'SimpleGrid': return LayoutMainPageType.SimpleGrid;
|
|
||||||
case r'MasonryGrid': return LayoutMainPageType.MasonryGrid;
|
|
||||||
default:
|
|
||||||
if (!allowNull) {
|
|
||||||
throw ArgumentError('Unknown enum value to decode: $data');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if(data.runtimeType == int) {
|
|
||||||
switch (data) {
|
|
||||||
case 0: return LayoutMainPageType.SimpleGrid;
|
|
||||||
case 1: return LayoutMainPageType.MasonryGrid;
|
|
||||||
default:
|
|
||||||
if (!allowNull) {
|
|
||||||
throw ArgumentError('Unknown enum value to decode: $data');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Singleton [LayoutMainPageTypeTypeTransformer] instance.
|
|
||||||
static LayoutMainPageTypeTypeTransformer? _instance;
|
|
||||||
}
|
|
||||||
@ -1,31 +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 MapAnnotation {
|
|
||||||
MapAnnotation({this.id});
|
|
||||||
String? id;
|
|
||||||
|
|
||||||
static MapAnnotation? fromJson(dynamic value) => value is Map ? MapAnnotation() : null;
|
|
||||||
|
|
||||||
static List<MapAnnotation> listFromJson(dynamic json, {bool growable = false}) {
|
|
||||||
final result = <MapAnnotation>[];
|
|
||||||
if (json is List && json.isNotEmpty) {
|
|
||||||
for (final row in json) {
|
|
||||||
final value = MapAnnotation.fromJson(row);
|
|
||||||
if (value != null) result.add(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result.toList(growable: growable);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const requiredKeys = <String>{};
|
|
||||||
}
|
|
||||||
@ -1,31 +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 ProgrammeBlock {
|
|
||||||
ProgrammeBlock({this.id});
|
|
||||||
String? id;
|
|
||||||
|
|
||||||
static ProgrammeBlock? fromJson(dynamic value) => value is Map ? ProgrammeBlock() : null;
|
|
||||||
|
|
||||||
static List<ProgrammeBlock> listFromJson(dynamic json, {bool growable = false}) {
|
|
||||||
final result = <ProgrammeBlock>[];
|
|
||||||
if (json is List && json.isNotEmpty) {
|
|
||||||
for (final row in json) {
|
|
||||||
final value = ProgrammeBlock.fromJson(row);
|
|
||||||
if (value != null) result.add(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result.toList(growable: growable);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const requiredKeys = <String>{};
|
|
||||||
}
|
|
||||||
@ -1,386 +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 SectionEvent {
|
|
||||||
/// Returns a new [SectionEvent] instance.
|
|
||||||
SectionEvent({
|
|
||||||
required this.id,
|
|
||||||
required this.label,
|
|
||||||
this.title = const [],
|
|
||||||
required this.configurationId,
|
|
||||||
required this.type,
|
|
||||||
required this.isSubSection,
|
|
||||||
required this.instanceId,
|
|
||||||
this.description = const [],
|
|
||||||
this.order,
|
|
||||||
this.imageId,
|
|
||||||
this.imageSource,
|
|
||||||
this.parentId,
|
|
||||||
this.dateCreation,
|
|
||||||
this.isBeacon,
|
|
||||||
this.beaconId,
|
|
||||||
this.latitude,
|
|
||||||
this.longitude,
|
|
||||||
this.meterZoneGPS,
|
|
||||||
this.isActive,
|
|
||||||
this.startDate,
|
|
||||||
this.endDate,
|
|
||||||
this.programme = const [],
|
|
||||||
this.parcoursIds = const [],
|
|
||||||
});
|
|
||||||
|
|
||||||
String id;
|
|
||||||
|
|
||||||
String label;
|
|
||||||
|
|
||||||
List<TranslationDTO> title;
|
|
||||||
|
|
||||||
String configurationId;
|
|
||||||
|
|
||||||
SectionType type;
|
|
||||||
|
|
||||||
bool isSubSection;
|
|
||||||
|
|
||||||
String instanceId;
|
|
||||||
|
|
||||||
List<TranslationDTO>? description;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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.
|
|
||||||
///
|
|
||||||
int? order;
|
|
||||||
|
|
||||||
String? imageId;
|
|
||||||
|
|
||||||
String? imageSource;
|
|
||||||
|
|
||||||
String? parentId;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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.
|
|
||||||
///
|
|
||||||
DateTime? dateCreation;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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? isBeacon;
|
|
||||||
|
|
||||||
int? beaconId;
|
|
||||||
|
|
||||||
String? latitude;
|
|
||||||
|
|
||||||
String? longitude;
|
|
||||||
|
|
||||||
int? meterZoneGPS;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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? isActive;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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.
|
|
||||||
///
|
|
||||||
DateTime? startDate;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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.
|
|
||||||
///
|
|
||||||
DateTime? endDate;
|
|
||||||
|
|
||||||
List<ProgrammeBlock>? programme;
|
|
||||||
|
|
||||||
List<String>? parcoursIds;
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool operator ==(Object other) =>
|
|
||||||
identical(this, other) ||
|
|
||||||
other is SectionEvent &&
|
|
||||||
other.id == id &&
|
|
||||||
other.label == label &&
|
|
||||||
_deepEquality.equals(other.title, title) &&
|
|
||||||
other.configurationId == configurationId &&
|
|
||||||
other.type == type &&
|
|
||||||
other.isSubSection == isSubSection &&
|
|
||||||
other.instanceId == instanceId &&
|
|
||||||
_deepEquality.equals(other.description, description) &&
|
|
||||||
other.order == order &&
|
|
||||||
other.imageId == imageId &&
|
|
||||||
other.imageSource == imageSource &&
|
|
||||||
other.parentId == parentId &&
|
|
||||||
other.dateCreation == dateCreation &&
|
|
||||||
other.isBeacon == isBeacon &&
|
|
||||||
other.beaconId == beaconId &&
|
|
||||||
other.latitude == latitude &&
|
|
||||||
other.longitude == longitude &&
|
|
||||||
other.meterZoneGPS == meterZoneGPS &&
|
|
||||||
other.isActive == isActive &&
|
|
||||||
other.startDate == startDate &&
|
|
||||||
other.endDate == endDate &&
|
|
||||||
_deepEquality.equals(other.programme, programme) &&
|
|
||||||
_deepEquality.equals(other.parcoursIds, parcoursIds);
|
|
||||||
|
|
||||||
@override
|
|
||||||
int get hashCode =>
|
|
||||||
// ignore: unnecessary_parenthesis
|
|
||||||
(id.hashCode) +
|
|
||||||
(label.hashCode) +
|
|
||||||
(title.hashCode) +
|
|
||||||
(configurationId.hashCode) +
|
|
||||||
(type.hashCode) +
|
|
||||||
(isSubSection.hashCode) +
|
|
||||||
(instanceId.hashCode) +
|
|
||||||
(description == null ? 0 : description!.hashCode) +
|
|
||||||
(order == null ? 0 : order!.hashCode) +
|
|
||||||
(imageId == null ? 0 : imageId!.hashCode) +
|
|
||||||
(imageSource == null ? 0 : imageSource!.hashCode) +
|
|
||||||
(parentId == null ? 0 : parentId!.hashCode) +
|
|
||||||
(dateCreation == null ? 0 : dateCreation!.hashCode) +
|
|
||||||
(isBeacon == null ? 0 : isBeacon!.hashCode) +
|
|
||||||
(beaconId == null ? 0 : beaconId!.hashCode) +
|
|
||||||
(latitude == null ? 0 : latitude!.hashCode) +
|
|
||||||
(longitude == null ? 0 : longitude!.hashCode) +
|
|
||||||
(meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) +
|
|
||||||
(isActive == null ? 0 : isActive!.hashCode) +
|
|
||||||
(startDate == null ? 0 : startDate!.hashCode) +
|
|
||||||
(endDate == null ? 0 : endDate!.hashCode) +
|
|
||||||
(programme == null ? 0 : programme!.hashCode) +
|
|
||||||
(parcoursIds == null ? 0 : parcoursIds!.hashCode);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() =>
|
|
||||||
'SectionEvent[id=$id, label=$label, title=$title, configurationId=$configurationId, type=$type, isSubSection=$isSubSection, instanceId=$instanceId, description=$description, order=$order, imageId=$imageId, imageSource=$imageSource, parentId=$parentId, dateCreation=$dateCreation, isBeacon=$isBeacon, beaconId=$beaconId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isActive=$isActive, startDate=$startDate, endDate=$endDate, programme=$programme, parcoursIds=$parcoursIds]';
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
final json = <String, dynamic>{};
|
|
||||||
json[r'id'] = this.id;
|
|
||||||
json[r'label'] = this.label;
|
|
||||||
json[r'title'] = this.title;
|
|
||||||
json[r'configurationId'] = this.configurationId;
|
|
||||||
json[r'type'] = this.type;
|
|
||||||
json[r'isSubSection'] = this.isSubSection;
|
|
||||||
json[r'instanceId'] = this.instanceId;
|
|
||||||
if (this.description != null) {
|
|
||||||
json[r'description'] = this.description;
|
|
||||||
} else {
|
|
||||||
json[r'description'] = null;
|
|
||||||
}
|
|
||||||
if (this.order != null) {
|
|
||||||
json[r'order'] = this.order;
|
|
||||||
} else {
|
|
||||||
json[r'order'] = 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.parentId != null) {
|
|
||||||
json[r'parentId'] = this.parentId;
|
|
||||||
} else {
|
|
||||||
json[r'parentId'] = null;
|
|
||||||
}
|
|
||||||
if (this.dateCreation != null) {
|
|
||||||
json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String();
|
|
||||||
} else {
|
|
||||||
json[r'dateCreation'] = 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.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.isActive != null) {
|
|
||||||
json[r'isActive'] = this.isActive;
|
|
||||||
} else {
|
|
||||||
json[r'isActive'] = null;
|
|
||||||
}
|
|
||||||
if (this.startDate != null) {
|
|
||||||
json[r'startDate'] = this.startDate!.toUtc().toIso8601String();
|
|
||||||
} else {
|
|
||||||
json[r'startDate'] = null;
|
|
||||||
}
|
|
||||||
if (this.endDate != null) {
|
|
||||||
json[r'endDate'] = this.endDate!.toUtc().toIso8601String();
|
|
||||||
} else {
|
|
||||||
json[r'endDate'] = null;
|
|
||||||
}
|
|
||||||
if (this.programme != null) {
|
|
||||||
json[r'programme'] = this.programme;
|
|
||||||
} else {
|
|
||||||
json[r'programme'] = null;
|
|
||||||
}
|
|
||||||
if (this.parcoursIds != null) {
|
|
||||||
json[r'parcoursIds'] = this.parcoursIds;
|
|
||||||
} else {
|
|
||||||
json[r'parcoursIds'] = null;
|
|
||||||
}
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns a new [SectionEvent] instance and imports its values from
|
|
||||||
/// [value] if it's a [Map], null otherwise.
|
|
||||||
// ignore: prefer_constructors_over_static_methods
|
|
||||||
static SectionEvent? 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 "SectionEvent[$key]" is missing from JSON.');
|
|
||||||
assert(json[key] != null,
|
|
||||||
'Required key "SectionEvent[$key]" has a null value in JSON.');
|
|
||||||
});
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return SectionEvent(
|
|
||||||
id: mapValueOfType<String>(json, r'id')!,
|
|
||||||
label: mapValueOfType<String>(json, r'label')!,
|
|
||||||
title: TranslationDTO.listFromJson(json[r'title']),
|
|
||||||
configurationId: mapValueOfType<String>(json, r'configurationId')!,
|
|
||||||
type: SectionType.fromJson(json[r'type'])!,
|
|
||||||
isSubSection: mapValueOfType<bool>(json, r'isSubSection')!,
|
|
||||||
instanceId: mapValueOfType<String>(json, r'instanceId')!,
|
|
||||||
description: TranslationDTO.listFromJson(json[r'description']),
|
|
||||||
order: mapValueOfType<int>(json, r'order'),
|
|
||||||
imageId: mapValueOfType<String>(json, r'imageId'),
|
|
||||||
imageSource: mapValueOfType<String>(json, r'imageSource'),
|
|
||||||
parentId: mapValueOfType<String>(json, r'parentId'),
|
|
||||||
dateCreation: mapDateTime(json, r'dateCreation', r''),
|
|
||||||
isBeacon: mapValueOfType<bool>(json, r'isBeacon'),
|
|
||||||
beaconId: mapValueOfType<int>(json, r'beaconId'),
|
|
||||||
latitude: mapValueOfType<String>(json, r'latitude'),
|
|
||||||
longitude: mapValueOfType<String>(json, r'longitude'),
|
|
||||||
meterZoneGPS: mapValueOfType<int>(json, r'meterZoneGPS'),
|
|
||||||
isActive: mapValueOfType<bool>(json, r'isActive'),
|
|
||||||
startDate: mapDateTime(json, r'startDate', r''),
|
|
||||||
endDate: mapDateTime(json, r'endDate', r''),
|
|
||||||
programme: ProgrammeBlock.listFromJson(json[r'programme']),
|
|
||||||
parcoursIds: json[r'parcoursIds'] is Iterable
|
|
||||||
? (json[r'parcoursIds'] as Iterable)
|
|
||||||
.cast<String>()
|
|
||||||
.toList(growable: false)
|
|
||||||
: const [],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
static List<SectionEvent> listFromJson(
|
|
||||||
dynamic json, {
|
|
||||||
bool growable = false,
|
|
||||||
}) {
|
|
||||||
final result = <SectionEvent>[];
|
|
||||||
if (json is List && json.isNotEmpty) {
|
|
||||||
for (final row in json) {
|
|
||||||
final value = SectionEvent.fromJson(row);
|
|
||||||
if (value != null) {
|
|
||||||
result.add(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result.toList(growable: growable);
|
|
||||||
}
|
|
||||||
|
|
||||||
static Map<String, SectionEvent> mapFromJson(dynamic json) {
|
|
||||||
final map = <String, SectionEvent>{};
|
|
||||||
if (json is Map && json.isNotEmpty) {
|
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
|
||||||
for (final entry in json.entries) {
|
|
||||||
final value = SectionEvent.fromJson(entry.value);
|
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
// maps a json object with a list of SectionEvent-objects as value to a dart map
|
|
||||||
static Map<String, List<SectionEvent>> mapListFromJson(
|
|
||||||
dynamic json, {
|
|
||||||
bool growable = false,
|
|
||||||
}) {
|
|
||||||
final map = <String, List<SectionEvent>>{};
|
|
||||||
if (json is Map && json.isNotEmpty) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
json = json.cast<String, dynamic>();
|
|
||||||
for (final entry in json.entries) {
|
|
||||||
map[entry.key] = SectionEvent.listFromJson(
|
|
||||||
entry.value,
|
|
||||||
growable: growable,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The list of required keys that must be present in a JSON.
|
|
||||||
static const requiredKeys = <String>{
|
|
||||||
'id',
|
|
||||||
'label',
|
|
||||||
'title',
|
|
||||||
'configurationId',
|
|
||||||
'type',
|
|
||||||
'isSubSection',
|
|
||||||
'instanceId',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@ -1,406 +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 SectionEventDTO {
|
|
||||||
/// Returns a new [SectionEventDTO] instance.
|
|
||||||
SectionEventDTO({
|
|
||||||
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.startDate,
|
|
||||||
this.endDate,
|
|
||||||
this.parcoursIds = const [],
|
|
||||||
this.programme = const [],
|
|
||||||
});
|
|
||||||
|
|
||||||
String? id;
|
|
||||||
|
|
||||||
String? label;
|
|
||||||
|
|
||||||
List<TranslationDTO>? title;
|
|
||||||
|
|
||||||
List<TranslationDTO>? description;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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? isActive;
|
|
||||||
|
|
||||||
String? imageId;
|
|
||||||
|
|
||||||
String? imageSource;
|
|
||||||
|
|
||||||
String? configurationId;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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? isSubSection;
|
|
||||||
|
|
||||||
String? parentId;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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.
|
|
||||||
///
|
|
||||||
SectionType? type;
|
|
||||||
|
|
||||||
DateTime? dateCreation;
|
|
||||||
|
|
||||||
int? order;
|
|
||||||
|
|
||||||
String? instanceId;
|
|
||||||
|
|
||||||
String? latitude;
|
|
||||||
|
|
||||||
String? longitude;
|
|
||||||
|
|
||||||
int? meterZoneGPS;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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? isBeacon;
|
|
||||||
|
|
||||||
int? beaconId;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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.
|
|
||||||
///
|
|
||||||
DateTime? startDate;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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.
|
|
||||||
///
|
|
||||||
DateTime? endDate;
|
|
||||||
|
|
||||||
List<String>? parcoursIds;
|
|
||||||
|
|
||||||
List<ProgrammeBlock>? programme;
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool operator ==(Object other) =>
|
|
||||||
identical(this, other) ||
|
|
||||||
other is SectionEventDTO &&
|
|
||||||
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.startDate == startDate &&
|
|
||||||
other.endDate == endDate &&
|
|
||||||
_deepEquality.equals(other.parcoursIds, parcoursIds) &&
|
|
||||||
_deepEquality.equals(other.programme, programme);
|
|
||||||
|
|
||||||
@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) +
|
|
||||||
(startDate == null ? 0 : startDate!.hashCode) +
|
|
||||||
(endDate == null ? 0 : endDate!.hashCode) +
|
|
||||||
(parcoursIds == null ? 0 : parcoursIds!.hashCode) +
|
|
||||||
(programme == null ? 0 : programme!.hashCode);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() =>
|
|
||||||
'SectionEventDTO[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, startDate=$startDate, endDate=$endDate, parcoursIds=$parcoursIds, programme=$programme]';
|
|
||||||
|
|
||||||
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;
|
|
||||||
} else {
|
|
||||||
json[r'title'] = null;
|
|
||||||
}
|
|
||||||
if (this.description != null) {
|
|
||||||
json[r'description'] = this.description;
|
|
||||||
} 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.startDate != null) {
|
|
||||||
json[r'startDate'] = this.startDate!.toUtc().toIso8601String();
|
|
||||||
} else {
|
|
||||||
json[r'startDate'] = null;
|
|
||||||
}
|
|
||||||
if (this.endDate != null) {
|
|
||||||
json[r'endDate'] = this.endDate!.toUtc().toIso8601String();
|
|
||||||
} else {
|
|
||||||
json[r'endDate'] = null;
|
|
||||||
}
|
|
||||||
if (this.parcoursIds != null) {
|
|
||||||
json[r'parcoursIds'] = this.parcoursIds;
|
|
||||||
} else {
|
|
||||||
json[r'parcoursIds'] = null;
|
|
||||||
}
|
|
||||||
if (this.programme != null) {
|
|
||||||
json[r'programme'] = this.programme;
|
|
||||||
} else {
|
|
||||||
json[r'programme'] = null;
|
|
||||||
}
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns a new [SectionEventDTO] instance and imports its values from
|
|
||||||
/// [value] if it's a [Map], null otherwise.
|
|
||||||
// ignore: prefer_constructors_over_static_methods
|
|
||||||
static SectionEventDTO? 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 "SectionEventDTO[$key]" is missing from JSON.');
|
|
||||||
assert(json[key] != null,
|
|
||||||
'Required key "SectionEventDTO[$key]" has a null value in JSON.');
|
|
||||||
});
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return SectionEventDTO(
|
|
||||||
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'),
|
|
||||||
startDate: mapDateTime(json, r'startDate', r''),
|
|
||||||
endDate: mapDateTime(json, r'endDate', r''),
|
|
||||||
parcoursIds: json[r'parcoursIds'] is Iterable
|
|
||||||
? (json[r'parcoursIds'] as Iterable)
|
|
||||||
.cast<String>()
|
|
||||||
.toList(growable: false)
|
|
||||||
: const [],
|
|
||||||
programme: ProgrammeBlock.listFromJson(json[r'programme']),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
static List<SectionEventDTO> listFromJson(
|
|
||||||
dynamic json, {
|
|
||||||
bool growable = false,
|
|
||||||
}) {
|
|
||||||
final result = <SectionEventDTO>[];
|
|
||||||
if (json is List && json.isNotEmpty) {
|
|
||||||
for (final row in json) {
|
|
||||||
final value = SectionEventDTO.fromJson(row);
|
|
||||||
if (value != null) {
|
|
||||||
result.add(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result.toList(growable: growable);
|
|
||||||
}
|
|
||||||
|
|
||||||
static Map<String, SectionEventDTO> mapFromJson(dynamic json) {
|
|
||||||
final map = <String, SectionEventDTO>{};
|
|
||||||
if (json is Map && json.isNotEmpty) {
|
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
|
||||||
for (final entry in json.entries) {
|
|
||||||
final value = SectionEventDTO.fromJson(entry.value);
|
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
// maps a json object with a list of SectionEventDTO-objects as value to a dart map
|
|
||||||
static Map<String, List<SectionEventDTO>> mapListFromJson(
|
|
||||||
dynamic json, {
|
|
||||||
bool growable = false,
|
|
||||||
}) {
|
|
||||||
final map = <String, List<SectionEventDTO>>{};
|
|
||||||
if (json is Map && json.isNotEmpty) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
json = json.cast<String, dynamic>();
|
|
||||||
for (final entry in json.entries) {
|
|
||||||
map[entry.key] = SectionEventDTO.listFromJson(
|
|
||||||
entry.value,
|
|
||||||
growable: growable,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The list of required keys that must be present in a JSON.
|
|
||||||
static const requiredKeys = <String>{};
|
|
||||||
}
|
|
||||||
@ -80,7 +80,7 @@ dependencies:
|
|||||||
#win32: ^4.1.2
|
#win32: ^4.1.2
|
||||||
#archive: ^3.6.1
|
#archive: ^3.6.1
|
||||||
manager_api_new:
|
manager_api_new:
|
||||||
path: ../manager-app/manager_api_new
|
path: manager_api_new
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|||||||
@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
#include <firebase_core/firebase_core_plugin_c_api.h>
|
#include <firebase_core/firebase_core_plugin_c_api.h>
|
||||||
#include <firebase_storage/firebase_storage_plugin_c_api.h>
|
#include <firebase_storage/firebase_storage_plugin_c_api.h>
|
||||||
#include <flutter_inappwebview_windows/flutter_inappwebview_windows_plugin_c_api.h>
|
|
||||||
#include <permission_handler_windows/permission_handler_windows_plugin.h>
|
#include <permission_handler_windows/permission_handler_windows_plugin.h>
|
||||||
#include <url_launcher_windows/url_launcher_windows.h>
|
#include <url_launcher_windows/url_launcher_windows.h>
|
||||||
|
|
||||||
@ -17,8 +16,6 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
|
|||||||
registry->GetRegistrarForPlugin("FirebaseCorePluginCApi"));
|
registry->GetRegistrarForPlugin("FirebaseCorePluginCApi"));
|
||||||
FirebaseStoragePluginCApiRegisterWithRegistrar(
|
FirebaseStoragePluginCApiRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("FirebaseStoragePluginCApi"));
|
registry->GetRegistrarForPlugin("FirebaseStoragePluginCApi"));
|
||||||
FlutterInappwebviewWindowsPluginCApiRegisterWithRegistrar(
|
|
||||||
registry->GetRegistrarForPlugin("FlutterInappwebviewWindowsPluginCApi"));
|
|
||||||
PermissionHandlerWindowsPluginRegisterWithRegistrar(
|
PermissionHandlerWindowsPluginRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
|
registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
|
||||||
UrlLauncherWindowsRegisterWithRegistrar(
|
UrlLauncherWindowsRegisterWithRegistrar(
|
||||||
|
|||||||
@ -5,7 +5,6 @@
|
|||||||
list(APPEND FLUTTER_PLUGIN_LIST
|
list(APPEND FLUTTER_PLUGIN_LIST
|
||||||
firebase_core
|
firebase_core
|
||||||
firebase_storage
|
firebase_storage
|
||||||
flutter_inappwebview_windows
|
|
||||||
permission_handler_windows
|
permission_handler_windows
|
||||||
url_launcher_windows
|
url_launcher_windows
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user