wip support appconfigLink + update min size for elements in main views

This commit is contained in:
Thomas Fransolet 2025-08-14 22:25:33 +02:00
parent e2edbfd596
commit 2b0ac1ed0b
39 changed files with 2143 additions and 648 deletions

View File

@ -2,12 +2,13 @@ import 'package:flutter/material.dart';
import 'package:manager_app/Components/common_loader.dart';
import 'package:manager_app/Components/rounded_button.dart';
import 'package:manager_app/Components/string_input_container.dart';
import 'package:manager_app/Screens/Devices/change_device_info_modal.dart';
import 'package:manager_app/Screens/Resources/resources_screen.dart';
import 'package:manager_app/app_context.dart';
import 'package:manager_app/constants.dart';
import 'package:manager_api_new/api.dart';
import '../Kiosk_devices/change_device_info_modal.dart';
dynamic showAddConfigurationLink (BuildContext mainContext, AppContext appContext, InstanceDTO instanceDTO, List<String> configurationIds) async {
Size size = MediaQuery.of(mainContext).size;

View File

@ -6,7 +6,6 @@ import 'package:manager_app/Components/message_notification.dart';
import 'package:manager_app/Models/managerContext.dart';
import 'package:manager_app/Screens/Applications/add_configuration_link_popup.dart';
import 'package:manager_app/Screens/Applications/phone_mockup.dart';
import 'package:manager_app/Screens/Devices/device_element.dart';
import 'package:manager_app/app_context.dart';
import 'package:manager_app/constants.dart';
import 'package:manager_api_new/api.dart';
@ -36,6 +35,10 @@ class _AppConfigurationLinkScreenState extends State<AppConfigurationLinkScreen>
List<AppConfigurationLinkDTO>? appConfigurationLinks = snapshot.data;
if (snapshot.connectionState == ConnectionState.done) {
final screenWidth = MediaQuery.of(context).size.width;
final itemWidth = 150; // largeur idéale d'une cellule
final crossAxisCount = (screenWidth / itemWidth).floor().clamp(1, 6);
return Container(
child: Align(
alignment: AlignmentDirectional.topCenter,
@ -67,7 +70,7 @@ class _AppConfigurationLinkScreenState extends State<AppConfigurationLinkScreen>
child: Center(
child: GridView.builder(
shrinkWrap: true,
gridDelegate: new SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 6),
gridDelegate: new SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: crossAxisCount),
itemCount: appConfigurationLinks.length,
itemBuilder: (BuildContext context, int index) {
AppConfigurationLinkDTO appConfigurationLink = appConfigurationLinks[index];

View File

@ -375,18 +375,6 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
},
),
),*/
// It's a section now
/*SizedBox(
height: 100,
child: StringInputContainer(
label: "Ville météo :",
fontSize: 20,
initialValue: configurationDTO.weatherCity,
onChanged: (value) {
configurationDTO.weatherCity = value;
},
),
),*/
])
],
),

View File

@ -61,10 +61,13 @@ class _ConfigurationsScreenState extends State<ConfigurationsScreen> {
}
}
Widget bodyGrid(data, Size size, AppContext appContext, BuildContext mainContext) {
Widget bodyGrid(data, Size size, AppContext appContext, BuildContext mainContext) {
final screenWidth = MediaQuery.of(context).size.width;
final itemWidth = 175;
final crossAxisCount = (screenWidth / itemWidth).floor().clamp(1, 6);
return GridView.builder(
shrinkWrap: true,
gridDelegate: new SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 6),
gridDelegate: new SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: crossAxisCount),
itemCount: data.length,
itemBuilder: (BuildContext context, int index) {
return

View File

@ -1,7 +1,6 @@
import 'package:flutter/material.dart';
import 'package:manager_app/Components/dropDown_input_container.dart';
import 'package:manager_app/Components/message_notification.dart';
import 'package:manager_app/Components/multi_select_container.dart';
import 'package:manager_app/Components/rounded_button.dart';
import 'package:manager_app/Components/string_input_container.dart';
import 'package:manager_app/Models/managerContext.dart';

View File

@ -1,160 +0,0 @@
import 'package:flutter/material.dart';
import 'package:manager_app/Components/rounded_button.dart';
import 'package:manager_app/Components/string_input_container.dart';
import 'package:manager_app/Models/managerContext.dart';
import 'package:manager_app/app_context.dart';
import 'package:manager_app/constants.dart';
import 'package:manager_api_new/api.dart';
import 'dropDown_configuration.dart';
showChangeInfo (String text, DeviceDTO inputDevice, Function onGetResult, int maxLines, BuildContext mainContext, dynamic appContext) async {
Size size = MediaQuery.of(mainContext).size;
var result = await showDialog(
builder: (BuildContext context) => AlertDialog(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(20.0))
),
title: Center(child: Text(text)),
content: Container(
width: size.width * 0.3,
height: size.height * 0.3,
child: Column(
children: [
Center(
child: Container(
width: size.width * 0.3,
height: size.height * 0.15,
child: StringInputContainer(
label: "Nom:",
initialValue: inputDevice.name,
onChanged: (value) {
inputDevice.name = value;
},
maxLength: 20,
),
),
),
Row(
children: [
Align(
alignment: AlignmentDirectional.centerStart,
child: Text("Configuration:", style: TextStyle(fontSize: 25, fontWeight: FontWeight.w300))
),
Container(
height: size.height * 0.1,
child: FutureBuilder(
future: getConfigurations(appContext),
builder: (context, AsyncSnapshot<dynamic> snapshot) {
if (snapshot.connectionState == ConnectionState.done) {
if (snapshot.data.length > 0) {
return Row(
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: DropDownConfig(
configurations: snapshot.data,
selectedConfigurationId: inputDevice.configurationId!,
onChange: (ConfigurationDTO configurationOut) {
inputDevice.configuration = configurationOut.label;
inputDevice.configurationId = configurationOut.id;
},
),
),
],
);
} else {
return Text("Aucune configuration trouvée");
}
} else if (snapshot.connectionState == ConnectionState.none) {
return Text("No data");
} else {
return Center(
child: Container(
child: Text("Loading..")
)
);
}
}
),
),
],
)
],
),
),
actions: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Container(
width: 180,
height: 70,
child: RoundedButton(
text: "Annuler",
icon: Icons.undo,
color: kSecond,
press: () {
Navigator.of(context).pop();
},
fontSize: 20,
),
),
Container(
width: 180,
height: 70,
child: RoundedButton(
text: "Changer",
icon: Icons.check,
color: kPrimaryColor,
textColor: kWhite,
press: () {
onGetResult(inputDevice);
Navigator.of(context).pop();
},
fontSize: 20,
),
),
],
),
],
), context: mainContext
);
}
getConfigurationsElement(DeviceDTO inputDevice, data, Function onGetResult) {
List<Widget> widgets = <Widget>[];
for(var configuration in data as List<ConfigurationDTO>) {
var widget = new InkWell(
onTap: () {
inputDevice.configuration = configuration.label;
inputDevice.configurationId = configuration.id;
},
child: Ink(
color: inputDevice.configurationId == configuration.id ? kPrimaryColor : null,
child: ListTile(
leading: Icon(Icons.account_tree_rounded),
title: Text(configuration.label!),
),
),
);
widgets.add(widget);
}
return widgets;
}
Future<List<ConfigurationDTO>?> getConfigurations(AppContext appContext) async {
List<ConfigurationDTO>? configurations = await (appContext.getContext() as ManagerAppContext).clientAPI!.configurationApi!.configurationGet(instanceId: (appContext.getContext() as ManagerAppContext).instanceId);
//print("number of configurations " + configurations.length.toString());
if(configurations != null) {
configurations.forEach((element) {
//print(element);
});
}
return configurations;
}

View File

@ -0,0 +1,261 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:manager_app/Components/check_input_container.dart';
import 'package:manager_app/Components/color_picker_input_container.dart';
import 'package:manager_app/Components/message_notification.dart';
import 'package:manager_app/Components/number_input_container.dart';
import 'package:manager_app/Components/rounded_button.dart';
import 'package:manager_app/Components/string_input_container.dart';
import 'package:manager_app/Models/managerContext.dart';
import 'package:manager_app/app_context.dart';
import 'package:manager_app/constants.dart';
import 'package:manager_api_new/api.dart';
import 'dropDown_configuration.dart';
showChangeInfo (String text, DeviceDTO inputDevice, AppConfigurationLinkDTO appConfiguration, Function onGetResult, int maxLines, BuildContext mainContext, dynamic appContext) async {
Size size = MediaQuery.of(mainContext).size;
var result = await showDialog(
builder: (BuildContext context) => AlertDialog(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(20.0))
),
title: Center(child: Text(text)),
content: Container(
width: size.width * 0.5,
height: size.height * 0.5,
constraints: BoxConstraints(minWidth: 400, minHeight: 500),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Container(
width: size.width * 0.3,
height: size.height * 0.15,
child: StringInputContainer(
label: "Nom:",
initialValue: inputDevice.name,
onChanged: (value) {
inputDevice.name = value;
},
maxLength: 20,
),
),
Row(
children: [
Align(
alignment: AlignmentDirectional.centerStart,
child: Text("Configuration:", style: TextStyle(fontSize: 25, fontWeight: FontWeight.w300))
),
Container(
height: size.height * 0.1,
child: FutureBuilder(
future: getConfigurations(appContext),
builder: (context, AsyncSnapshot<dynamic> snapshot) {
if (snapshot.connectionState == ConnectionState.done) {
if (snapshot.data.length > 0) {
return Row(
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: DropDownConfig(
configurations: snapshot.data,
selectedConfigurationId: inputDevice.configurationId!,
onChange: (ConfigurationDTO configurationOut) {
inputDevice.configuration = configurationOut.label;
inputDevice.configurationId = configurationOut.id;
},
),
),
],
);
} else {
return Text("Aucune configuration trouvée");
}
} else if (snapshot.connectionState == ConnectionState.none) {
return Text("No data");
} else {
return Center(
child: Container(
child: Text("Loading..")
)
);
}
}
),
),
],
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
ColorPickerInputContainer(
label: "Couleur principale :",
fontSize: 20,
color: appConfiguration.primaryColor,
onChanged: (value) {
appConfiguration.primaryColor = value;
},
),
ColorPickerInputContainer(
label: "Couleur fond d'écran :",
fontSize: 20,
color: appConfiguration.secondaryColor,
onChanged: (value) {
appConfiguration.secondaryColor = value;
},
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Container(
height: 100,
child: NumberInputContainer(
label: "Place des sections (%) :",
initialValue: appConfiguration.screenPercentageSectionsMainPage ?? 0,
isSmall: true,
maxLength: 3,
onChanged: (value) {
try {
appConfiguration.screenPercentageSectionsMainPage = int.parse(value);
} catch (e) {
print('Screen percentage value not a number');
showNotification(Colors.orange, kWhite, 'Cela doit être un chiffre', context, null);
}
},
),
),
Container(
height: 100,
child: NumberInputContainer(
label: "Pourcentage des arrondis (0-50) :",
initialValue: appConfiguration.roundedValue ?? 0,
isSmall: true,
maxLength: 2,
onChanged: (value) {
try {
appConfiguration.roundedValue = int.parse(value);
} catch (e) {
print('Rounded value not a number');
showNotification(Colors.orange, kWhite, 'Cela doit être un chiffre', context, null);
}
},
),
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
CheckInputContainer(
icon: Icons.image,
label: "Fond pour les images des sections :",
fontSize: 20,
isChecked: appConfiguration.isSectionImageBackground,
onChanged: (value) {
appConfiguration.isSectionImageBackground = value;
},
),
CheckInputContainer(
icon: Icons.watch_later_outlined,
label: "Heure :",
fontSize: 20,
isChecked: appConfiguration.isHour,
onChanged: (value) {
appConfiguration.isHour = value;
},
),
CheckInputContainer(
icon: Icons.date_range,
label: "Date :",
fontSize: 20,
isChecked: appConfiguration.isDate,
onChanged: (value) {
appConfiguration.isDate = value;
},
),
]
),
],
),
),
actions: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Container(
width: 180,
height: 70,
child: RoundedButton(
text: "Annuler",
icon: Icons.undo,
color: kSecond,
press: () {
Navigator.of(context).pop();
},
fontSize: 20,
),
),
Container(
width: 180,
height: 70,
child: RoundedButton(
text: "Changer",
icon: Icons.check,
color: kPrimaryColor,
textColor: kWhite,
press: () {
onGetResult(inputDevice, appConfiguration);
Navigator.of(context).pop();
},
fontSize: 20,
),
),
],
),
],
), context: mainContext
);
}
getConfigurationsElement(DeviceDTO inputDevice, data, Function onGetResult) {
List<Widget> widgets = <Widget>[];
for(var configuration in data as List<ConfigurationDTO>) {
var widget = new InkWell(
onTap: () {
inputDevice.configuration = configuration.label;
inputDevice.configurationId = configuration.id;
},
child: Ink(
color: inputDevice.configurationId == configuration.id ? kPrimaryColor : null,
child: ListTile(
leading: Icon(Icons.account_tree_rounded),
title: Text(configuration.label!),
),
),
);
widgets.add(widget);
}
return widgets;
}
Future<List<ConfigurationDTO>?> getConfigurations(AppContext appContext) async {
List<ConfigurationDTO>? configurations = await (appContext.getContext() as ManagerAppContext).clientAPI!.configurationApi!.configurationGet(instanceId: (appContext.getContext() as ManagerAppContext).instanceId);
//print("number of configurations " + configurations.length.toString());
if(configurations != null) {
configurations.forEach((element) {
//print(element);
});
}
return configurations;
}

View File

@ -1,7 +1,9 @@
import 'package:auto_size_text/auto_size_text.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:manager_app/Components/message_notification.dart';
import 'package:manager_app/Models/managerContext.dart';
import 'package:manager_app/Screens/Devices/change_device_info_modal.dart';
import 'package:manager_app/Screens/Kiosk_devices/change_device_info_modal.dart';
import 'package:manager_app/app_context.dart';
import 'package:manager_app/constants.dart';
import 'package:manager_api_new/api.dart';
@ -9,9 +11,11 @@ import 'package:provider/provider.dart';
class DeviceElement extends StatefulWidget {
final DeviceDTO deviceDTO;
final AppConfigurationLinkDTO appConfigurationLinkDTO;
const DeviceElement({
Key? key,
required this.deviceDTO,
required this.appConfigurationLinkDTO,
}) : super(key: key);
@override
@ -19,13 +23,6 @@ class DeviceElement extends StatefulWidget {
}
class _DeviceElementState extends State<DeviceElement> {
late DeviceDTO deviceDTO;
@override
void initState() {
deviceDTO = widget.deviceDTO;
super.initState();
}
@override
Widget build(BuildContext context) {
@ -40,7 +37,7 @@ class _DeviceElementState extends State<DeviceElement> {
width: 15,
height: 15,
decoration: BoxDecoration(
color: deviceDTO.connected! ? Colors.green : kError,
color: widget.deviceDTO.connected! ? Colors.green : kError,
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(25.0),
boxShadow: [
@ -60,32 +57,19 @@ class _DeviceElementState extends State<DeviceElement> {
child: Row(
children: [
AutoSizeText(
deviceDTO.name != null ? deviceDTO.name! : deviceDTO.identifier!,
widget.deviceDTO.name != null ? widget.deviceDTO.name! : widget.deviceDTO.identifier!,
style: new TextStyle(fontSize: 25, fontWeight: FontWeight.w300),
maxLines: 1,
),
],
),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Align(
alignment: Alignment.centerLeft,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
AutoSizeText(
deviceDTO.configuration != null ? deviceDTO.configuration! : "Aucune configuration",
style: new TextStyle(fontSize: 20),
maxLines: 1,
),
],
),
),
],
Center(
child: Text(
widget.appConfigurationLinkDTO.configuration != null ? widget.appConfigurationLinkDTO.configuration!.label! : "Aucune configuration",
style: new TextStyle(fontSize: 20),
maxLines: 1,
),
),
Positioned(
bottom: 10,
@ -95,15 +79,16 @@ class _DeviceElementState extends State<DeviceElement> {
onPressed: () {
showChangeInfo(
"Mettre à jour la tablette",
deviceDTO,
(DeviceDTO outputDevice) {
widget.deviceDTO,
widget.appConfigurationLinkDTO,
(DeviceDTO outputDevice, AppConfigurationLinkDTO outputAppConfig) {
// For refresh
setState(() {
//print("output");
//print(outputDevice);
deviceDTO = outputDevice;
var deviceDTO = outputDevice;
// Update device main info
updateMainInfos(deviceDTO, appContext);
updateMainInfos(deviceDTO, outputAppConfig, appContext);
});
},
1,
@ -118,11 +103,16 @@ class _DeviceElementState extends State<DeviceElement> {
);
}
Future<DeviceDTO?> updateMainInfos(DeviceDTO deviceToUpdate, dynamic appContext) async {
Future<DeviceDTO?> updateMainInfos(DeviceDTO deviceToUpdate, AppConfigurationLinkDTO appConfigurationToUpdate, dynamic appContext) async {
ManagerAppContext managerAppContext = appContext.getContext();
//print(deviceToUpdate);
DeviceDTO? device = await managerAppContext.clientAPI!.deviceApi!.deviceUpdateMainInfos(deviceToUpdate);
appConfigurationToUpdate.layoutMainPage = LayoutMainPageType.SimpleGrid; // Hardcoded for now as not supported
AppConfigurationLinkDTO? result = await managerAppContext.clientAPI!.applicationInstanceApi!.applicationInstanceUpdateApplicationLink(appConfigurationToUpdate);
//print(device);
showNotification(kSuccess, kWhite, "Le kiosk a été mis à jour", context, null);
return device;
}

View File

@ -2,20 +2,22 @@ import 'package:auto_size_text/auto_size_text.dart';
import 'package:flutter/material.dart';
import 'package:manager_app/Components/common_loader.dart';
import 'package:manager_app/Models/managerContext.dart';
import 'package:manager_app/Screens/Devices/device_element.dart';
import 'package:manager_app/Screens/Applications/app_configuration_link_screen.dart';
import 'package:manager_app/Screens/Kiosk_devices/device_element.dart';
import 'package:manager_app/app_context.dart';
import 'package:manager_app/constants.dart';
import 'package:manager_api_new/api.dart';
import 'package:provider/provider.dart';
class DevicesScreen extends StatefulWidget {
DevicesScreen({Key? key}) : super(key: key);
class KioskScreen extends StatefulWidget {
final ApplicationInstanceDTO applicationInstanceDTO;
KioskScreen({Key? key, required this.applicationInstanceDTO}) : super(key: key);
@override
_DevicesScreenState createState() => _DevicesScreenState();
_KioskScreenState createState() => _KioskScreenState();
}
class _DevicesScreenState extends State<DevicesScreen> {
class _KioskScreenState extends State<KioskScreen> {
@override
Widget build(BuildContext context) {
final appContext = Provider.of<AppContext>(context);
@ -42,26 +44,33 @@ class _DevicesScreenState extends State<DevicesScreen> {
),
),
FutureBuilder(
future: getDevices(appContext),
future: getAppConfigurationLink(appContext, widget.applicationInstanceDTO),
builder: (context, AsyncSnapshot<dynamic> snapshot) {
if (snapshot.connectionState == ConnectionState.done) {
List<AppConfigurationLinkDTO>? appConfigurationLinks = snapshot.data;
if (snapshot.connectionState == ConnectionState.done && appConfigurationLinks != null) {
final screenWidth = MediaQuery.of(context).size.width;
final itemWidth = 175;
final crossAxisCount = (screenWidth / itemWidth).floor().clamp(1, 6);
return GridView.builder(
shrinkWrap: true,
gridDelegate: new SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 6),
itemCount: snapshot.data.length,
gridDelegate: new SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: crossAxisCount),
itemCount: appConfigurationLinks.length,
itemBuilder: (BuildContext context, int index) {
return Container(
decoration: boxDecoration(),
padding: const EdgeInsets.all(15),
margin: EdgeInsets.symmetric(vertical: 15, horizontal: 15),
padding: const EdgeInsets.all(10),
margin: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
child: Align(
alignment: Alignment.center,
child: DeviceElement(deviceDTO: snapshot.data[index]), //getElement()
child: DeviceElement(deviceDTO: appConfigurationLinks[index].device!, appConfigurationLinkDTO: appConfigurationLinks[index]), //getElement()
),
);
}
);
} else if (snapshot.connectionState == ConnectionState.none) {
} else if (snapshot.connectionState == ConnectionState.none || appConfigurationLinks == null) {
return Text("No data");
} else {
return Center(
@ -222,11 +231,6 @@ class _DevicesScreenState extends State<DevicesScreen> {
}*/
}
Future<void> updateMainInfos(DeviceDTO deviceToUpdate, dynamic appContext) async {
ManagerAppContext managerAppContext = appContext.getContext();
await managerAppContext.clientAPI!.deviceApi!.deviceUpdateMainInfos(deviceToUpdate);
}
boxDecoration() {
return BoxDecoration(
color: kTextLightColor,

View File

@ -7,7 +7,7 @@ import 'package:manager_app/Models/managerContext.dart';
import 'package:manager_app/Models/menu.dart';
import 'package:manager_app/Models/menuSection.dart';
import 'package:manager_app/Screens/Configurations/configurations_screen.dart';
import 'package:manager_app/Screens/Devices/devices_screen.dart';
import 'package:manager_app/Screens/Kiosk_devices/kiosk_screen.dart';
import 'package:manager_app/Screens/Main/components/background.dart';
import 'package:manager_app/Screens/Resources/resources_screen.dart';
import 'package:manager_app/Screens/Applications/app_configuration_link_screen.dart';
@ -236,7 +236,7 @@ class _BodyState extends State<Body> {
var applicationInstanceTablet = instanceDTO.applicationInstanceDTOs!.firstWhere((ai) => ai.appType == AppType.Tablet);
return Padding(
padding: const EdgeInsets.all(8.0),
child: DevicesScreen()
child: KioskScreen(applicationInstanceDTO: applicationInstanceTablet)
);
case 'web' :
var applicationInstanceWeb = instanceDTO.applicationInstanceDTOs!.firstWhere((ai) => ai.appType == AppType.Web);

View File

@ -53,6 +53,10 @@ class _ResourceBodyGridState extends State<ResourceBodyGrid> {
}
Widget bodyGrid(data, Size size, AppContext appContext) {
final screenWidth = MediaQuery.of(context).size.width;
final itemWidth = 150;
final crossAxisCount = (screenWidth / itemWidth).floor().clamp(1, 9);
return Column(
children: [
Row(
@ -123,7 +127,7 @@ class _ResourceBodyGridState extends State<ResourceBodyGrid> {
Expanded(
child: GridView.builder(
shrinkWrap: true,
gridDelegate: new SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 9),
gridDelegate: new SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: crossAxisCount),
itemCount: data.length,
itemBuilder: (BuildContext context, int index) {
return

View File

@ -1,4 +1,4 @@
// Openapi Generator last run: : 2025-08-14T14:27:27.832614
// Openapi Generator last run: : 2025-08-14T22:13:12.782467
import 'package:openapi_generator_annotations/openapi_generator_annotations.dart';
@Openapi(

View File

@ -4,7 +4,7 @@
"info": {
"title": "Manager Service",
"description": "API Manager Service",
"version": "Version Alpha 1"
"version": "Version Alpha"
},
"servers": [
{
@ -5451,12 +5451,6 @@
"type": "string",
"nullable": true
},
"isDate": {
"type": "boolean"
},
"isHour": {
"type": "boolean"
},
"primaryColor": {
"type": "string",
"nullable": true
@ -5465,19 +5459,6 @@
"type": "string",
"nullable": true
},
"roundedValue": {
"type": "integer",
"format": "int32",
"nullable": true
},
"screenPercentageSectionsMainPage": {
"type": "integer",
"format": "int32",
"nullable": true
},
"isSectionImageBackground": {
"type": "boolean"
},
"languages": {
"type": "array",
"nullable": true,
@ -5536,6 +5517,44 @@
"format": "int32",
"nullable": true
},
"isDate": {
"type": "boolean"
},
"isHour": {
"type": "boolean"
},
"roundedValue": {
"type": "integer",
"format": "int32",
"nullable": true
},
"screenPercentageSectionsMainPage": {
"type": "integer",
"format": "int32",
"nullable": true
},
"isSectionImageBackground": {
"type": "boolean"
},
"layoutMainPage": {
"$ref": "#/components/schemas/LayoutMainPageType"
},
"loaderImageId": {
"type": "string",
"nullable": true
},
"loaderImageUrl": {
"type": "string",
"nullable": true
},
"primaryColor": {
"type": "string",
"nullable": true
},
"secondaryColor": {
"type": "string",
"nullable": true
},
"configuration": {
"nullable": true,
"oneOf": [
@ -5551,9 +5570,33 @@
"$ref": "#/components/schemas/ApplicationInstance"
}
]
},
"deviceId": {
"type": "string",
"nullable": true
},
"device": {
"nullable": true,
"oneOf": [
{
"$ref": "#/components/schemas/Device"
}
]
}
}
},
"LayoutMainPageType": {
"type": "integer",
"description": "0 = SimpleGrid\n1 = MasonryGrid",
"x-enumNames": [
"SimpleGrid",
"MasonryGrid"
],
"enum": [
0,
1
]
},
"Configuration": {
"type": "object",
"additionalProperties": false,
@ -5687,12 +5730,6 @@
"type": "string",
"nullable": true
},
"isDate": {
"type": "boolean"
},
"isHour": {
"type": "boolean"
},
"primaryColor": {
"type": "string",
"nullable": true
@ -5701,19 +5738,6 @@
"type": "string",
"nullable": true
},
"roundedValue": {
"type": "integer",
"format": "int32",
"nullable": true
},
"screenPercentageSectionsMainPage": {
"type": "integer",
"format": "int32",
"nullable": true
},
"isSectionImageBackground": {
"type": "boolean"
},
"layoutMainPage": {
"$ref": "#/components/schemas/LayoutMainPageType"
},
@ -5738,18 +5762,6 @@
}
}
},
"LayoutMainPageType": {
"type": "integer",
"description": "0 = SimpleGrid\n1 = MasonryGrid",
"x-enumNames": [
"SimpleGrid",
"MasonryGrid"
],
"enum": [
0,
1
]
},
"SectionEvent": {
"allOf": [
{
@ -6709,6 +6721,81 @@
11
]
},
"Device": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"configurationId",
"connected",
"instanceId"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"identifier": {
"type": "string",
"nullable": true
},
"name": {
"type": "string",
"nullable": true
},
"ipAddressWLAN": {
"type": "string",
"nullable": true
},
"ipAddressETH": {
"type": "string",
"nullable": true
},
"configuration": {
"nullable": true,
"oneOf": [
{
"$ref": "#/components/schemas/Configuration"
}
]
},
"configurationId": {
"type": "string",
"minLength": 1
},
"connected": {
"type": "boolean"
},
"dateCreation": {
"type": "string",
"format": "date-time"
},
"dateUpdate": {
"type": "string",
"format": "date-time"
},
"batteryLevel": {
"type": "string",
"nullable": true
},
"lastBatteryLevel": {
"type": "string",
"format": "date-time"
},
"connectionLevel": {
"type": "string",
"nullable": true
},
"lastConnectionLevel": {
"type": "string",
"format": "date-time"
},
"instanceId": {
"type": "string",
"minLength": 1
}
}
},
"AppConfigurationLinkDTO": {
"type": "object",
"additionalProperties": false,
@ -6733,14 +6820,6 @@
"type": "string",
"nullable": true
},
"applicationInstance": {
"nullable": true,
"oneOf": [
{
"$ref": "#/components/schemas/ApplicationInstanceDTO"
}
]
},
"order": {
"type": "integer",
"format": "int32",
@ -6753,6 +6832,56 @@
"type": "integer",
"format": "int32",
"nullable": true
},
"isDate": {
"type": "boolean"
},
"isHour": {
"type": "boolean"
},
"roundedValue": {
"type": "integer",
"format": "int32",
"nullable": true
},
"screenPercentageSectionsMainPage": {
"type": "integer",
"format": "int32",
"nullable": true
},
"isSectionImageBackground": {
"type": "boolean"
},
"deviceId": {
"type": "string",
"nullable": true
},
"device": {
"nullable": true,
"oneOf": [
{
"$ref": "#/components/schemas/DeviceDTO"
}
]
},
"layoutMainPage": {
"$ref": "#/components/schemas/LayoutMainPageType"
},
"loaderImageId": {
"type": "string",
"nullable": true
},
"loaderImageUrl": {
"type": "string",
"nullable": true
},
"primaryColor": {
"type": "string",
"nullable": true
},
"secondaryColor": {
"type": "string",
"nullable": true
}
}
},
@ -6826,6 +6955,57 @@
}
}
},
"DeviceDTO": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"nullable": true
},
"identifier": {
"type": "string",
"nullable": true
},
"name": {
"type": "string",
"nullable": true
},
"ipAddressWLAN": {
"type": "string",
"nullable": true
},
"ipAddressETH": {
"type": "string",
"nullable": true
},
"configurationId": {
"type": "string",
"nullable": true
},
"configuration": {
"type": "string",
"nullable": true
},
"connected": {
"type": "boolean"
},
"dateCreation": {
"type": "string",
"format": "date-time",
"nullable": true
},
"dateUpdate": {
"type": "string",
"format": "date-time",
"nullable": true
},
"instanceId": {
"type": "string",
"nullable": true
}
}
},
"ExportConfigurationDTO": {
"allOf": [
{
@ -6970,57 +7150,6 @@
}
}
},
"DeviceDTO": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"nullable": true
},
"identifier": {
"type": "string",
"nullable": true
},
"name": {
"type": "string",
"nullable": true
},
"ipAddressWLAN": {
"type": "string",
"nullable": true
},
"ipAddressETH": {
"type": "string",
"nullable": true
},
"configurationId": {
"type": "string",
"nullable": true
},
"configuration": {
"type": "string",
"nullable": true
},
"connected": {
"type": "boolean"
},
"dateCreation": {
"type": "string",
"format": "date-time",
"nullable": true
},
"dateUpdate": {
"type": "string",
"format": "date-time",
"nullable": true
},
"instanceId": {
"type": "string",
"nullable": true
}
}
},
"DeviceDetailDTO": {
"allOf": [
{

View File

@ -8,8 +8,9 @@ doc/AppConfigurationLink.md
doc/AppConfigurationLinkApplicationInstance.md
doc/AppConfigurationLinkConfiguration.md
doc/AppConfigurationLinkDTO.md
doc/AppConfigurationLinkDTOApplicationInstance.md
doc/AppConfigurationLinkDTOConfiguration.md
doc/AppConfigurationLinkDTODevice.md
doc/AppConfigurationLinkDevice.md
doc/AppType.md
doc/ApplicationInstance.md
doc/ApplicationInstanceApi.md
@ -26,6 +27,7 @@ doc/Coordinate.md
doc/CoordinateEqualityComparer.md
doc/CoordinateSequence.md
doc/CoordinateSequenceFactory.md
doc/Device.md
doc/DeviceApi.md
doc/DeviceDTO.md
doc/DeviceDetailDTO.md
@ -156,9 +158,10 @@ lib/model/agenda_dto_all_of_agenda_map_provider.dart
lib/model/app_configuration_link.dart
lib/model/app_configuration_link_application_instance.dart
lib/model/app_configuration_link_configuration.dart
lib/model/app_configuration_link_device.dart
lib/model/app_configuration_link_dto.dart
lib/model/app_configuration_link_dto_application_instance.dart
lib/model/app_configuration_link_dto_configuration.dart
lib/model/app_configuration_link_dto_device.dart
lib/model/app_type.dart
lib/model/application_instance.dart
lib/model/application_instance_dto.dart
@ -172,6 +175,7 @@ lib/model/coordinate.dart
lib/model/coordinate_equality_comparer.dart
lib/model/coordinate_sequence.dart
lib/model/coordinate_sequence_factory.dart
lib/model/device.dart
lib/model/device_detail_dto.dart
lib/model/device_dto.dart
lib/model/dimension.dart
@ -267,5 +271,3 @@ lib/model/video_dto.dart
lib/model/weather_dto.dart
lib/model/web_dto.dart
pubspec.yaml
test/app_configuration_link_dto_application_instance_test.dart
test/app_configuration_link_dto_configuration_test.dart

View File

@ -3,7 +3,7 @@ API Manager Service
This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: Version Alpha 1
- API version: Version Alpha
- Generator version: 7.9.0
- Build package: org.openapitools.codegen.languages.DartClientCodegen
@ -167,8 +167,9 @@ Class | Method | HTTP request | Description
- [AppConfigurationLinkApplicationInstance](doc//AppConfigurationLinkApplicationInstance.md)
- [AppConfigurationLinkConfiguration](doc//AppConfigurationLinkConfiguration.md)
- [AppConfigurationLinkDTO](doc//AppConfigurationLinkDTO.md)
- [AppConfigurationLinkDTOApplicationInstance](doc//AppConfigurationLinkDTOApplicationInstance.md)
- [AppConfigurationLinkDTOConfiguration](doc//AppConfigurationLinkDTOConfiguration.md)
- [AppConfigurationLinkDTODevice](doc//AppConfigurationLinkDTODevice.md)
- [AppConfigurationLinkDevice](doc//AppConfigurationLinkDevice.md)
- [AppType](doc//AppType.md)
- [ApplicationInstance](doc//ApplicationInstance.md)
- [ApplicationInstanceDTO](doc//ApplicationInstanceDTO.md)
@ -182,6 +183,7 @@ Class | Method | HTTP request | Description
- [CoordinateEqualityComparer](doc//CoordinateEqualityComparer.md)
- [CoordinateSequence](doc//CoordinateSequence.md)
- [CoordinateSequenceFactory](doc//CoordinateSequenceFactory.md)
- [Device](doc//Device.md)
- [DeviceDTO](doc//DeviceDTO.md)
- [DeviceDetailDTO](doc//DeviceDetailDTO.md)
- [Dimension](doc//Dimension.md)

View File

@ -14,8 +14,20 @@ Name | Type | Description | Notes
**order** | **int** | | [optional]
**isActive** | **bool** | | [optional]
**weightMasonryGrid** | **int** | | [optional]
**isDate** | **bool** | | [optional]
**isHour** | **bool** | | [optional]
**roundedValue** | **int** | | [optional]
**screenPercentageSectionsMainPage** | **int** | | [optional]
**isSectionImageBackground** | **bool** | | [optional]
**layoutMainPage** | [**LayoutMainPageType**](LayoutMainPageType.md) | | [optional]
**loaderImageId** | **String** | | [optional]
**loaderImageUrl** | **String** | | [optional]
**primaryColor** | **String** | | [optional]
**secondaryColor** | **String** | | [optional]
**configuration** | [**AppConfigurationLinkConfiguration**](AppConfigurationLinkConfiguration.md) | | [optional]
**applicationInstance** | [**AppConfigurationLinkApplicationInstance**](AppConfigurationLinkApplicationInstance.md) | | [optional]
**deviceId** | **String** | | [optional]
**device** | [**AppConfigurationLinkDevice**](AppConfigurationLinkDevice.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -16,13 +16,8 @@ Name | Type | Description | Notes
**mainImageUrl** | **String** | | [optional]
**loaderImageId** | **String** | | [optional]
**loaderImageUrl** | **String** | | [optional]
**isDate** | **bool** | | [optional]
**isHour** | **bool** | | [optional]
**primaryColor** | **String** | | [optional]
**secondaryColor** | **String** | | [optional]
**roundedValue** | **int** | | [optional]
**screenPercentageSectionsMainPage** | **int** | | [optional]
**isSectionImageBackground** | **bool** | | [optional]
**layoutMainPage** | [**LayoutMainPageType**](LayoutMainPageType.md) | | [optional]
**languages** | **List<String>** | | [optional] [default to const []]
**sectionEventId** | **String** | | [optional]

View File

@ -12,10 +12,21 @@ Name | Type | Description | Notes
**configurationId** | **String** | | [optional]
**configuration** | [**AppConfigurationLinkDTOConfiguration**](AppConfigurationLinkDTOConfiguration.md) | | [optional]
**applicationInstanceId** | **String** | | [optional]
**applicationInstance** | [**AppConfigurationLinkDTOApplicationInstance**](AppConfigurationLinkDTOApplicationInstance.md) | | [optional]
**order** | **int** | | [optional]
**isActive** | **bool** | | [optional]
**weightMasonryGrid** | **int** | | [optional]
**isDate** | **bool** | | [optional]
**isHour** | **bool** | | [optional]
**roundedValue** | **int** | | [optional]
**screenPercentageSectionsMainPage** | **int** | | [optional]
**isSectionImageBackground** | **bool** | | [optional]
**deviceId** | **String** | | [optional]
**device** | [**AppConfigurationLinkDTODevice**](AppConfigurationLinkDTODevice.md) | | [optional]
**layoutMainPage** | [**LayoutMainPageType**](LayoutMainPageType.md) | | [optional]
**loaderImageId** | **String** | | [optional]
**loaderImageUrl** | **String** | | [optional]
**primaryColor** | **String** | | [optional]
**secondaryColor** | **String** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,25 @@
# manager_api_new.model.AppConfigurationLinkDTODevice
## Load the model package
```dart
import 'package:manager_api_new/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**identifier** | **String** | | [optional]
**name** | **String** | | [optional]
**ipAddressWLAN** | **String** | | [optional]
**ipAddressETH** | **String** | | [optional]
**configurationId** | **String** | | [optional]
**configuration** | **String** | | [optional]
**connected** | **bool** | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**dateUpdate** | [**DateTime**](DateTime.md) | | [optional]
**instanceId** | **String** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,29 @@
# manager_api_new.model.AppConfigurationLinkDevice
## Load the model package
```dart
import 'package:manager_api_new/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | |
**configurationId** | **String** | |
**connected** | **bool** | |
**instanceId** | **String** | |
**identifier** | **String** | | [optional]
**name** | **String** | | [optional]
**ipAddressWLAN** | **String** | | [optional]
**ipAddressETH** | **String** | | [optional]
**configuration** | [**AppConfigurationLinkConfiguration**](AppConfigurationLinkConfiguration.md) | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**dateUpdate** | [**DateTime**](DateTime.md) | | [optional]
**batteryLevel** | **String** | | [optional]
**lastBatteryLevel** | [**DateTime**](DateTime.md) | | [optional]
**connectionLevel** | **String** | | [optional]
**lastConnectionLevel** | [**DateTime**](DateTime.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -16,13 +16,8 @@ Name | Type | Description | Notes
**mainImageUrl** | **String** | | [optional]
**loaderImageId** | **String** | | [optional]
**loaderImageUrl** | **String** | | [optional]
**isDate** | **bool** | | [optional]
**isHour** | **bool** | | [optional]
**primaryColor** | **String** | | [optional]
**secondaryColor** | **String** | | [optional]
**roundedValue** | **int** | | [optional]
**screenPercentageSectionsMainPage** | **int** | | [optional]
**isSectionImageBackground** | **bool** | | [optional]
**layoutMainPage** | [**LayoutMainPageType**](LayoutMainPageType.md) | | [optional]
**languages** | **List<String>** | | [optional] [default to const []]
**sectionEventId** | **String** | | [optional]

View File

@ -16,13 +16,8 @@ Name | Type | Description | Notes
**mainImageUrl** | **String** | | [optional]
**loaderImageId** | **String** | | [optional]
**loaderImageUrl** | **String** | | [optional]
**isDate** | **bool** | | [optional]
**isHour** | **bool** | | [optional]
**primaryColor** | **String** | | [optional]
**secondaryColor** | **String** | | [optional]
**roundedValue** | **int** | | [optional]
**screenPercentageSectionsMainPage** | **int** | | [optional]
**isSectionImageBackground** | **bool** | | [optional]
**languages** | **List<String>** | | [optional] [default to const []]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,29 @@
# manager_api_new.model.Device
## Load the model package
```dart
import 'package:manager_api_new/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | |
**configurationId** | **String** | |
**connected** | **bool** | |
**instanceId** | **String** | |
**identifier** | **String** | | [optional]
**name** | **String** | | [optional]
**ipAddressWLAN** | **String** | | [optional]
**ipAddressETH** | **String** | | [optional]
**configuration** | [**AppConfigurationLinkConfiguration**](AppConfigurationLinkConfiguration.md) | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**dateUpdate** | [**DateTime**](DateTime.md) | | [optional]
**batteryLevel** | **String** | | [optional]
**lastBatteryLevel** | [**DateTime**](DateTime.md) | | [optional]
**connectionLevel** | **String** | | [optional]
**lastConnectionLevel** | [**DateTime**](DateTime.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -47,8 +47,9 @@ part 'model/app_configuration_link.dart';
part 'model/app_configuration_link_application_instance.dart';
part 'model/app_configuration_link_configuration.dart';
part 'model/app_configuration_link_dto.dart';
part 'model/app_configuration_link_dto_application_instance.dart';
part 'model/app_configuration_link_dto_configuration.dart';
part 'model/app_configuration_link_dto_device.dart';
part 'model/app_configuration_link_device.dart';
part 'model/app_type.dart';
part 'model/application_instance.dart';
part 'model/application_instance_dto.dart';
@ -62,6 +63,7 @@ part 'model/coordinate.dart';
part 'model/coordinate_equality_comparer.dart';
part 'model/coordinate_sequence.dart';
part 'model/coordinate_sequence_factory.dart';
part 'model/device.dart';
part 'model/device_dto.dart';
part 'model/device_detail_dto.dart';
part 'model/dimension.dart';

View File

@ -241,10 +241,12 @@ class ApiClient {
return AppConfigurationLinkConfiguration.fromJson(value);
case 'AppConfigurationLinkDTO':
return AppConfigurationLinkDTO.fromJson(value);
case 'AppConfigurationLinkDTOApplicationInstance':
return AppConfigurationLinkDTOApplicationInstance.fromJson(value);
case 'AppConfigurationLinkDTOConfiguration':
return AppConfigurationLinkDTOConfiguration.fromJson(value);
case 'AppConfigurationLinkDTODevice':
return AppConfigurationLinkDTODevice.fromJson(value);
case 'AppConfigurationLinkDevice':
return AppConfigurationLinkDevice.fromJson(value);
case 'AppType':
return AppTypeTypeTransformer().decode(value);
case 'ApplicationInstance':
@ -271,6 +273,8 @@ class ApiClient {
return CoordinateSequence.fromJson(value);
case 'CoordinateSequenceFactory':
return CoordinateSequenceFactory.fromJson(value);
case 'Device':
return Device.fromJson(value);
case 'DeviceDTO':
return DeviceDTO.fromJson(value);
case 'DeviceDetailDTO':

View File

@ -19,8 +19,20 @@ class AppConfigurationLink {
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;
@ -41,10 +53,58 @@ class AppConfigurationLink {
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) ||
@ -55,8 +115,21 @@ class AppConfigurationLink {
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.applicationInstance == applicationInstance &&
other.deviceId == deviceId &&
other.device == device;
@override
int get hashCode =>
@ -67,12 +140,28 @@ class AppConfigurationLink {
(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);
(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, configuration=$configuration, applicationInstance=$applicationInstance]';
'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>{};
@ -98,6 +187,57 @@ class AppConfigurationLink {
} 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 {
@ -108,6 +248,16 @@ class AppConfigurationLink {
} 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;
}
@ -139,10 +289,24 @@ class AppConfigurationLink {
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;

View File

@ -21,13 +21,8 @@ class AppConfigurationLinkApplicationInstance {
this.mainImageUrl,
this.loaderImageId,
this.loaderImageUrl,
this.isDate,
this.isHour,
this.primaryColor,
this.secondaryColor,
this.roundedValue,
this.screenPercentageSectionsMainPage,
this.isSectionImageBackground,
this.layoutMainPage,
this.languages = const [],
this.sectionEventId,
@ -50,38 +45,10 @@ class AppConfigurationLinkApplicationInstance {
String? loaderImageUrl;
///
/// 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;
String? primaryColor;
String? secondaryColor;
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
@ -108,14 +75,8 @@ class AppConfigurationLinkApplicationInstance {
other.mainImageUrl == mainImageUrl &&
other.loaderImageId == loaderImageId &&
other.loaderImageUrl == loaderImageUrl &&
other.isDate == isDate &&
other.isHour == isHour &&
other.primaryColor == primaryColor &&
other.secondaryColor == secondaryColor &&
other.roundedValue == roundedValue &&
other.screenPercentageSectionsMainPage ==
screenPercentageSectionsMainPage &&
other.isSectionImageBackground == isSectionImageBackground &&
other.layoutMainPage == layoutMainPage &&
_deepEquality.equals(other.languages, languages) &&
other.sectionEventId == sectionEventId &&
@ -132,17 +93,8 @@ class AppConfigurationLinkApplicationInstance {
(mainImageUrl == null ? 0 : mainImageUrl!.hashCode) +
(loaderImageId == null ? 0 : loaderImageId!.hashCode) +
(loaderImageUrl == null ? 0 : loaderImageUrl!.hashCode) +
(isDate == null ? 0 : isDate!.hashCode) +
(isHour == null ? 0 : isHour!.hashCode) +
(primaryColor == null ? 0 : primaryColor!.hashCode) +
(secondaryColor == null ? 0 : secondaryColor!.hashCode) +
(roundedValue == null ? 0 : roundedValue!.hashCode) +
(screenPercentageSectionsMainPage == null
? 0
: screenPercentageSectionsMainPage!.hashCode) +
(isSectionImageBackground == null
? 0
: isSectionImageBackground!.hashCode) +
(layoutMainPage == null ? 0 : layoutMainPage!.hashCode) +
(languages == null ? 0 : languages!.hashCode) +
(sectionEventId == null ? 0 : sectionEventId!.hashCode) +
@ -150,7 +102,7 @@ class AppConfigurationLinkApplicationInstance {
@override
String toString() =>
'AppConfigurationLinkApplicationInstance[instanceId=$instanceId, appType=$appType, id=$id, configurations=$configurations, mainImageId=$mainImageId, mainImageUrl=$mainImageUrl, loaderImageId=$loaderImageId, loaderImageUrl=$loaderImageUrl, isDate=$isDate, isHour=$isHour, primaryColor=$primaryColor, secondaryColor=$secondaryColor, roundedValue=$roundedValue, screenPercentageSectionsMainPage=$screenPercentageSectionsMainPage, isSectionImageBackground=$isSectionImageBackground, layoutMainPage=$layoutMainPage, languages=$languages, sectionEventId=$sectionEventId, sectionEvent=$sectionEvent]';
'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>{};
@ -186,16 +138,6 @@ class AppConfigurationLinkApplicationInstance {
} else {
json[r'loaderImageUrl'] = 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.primaryColor != null) {
json[r'primaryColor'] = this.primaryColor;
} else {
@ -206,22 +148,6 @@ class AppConfigurationLinkApplicationInstance {
} else {
json[r'secondaryColor'] = 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 {
@ -275,15 +201,8 @@ class AppConfigurationLinkApplicationInstance {
mainImageUrl: mapValueOfType<String>(json, r'mainImageUrl'),
loaderImageId: mapValueOfType<String>(json, r'loaderImageId'),
loaderImageUrl: mapValueOfType<String>(json, r'loaderImageUrl'),
isDate: mapValueOfType<bool>(json, r'isDate'),
isHour: mapValueOfType<bool>(json, r'isHour'),
primaryColor: mapValueOfType<String>(json, r'primaryColor'),
secondaryColor: mapValueOfType<String>(json, r'secondaryColor'),
roundedValue: mapValueOfType<int>(json, r'roundedValue'),
screenPercentageSectionsMainPage:
mapValueOfType<int>(json, r'screenPercentageSectionsMainPage'),
isSectionImageBackground:
mapValueOfType<bool>(json, r'isSectionImageBackground'),
layoutMainPage: LayoutMainPageType.fromJson(json[r'layoutMainPage']),
languages: json[r'languages'] is Iterable
? (json[r'languages'] as Iterable)

View File

@ -0,0 +1,294 @@
//
// 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 {
/// Returns a new [AppConfigurationLinkDevice] instance.
AppConfigurationLinkDevice({
required this.id,
required this.configurationId,
required this.connected,
required this.instanceId,
this.identifier,
this.name,
this.ipAddressWLAN,
this.ipAddressETH,
this.configuration,
this.dateCreation,
this.dateUpdate,
this.batteryLevel,
this.lastBatteryLevel,
this.connectionLevel,
this.lastConnectionLevel,
});
String id;
String configurationId;
bool connected;
String instanceId;
String? identifier;
String? name;
String? ipAddressWLAN;
String? ipAddressETH;
AppConfigurationLinkConfiguration? configuration;
///
/// 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.
///
DateTime? dateUpdate;
String? batteryLevel;
///
/// 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? lastBatteryLevel;
String? connectionLevel;
///
/// 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? lastConnectionLevel;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is AppConfigurationLinkDevice &&
other.id == id &&
other.configurationId == configurationId &&
other.connected == connected &&
other.instanceId == instanceId &&
other.identifier == identifier &&
other.name == name &&
other.ipAddressWLAN == ipAddressWLAN &&
other.ipAddressETH == ipAddressETH &&
other.configuration == configuration &&
other.dateCreation == dateCreation &&
other.dateUpdate == dateUpdate &&
other.batteryLevel == batteryLevel &&
other.lastBatteryLevel == lastBatteryLevel &&
other.connectionLevel == connectionLevel &&
other.lastConnectionLevel == lastConnectionLevel;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(id.hashCode) +
(configurationId.hashCode) +
(connected.hashCode) +
(instanceId.hashCode) +
(identifier == null ? 0 : identifier!.hashCode) +
(name == null ? 0 : name!.hashCode) +
(ipAddressWLAN == null ? 0 : ipAddressWLAN!.hashCode) +
(ipAddressETH == null ? 0 : ipAddressETH!.hashCode) +
(configuration == null ? 0 : configuration!.hashCode) +
(dateCreation == null ? 0 : dateCreation!.hashCode) +
(dateUpdate == null ? 0 : dateUpdate!.hashCode) +
(batteryLevel == null ? 0 : batteryLevel!.hashCode) +
(lastBatteryLevel == null ? 0 : lastBatteryLevel!.hashCode) +
(connectionLevel == null ? 0 : connectionLevel!.hashCode) +
(lastConnectionLevel == null ? 0 : lastConnectionLevel!.hashCode);
@override
String toString() =>
'AppConfigurationLinkDevice[id=$id, configurationId=$configurationId, connected=$connected, instanceId=$instanceId, identifier=$identifier, name=$name, ipAddressWLAN=$ipAddressWLAN, ipAddressETH=$ipAddressETH, configuration=$configuration, dateCreation=$dateCreation, dateUpdate=$dateUpdate, batteryLevel=$batteryLevel, lastBatteryLevel=$lastBatteryLevel, connectionLevel=$connectionLevel, lastConnectionLevel=$lastConnectionLevel]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'id'] = this.id;
json[r'configurationId'] = this.configurationId;
json[r'connected'] = this.connected;
json[r'instanceId'] = this.instanceId;
if (this.identifier != null) {
json[r'identifier'] = this.identifier;
} else {
json[r'identifier'] = null;
}
if (this.name != null) {
json[r'name'] = this.name;
} else {
json[r'name'] = null;
}
if (this.ipAddressWLAN != null) {
json[r'ipAddressWLAN'] = this.ipAddressWLAN;
} else {
json[r'ipAddressWLAN'] = null;
}
if (this.ipAddressETH != null) {
json[r'ipAddressETH'] = this.ipAddressETH;
} else {
json[r'ipAddressETH'] = null;
}
if (this.configuration != null) {
json[r'configuration'] = this.configuration;
} else {
json[r'configuration'] = null;
}
if (this.dateCreation != null) {
json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String();
} else {
json[r'dateCreation'] = null;
}
if (this.dateUpdate != null) {
json[r'dateUpdate'] = this.dateUpdate!.toUtc().toIso8601String();
} else {
json[r'dateUpdate'] = null;
}
if (this.batteryLevel != null) {
json[r'batteryLevel'] = this.batteryLevel;
} else {
json[r'batteryLevel'] = null;
}
if (this.lastBatteryLevel != null) {
json[r'lastBatteryLevel'] =
this.lastBatteryLevel!.toUtc().toIso8601String();
} else {
json[r'lastBatteryLevel'] = null;
}
if (this.connectionLevel != null) {
json[r'connectionLevel'] = this.connectionLevel;
} else {
json[r'connectionLevel'] = null;
}
if (this.lastConnectionLevel != null) {
json[r'lastConnectionLevel'] =
this.lastConnectionLevel!.toUtc().toIso8601String();
} else {
json[r'lastConnectionLevel'] = null;
}
return json;
}
/// Returns a new [AppConfigurationLinkDevice] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AppConfigurationLinkDevice? 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 "AppConfigurationLinkDevice[$key]" is missing from JSON.');
assert(json[key] != null,
'Required key "AppConfigurationLinkDevice[$key]" has a null value in JSON.');
});
return true;
}());
return AppConfigurationLinkDevice(
id: mapValueOfType<String>(json, r'id')!,
configurationId: mapValueOfType<String>(json, r'configurationId')!,
connected: mapValueOfType<bool>(json, r'connected')!,
instanceId: mapValueOfType<String>(json, r'instanceId')!,
identifier: mapValueOfType<String>(json, r'identifier'),
name: mapValueOfType<String>(json, r'name'),
ipAddressWLAN: mapValueOfType<String>(json, r'ipAddressWLAN'),
ipAddressETH: mapValueOfType<String>(json, r'ipAddressETH'),
configuration:
AppConfigurationLinkConfiguration.fromJson(json[r'configuration']),
dateCreation: mapDateTime(json, r'dateCreation', r''),
dateUpdate: mapDateTime(json, r'dateUpdate', r''),
batteryLevel: mapValueOfType<String>(json, r'batteryLevel'),
lastBatteryLevel: mapDateTime(json, r'lastBatteryLevel', r''),
connectionLevel: mapValueOfType<String>(json, r'connectionLevel'),
lastConnectionLevel: mapDateTime(json, r'lastConnectionLevel', r''),
);
}
return null;
}
static List<AppConfigurationLinkDevice> listFromJson(
dynamic json, {
bool growable = false,
}) {
final result = <AppConfigurationLinkDevice>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AppConfigurationLinkDevice.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AppConfigurationLinkDevice> mapFromJson(dynamic json) {
final map = <String, AppConfigurationLinkDevice>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AppConfigurationLinkDevice.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AppConfigurationLinkDevice-objects as value to a dart map
static Map<String, List<AppConfigurationLinkDevice>> mapListFromJson(
dynamic json, {
bool growable = false,
}) {
final map = <String, List<AppConfigurationLinkDevice>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AppConfigurationLinkDevice.listFromJson(
entry.value,
growable: growable,
);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'id',
'configurationId',
'connected',
'instanceId',
};
}

View File

@ -17,10 +17,21 @@ class AppConfigurationLinkDTO {
this.configurationId,
this.configuration,
this.applicationInstanceId,
this.applicationInstance,
this.order,
this.isActive,
this.weightMasonryGrid,
this.isDate,
this.isHour,
this.roundedValue,
this.screenPercentageSectionsMainPage,
this.isSectionImageBackground,
this.deviceId,
this.device,
this.layoutMainPage,
this.loaderImageId,
this.loaderImageUrl,
this.primaryColor,
this.secondaryColor,
});
String? id;
@ -31,8 +42,6 @@ class AppConfigurationLinkDTO {
String? applicationInstanceId;
AppConfigurationLinkDTOApplicationInstance? applicationInstance;
int? order;
///
@ -45,6 +54,54 @@ class AppConfigurationLinkDTO {
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;
String? deviceId;
DeviceDTO? device;
///
/// 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;
@override
bool operator ==(Object other) =>
identical(this, other) ||
@ -53,10 +110,22 @@ class AppConfigurationLinkDTO {
other.configurationId == configurationId &&
other.configuration == configuration &&
other.applicationInstanceId == applicationInstanceId &&
other.applicationInstance == applicationInstance &&
other.order == order &&
other.isActive == isActive &&
other.weightMasonryGrid == weightMasonryGrid;
other.weightMasonryGrid == weightMasonryGrid &&
other.isDate == isDate &&
other.isHour == isHour &&
other.roundedValue == roundedValue &&
other.screenPercentageSectionsMainPage ==
screenPercentageSectionsMainPage &&
other.isSectionImageBackground == isSectionImageBackground &&
other.deviceId == deviceId &&
other.device == device &&
other.layoutMainPage == layoutMainPage &&
other.loaderImageId == loaderImageId &&
other.loaderImageUrl == loaderImageUrl &&
other.primaryColor == primaryColor &&
other.secondaryColor == secondaryColor;
@override
int get hashCode =>
@ -65,14 +134,29 @@ class AppConfigurationLinkDTO {
(configurationId == null ? 0 : configurationId!.hashCode) +
(configuration == null ? 0 : configuration!.hashCode) +
(applicationInstanceId == null ? 0 : applicationInstanceId!.hashCode) +
(applicationInstance == null ? 0 : applicationInstance!.hashCode) +
(order == null ? 0 : order!.hashCode) +
(isActive == null ? 0 : isActive!.hashCode) +
(weightMasonryGrid == null ? 0 : weightMasonryGrid!.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) +
(deviceId == null ? 0 : deviceId!.hashCode) +
(device == null ? 0 : device!.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);
@override
String toString() =>
'AppConfigurationLinkDTO[id=$id, configurationId=$configurationId, configuration=$configuration, applicationInstanceId=$applicationInstanceId, applicationInstance=$applicationInstance, order=$order, isActive=$isActive, weightMasonryGrid=$weightMasonryGrid]';
'AppConfigurationLinkDTO[id=$id, configurationId=$configurationId, configuration=$configuration, applicationInstanceId=$applicationInstanceId, order=$order, isActive=$isActive, weightMasonryGrid=$weightMasonryGrid, isDate=$isDate, isHour=$isHour, roundedValue=$roundedValue, screenPercentageSectionsMainPage=$screenPercentageSectionsMainPage, isSectionImageBackground=$isSectionImageBackground, deviceId=$deviceId, device=$device, layoutMainPage=$layoutMainPage, loaderImageId=$loaderImageId, loaderImageUrl=$loaderImageUrl, primaryColor=$primaryColor, secondaryColor=$secondaryColor]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@ -96,11 +180,6 @@ class AppConfigurationLinkDTO {
} else {
json[r'applicationInstanceId'] = null;
}
if (this.applicationInstance != null) {
json[r'applicationInstance'] = this.applicationInstance;
} else {
json[r'applicationInstance'] = null;
}
if (this.order != null) {
json[r'order'] = this.order;
} else {
@ -116,6 +195,67 @@ class AppConfigurationLinkDTO {
} 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.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;
}
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;
}
return json;
}
@ -146,12 +286,23 @@ class AppConfigurationLinkDTO {
json[r'configuration']),
applicationInstanceId:
mapValueOfType<String>(json, r'applicationInstanceId'),
applicationInstance:
AppConfigurationLinkDTOApplicationInstance.fromJson(
json[r'applicationInstance']),
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'),
deviceId: mapValueOfType<String>(json, r'deviceId'),
device: DeviceDTO.fromJson(json[r'device']),
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'),
);
}
return null;

View File

@ -0,0 +1,240 @@
//
// 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 AppConfigurationLinkDTODevice {
/// Returns a new [AppConfigurationLinkDTODevice] instance.
AppConfigurationLinkDTODevice({
this.id,
this.identifier,
this.name,
this.ipAddressWLAN,
this.ipAddressETH,
this.configurationId,
this.configuration,
this.connected,
this.dateCreation,
this.dateUpdate,
this.instanceId,
});
String? id;
String? identifier;
String? name;
String? ipAddressWLAN;
String? ipAddressETH;
String? configurationId;
String? configuration;
///
/// 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? connected;
DateTime? dateCreation;
DateTime? dateUpdate;
String? instanceId;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is AppConfigurationLinkDTODevice &&
other.id == id &&
other.identifier == identifier &&
other.name == name &&
other.ipAddressWLAN == ipAddressWLAN &&
other.ipAddressETH == ipAddressETH &&
other.configurationId == configurationId &&
other.configuration == configuration &&
other.connected == connected &&
other.dateCreation == dateCreation &&
other.dateUpdate == dateUpdate &&
other.instanceId == instanceId;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(id == null ? 0 : id!.hashCode) +
(identifier == null ? 0 : identifier!.hashCode) +
(name == null ? 0 : name!.hashCode) +
(ipAddressWLAN == null ? 0 : ipAddressWLAN!.hashCode) +
(ipAddressETH == null ? 0 : ipAddressETH!.hashCode) +
(configurationId == null ? 0 : configurationId!.hashCode) +
(configuration == null ? 0 : configuration!.hashCode) +
(connected == null ? 0 : connected!.hashCode) +
(dateCreation == null ? 0 : dateCreation!.hashCode) +
(dateUpdate == null ? 0 : dateUpdate!.hashCode) +
(instanceId == null ? 0 : instanceId!.hashCode);
@override
String toString() =>
'AppConfigurationLinkDTODevice[id=$id, identifier=$identifier, name=$name, ipAddressWLAN=$ipAddressWLAN, ipAddressETH=$ipAddressETH, configurationId=$configurationId, configuration=$configuration, connected=$connected, dateCreation=$dateCreation, dateUpdate=$dateUpdate, instanceId=$instanceId]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.id != null) {
json[r'id'] = this.id;
} else {
json[r'id'] = null;
}
if (this.identifier != null) {
json[r'identifier'] = this.identifier;
} else {
json[r'identifier'] = null;
}
if (this.name != null) {
json[r'name'] = this.name;
} else {
json[r'name'] = null;
}
if (this.ipAddressWLAN != null) {
json[r'ipAddressWLAN'] = this.ipAddressWLAN;
} else {
json[r'ipAddressWLAN'] = null;
}
if (this.ipAddressETH != null) {
json[r'ipAddressETH'] = this.ipAddressETH;
} else {
json[r'ipAddressETH'] = null;
}
if (this.configurationId != null) {
json[r'configurationId'] = this.configurationId;
} else {
json[r'configurationId'] = null;
}
if (this.configuration != null) {
json[r'configuration'] = this.configuration;
} else {
json[r'configuration'] = null;
}
if (this.connected != null) {
json[r'connected'] = this.connected;
} else {
json[r'connected'] = null;
}
if (this.dateCreation != null) {
json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String();
} else {
json[r'dateCreation'] = null;
}
if (this.dateUpdate != null) {
json[r'dateUpdate'] = this.dateUpdate!.toUtc().toIso8601String();
} else {
json[r'dateUpdate'] = null;
}
if (this.instanceId != null) {
json[r'instanceId'] = this.instanceId;
} else {
json[r'instanceId'] = null;
}
return json;
}
/// Returns a new [AppConfigurationLinkDTODevice] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AppConfigurationLinkDTODevice? 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 "AppConfigurationLinkDTODevice[$key]" is missing from JSON.');
assert(json[key] != null,
'Required key "AppConfigurationLinkDTODevice[$key]" has a null value in JSON.');
});
return true;
}());
return AppConfigurationLinkDTODevice(
id: mapValueOfType<String>(json, r'id'),
identifier: mapValueOfType<String>(json, r'identifier'),
name: mapValueOfType<String>(json, r'name'),
ipAddressWLAN: mapValueOfType<String>(json, r'ipAddressWLAN'),
ipAddressETH: mapValueOfType<String>(json, r'ipAddressETH'),
configurationId: mapValueOfType<String>(json, r'configurationId'),
configuration: mapValueOfType<String>(json, r'configuration'),
connected: mapValueOfType<bool>(json, r'connected'),
dateCreation: mapDateTime(json, r'dateCreation', r''),
dateUpdate: mapDateTime(json, r'dateUpdate', r''),
instanceId: mapValueOfType<String>(json, r'instanceId'),
);
}
return null;
}
static List<AppConfigurationLinkDTODevice> listFromJson(
dynamic json, {
bool growable = false,
}) {
final result = <AppConfigurationLinkDTODevice>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AppConfigurationLinkDTODevice.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AppConfigurationLinkDTODevice> mapFromJson(dynamic json) {
final map = <String, AppConfigurationLinkDTODevice>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AppConfigurationLinkDTODevice.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AppConfigurationLinkDTODevice-objects as value to a dart map
static Map<String, List<AppConfigurationLinkDTODevice>> mapListFromJson(
dynamic json, {
bool growable = false,
}) {
final map = <String, List<AppConfigurationLinkDTODevice>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AppConfigurationLinkDTODevice.listFromJson(
entry.value,
growable: growable,
);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{};
}

View File

@ -76,7 +76,6 @@ class AppTypeTypeTransformer {
/// 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;

View File

@ -21,13 +21,8 @@ class ApplicationInstance {
this.mainImageUrl,
this.loaderImageId,
this.loaderImageUrl,
this.isDate,
this.isHour,
this.primaryColor,
this.secondaryColor,
this.roundedValue,
this.screenPercentageSectionsMainPage,
this.isSectionImageBackground,
this.layoutMainPage,
this.languages = const [],
this.sectionEventId,
@ -50,38 +45,10 @@ class ApplicationInstance {
String? loaderImageUrl;
///
/// 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;
String? primaryColor;
String? secondaryColor;
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
@ -108,14 +75,8 @@ class ApplicationInstance {
other.mainImageUrl == mainImageUrl &&
other.loaderImageId == loaderImageId &&
other.loaderImageUrl == loaderImageUrl &&
other.isDate == isDate &&
other.isHour == isHour &&
other.primaryColor == primaryColor &&
other.secondaryColor == secondaryColor &&
other.roundedValue == roundedValue &&
other.screenPercentageSectionsMainPage ==
screenPercentageSectionsMainPage &&
other.isSectionImageBackground == isSectionImageBackground &&
other.layoutMainPage == layoutMainPage &&
_deepEquality.equals(other.languages, languages) &&
other.sectionEventId == sectionEventId &&
@ -132,17 +93,8 @@ class ApplicationInstance {
(mainImageUrl == null ? 0 : mainImageUrl!.hashCode) +
(loaderImageId == null ? 0 : loaderImageId!.hashCode) +
(loaderImageUrl == null ? 0 : loaderImageUrl!.hashCode) +
(isDate == null ? 0 : isDate!.hashCode) +
(isHour == null ? 0 : isHour!.hashCode) +
(primaryColor == null ? 0 : primaryColor!.hashCode) +
(secondaryColor == null ? 0 : secondaryColor!.hashCode) +
(roundedValue == null ? 0 : roundedValue!.hashCode) +
(screenPercentageSectionsMainPage == null
? 0
: screenPercentageSectionsMainPage!.hashCode) +
(isSectionImageBackground == null
? 0
: isSectionImageBackground!.hashCode) +
(layoutMainPage == null ? 0 : layoutMainPage!.hashCode) +
(languages == null ? 0 : languages!.hashCode) +
(sectionEventId == null ? 0 : sectionEventId!.hashCode) +
@ -150,7 +102,7 @@ class ApplicationInstance {
@override
String toString() =>
'ApplicationInstance[instanceId=$instanceId, appType=$appType, id=$id, configurations=$configurations, mainImageId=$mainImageId, mainImageUrl=$mainImageUrl, loaderImageId=$loaderImageId, loaderImageUrl=$loaderImageUrl, isDate=$isDate, isHour=$isHour, primaryColor=$primaryColor, secondaryColor=$secondaryColor, roundedValue=$roundedValue, screenPercentageSectionsMainPage=$screenPercentageSectionsMainPage, isSectionImageBackground=$isSectionImageBackground, layoutMainPage=$layoutMainPage, languages=$languages, sectionEventId=$sectionEventId, sectionEvent=$sectionEvent]';
'ApplicationInstance[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>{};
@ -186,16 +138,6 @@ class ApplicationInstance {
} else {
json[r'loaderImageUrl'] = 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.primaryColor != null) {
json[r'primaryColor'] = this.primaryColor;
} else {
@ -206,22 +148,6 @@ class ApplicationInstance {
} else {
json[r'secondaryColor'] = 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 {
@ -275,15 +201,8 @@ class ApplicationInstance {
mainImageUrl: mapValueOfType<String>(json, r'mainImageUrl'),
loaderImageId: mapValueOfType<String>(json, r'loaderImageId'),
loaderImageUrl: mapValueOfType<String>(json, r'loaderImageUrl'),
isDate: mapValueOfType<bool>(json, r'isDate'),
isHour: mapValueOfType<bool>(json, r'isHour'),
primaryColor: mapValueOfType<String>(json, r'primaryColor'),
secondaryColor: mapValueOfType<String>(json, r'secondaryColor'),
roundedValue: mapValueOfType<int>(json, r'roundedValue'),
screenPercentageSectionsMainPage:
mapValueOfType<int>(json, r'screenPercentageSectionsMainPage'),
isSectionImageBackground:
mapValueOfType<bool>(json, r'isSectionImageBackground'),
layoutMainPage: LayoutMainPageType.fromJson(json[r'layoutMainPage']),
languages: json[r'languages'] is Iterable
? (json[r'languages'] as Iterable)

View File

@ -21,13 +21,8 @@ class ApplicationInstanceDTO {
this.mainImageUrl,
this.loaderImageId,
this.loaderImageUrl,
this.isDate,
this.isHour,
this.primaryColor,
this.secondaryColor,
this.roundedValue,
this.screenPercentageSectionsMainPage,
this.isSectionImageBackground,
this.languages = const [],
});
@ -53,38 +48,10 @@ class ApplicationInstanceDTO {
String? loaderImageUrl;
///
/// 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;
String? primaryColor;
String? secondaryColor;
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;
List<String>? languages;
@override
@ -99,14 +66,8 @@ class ApplicationInstanceDTO {
other.mainImageUrl == mainImageUrl &&
other.loaderImageId == loaderImageId &&
other.loaderImageUrl == loaderImageUrl &&
other.isDate == isDate &&
other.isHour == isHour &&
other.primaryColor == primaryColor &&
other.secondaryColor == secondaryColor &&
other.roundedValue == roundedValue &&
other.screenPercentageSectionsMainPage ==
screenPercentageSectionsMainPage &&
other.isSectionImageBackground == isSectionImageBackground &&
_deepEquality.equals(other.languages, languages);
@override
@ -120,22 +81,13 @@ class ApplicationInstanceDTO {
(mainImageUrl == null ? 0 : mainImageUrl!.hashCode) +
(loaderImageId == null ? 0 : loaderImageId!.hashCode) +
(loaderImageUrl == null ? 0 : loaderImageUrl!.hashCode) +
(isDate == null ? 0 : isDate!.hashCode) +
(isHour == null ? 0 : isHour!.hashCode) +
(primaryColor == null ? 0 : primaryColor!.hashCode) +
(secondaryColor == null ? 0 : secondaryColor!.hashCode) +
(roundedValue == null ? 0 : roundedValue!.hashCode) +
(screenPercentageSectionsMainPage == null
? 0
: screenPercentageSectionsMainPage!.hashCode) +
(isSectionImageBackground == null
? 0
: isSectionImageBackground!.hashCode) +
(languages == null ? 0 : languages!.hashCode);
@override
String toString() =>
'ApplicationInstanceDTO[id=$id, instanceId=$instanceId, appType=$appType, configurations=$configurations, mainImageId=$mainImageId, mainImageUrl=$mainImageUrl, loaderImageId=$loaderImageId, loaderImageUrl=$loaderImageUrl, isDate=$isDate, isHour=$isHour, primaryColor=$primaryColor, secondaryColor=$secondaryColor, roundedValue=$roundedValue, screenPercentageSectionsMainPage=$screenPercentageSectionsMainPage, isSectionImageBackground=$isSectionImageBackground, languages=$languages]';
'ApplicationInstanceDTO[id=$id, instanceId=$instanceId, appType=$appType, configurations=$configurations, mainImageId=$mainImageId, mainImageUrl=$mainImageUrl, loaderImageId=$loaderImageId, loaderImageUrl=$loaderImageUrl, primaryColor=$primaryColor, secondaryColor=$secondaryColor, languages=$languages]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@ -179,16 +131,6 @@ class ApplicationInstanceDTO {
} else {
json[r'loaderImageUrl'] = 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.primaryColor != null) {
json[r'primaryColor'] = this.primaryColor;
} else {
@ -199,22 +141,6 @@ class ApplicationInstanceDTO {
} else {
json[r'secondaryColor'] = 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.languages != null) {
json[r'languages'] = this.languages;
} else {
@ -253,15 +179,8 @@ class ApplicationInstanceDTO {
mainImageUrl: mapValueOfType<String>(json, r'mainImageUrl'),
loaderImageId: mapValueOfType<String>(json, r'loaderImageId'),
loaderImageUrl: mapValueOfType<String>(json, r'loaderImageUrl'),
isDate: mapValueOfType<bool>(json, r'isDate'),
isHour: mapValueOfType<bool>(json, r'isHour'),
primaryColor: mapValueOfType<String>(json, r'primaryColor'),
secondaryColor: mapValueOfType<String>(json, r'secondaryColor'),
roundedValue: mapValueOfType<int>(json, r'roundedValue'),
screenPercentageSectionsMainPage:
mapValueOfType<int>(json, r'screenPercentageSectionsMainPage'),
isSectionImageBackground:
mapValueOfType<bool>(json, r'isSectionImageBackground'),
languages: json[r'languages'] is Iterable
? (json[r'languages'] as Iterable)
.cast<String>()

View File

@ -0,0 +1,294 @@
//
// 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 Device {
/// Returns a new [Device] instance.
Device({
required this.id,
required this.configurationId,
required this.connected,
required this.instanceId,
this.identifier,
this.name,
this.ipAddressWLAN,
this.ipAddressETH,
this.configuration,
this.dateCreation,
this.dateUpdate,
this.batteryLevel,
this.lastBatteryLevel,
this.connectionLevel,
this.lastConnectionLevel,
});
String id;
String configurationId;
bool connected;
String instanceId;
String? identifier;
String? name;
String? ipAddressWLAN;
String? ipAddressETH;
AppConfigurationLinkConfiguration? configuration;
///
/// 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.
///
DateTime? dateUpdate;
String? batteryLevel;
///
/// 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? lastBatteryLevel;
String? connectionLevel;
///
/// 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? lastConnectionLevel;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is Device &&
other.id == id &&
other.configurationId == configurationId &&
other.connected == connected &&
other.instanceId == instanceId &&
other.identifier == identifier &&
other.name == name &&
other.ipAddressWLAN == ipAddressWLAN &&
other.ipAddressETH == ipAddressETH &&
other.configuration == configuration &&
other.dateCreation == dateCreation &&
other.dateUpdate == dateUpdate &&
other.batteryLevel == batteryLevel &&
other.lastBatteryLevel == lastBatteryLevel &&
other.connectionLevel == connectionLevel &&
other.lastConnectionLevel == lastConnectionLevel;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(id.hashCode) +
(configurationId.hashCode) +
(connected.hashCode) +
(instanceId.hashCode) +
(identifier == null ? 0 : identifier!.hashCode) +
(name == null ? 0 : name!.hashCode) +
(ipAddressWLAN == null ? 0 : ipAddressWLAN!.hashCode) +
(ipAddressETH == null ? 0 : ipAddressETH!.hashCode) +
(configuration == null ? 0 : configuration!.hashCode) +
(dateCreation == null ? 0 : dateCreation!.hashCode) +
(dateUpdate == null ? 0 : dateUpdate!.hashCode) +
(batteryLevel == null ? 0 : batteryLevel!.hashCode) +
(lastBatteryLevel == null ? 0 : lastBatteryLevel!.hashCode) +
(connectionLevel == null ? 0 : connectionLevel!.hashCode) +
(lastConnectionLevel == null ? 0 : lastConnectionLevel!.hashCode);
@override
String toString() =>
'Device[id=$id, configurationId=$configurationId, connected=$connected, instanceId=$instanceId, identifier=$identifier, name=$name, ipAddressWLAN=$ipAddressWLAN, ipAddressETH=$ipAddressETH, configuration=$configuration, dateCreation=$dateCreation, dateUpdate=$dateUpdate, batteryLevel=$batteryLevel, lastBatteryLevel=$lastBatteryLevel, connectionLevel=$connectionLevel, lastConnectionLevel=$lastConnectionLevel]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'id'] = this.id;
json[r'configurationId'] = this.configurationId;
json[r'connected'] = this.connected;
json[r'instanceId'] = this.instanceId;
if (this.identifier != null) {
json[r'identifier'] = this.identifier;
} else {
json[r'identifier'] = null;
}
if (this.name != null) {
json[r'name'] = this.name;
} else {
json[r'name'] = null;
}
if (this.ipAddressWLAN != null) {
json[r'ipAddressWLAN'] = this.ipAddressWLAN;
} else {
json[r'ipAddressWLAN'] = null;
}
if (this.ipAddressETH != null) {
json[r'ipAddressETH'] = this.ipAddressETH;
} else {
json[r'ipAddressETH'] = null;
}
if (this.configuration != null) {
json[r'configuration'] = this.configuration;
} else {
json[r'configuration'] = null;
}
if (this.dateCreation != null) {
json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String();
} else {
json[r'dateCreation'] = null;
}
if (this.dateUpdate != null) {
json[r'dateUpdate'] = this.dateUpdate!.toUtc().toIso8601String();
} else {
json[r'dateUpdate'] = null;
}
if (this.batteryLevel != null) {
json[r'batteryLevel'] = this.batteryLevel;
} else {
json[r'batteryLevel'] = null;
}
if (this.lastBatteryLevel != null) {
json[r'lastBatteryLevel'] =
this.lastBatteryLevel!.toUtc().toIso8601String();
} else {
json[r'lastBatteryLevel'] = null;
}
if (this.connectionLevel != null) {
json[r'connectionLevel'] = this.connectionLevel;
} else {
json[r'connectionLevel'] = null;
}
if (this.lastConnectionLevel != null) {
json[r'lastConnectionLevel'] =
this.lastConnectionLevel!.toUtc().toIso8601String();
} else {
json[r'lastConnectionLevel'] = null;
}
return json;
}
/// Returns a new [Device] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static Device? 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 "Device[$key]" is missing from JSON.');
assert(json[key] != null,
'Required key "Device[$key]" has a null value in JSON.');
});
return true;
}());
return Device(
id: mapValueOfType<String>(json, r'id')!,
configurationId: mapValueOfType<String>(json, r'configurationId')!,
connected: mapValueOfType<bool>(json, r'connected')!,
instanceId: mapValueOfType<String>(json, r'instanceId')!,
identifier: mapValueOfType<String>(json, r'identifier'),
name: mapValueOfType<String>(json, r'name'),
ipAddressWLAN: mapValueOfType<String>(json, r'ipAddressWLAN'),
ipAddressETH: mapValueOfType<String>(json, r'ipAddressETH'),
configuration:
AppConfigurationLinkConfiguration.fromJson(json[r'configuration']),
dateCreation: mapDateTime(json, r'dateCreation', r''),
dateUpdate: mapDateTime(json, r'dateUpdate', r''),
batteryLevel: mapValueOfType<String>(json, r'batteryLevel'),
lastBatteryLevel: mapDateTime(json, r'lastBatteryLevel', r''),
connectionLevel: mapValueOfType<String>(json, r'connectionLevel'),
lastConnectionLevel: mapDateTime(json, r'lastConnectionLevel', r''),
);
}
return null;
}
static List<Device> listFromJson(
dynamic json, {
bool growable = false,
}) {
final result = <Device>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = Device.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, Device> mapFromJson(dynamic json) {
final map = <String, Device>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = Device.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of Device-objects as value to a dart map
static Map<String, List<Device>> mapListFromJson(
dynamic json, {
bool growable = false,
}) {
final map = <String, List<Device>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = Device.listFromJson(
entry.value,
growable: growable,
);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'id',
'configurationId',
'connected',
'instanceId',
};
}

View File

@ -23,13 +23,13 @@ class LayoutMainPageType {
int toJson() => value;
static const number0 = LayoutMainPageType._(0);
static const number1 = LayoutMainPageType._(1);
static const SimpleGrid = LayoutMainPageType._(0);
static const MasonryGrid = LayoutMainPageType._(1);
/// List of all possible values in this [enum][LayoutMainPageType].
static const values = <LayoutMainPageType>[
number0,
number1,
SimpleGrid,
MasonryGrid,
];
static LayoutMainPageType? fromJson(dynamic value) =>
@ -72,15 +72,26 @@ class LayoutMainPageTypeTypeTransformer {
/// and users are still using an old app with the old code.
LayoutMainPageType? decode(dynamic data, {bool allowNull = true}) {
if (data != null) {
switch (data) {
case 0:
return LayoutMainPageType.number0;
case 1:
return LayoutMainPageType.number1;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
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;

View File

@ -0,0 +1,94 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
import 'package:manager_api_new/api.dart';
import 'package:test/test.dart';
// tests for AppConfigurationLinkDevice
void main() {
// final instance = AppConfigurationLinkDevice();
group('test AppConfigurationLinkDevice', () {
// String id
test('to test the property `id`', () async {
// TODO
});
// String configurationId
test('to test the property `configurationId`', () async {
// TODO
});
// bool connected
test('to test the property `connected`', () async {
// TODO
});
// String instanceId
test('to test the property `instanceId`', () async {
// TODO
});
// String identifier
test('to test the property `identifier`', () async {
// TODO
});
// String name
test('to test the property `name`', () async {
// TODO
});
// String ipAddressWLAN
test('to test the property `ipAddressWLAN`', () async {
// TODO
});
// String ipAddressETH
test('to test the property `ipAddressETH`', () async {
// TODO
});
// AppConfigurationLinkConfiguration configuration
test('to test the property `configuration`', () async {
// TODO
});
// DateTime dateCreation
test('to test the property `dateCreation`', () async {
// TODO
});
// DateTime dateUpdate
test('to test the property `dateUpdate`', () async {
// TODO
});
// String batteryLevel
test('to test the property `batteryLevel`', () async {
// TODO
});
// DateTime lastBatteryLevel
test('to test the property `lastBatteryLevel`', () async {
// TODO
});
// String connectionLevel
test('to test the property `connectionLevel`', () async {
// TODO
});
// DateTime lastConnectionLevel
test('to test the property `lastConnectionLevel`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,74 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
import 'package:manager_api_new/api.dart';
import 'package:test/test.dart';
// tests for AppConfigurationLinkDTODevice
void main() {
// final instance = AppConfigurationLinkDTODevice();
group('test AppConfigurationLinkDTODevice', () {
// String id
test('to test the property `id`', () async {
// TODO
});
// String identifier
test('to test the property `identifier`', () async {
// TODO
});
// String name
test('to test the property `name`', () async {
// TODO
});
// String ipAddressWLAN
test('to test the property `ipAddressWLAN`', () async {
// TODO
});
// String ipAddressETH
test('to test the property `ipAddressETH`', () async {
// TODO
});
// String configurationId
test('to test the property `configurationId`', () async {
// TODO
});
// String configuration
test('to test the property `configuration`', () async {
// TODO
});
// bool connected
test('to test the property `connected`', () async {
// TODO
});
// DateTime dateCreation
test('to test the property `dateCreation`', () async {
// TODO
});
// DateTime dateUpdate
test('to test the property `dateUpdate`', () async {
// TODO
});
// String instanceId
test('to test the property `instanceId`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,94 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
import 'package:manager_api_new/api.dart';
import 'package:test/test.dart';
// tests for Device
void main() {
// final instance = Device();
group('test Device', () {
// String id
test('to test the property `id`', () async {
// TODO
});
// String configurationId
test('to test the property `configurationId`', () async {
// TODO
});
// bool connected
test('to test the property `connected`', () async {
// TODO
});
// String instanceId
test('to test the property `instanceId`', () async {
// TODO
});
// String identifier
test('to test the property `identifier`', () async {
// TODO
});
// String name
test('to test the property `name`', () async {
// TODO
});
// String ipAddressWLAN
test('to test the property `ipAddressWLAN`', () async {
// TODO
});
// String ipAddressETH
test('to test the property `ipAddressETH`', () async {
// TODO
});
// AppConfigurationLinkConfiguration configuration
test('to test the property `configuration`', () async {
// TODO
});
// DateTime dateCreation
test('to test the property `dateCreation`', () async {
// TODO
});
// DateTime dateUpdate
test('to test the property `dateUpdate`', () async {
// TODO
});
// String batteryLevel
test('to test the property `batteryLevel`', () async {
// TODO
});
// DateTime lastBatteryLevel
test('to test the property `lastBatteryLevel`', () async {
// TODO
});
// String connectionLevel
test('to test the property `connectionLevel`', () async {
// TODO
});
// DateTime lastConnectionLevel
test('to test the property `lastConnectionLevel`', () async {
// TODO
});
});
}