Service generation + data for webDTO and videoDTO + wip slider (reordable list)

This commit is contained in:
Thomas Fransolet 2021-05-13 22:03:00 +02:00
parent 408177f92b
commit 45ce7a345e
49 changed files with 2357 additions and 54 deletions

View File

@ -1,7 +1,11 @@
import 'package:auto_size_text/auto_size_text.dart';
import 'package:flutter/material.dart';
import 'package:manager_app/Screens/Resources/fetch_image_for_resource.dart';
import 'package:manager_app/app_context.dart';
import 'package:manager_app/constants.dart';
import 'package:manager_app/Screens/Resources/select_resource_modal.dart';
import 'package:managerapi/api.dart';
import 'package:provider/provider.dart';
class ImageInputContainer extends StatefulWidget {
final Color color;
@ -48,15 +52,13 @@ class _ImageInputContainerState extends State<ImageInputContainer> {
showSelectResourceModal(
"Sélectionner une ressource",
(String resourceId) {
print('ON GET RESULT PARENT INPUT ');
widget.onChanged(resourceId);
setState(() {
print(resourceId);
resourceIdToShow = resourceId;
print('Set State');
});
},
1,
true,
context
);
},
@ -70,10 +72,29 @@ class _ImageInputContainerState extends State<ImageInputContainer> {
}
getElement(String initialValue, BuildContext context) {
print("getElement");
print(resourceIdToShow);
if (resourceIdToShow != null) {
return Text("Show image todo");
Size size = MediaQuery.of(context).size;
final appContext = Provider.of<AppContext>(context);
return FutureBuilder(
future: getResource(resourceIdToShow, appContext),
builder: (context, AsyncSnapshot<dynamic> snapshot) {
if (snapshot.connectionState == ConnectionState.done) {
return Transform.scale(
scale: size.aspectRatio * 0.3,
child: AspectRatio(
aspectRatio: 4/4,
child: Container(
decoration: boxDecoration(snapshot.data, appContext),
),
),
);
} else if (snapshot.connectionState == ConnectionState.none) {
return Text("No data");
} else {
return Center(child: Container(height: size.height * 0.2, child: Text('LOADING TODO FRAISE')));
}
}
);
} else {
return Container(
decoration: BoxDecoration(
@ -93,4 +114,29 @@ class _ImageInputContainerState extends State<ImageInputContainer> {
);
}
}
Future<ResourceDetailDTO> getResource(String resourceIdToShow, dynamic appContext) async {
ResourceDetailDTO resource = await appContext.getContext().clientAPI.resourceApi.resourceGetDetail(resourceIdToShow);
return resource;
}
boxDecoration(ResourceDetailDTO resourceDetailDTO, appContext) {
return BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(30.0),
image: new DecorationImage(
fit: BoxFit.cover,
image: new NetworkImage(
resourceDetailDTO.type == ResourceType.image ? appContext.getContext().clientAPI.resourceApi.apiClient.basePath+"/api/Resource/"+ resourceDetailDTO.id : resourceDetailDTO.data,
),
),
boxShadow: [
BoxShadow(
spreadRadius: 0.5,
blurRadius: 1,
offset: Offset(0, 1.5), // changes position of shadow
),
],
);
}
}

View File

@ -72,7 +72,7 @@ showMultiStringInput (String text, List<TranslationDTO> values, List<Translation
), context: context
);
}
/*
showValues(List<TranslationDTO> newValues) {
List<Widget> valuesToShow = new List<Widget>();
newValues.forEach((newValue) {
@ -87,6 +87,6 @@ showValues(List<TranslationDTO> newValues) {
));
});
return valuesToShow;
}
}*/

View File

@ -23,6 +23,7 @@ class MultiStringContainer extends StatelessWidget {
@override
Widget build(BuildContext context) {
Size size = MediaQuery.of(context).size;
return Container(
child: Row(

View File

@ -7,12 +7,14 @@ class StringInputContainer extends StatelessWidget {
final String label;
final String initialValue;
final ValueChanged<String> onChanged;
final bool isUrl;
const StringInputContainer({
Key key,
this.color = kSecond,
this.label,
this.initialValue,
this.onChanged,
this.isUrl = false,
}) : super(key: key);
@override
@ -28,7 +30,7 @@ class StringInputContainer extends StatelessWidget {
Padding(
padding: const EdgeInsets.all(10.0),
child: Container(
width: size.width *0.2,
width: isUrl ? size.width *0.6 : size.width *0.2,
child: RoundedInputField(
color: kSecond,
textColor: kBlack,

View File

@ -64,6 +64,8 @@ getContent(List<TranslationDTO> translations, int maxLines) {
maxLines: maxLines,
initialValue: translation.value,
onChanged: (String value) {
print("onChanged value in tranbslationTAB");
print(value);
translation.value = value;
},
cursorColor: kPrimaryColor,

View File

@ -0,0 +1,126 @@
import 'dart:convert';
import 'package:auto_size_text/auto_size_text.dart';
import 'package:flutter/material.dart';
import 'package:manager_app/Screens/Configurations/Section/SubSection/new_update_image_slider.dart';
import 'package:manager_app/app_context.dart';
import 'package:manager_app/constants.dart';
import 'package:managerapi/api.dart';
class ListViewCard extends StatefulWidget {
final int index;
final Key key;
final List<ImageDTO> listItems;
final AppContext appContext;
final ValueChanged<List<ImageDTO>> onChanged;
ListViewCard(
this.listItems,
this.index,
this.key,
this.appContext,
this.onChanged
);
@override
_ListViewCard createState() => _ListViewCard();
}
class _ListViewCard extends State<ListViewCard> {
@override
Widget build(BuildContext context) {
Size size = MediaQuery.of(context).size;
return Card(
margin: EdgeInsets.all(4),
color: Colors.white,
child: Container(
width: 200,
height: 200,
child: InkWell(
splashColor: kPrimaryColor,
onTap: () {
print("Item ${widget.listItems[widget.index]} selected.");
showNewOrUpdateImageSlider(
widget.listItems[widget.index],
(value) {
print("get result bébé");
setState(() {
//List<ImageDTO> test = new List<ImageDTO>.from(sliderDTO.images);
widget.listItems.add(value);
widget.onChanged(widget.listItems);
});
},
widget.appContext,
context);
},
child: Container(
decoration: boxDecoration(widget.listItems[widget.index], widget.appContext),
padding: const EdgeInsets.all(15),
margin: EdgeInsets.symmetric(vertical: 15, horizontal: 15),
child: Align(
alignment: Alignment.center,
child: getElement(widget.listItems[widget.index], size, widget.appContext)
),
),
),
),
);
}
}
getElement(ImageDTO imageDTO, Size size, AppContext appContext) {
if (imageDTO.title != null) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
SizedBox(
height: size.width *0.01,
),
Align(
alignment: Alignment.center,
child: AutoSizeText(
imageDTO.title == null ? "" : imageDTO.title[0].value,
style: new TextStyle(fontSize: 20),
maxLines: 1,
),
),
Align(
alignment: Alignment.bottomRight,
child: Text("TODO")
),
],
);
} else {
return Icon(
Icons.add,
color: kTextLightColor,
size: 80.0,
);
}
}
boxDecoration(ImageDTO imageDTO, appContext) {
return BoxDecoration(
color: imageDTO.title == null ? Colors.lightGreen : kBackgroundColor,
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(30.0),
image: imageDTO.title != null ? new DecorationImage(
fit: BoxFit.cover,
colorFilter: new ColorFilter.mode(Colors.black.withOpacity(0.3), BlendMode.dstATop),
image: new NetworkImage(
imageDTO.source_,
),
) : null,
boxShadow: [
BoxShadow(
color: kSecond,
spreadRadius: 0.5,
blurRadius: 5,
offset: Offset(0, 1.5), // changes position of shadow
),
],
);
}

View File

@ -0,0 +1,138 @@
import 'package:manager_app/Components/image_input_container.dart';
import 'package:manager_app/Components/multi_string_input_container.dart';
import 'package:flutter/material.dart';
import 'package:manager_app/Components/rounded_button.dart';
import 'package:manager_app/Models/managerContext.dart';
import 'package:manager_app/app_context.dart';
import 'package:manager_app/constants.dart';
import 'package:managerapi/api.dart';
void showNewOrUpdateImageSlider(ImageDTO inputImageDTO, Function getResult, AppContext appContext, BuildContext context) {
ImageDTO imageDTO = new ImageDTO();
if (inputImageDTO.source_ != null) {
print("inputImageDTO.source_ != null NOT NULLLLL");
imageDTO = inputImageDTO;
} else {
imageDTO.title = new List<TranslationDTO>();
imageDTO.description = new List<TranslationDTO>();
ManagerAppContext managerAppContext = appContext.getContext();
managerAppContext.selectedConfiguration.languages.forEach((element) {
var translationDTO = new TranslationDTO();
translationDTO.language = element;
translationDTO.value = "";
imageDTO.title.add(translationDTO);
imageDTO.description.add(translationDTO);
});
}
print(imageDTO);
Size size = MediaQuery.of(context).size;
showDialog(
builder: (BuildContext context) => AlertDialog(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(20.0))
),
content: Container(
width: size.width *0.5,
child: SingleChildScrollView(
child: Column(
children: [
Text("Nouvelle image/vidéo", style: new TextStyle(fontSize: 25, fontWeight: FontWeight.w400)),
Column(
children: [
ImageInputContainer(
label: "Image :",
initialValue: imageDTO.source_,
color: kPrimaryColor,
onChanged: (value) {
print("received value in grant older");
imageDTO.source_ = value;
},
),
MultiStringContainer(
label: "Titre :",
color: kPrimaryColor,
initialValue: imageDTO.title,
onGetResult: (value) {
print("Received titres");
if (imageDTO.title != value) {
imageDTO.title = value;
}
print(imageDTO.title);
},
maxLines: 1,
),
MultiStringContainer(
label: "Description :",
color: kPrimaryColor,
initialValue: imageDTO.description,
onGetResult: (value) {
print("Received descriptions");
print(value);
if (imageDTO.description != value) {
imageDTO.description = value;
}
print(imageDTO.description);
},
maxLines: 1,
),
],
),
],
),
),
),
actions: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Align(
alignment: AlignmentDirectional.bottomEnd,
child: Container(
width: 175,
height: 70,
child: RoundedButton(
text: "Annuler",
icon: Icons.undo,
color: kSecond,
press: () {
Navigator.of(context).pop();
},
fontSize: 20,
),
),
),
Align(
alignment: AlignmentDirectional.bottomEnd,
child: Container(
width: inputImageDTO.source_ != null ? 200: 150,
height: 70,
child: RoundedButton(
text: inputImageDTO.source_ != null ? "Sauvegarder" : "Créer",
icon: Icons.check,
color: kPrimaryColor,
textColor: kWhite,
press: () {
print("TODO create or update");
print(imageDTO);
getResult(imageDTO);
print("result sent");
Navigator.of(context).pop();
},
fontSize: 20,
),
),
),
],
),
],
), context: context
);
}

View File

@ -0,0 +1,133 @@
import 'package:auto_size_text/auto_size_text.dart';
import 'package:drag_and_drop_lists/drag_and_drop_item.dart';
import 'package:drag_and_drop_lists/drag_and_drop_list.dart';
import 'package:drag_and_drop_lists/drag_and_drop_lists.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:manager_app/Screens/Configurations/Section/SubSection/listViewcard.dart';
import 'package:manager_app/Screens/Configurations/Section/SubSection/new_update_image_slider.dart';
import 'package:manager_app/app_context.dart';
import 'package:manager_app/constants.dart';
import 'package:managerapi/api.dart';
import 'dart:convert';
import 'package:provider/provider.dart';
class SliderConfig extends StatefulWidget {
final String color;
final String label;
final String initialValue;
final ValueChanged<String> onChanged;
const SliderConfig({
Key key,
this.color,
this.label,
this.initialValue,
this.onChanged,
}) : super(key: key);
@override
_SliderConfigState createState() => _SliderConfigState();
}
class _SliderConfigState extends State<SliderConfig> {
SliderDTO sliderDTO;
@override
void initState() {
super.initState();
sliderDTO = SliderDTO.fromJson(json.decode(widget.initialValue));
List<ImageDTO> test = new List<ImageDTO>.from(sliderDTO.images);
test.add(ImageDTO(title: null));
sliderDTO.images = test;
print(sliderDTO);
}
@override
Widget build(BuildContext context) {
final appContext = Provider.of<AppContext>(context);
Size size = MediaQuery.of(context).size;
void _onReorder(int oldIndex, int newIndex) {
setState(
() {
if (newIndex > oldIndex) {
newIndex -= 1;
}
final ImageDTO item = sliderDTO.images.removeAt(oldIndex);
sliderDTO.images.insert(newIndex, item);
},
);
}
return ReorderableListView(
onReorder: _onReorder,
scrollDirection: Axis.horizontal,
padding: const EdgeInsets.symmetric(vertical: 25.0),
children: List.generate(
sliderDTO.images.length,
(index) {
return ListViewCard(
sliderDTO.images,
index,
Key('$index'),
appContext,
(images) {
print(images);
print("ONCHANEGDE");
setState(() {
List<ImageDTO> test = new List<ImageDTO>.from(images);
sliderDTO.images = test;
List<ImageDTO> testToSend = new List<ImageDTO>.from(images);
testToSend = testToSend.where((element) => element.source_ != null).toList();
var sliderToSend = new SliderDTO();
sliderToSend.images = testToSend;
widget.onChanged(jsonEncode(sliderToSend).toString());
});
}
);
},
),
);
return GridView.builder(
shrinkWrap: true,
gridDelegate: new SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 8),
itemCount: sliderDTO.images.length,
itemBuilder: (BuildContext context, int index) {
return
InkWell(
onTap: () {
// Main screen
showNewOrUpdateImageSlider(
sliderDTO.images[index],
(value) {
print("get result bébé");
setState(() {
sliderDTO.images.add(value);
widget.onChanged(jsonEncode(sliderDTO).toString());
});
},
appContext,
context);
},
child: Container(
decoration: boxDecoration(sliderDTO.images[index], appContext),
padding: const EdgeInsets.all(15),
margin: EdgeInsets.symmetric(vertical: 15, horizontal: 15),
child: Align(
alignment: Alignment.center,
child: getElement(sliderDTO.images[index], size, appContext)
),
),
);
}
);
}
}

View File

@ -0,0 +1,45 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:manager_app/Components/string_input_container.dart';
import 'package:managerapi/api.dart';
import 'dart:convert';
class WebOrVideoConfig extends StatefulWidget {
final String color;
final String label;
final String initialValue;
final ValueChanged<String> onChanged; // To return video or web url
const WebOrVideoConfig({
Key key,
this.color,
this.label,
this.initialValue,
this.onChanged,
}) : super(key: key);
@override
_WebOrVideoConfigState createState() => _WebOrVideoConfigState();
}
class _WebOrVideoConfigState extends State<WebOrVideoConfig> {
WebDTO resourceSource; // WebDTO == VideoDTO
@override
void initState() {
WebDTO test = WebDTO.fromJson(json.decode(widget.initialValue));
resourceSource = test;
super.initState();
}
@override
Widget build(BuildContext context) {
return StringInputContainer(
label: widget.label,
initialValue: resourceSource.source_ == null ? '': resourceSource.source_,
onChanged: (String url) {
resourceSource.source_ = url;
widget.onChanged(jsonEncode(resourceSource).toString());
},
isUrl: true,
);
}
}

View File

@ -8,6 +8,8 @@ import 'package:manager_app/Components/multi_string_input_container.dart';
import 'package:manager_app/Components/rounded_button.dart';
import 'package:manager_app/Components/string_input_container.dart';
import 'package:manager_app/Models/managerContext.dart';
import 'package:manager_app/Screens/Configurations/Section/SubSection/slider_config.dart';
import 'package:manager_app/Screens/Configurations/Section/SubSection/web_video_config.dart';
import 'package:manager_app/app_context.dart';
import 'package:manager_app/client.dart';
import 'package:manager_app/constants.dart';
@ -31,7 +33,7 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
final appContext = Provider.of<AppContext>(context);
Size size = MediaQuery.of(context).size;
return Container(
return SingleChildScrollView(
child: FutureBuilder(
future: getSection(widget.id, appContext.getContext().clientAPI),
builder: (context, AsyncSnapshot<dynamic> snapshot) {
@ -190,7 +192,18 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
),
),
),// FIELDS SECTION
getSpecificData(sectionDTO, appContext),
Container(
height: size.height * 0.4,
width: size.width * 0.8,
child: Padding(
padding: const EdgeInsets.all(10.0),
child: getSpecificData(sectionDTO, appContext),
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(30),
border: Border.all(width: 1.5, color: kSecond)
),
),
getButtons(sectionDTO, appContext),
],
);
@ -287,11 +300,23 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
case SectionType.map:
return Text("map");
case SectionType.slider:
return Text("slider");
return SliderConfig(
initialValue: sectionDTO.data,
onChanged: (String data) {
print("Received info in parent");
print(data);
sectionDTO.data = data;
},
);
case SectionType.video:
return Text("video");
case SectionType.web:
return Text("web");
return WebOrVideoConfig(
label: sectionDTO.type == SectionType.video ? "Url de la vidéo:": "Url du site web:",
initialValue: sectionDTO.data,
onChanged: (String data) {
sectionDTO.data = data;
},
);
case SectionType.menu:
return Text("menu");
}
@ -300,7 +325,6 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
Future<SectionDTO> getSection(String sectionId, Client client) async {
SectionDTO section = await client.sectionApi.sectionGetDetail(sectionId);
print("received section");
print(section);
return section;
}

View File

@ -2,7 +2,7 @@ import 'package:manager_app/app_context.dart';
import 'package:managerapi/api.dart';
import 'package:flutter/material.dart';
getImageForResource(ResourceDTO resourceDTO, AppContext appContext) {
getImageForResource(dynamic resourceDTO, AppContext appContext) {
switch(resourceDTO.type) {
case ResourceType.image:
return Image.network(
@ -23,4 +23,4 @@ getImageForResource(ResourceDTO resourceDTO, AppContext appContext) {
return Text(resourceDTO.data);
break;
}
}
}

View File

@ -8,8 +8,6 @@ import 'package:manager_app/constants.dart';
import 'package:managerapi/api.dart';
import 'package:provider/provider.dart';
import 'fetch_image_for_resource.dart';
class ResourcesScreen extends StatefulWidget {
final Function onGetResult;
final bool isImage;
@ -34,7 +32,7 @@ class _ResourcesScreenState extends State<ResourcesScreen> {
child: Column(
children: [
FutureBuilder(
future: getResources(appContext),
future: getResources(widget.onGetResult, widget.isImage, appContext),
builder: (context, AsyncSnapshot<dynamic> snapshot) {
if (snapshot.connectionState == ConnectionState.done) {
var tempOutput = new List<ResourceDTO>.from(snapshot.data);
@ -79,7 +77,7 @@ class _ResourcesScreenState extends State<ResourcesScreen> {
},
child: Container(
decoration: boxDecoration(data[index]),
decoration: boxDecoration(data[index], appContext),
padding: const EdgeInsets.all(15),
margin: EdgeInsets.symmetric(vertical: 15, horizontal: 15),
child: Align(
@ -98,6 +96,9 @@ class _ResourcesScreenState extends State<ResourcesScreen> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
SizedBox(
height: size.width *0.01,
),
Align(
alignment: Alignment.center,
child: AutoSizeText(
@ -106,12 +107,6 @@ class _ResourcesScreenState extends State<ResourcesScreen> {
maxLines: 1,
),
),
Container(
height: size.height *0.08,
child: Center(
child: getImageForResource(resource, appContext),
)
),
Align(
alignment: Alignment.bottomRight,
child: Icon(
@ -132,11 +127,18 @@ class _ResourcesScreenState extends State<ResourcesScreen> {
}
}
boxDecoration(ResourceDTO resourceDTO) {
boxDecoration(dynamic resourceDetailDTO, appContext) {
return BoxDecoration(
color: resourceDTO.id == null ? Colors.lightGreen : kTextLightColor,
color: resourceDetailDTO.id == null ? Colors.lightGreen : kBackgroundColor,
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(25.0),
borderRadius: BorderRadius.circular(30.0),
image: resourceDetailDTO.id != null && resourceDetailDTO.type != ResourceType.videoUrl ? new DecorationImage(
fit: BoxFit.cover,
colorFilter: new ColorFilter.mode(Colors.black.withOpacity(0.3), BlendMode.dstATop),
image: new NetworkImage(
resourceDetailDTO.type == ResourceType.image ? appContext.getContext().clientAPI.resourceApi.apiClient.basePath+"/api/Resource/"+ resourceDetailDTO.id : resourceDetailDTO.data,
),
) : null,
boxShadow: [
BoxShadow(
color: kSecond,
@ -148,8 +150,11 @@ boxDecoration(ResourceDTO resourceDTO) {
);
}
Future<List<ResourceDTO>> getResources(dynamic appContext) async {
Future<List<ResourceDTO>> getResources(Function onGetResult, bool isImage, dynamic appContext) async {
List<ResourceDTO> resources = await appContext.getContext().clientAPI.resourceApi.resourceGet();
print(resources);
if (onGetResult != null && isImage) {
resources = resources.where((element) => element.type == ResourceType.image || element.type == ResourceType.imageUrl).toList();
}
return resources;
}

View File

@ -5,7 +5,7 @@ import 'package:manager_app/Screens/Resources/resources_screen.dart';
import 'package:manager_app/constants.dart';
import 'package:managerapi/api.dart';
showSelectResourceModal (String text, Function onGetResult, int maxLines, BuildContext mainContext) { /*Function onSelect,*/
showSelectResourceModal (String text, Function onGetResult, int maxLines, bool onlyImage, BuildContext mainContext) { /*Function onSelect,*/
Size size = MediaQuery.of(mainContext).size;
showDialog(
@ -27,12 +27,9 @@ showSelectResourceModal (String text, Function onGetResult, int maxLines, BuildC
Navigator.of(mainContext).pop();
}
},
isImage: true,
isImage: onlyImage,
),
),
/*Column(
children: showValues(newValues),
),*/
],
)
),
@ -48,28 +45,11 @@ showSelectResourceModal (String text, Function onGetResult, int maxLines, BuildC
icon: Icons.undo,
color: kSecond,
press: () {
//onGetResult(values);
print("TODO onGetResult");
Navigator.of(context).pop();
},
fontSize: 20,
),
),
/*Container(
width: 180,
height: 70,
child: RoundedButton(
text: "Valider",
icon: Icons.check,
color: kPrimaryColor,
textColor: kWhite,
press: () {
print("TODO Valider resource selected");
Navigator.of(context).pop();
},
fontSize: 20,
),
),*/
],
),
],

View File

@ -8,7 +8,12 @@ doc/DeviceApi.md
doc/DeviceDTO.md
doc/DeviceDetailDTO.md
doc/DeviceDetailDTOAllOf.md
doc/GeoPointDTO.md
doc/ImageDTO.md
doc/LoginDTO.md
doc/MapDTO.md
doc/MapType.md
doc/MenuDTO.md
doc/ResourceApi.md
doc/ResourceDTO.md
doc/ResourceDetailDTO.md
@ -16,11 +21,14 @@ doc/ResourceType.md
doc/SectionApi.md
doc/SectionDTO.md
doc/SectionType.md
doc/SliderDTO.md
doc/TokenDTO.md
doc/TranslationDTO.md
doc/User.md
doc/UserApi.md
doc/UserDetailDTO.md
doc/VideoDTO.md
doc/WebDTO.md
git_push.sh
lib/api.dart
lib/api/authentication_api.dart
@ -41,14 +49,30 @@ lib/model/configuration_dto.dart
lib/model/device_detail_dto.dart
lib/model/device_detail_dto_all_of.dart
lib/model/device_dto.dart
lib/model/geo_point_dto.dart
lib/model/image_dto.dart
lib/model/login_dto.dart
lib/model/map_dto.dart
lib/model/map_type.dart
lib/model/menu_dto.dart
lib/model/resource_detail_dto.dart
lib/model/resource_dto.dart
lib/model/resource_type.dart
lib/model/section_dto.dart
lib/model/section_type.dart
lib/model/slider_dto.dart
lib/model/token_dto.dart
lib/model/translation_dto.dart
lib/model/user.dart
lib/model/user_detail_dto.dart
lib/model/video_dto.dart
lib/model/web_dto.dart
pubspec.yaml
test/geo_point_dto_test.dart
test/image_dto_test.dart
test/map_dto_test.dart
test/map_type_test.dart
test/menu_dto_test.dart
test/slider_dto_test.dart
test/video_dto_test.dart
test/web_dto_test.dart

View File

@ -90,6 +90,11 @@ Class | Method | HTTP request | Description
*SectionApi* | [**sectionGetAllSectionSubSections**](doc\/SectionApi.md#sectiongetallsectionsubsections) | **GET** /api/Section/{id}/subsections |
*SectionApi* | [**sectionGetDetail**](doc\/SectionApi.md#sectiongetdetail) | **GET** /api/Section/{id} |
*SectionApi* | [**sectionGetFromConfiguration**](doc\/SectionApi.md#sectiongetfromconfiguration) | **GET** /api/Section/configuration/{id} |
*SectionApi* | [**sectionGetMapDTO**](doc\/SectionApi.md#sectiongetmapdto) | **GET** /api/Section/MapDTO |
*SectionApi* | [**sectionGetMenuDTO**](doc\/SectionApi.md#sectiongetmenudto) | **GET** /api/Section/MenuDTO |
*SectionApi* | [**sectionGetSliderDTO**](doc\/SectionApi.md#sectiongetsliderdto) | **GET** /api/Section/SliderDTO |
*SectionApi* | [**sectionGetVideoDTO**](doc\/SectionApi.md#sectiongetvideodto) | **GET** /api/Section/VideoDTO |
*SectionApi* | [**sectionGetWebDTO**](doc\/SectionApi.md#sectiongetwebdto) | **GET** /api/Section/WebDTO |
*SectionApi* | [**sectionUpdate**](doc\/SectionApi.md#sectionupdate) | **PUT** /api/Section |
*UserApi* | [**userCreateUser**](doc\/UserApi.md#usercreateuser) | **POST** /api/User |
*UserApi* | [**userDeleteUser**](doc\/UserApi.md#userdeleteuser) | **DELETE** /api/User/{id} |
@ -104,16 +109,24 @@ Class | Method | HTTP request | Description
- [DeviceDTO](doc\/DeviceDTO.md)
- [DeviceDetailDTO](doc\/DeviceDetailDTO.md)
- [DeviceDetailDTOAllOf](doc\/DeviceDetailDTOAllOf.md)
- [GeoPointDTO](doc\/GeoPointDTO.md)
- [ImageDTO](doc\/ImageDTO.md)
- [LoginDTO](doc\/LoginDTO.md)
- [MapDTO](doc\/MapDTO.md)
- [MapType](doc\/MapType.md)
- [MenuDTO](doc\/MenuDTO.md)
- [ResourceDTO](doc\/ResourceDTO.md)
- [ResourceDetailDTO](doc\/ResourceDetailDTO.md)
- [ResourceType](doc\/ResourceType.md)
- [SectionDTO](doc\/SectionDTO.md)
- [SectionType](doc\/SectionType.md)
- [SliderDTO](doc\/SliderDTO.md)
- [TokenDTO](doc\/TokenDTO.md)
- [TranslationDTO](doc\/TranslationDTO.md)
- [User](doc\/User.md)
- [UserDetailDTO](doc\/UserDetailDTO.md)
- [VideoDTO](doc\/VideoDTO.md)
- [WebDTO](doc\/WebDTO.md)
## Documentation For Authorization

View File

@ -0,0 +1,22 @@
# managerapi.model.GeoPointDTO
## Load the model package
```dart
import 'package:managerapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**image** | **String** | | [optional]
**imageType** | **String** | | [optional]
**text** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**latitude** | **String** | | [optional]
**longitude** | **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,17 @@
# managerapi.model.ImageDTO
## Load the model package
```dart
import 'package:managerapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**source_** | **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)

18
manager_api/doc/MapDTO.md Normal file
View File

@ -0,0 +1,18 @@
# managerapi.model.MapDTO
## Load the model package
```dart
import 'package:managerapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**zoom** | **int** | | [optional]
**mapType** | [**MapType**](MapType.md) | | [optional]
**points** | [**List<GeoPointDTO>**](GeoPointDTO.md) | | [optional] [default to const []]
**icon** | **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,14 @@
# managerapi.model.MapType
## Load the model package
```dart
import 'package:managerapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[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,15 @@
# managerapi.model.MenuDTO
## Load the model package
```dart
import 'package:managerapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**sections** | [**List<SectionDTO>**](SectionDTO.md) | | [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

@ -16,6 +16,11 @@ Method | HTTP request | Description
[**sectionGetAllSectionSubSections**](SectionApi.md#sectiongetallsectionsubsections) | **GET** /api/Section/{id}/subsections |
[**sectionGetDetail**](SectionApi.md#sectiongetdetail) | **GET** /api/Section/{id} |
[**sectionGetFromConfiguration**](SectionApi.md#sectiongetfromconfiguration) | **GET** /api/Section/configuration/{id} |
[**sectionGetMapDTO**](SectionApi.md#sectiongetmapdto) | **GET** /api/Section/MapDTO |
[**sectionGetMenuDTO**](SectionApi.md#sectiongetmenudto) | **GET** /api/Section/MenuDTO |
[**sectionGetSliderDTO**](SectionApi.md#sectiongetsliderdto) | **GET** /api/Section/SliderDTO |
[**sectionGetVideoDTO**](SectionApi.md#sectiongetvideodto) | **GET** /api/Section/VideoDTO |
[**sectionGetWebDTO**](SectionApi.md#sectiongetwebdto) | **GET** /api/Section/WebDTO |
[**sectionUpdate**](SectionApi.md#sectionupdate) | **PUT** /api/Section |
@ -316,6 +321,201 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **sectionGetMapDTO**
> MapDTO sectionGetMapDTO()
### Example
```dart
import 'package:managerapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = SectionApi();
try {
final result = api_instance.sectionGetMapDTO();
print(result);
} catch (e) {
print('Exception when calling SectionApi->sectionGetMapDTO: $e\n');
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**MapDTO**](MapDTO.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **sectionGetMenuDTO**
> MenuDTO sectionGetMenuDTO()
### Example
```dart
import 'package:managerapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = SectionApi();
try {
final result = api_instance.sectionGetMenuDTO();
print(result);
} catch (e) {
print('Exception when calling SectionApi->sectionGetMenuDTO: $e\n');
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**MenuDTO**](MenuDTO.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **sectionGetSliderDTO**
> SliderDTO sectionGetSliderDTO()
### Example
```dart
import 'package:managerapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = SectionApi();
try {
final result = api_instance.sectionGetSliderDTO();
print(result);
} catch (e) {
print('Exception when calling SectionApi->sectionGetSliderDTO: $e\n');
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**SliderDTO**](SliderDTO.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **sectionGetVideoDTO**
> VideoDTO sectionGetVideoDTO()
### Example
```dart
import 'package:managerapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = SectionApi();
try {
final result = api_instance.sectionGetVideoDTO();
print(result);
} catch (e) {
print('Exception when calling SectionApi->sectionGetVideoDTO: $e\n');
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**VideoDTO**](VideoDTO.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **sectionGetWebDTO**
> WebDTO sectionGetWebDTO()
### Example
```dart
import 'package:managerapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = SectionApi();
try {
final result = api_instance.sectionGetWebDTO();
print(result);
} catch (e) {
print('Exception when calling SectionApi->sectionGetWebDTO: $e\n');
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**WebDTO**](WebDTO.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **sectionUpdate**
> SectionDTO sectionUpdate(sectionDTO)

View File

@ -0,0 +1,15 @@
# managerapi.model.SliderDTO
## Load the model package
```dart
import 'package:managerapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**images** | [**List<ImageDTO>**](ImageDTO.md) | | [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,15 @@
# managerapi.model.VideoDTO
## Load the model package
```dart
import 'package:managerapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**source_** | **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)

15
manager_api/doc/WebDTO.md Normal file
View File

@ -0,0 +1,15 @@
# managerapi.model.WebDTO
## Load the model package
```dart
import 'package:managerapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**source_** | **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

@ -38,16 +38,24 @@ part 'model/configuration_dto.dart';
part 'model/device_dto.dart';
part 'model/device_detail_dto.dart';
part 'model/device_detail_dto_all_of.dart';
part 'model/geo_point_dto.dart';
part 'model/image_dto.dart';
part 'model/login_dto.dart';
part 'model/map_dto.dart';
part 'model/map_type.dart';
part 'model/menu_dto.dart';
part 'model/resource_dto.dart';
part 'model/resource_detail_dto.dart';
part 'model/resource_type.dart';
part 'model/section_dto.dart';
part 'model/section_type.dart';
part 'model/slider_dto.dart';
part 'model/token_dto.dart';
part 'model/translation_dto.dart';
part 'model/user.dart';
part 'model/user_detail_dto.dart';
part 'model/video_dto.dart';
part 'model/web_dto.dart';
const _delimiters = {'csv': ',', 'ssv': ' ', 'tsv': '\t', 'pipes': '|'};

View File

@ -456,6 +456,266 @@ class SectionApi {
return Future<List<SectionDTO>>.value(null);
}
/// Performs an HTTP 'GET /api/Section/MapDTO' operation and returns the [Response].
Future<Response> sectionGetMapDTOWithHttpInfo() async {
final path = r'/api/Section/MapDTO';
Object postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
final contentTypes = <String>[];
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
final authNames = <String>['bearer'];
if (
nullableContentType != null &&
nullableContentType.toLowerCase().startsWith('multipart/form-data')
) {
bool hasFields = false;
final mp = MultipartRequest(null, null);
if (hasFields) {
postBody = mp;
}
} else {
}
return await apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
nullableContentType,
authNames,
);
}
Future<MapDTO> sectionGetMapDTO() async {
final response = await sectionGetMapDTOWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body != null && response.statusCode != HttpStatus.noContent) {
return apiClient.deserialize(_decodeBodyBytes(response), 'MapDTO') as MapDTO;
}
return Future<MapDTO>.value(null);
}
/// Performs an HTTP 'GET /api/Section/MenuDTO' operation and returns the [Response].
Future<Response> sectionGetMenuDTOWithHttpInfo() async {
final path = r'/api/Section/MenuDTO';
Object postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
final contentTypes = <String>[];
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
final authNames = <String>['bearer'];
if (
nullableContentType != null &&
nullableContentType.toLowerCase().startsWith('multipart/form-data')
) {
bool hasFields = false;
final mp = MultipartRequest(null, null);
if (hasFields) {
postBody = mp;
}
} else {
}
return await apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
nullableContentType,
authNames,
);
}
Future<MenuDTO> sectionGetMenuDTO() async {
final response = await sectionGetMenuDTOWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body != null && response.statusCode != HttpStatus.noContent) {
return apiClient.deserialize(_decodeBodyBytes(response), 'MenuDTO') as MenuDTO;
}
return Future<MenuDTO>.value(null);
}
/// Performs an HTTP 'GET /api/Section/SliderDTO' operation and returns the [Response].
Future<Response> sectionGetSliderDTOWithHttpInfo() async {
final path = r'/api/Section/SliderDTO';
Object postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
final contentTypes = <String>[];
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
final authNames = <String>['bearer'];
if (
nullableContentType != null &&
nullableContentType.toLowerCase().startsWith('multipart/form-data')
) {
bool hasFields = false;
final mp = MultipartRequest(null, null);
if (hasFields) {
postBody = mp;
}
} else {
}
return await apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
nullableContentType,
authNames,
);
}
Future<SliderDTO> sectionGetSliderDTO() async {
final response = await sectionGetSliderDTOWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body != null && response.statusCode != HttpStatus.noContent) {
return apiClient.deserialize(_decodeBodyBytes(response), 'SliderDTO') as SliderDTO;
}
return Future<SliderDTO>.value(null);
}
/// Performs an HTTP 'GET /api/Section/VideoDTO' operation and returns the [Response].
Future<Response> sectionGetVideoDTOWithHttpInfo() async {
final path = r'/api/Section/VideoDTO';
Object postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
final contentTypes = <String>[];
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
final authNames = <String>['bearer'];
if (
nullableContentType != null &&
nullableContentType.toLowerCase().startsWith('multipart/form-data')
) {
bool hasFields = false;
final mp = MultipartRequest(null, null);
if (hasFields) {
postBody = mp;
}
} else {
}
return await apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
nullableContentType,
authNames,
);
}
Future<VideoDTO> sectionGetVideoDTO() async {
final response = await sectionGetVideoDTOWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body != null && response.statusCode != HttpStatus.noContent) {
return apiClient.deserialize(_decodeBodyBytes(response), 'VideoDTO') as VideoDTO;
}
return Future<VideoDTO>.value(null);
}
/// Performs an HTTP 'GET /api/Section/WebDTO' operation and returns the [Response].
Future<Response> sectionGetWebDTOWithHttpInfo() async {
final path = r'/api/Section/WebDTO';
Object postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
final contentTypes = <String>[];
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
final authNames = <String>['bearer'];
if (
nullableContentType != null &&
nullableContentType.toLowerCase().startsWith('multipart/form-data')
) {
bool hasFields = false;
final mp = MultipartRequest(null, null);
if (hasFields) {
postBody = mp;
}
} else {
}
return await apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
nullableContentType,
authNames,
);
}
Future<WebDTO> sectionGetWebDTO() async {
final response = await sectionGetWebDTOWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body != null && response.statusCode != HttpStatus.noContent) {
return apiClient.deserialize(_decodeBodyBytes(response), 'WebDTO') as WebDTO;
}
return Future<WebDTO>.value(null);
}
/// Performs an HTTP 'PUT /api/Section' operation and returns the [Response].
/// Parameters:
///

View File

@ -164,8 +164,19 @@ class ApiClient {
return DeviceDetailDTO.fromJson(value);
case 'DeviceDetailDTOAllOf':
return DeviceDetailDTOAllOf.fromJson(value);
case 'GeoPointDTO':
return GeoPointDTO.fromJson(value);
case 'ImageDTO':
return ImageDTO.fromJson(value);
case 'LoginDTO':
return LoginDTO.fromJson(value);
case 'MapDTO':
return MapDTO.fromJson(value);
case 'MapType':
return MapTypeTypeTransformer().decode(value);
case 'MenuDTO':
return MenuDTO.fromJson(value);
case 'ResourceDTO':
return ResourceDTO.fromJson(value);
case 'ResourceDetailDTO':
@ -178,6 +189,8 @@ class ApiClient {
case 'SectionType':
return SectionTypeTypeTransformer().decode(value);
case 'SliderDTO':
return SliderDTO.fromJson(value);
case 'TokenDTO':
return TokenDTO.fromJson(value);
case 'TranslationDTO':
@ -186,6 +199,10 @@ class ApiClient {
return User.fromJson(value);
case 'UserDetailDTO':
return UserDetailDTO.fromJson(value);
case 'VideoDTO':
return VideoDTO.fromJson(value);
case 'WebDTO':
return WebDTO.fromJson(value);
default:
Match match;
if (value is List && (match = _regList.firstMatch(targetType)) != null) {

View File

@ -58,6 +58,9 @@ String parameterToString(dynamic value) {
if (value is DateTime) {
return value.toUtc().toIso8601String();
}
if (value is MapType) {
return MapTypeTypeTransformer().encode(value).toString();
}
if (value is ResourceType) {
return ResourceTypeTypeTransformer().encode(value).toString();
}

View File

@ -0,0 +1,134 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class GeoPointDTO {
/// Returns a new [GeoPointDTO] instance.
GeoPointDTO({
this.id,
this.title,
this.description,
this.image,
this.imageType,
this.text,
this.latitude,
this.longitude,
});
int id;
List<TranslationDTO> title;
List<TranslationDTO> description;
String image;
String imageType;
List<TranslationDTO> text;
String latitude;
String longitude;
@override
bool operator ==(Object other) => identical(this, other) || other is GeoPointDTO &&
other.id == id &&
other.title == title &&
other.description == description &&
other.image == image &&
other.imageType == imageType &&
other.text == text &&
other.latitude == latitude &&
other.longitude == longitude;
@override
int get hashCode =>
(id == null ? 0 : id.hashCode) +
(title == null ? 0 : title.hashCode) +
(description == null ? 0 : description.hashCode) +
(image == null ? 0 : image.hashCode) +
(imageType == null ? 0 : imageType.hashCode) +
(text == null ? 0 : text.hashCode) +
(latitude == null ? 0 : latitude.hashCode) +
(longitude == null ? 0 : longitude.hashCode);
@override
String toString() => 'GeoPointDTO[id=$id, title=$title, description=$description, image=$image, imageType=$imageType, text=$text, latitude=$latitude, longitude=$longitude]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (id != null) {
json[r'id'] = id;
}
if (title != null) {
json[r'title'] = title;
}
if (description != null) {
json[r'description'] = description;
}
if (image != null) {
json[r'image'] = image;
}
if (imageType != null) {
json[r'imageType'] = imageType;
}
if (text != null) {
json[r'text'] = text;
}
if (latitude != null) {
json[r'latitude'] = latitude;
}
if (longitude != null) {
json[r'longitude'] = longitude;
}
return json;
}
/// Returns a new [GeoPointDTO] instance and imports its values from
/// [json] if it's non-null, null if [json] is null.
static GeoPointDTO fromJson(Map<String, dynamic> json) => json == null
? null
: GeoPointDTO(
id: json[r'id'],
title: TranslationDTO.listFromJson(json[r'title']),
description: TranslationDTO.listFromJson(json[r'description']),
image: json[r'image'],
imageType: json[r'imageType'],
text: TranslationDTO.listFromJson(json[r'text']),
latitude: json[r'latitude'],
longitude: json[r'longitude'],
);
static List<GeoPointDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
json == null || json.isEmpty
? true == emptyIsNull ? null : <GeoPointDTO>[]
: json.map((v) => GeoPointDTO.fromJson(v)).toList(growable: true == growable);
static Map<String, GeoPointDTO> mapFromJson(Map<String, dynamic> json) {
final map = <String, GeoPointDTO>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) => map[key] = GeoPointDTO.fromJson(v));
}
return map;
}
// maps a json object with a list of GeoPointDTO-objects as value to a dart map
static Map<String, List<GeoPointDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
final map = <String, List<GeoPointDTO>>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) {
map[key] = GeoPointDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
});
}
return map;
}
}

View File

@ -0,0 +1,89 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class ImageDTO {
/// Returns a new [ImageDTO] instance.
ImageDTO({
this.title,
this.description,
this.source_,
});
List<TranslationDTO> title;
List<TranslationDTO> description;
String source_;
@override
bool operator ==(Object other) => identical(this, other) || other is ImageDTO &&
other.title == title &&
other.description == description &&
other.source_ == source_;
@override
int get hashCode =>
(title == null ? 0 : title.hashCode) +
(description == null ? 0 : description.hashCode) +
(source_ == null ? 0 : source_.hashCode);
@override
String toString() => 'ImageDTO[title=$title, description=$description, source_=$source_]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (title != null) {
json[r'title'] = title;
}
if (description != null) {
json[r'description'] = description;
}
if (source_ != null) {
json[r'source'] = source_;
}
return json;
}
/// Returns a new [ImageDTO] instance and imports its values from
/// [json] if it's non-null, null if [json] is null.
static ImageDTO fromJson(Map<String, dynamic> json) => json == null
? null
: ImageDTO(
title: TranslationDTO.listFromJson(json[r'title']),
description: TranslationDTO.listFromJson(json[r'description']),
source_: json[r'source'],
);
static List<ImageDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
json == null || json.isEmpty
? true == emptyIsNull ? null : <ImageDTO>[]
: json.map((v) => ImageDTO.fromJson(v)).toList(growable: true == growable);
static Map<String, ImageDTO> mapFromJson(Map<String, dynamic> json) {
final map = <String, ImageDTO>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) => map[key] = ImageDTO.fromJson(v));
}
return map;
}
// maps a json object with a list of ImageDTO-objects as value to a dart map
static Map<String, List<ImageDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
final map = <String, List<ImageDTO>>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) {
map[key] = ImageDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
});
}
return map;
}
}

View File

@ -0,0 +1,98 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class MapDTO {
/// Returns a new [MapDTO] instance.
MapDTO({
this.zoom,
this.mapType,
this.points,
this.icon,
});
int zoom;
MapType mapType;
List<GeoPointDTO> points;
String icon;
@override
bool operator ==(Object other) => identical(this, other) || other is MapDTO &&
other.zoom == zoom &&
other.mapType == mapType &&
other.points == points &&
other.icon == icon;
@override
int get hashCode =>
(zoom == null ? 0 : zoom.hashCode) +
(mapType == null ? 0 : mapType.hashCode) +
(points == null ? 0 : points.hashCode) +
(icon == null ? 0 : icon.hashCode);
@override
String toString() => 'MapDTO[zoom=$zoom, mapType=$mapType, points=$points, icon=$icon]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (zoom != null) {
json[r'zoom'] = zoom;
}
if (mapType != null) {
json[r'mapType'] = mapType;
}
if (points != null) {
json[r'points'] = points;
}
if (icon != null) {
json[r'icon'] = icon;
}
return json;
}
/// Returns a new [MapDTO] instance and imports its values from
/// [json] if it's non-null, null if [json] is null.
static MapDTO fromJson(Map<String, dynamic> json) => json == null
? null
: MapDTO(
zoom: json[r'zoom'],
mapType: MapType.fromJson(json[r'mapType']),
points: GeoPointDTO.listFromJson(json[r'points']),
icon: json[r'icon'],
);
static List<MapDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
json == null || json.isEmpty
? true == emptyIsNull ? null : <MapDTO>[]
: json.map((v) => MapDTO.fromJson(v)).toList(growable: true == growable);
static Map<String, MapDTO> mapFromJson(Map<String, dynamic> json) {
final map = <String, MapDTO>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) => map[key] = MapDTO.fromJson(v));
}
return map;
}
// maps a json object with a list of MapDTO-objects as value to a dart map
static Map<String, List<MapDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
final map = <String, List<MapDTO>>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) {
map[key] = MapDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
});
}
return map;
}
}

View File

@ -0,0 +1,85 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class MapType {
/// Instantiate a new enum with the provided [value].
const MapType._(this.value);
/// The underlying value of this enum member.
final String value;
@override
String toString() => value;
String toJson() => value;
static const none = MapType._(r'none');
static const normal = MapType._(r'normal');
static const satellite = MapType._(r'satellite');
static const terrain = MapType._(r'terrain');
static const hybrid = MapType._(r'hybrid');
/// List of all possible values in this [enum][MapType].
static const values = <MapType>[
none,
normal,
satellite,
terrain,
hybrid,
];
static MapType fromJson(dynamic value) =>
MapTypeTypeTransformer().decode(value);
static List<MapType> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
json == null || json.isEmpty
? true == emptyIsNull ? null : <MapType>[]
: json
.map((value) => MapType.fromJson(value))
.toList(growable: true == growable);
}
/// Transformation class that can [encode] an instance of [MapType] to String,
/// and [decode] dynamic data back to [MapType].
class MapTypeTypeTransformer {
const MapTypeTypeTransformer._();
factory MapTypeTypeTransformer() => _instance ??= MapTypeTypeTransformer._();
String encode(MapType data) => data.value;
/// Decodes a [dynamic value][data] to a MapType.
///
/// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully,
/// then null is returned. However, if [allowNull] is false and the [dynamic value][data]
/// cannot be decoded successfully, then an [UnimplementedError] is thrown.
///
/// The [allowNull] is very handy when an API changes and a new enum value is added or removed,
/// and users are still using an old app with the old code.
MapType decode(dynamic data, {bool allowNull}) {
switch (data) {
case r'none': return MapType.none;
case r'normal': return MapType.normal;
case r'satellite': return MapType.satellite;
case r'terrain': return MapType.terrain;
case r'hybrid': return MapType.hybrid;
default:
if (allowNull == false) {
throw ArgumentError('Unknown enum value to decode: $data');
}
}
return null;
}
/// Singleton [MapTypeTypeTransformer] instance.
static MapTypeTypeTransformer _instance;
}

View File

@ -0,0 +1,71 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class MenuDTO {
/// Returns a new [MenuDTO] instance.
MenuDTO({
this.sections,
});
List<SectionDTO> sections;
@override
bool operator ==(Object other) => identical(this, other) || other is MenuDTO &&
other.sections == sections;
@override
int get hashCode =>
(sections == null ? 0 : sections.hashCode);
@override
String toString() => 'MenuDTO[sections=$sections]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (sections != null) {
json[r'sections'] = sections;
}
return json;
}
/// Returns a new [MenuDTO] instance and imports its values from
/// [json] if it's non-null, null if [json] is null.
static MenuDTO fromJson(Map<String, dynamic> json) => json == null
? null
: MenuDTO(
sections: SectionDTO.listFromJson(json[r'sections']),
);
static List<MenuDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
json == null || json.isEmpty
? true == emptyIsNull ? null : <MenuDTO>[]
: json.map((v) => MenuDTO.fromJson(v)).toList(growable: true == growable);
static Map<String, MenuDTO> mapFromJson(Map<String, dynamic> json) {
final map = <String, MenuDTO>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) => map[key] = MenuDTO.fromJson(v));
}
return map;
}
// maps a json object with a list of MenuDTO-objects as value to a dart map
static Map<String, List<MenuDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
final map = <String, List<MenuDTO>>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) {
map[key] = MenuDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
});
}
return map;
}
}

View File

@ -0,0 +1,71 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class SliderDTO {
/// Returns a new [SliderDTO] instance.
SliderDTO({
this.images,
});
List<ImageDTO> images;
@override
bool operator ==(Object other) => identical(this, other) || other is SliderDTO &&
other.images == images;
@override
int get hashCode =>
(images == null ? 0 : images.hashCode);
@override
String toString() => 'SliderDTO[images=$images]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (images != null) {
json[r'images'] = images;
}
return json;
}
/// Returns a new [SliderDTO] instance and imports its values from
/// [json] if it's non-null, null if [json] is null.
static SliderDTO fromJson(Map<String, dynamic> json) => json == null
? null
: SliderDTO(
images: ImageDTO.listFromJson(json[r'images']),
);
static List<SliderDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
json == null || json.isEmpty
? true == emptyIsNull ? null : <SliderDTO>[]
: json.map((v) => SliderDTO.fromJson(v)).toList(growable: true == growable);
static Map<String, SliderDTO> mapFromJson(Map<String, dynamic> json) {
final map = <String, SliderDTO>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) => map[key] = SliderDTO.fromJson(v));
}
return map;
}
// maps a json object with a list of SliderDTO-objects as value to a dart map
static Map<String, List<SliderDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
final map = <String, List<SliderDTO>>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) {
map[key] = SliderDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
});
}
return map;
}
}

View File

@ -0,0 +1,71 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class VideoDTO {
/// Returns a new [VideoDTO] instance.
VideoDTO({
this.source_,
});
String source_;
@override
bool operator ==(Object other) => identical(this, other) || other is VideoDTO &&
other.source_ == source_;
@override
int get hashCode =>
(source_ == null ? 0 : source_.hashCode);
@override
String toString() => 'VideoDTO[source_=$source_]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (source_ != null) {
json[r'source'] = source_;
}
return json;
}
/// Returns a new [VideoDTO] instance and imports its values from
/// [json] if it's non-null, null if [json] is null.
static VideoDTO fromJson(Map<String, dynamic> json) => json == null
? null
: VideoDTO(
source_: json[r'source'],
);
static List<VideoDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
json == null || json.isEmpty
? true == emptyIsNull ? null : <VideoDTO>[]
: json.map((v) => VideoDTO.fromJson(v)).toList(growable: true == growable);
static Map<String, VideoDTO> mapFromJson(Map<String, dynamic> json) {
final map = <String, VideoDTO>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) => map[key] = VideoDTO.fromJson(v));
}
return map;
}
// maps a json object with a list of VideoDTO-objects as value to a dart map
static Map<String, List<VideoDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
final map = <String, List<VideoDTO>>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) {
map[key] = VideoDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
});
}
return map;
}
}

View File

@ -0,0 +1,71 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class WebDTO {
/// Returns a new [WebDTO] instance.
WebDTO({
this.source_,
});
String source_;
@override
bool operator ==(Object other) => identical(this, other) || other is WebDTO &&
other.source_ == source_;
@override
int get hashCode =>
(source_ == null ? 0 : source_.hashCode);
@override
String toString() => 'WebDTO[source_=$source_]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (source_ != null) {
json[r'source'] = source_;
}
return json;
}
/// Returns a new [WebDTO] instance and imports its values from
/// [json] if it's non-null, null if [json] is null.
static WebDTO fromJson(Map<String, dynamic> json) => json == null
? null
: WebDTO(
source_: json[r'source'],
);
static List<WebDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
json == null || json.isEmpty
? true == emptyIsNull ? null : <WebDTO>[]
: json.map((v) => WebDTO.fromJson(v)).toList(growable: true == growable);
static Map<String, WebDTO> mapFromJson(Map<String, dynamic> json) {
final map = <String, WebDTO>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) => map[key] = WebDTO.fromJson(v));
}
return map;
}
// maps a json object with a list of WebDTO-objects as value to a dart map
static Map<String, List<WebDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
final map = <String, List<WebDTO>>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) {
map[key] = WebDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
});
}
return map;
}
}

View File

@ -864,6 +864,76 @@ paths:
type: string
security:
- bearer: []
/api/Section/MapDTO:
get:
tags:
- Section
operationId: Section_GetMapDTO
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/MapDTO'
security:
- bearer: []
/api/Section/SliderDTO:
get:
tags:
- Section
operationId: Section_GetSliderDTO
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/SliderDTO'
security:
- bearer: []
/api/Section/VideoDTO:
get:
tags:
- Section
operationId: Section_GetVideoDTO
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/VideoDTO'
security:
- bearer: []
/api/Section/WebDTO:
get:
tags:
- Section
operationId: Section_GetWebDTO
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/WebDTO'
security:
- bearer: []
/api/Section/MenuDTO:
get:
tags:
- Section
operationId: Section_GetMenuDTO
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/MenuDTO'
security:
- bearer: []
/api/User:
get:
tags:
@ -1291,6 +1361,121 @@ components:
- Video
- Web
- Menu
MapDTO:
type: object
additionalProperties: false
properties:
zoom:
type: integer
format: int32
mapType:
$ref: '#/components/schemas/MapType'
points:
type: array
nullable: true
items:
$ref: '#/components/schemas/GeoPointDTO'
icon:
type: string
nullable: true
MapType:
type: string
description: ''
x-enumNames:
- none
- normal
- satellite
- terrain
- hybrid
enum:
- none
- normal
- satellite
- terrain
- hybrid
GeoPointDTO:
type: object
additionalProperties: false
properties:
id:
type: integer
format: int32
title:
type: array
nullable: true
items:
$ref: '#/components/schemas/TranslationDTO'
description:
type: array
nullable: true
items:
$ref: '#/components/schemas/TranslationDTO'
image:
type: string
nullable: true
imageType:
type: string
nullable: true
text:
type: array
nullable: true
items:
$ref: '#/components/schemas/TranslationDTO'
latitude:
type: string
nullable: true
longitude:
type: string
nullable: true
SliderDTO:
type: object
additionalProperties: false
properties:
images:
type: array
nullable: true
items:
$ref: '#/components/schemas/ImageDTO'
ImageDTO:
type: object
additionalProperties: false
properties:
title:
type: array
nullable: true
items:
$ref: '#/components/schemas/TranslationDTO'
description:
type: array
nullable: true
items:
$ref: '#/components/schemas/TranslationDTO'
source:
type: string
nullable: true
VideoDTO:
type: object
additionalProperties: false
properties:
source:
type: string
nullable: true
WebDTO:
type: object
additionalProperties: false
properties:
source:
type: string
nullable: true
MenuDTO:
type: object
additionalProperties: false
properties:
sections:
type: array
nullable: true
items:
$ref: '#/components/schemas/SectionDTO'
User:
type: object
additionalProperties: false

View File

@ -0,0 +1,61 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
import 'package:managerapi/api.dart';
import 'package:test/test.dart';
// tests for GeoPointDTO
void main() {
final instance = GeoPointDTO();
group('test GeoPointDTO', () {
// int id
test('to test the property `id`', () async {
// TODO
});
// List<TranslationDTO> title (default value: const [])
test('to test the property `title`', () async {
// TODO
});
// List<TranslationDTO> description (default value: const [])
test('to test the property `description`', () async {
// TODO
});
// String image
test('to test the property `image`', () async {
// TODO
});
// String imageType
test('to test the property `imageType`', () async {
// TODO
});
// List<TranslationDTO> text (default value: const [])
test('to test the property `text`', () async {
// TODO
});
// String latitude
test('to test the property `latitude`', () async {
// TODO
});
// String longitude
test('to test the property `longitude`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,36 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
import 'package:managerapi/api.dart';
import 'package:test/test.dart';
// tests for ImageDTO
void main() {
final instance = ImageDTO();
group('test ImageDTO', () {
// List<TranslationDTO> title (default value: const [])
test('to test the property `title`', () async {
// TODO
});
// List<TranslationDTO> description (default value: const [])
test('to test the property `description`', () async {
// TODO
});
// String source_
test('to test the property `source_`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,41 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
import 'package:managerapi/api.dart';
import 'package:test/test.dart';
// tests for MapDTO
void main() {
final instance = MapDTO();
group('test MapDTO', () {
// int zoom
test('to test the property `zoom`', () async {
// TODO
});
// MapType mapType
test('to test the property `mapType`', () async {
// TODO
});
// List<GeoPointDTO> points (default value: const [])
test('to test the property `points`', () async {
// TODO
});
// String icon
test('to test the property `icon`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,20 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
import 'package:managerapi/api.dart';
import 'package:test/test.dart';
// tests for MapType
void main() {
group('test MapType', () {
});
}

View File

@ -0,0 +1,26 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
import 'package:managerapi/api.dart';
import 'package:test/test.dart';
// tests for MenuDTO
void main() {
final instance = MenuDTO();
group('test MenuDTO', () {
// List<SectionDTO> sections (default value: const [])
test('to test the property `sections`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,26 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
import 'package:managerapi/api.dart';
import 'package:test/test.dart';
// tests for SliderDTO
void main() {
final instance = SliderDTO();
group('test SliderDTO', () {
// List<ImageDTO> images (default value: const [])
test('to test the property `images`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,26 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
import 'package:managerapi/api.dart';
import 'package:test/test.dart';
// tests for VideoDTO
void main() {
final instance = VideoDTO();
group('test VideoDTO', () {
// String source_
test('to test the property `source_`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,26 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
import 'package:managerapi/api.dart';
import 'package:test/test.dart';
// tests for WebDTO
void main() {
final instance = WebDTO();
group('test WebDTO', () {
// String source_
test('to test the property `source_`', () async {
// TODO
});
});
}

View File

@ -78,6 +78,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.6"
drag_and_drop_lists:
dependency: "direct main"
description:
name: drag_and_drop_lists
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.2"
fake_async:
dependency: transitive
description:

View File

@ -35,6 +35,7 @@ dependencies:
filepicker_windows: ^2.0.0
dart_vlc: ^0.0.6
video_player: ^2.1.1
drag_and_drop_lists: ^0.3.2
managerapi:
path: manager_api