update service generation + gif and webm + wip select resource
This commit is contained in:
parent
6b65bcbf66
commit
4b7dac07a8
@ -8,7 +8,7 @@ import 'package:manager_app/Screens/Resources/select_resource_modal.dart';
|
|||||||
import 'package:manager_api_new/api.dart';
|
import 'package:manager_api_new/api.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class ImageInputContainer extends StatefulWidget {
|
class ResourceInputContainer extends StatefulWidget {
|
||||||
final Color color;
|
final Color color;
|
||||||
final String label;
|
final String label;
|
||||||
final String? initialValue;
|
final String? initialValue;
|
||||||
@ -16,7 +16,8 @@ class ImageInputContainer extends StatefulWidget {
|
|||||||
final BoxFit imageFit;
|
final BoxFit imageFit;
|
||||||
final bool isSmall;
|
final bool isSmall;
|
||||||
final double fontSize;
|
final double fontSize;
|
||||||
const ImageInputContainer({
|
final List<ResourceType> inResourceTypes;
|
||||||
|
const ResourceInputContainer({
|
||||||
Key? key,
|
Key? key,
|
||||||
this.color = kSecond,
|
this.color = kSecond,
|
||||||
required this.label,
|
required this.label,
|
||||||
@ -24,14 +25,15 @@ class ImageInputContainer extends StatefulWidget {
|
|||||||
required this.onChanged,
|
required this.onChanged,
|
||||||
this.imageFit = BoxFit.cover,
|
this.imageFit = BoxFit.cover,
|
||||||
this.isSmall = false,
|
this.isSmall = false,
|
||||||
this.fontSize = 25
|
this.fontSize = 25,
|
||||||
|
this.inResourceTypes = const [ResourceType.Image, ResourceType.ImageUrl]
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_ImageInputContainerState createState() => _ImageInputContainerState();
|
_ResourceInputContainerState createState() => _ResourceInputContainerState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ImageInputContainerState extends State<ImageInputContainer> {
|
class _ResourceInputContainerState extends State<ResourceInputContainer> {
|
||||||
String? resourceIdToShow;
|
String? resourceIdToShow;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -68,7 +70,7 @@ class _ImageInputContainerState extends State<ImageInputContainer> {
|
|||||||
ResourceDTO? result = await showSelectResourceModal(
|
ResourceDTO? result = await showSelectResourceModal(
|
||||||
"Sélectionner une ressource",
|
"Sélectionner une ressource",
|
||||||
1,
|
1,
|
||||||
[ResourceType.Image, ResourceType.ImageUrl],
|
widget.inResourceTypes,
|
||||||
context
|
context
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -93,6 +95,7 @@ class _ImageInputContainerState extends State<ImageInputContainer> {
|
|||||||
if (resourceIdToShow != null) {
|
if (resourceIdToShow != null) {
|
||||||
Size size = MediaQuery.of(context).size;
|
Size size = MediaQuery.of(context).size;
|
||||||
final appContext = Provider.of<AppContext>(context);
|
final appContext = Provider.of<AppContext>(context);
|
||||||
|
print("TODO get element");
|
||||||
return FutureBuilder(
|
return FutureBuilder(
|
||||||
future: getResource(resourceIdToShow!, appContext),
|
future: getResource(resourceIdToShow!, appContext),
|
||||||
builder: (context, AsyncSnapshot<dynamic> snapshot) {
|
builder: (context, AsyncSnapshot<dynamic> snapshot) {
|
||||||
@ -135,7 +138,7 @@ class _ImageInputContainerState extends State<ImageInputContainer> {
|
|||||||
padding: const EdgeInsets.only(left: 5, right: 5, top: 15, bottom: 15),
|
padding: const EdgeInsets.only(left: 5, right: 5, top: 15, bottom: 15),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: AutoSizeText(
|
child: AutoSizeText(
|
||||||
"Choisir une image",
|
"Choisir",
|
||||||
style: TextStyle(color: kWhite),
|
style: TextStyle(color: kWhite),
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
)
|
)
|
||||||
@ -48,7 +48,7 @@ class _UploadContentContainerState extends State<UploadContentContainer> with Si
|
|||||||
type: FileType.custom,
|
type: FileType.custom,
|
||||||
dialogTitle: 'Sélectionner un fichier',
|
dialogTitle: 'Sélectionner un fichier',
|
||||||
allowMultiple: true,
|
allowMultiple: true,
|
||||||
allowedExtensions: ['jpg', 'jpeg', 'png', 'mp3', 'mp4', 'pdf', 'json'],
|
allowedExtensions: ['jpg', 'jpeg', 'png', 'gif', 'mp3', 'mp4', 'webm', 'pdf', 'json'],
|
||||||
);
|
);
|
||||||
|
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
@ -65,7 +65,7 @@ class _UploadContentContainerState extends State<UploadContentContainer> with Si
|
|||||||
type: FileType.custom,
|
type: FileType.custom,
|
||||||
dialogTitle: 'Sélectionner un fichier',
|
dialogTitle: 'Sélectionner un fichier',
|
||||||
allowMultiple: true,
|
allowMultiple: true,
|
||||||
allowedExtensions: ['jpg', 'jpeg', 'png', 'mp3', 'mp4', 'pdf', 'json'],
|
allowedExtensions: ['jpg', 'jpeg', 'png', 'gif', 'mp3', 'mp4', 'webm', 'pdf', 'json'],
|
||||||
);
|
);
|
||||||
|
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
|
|||||||
@ -80,7 +80,7 @@ class _GeoPointContentListState extends State<GeoPointContentList> {
|
|||||||
top: 10,
|
top: 10,
|
||||||
left: 10,
|
left: 10,
|
||||||
child: Text(
|
child: Text(
|
||||||
"Images",
|
"Ressources",
|
||||||
style: TextStyle(fontSize: 15),
|
style: TextStyle(fontSize: 15),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -92,13 +92,13 @@ class _GeoPointContentListState extends State<GeoPointContentList> {
|
|||||||
var result = await showSelectResourceModal(
|
var result = await showSelectResourceModal(
|
||||||
"Sélectionner une ressource",
|
"Sélectionner une ressource",
|
||||||
1,
|
1,
|
||||||
[ResourceType.Image, ResourceType.ImageUrl],
|
[ResourceType.Image, ResourceType.ImageUrl, ResourceType.Video, ResourceType.VideoUrl, ResourceType.Audio],
|
||||||
context
|
context
|
||||||
);
|
);
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
setState(() {
|
setState(() {
|
||||||
ContentGeoPoint newImage = new ContentGeoPoint(resourceId: result.id, resourceUrl: result.url);
|
ContentGeoPoint newImage = new ContentGeoPoint(resourceId: result.id, resourceUrl: result.url, resourceName: result.label, resourceType: result.type);
|
||||||
//print("REULT IMAGES = ");
|
//print("RESULT IMAGES = ");
|
||||||
//print(newImage);
|
//print(newImage);
|
||||||
contentsGeo.add(newImage);
|
contentsGeo.add(newImage);
|
||||||
//print(imagesGeo);
|
//print(imagesGeo);
|
||||||
|
|||||||
@ -75,6 +75,7 @@ class _ListViewCardGeoPointContentsState extends State<ListViewCardGeoPointConte
|
|||||||
}
|
}
|
||||||
|
|
||||||
getElement(int index, ContentGeoPoint contentGeoPoint, Size size, AppContext appContext) {
|
getElement(int index, ContentGeoPoint contentGeoPoint, Size size, AppContext appContext) {
|
||||||
|
if(contentGeoPoint.resourceType == ResourceType.Image || contentGeoPoint.resourceType == ResourceType.ImageUrl) {
|
||||||
return Container(
|
return Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: double.infinity,
|
height: double.infinity,
|
||||||
@ -122,6 +123,13 @@ class _ListViewCardGeoPointContentsState extends State<ListViewCardGeoPointConte
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
return Container(
|
||||||
|
child: Center(
|
||||||
|
child: Text(contentGeoPoint.resourceName!),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import 'package:auto_size_text/auto_size_text.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_widget_from_html/flutter_widget_from_html.dart';
|
import 'package:flutter_widget_from_html/flutter_widget_from_html.dart';
|
||||||
import 'package:manager_app/Components/fetch_section_icon.dart';
|
import 'package:manager_app/Components/fetch_section_icon.dart';
|
||||||
import 'package:manager_app/Components/image_input_container.dart';
|
import 'package:manager_app/Components/resource_input_container.dart';
|
||||||
import 'package:manager_app/Components/multi_select_container.dart';
|
import 'package:manager_app/Components/multi_select_container.dart';
|
||||||
import 'package:manager_app/Components/slider_input_container.dart';
|
import 'package:manager_app/Components/slider_input_container.dart';
|
||||||
import 'package:manager_app/Models/managerContext.dart';
|
import 'package:manager_app/Models/managerContext.dart';
|
||||||
@ -87,7 +87,7 @@ class _MapConfigState extends State<MapConfig> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: [
|
children: [
|
||||||
// Icon
|
// Icon
|
||||||
ImageInputContainer(
|
ResourceInputContainer(
|
||||||
label: "Icône:",
|
label: "Icône:",
|
||||||
initialValue: mapDTO.iconResourceId,
|
initialValue: mapDTO.iconResourceId,
|
||||||
color: kPrimaryColor,
|
color: kPrimaryColor,
|
||||||
@ -142,7 +142,9 @@ class _MapConfigState extends State<MapConfig> {
|
|||||||
),
|
),
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Container(
|
||||||
|
constraints: BoxConstraints(minHeight: 100),
|
||||||
|
child: Padding(
|
||||||
padding: const EdgeInsets.only(top: 40, left: 10, right: 10, bottom: 10),
|
padding: const EdgeInsets.only(top: 40, left: 10, right: 10, bottom: 10),
|
||||||
child: GridView.builder(
|
child: GridView.builder(
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
@ -159,6 +161,7 @@ class _MapConfigState extends State<MapConfig> {
|
|||||||
}
|
}
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
top: 10,
|
top: 10,
|
||||||
left: 10,
|
left: 10,
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import 'package:auto_size_text/auto_size_text.dart';
|
import 'package:auto_size_text/auto_size_text.dart';
|
||||||
import 'package:manager_app/Components/image_input_container.dart';
|
import 'package:manager_app/Components/resource_input_container.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:manager_app/Components/multi_string_input_container.dart';
|
import 'package:manager_app/Components/multi_string_input_container.dart';
|
||||||
import 'package:manager_app/Components/rounded_button.dart';
|
import 'package:manager_app/Components/rounded_button.dart';
|
||||||
@ -43,7 +43,7 @@ void showEditSubSection(SectionDTO subSectionDTO, Function getResult, AppContext
|
|||||||
subSectionDTO.label = name;
|
subSectionDTO.label = name;
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
ImageInputContainer(
|
ResourceInputContainer(
|
||||||
label: "Image :",
|
label: "Image :",
|
||||||
initialValue: subSectionDTO.imageId,
|
initialValue: subSectionDTO.imageId,
|
||||||
color: kPrimaryColor,
|
color: kPrimaryColor,
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import 'package:auto_size_text/auto_size_text.dart';
|
import 'package:auto_size_text/auto_size_text.dart';
|
||||||
import 'package:manager_app/Components/image_input_container.dart';
|
import 'package:manager_app/Components/resource_input_container.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:manager_app/Components/message_notification.dart';
|
import 'package:manager_app/Components/message_notification.dart';
|
||||||
import 'package:manager_app/Components/multi_string_input_container.dart';
|
import 'package:manager_app/Components/multi_string_input_container.dart';
|
||||||
@ -55,7 +55,7 @@ Future<QuestionDTO> showNewOrUpdateQuestionQuizz(QuestionDTO? inputQuestionDTO,
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: [
|
children: [
|
||||||
ImageInputContainer(
|
ResourceInputContainer(
|
||||||
label: "Image :",
|
label: "Image :",
|
||||||
initialValue: questionDTO.resourceId,
|
initialValue: questionDTO.resourceId,
|
||||||
color: kPrimaryColor,
|
color: kPrimaryColor,
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import 'package:auto_size_text/auto_size_text.dart';
|
import 'package:auto_size_text/auto_size_text.dart';
|
||||||
import 'package:manager_app/Components/image_input_container.dart';
|
import 'package:manager_app/Components/resource_input_container.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:manager_app/Components/multi_string_input_container.dart';
|
import 'package:manager_app/Components/multi_string_input_container.dart';
|
||||||
import 'package:manager_app/Components/rounded_button.dart';
|
import 'package:manager_app/Components/rounded_button.dart';
|
||||||
@ -44,7 +44,7 @@ Future<LevelDTO?> showNewOrUpdateScoreQuizz(LevelDTO? inputLevelDTO, AppContext
|
|||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: [
|
children: [
|
||||||
Center(
|
Center(
|
||||||
child: ImageInputContainer(
|
child: ResourceInputContainer(
|
||||||
label: "Image :",
|
label: "Image :",
|
||||||
initialValue: levelDTO.resourceId,
|
initialValue: levelDTO.resourceId,
|
||||||
color: kPrimaryColor,
|
color: kPrimaryColor,
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import 'package:auto_size_text/auto_size_text.dart';
|
import 'package:auto_size_text/auto_size_text.dart';
|
||||||
import 'package:manager_app/Components/image_input_container.dart';
|
import 'package:manager_app/Components/resource_input_container.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:manager_app/Components/multi_string_input_container.dart';
|
import 'package:manager_app/Components/multi_string_input_container.dart';
|
||||||
import 'package:manager_app/Components/rounded_button.dart';
|
import 'package:manager_app/Components/rounded_button.dart';
|
||||||
@ -46,16 +46,17 @@ Future<ContentDTO> showNewOrUpdateContentSlider(ContentDTO? inputContentDTO, App
|
|||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text("Image", style: new TextStyle(fontSize: 25, fontWeight: FontWeight.w400)),
|
Text("Ressource", style: new TextStyle(fontSize: 25, fontWeight: FontWeight.w400)),
|
||||||
Column(
|
Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Center(
|
Center(
|
||||||
child: ImageInputContainer(
|
child: ResourceInputContainer(
|
||||||
label: "Image :",
|
label: "Ressource :",
|
||||||
initialValue: contentDTO.resourceId,
|
initialValue: contentDTO.resourceId,
|
||||||
color: kPrimaryColor,
|
color: kPrimaryColor,
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
|
inResourceTypes: [ResourceType.Image, ResourceType.ImageUrl, ResourceType.Video, ResourceType.VideoUrl, ResourceType.Audio],
|
||||||
onChanged: (ResourceDTO resource) {
|
onChanged: (ResourceDTO resource) {
|
||||||
if(resource.id == null) {
|
if(resource.id == null) {
|
||||||
contentDTO.resourceId = null;
|
contentDTO.resourceId = null;
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import 'package:flutter/services.dart';
|
|||||||
import 'package:manager_app/Components/check_input_container.dart';
|
import 'package:manager_app/Components/check_input_container.dart';
|
||||||
import 'package:manager_app/Components/confirmation_dialog.dart';
|
import 'package:manager_app/Components/confirmation_dialog.dart';
|
||||||
import 'package:manager_app/Components/fetch_section_icon.dart';
|
import 'package:manager_app/Components/fetch_section_icon.dart';
|
||||||
import 'package:manager_app/Components/image_input_container.dart';
|
import 'package:manager_app/Components/resource_input_container.dart';
|
||||||
import 'package:manager_app/Components/loading_common.dart';
|
import 'package:manager_app/Components/loading_common.dart';
|
||||||
import 'package:manager_app/Components/message_notification.dart';
|
import 'package:manager_app/Components/message_notification.dart';
|
||||||
import 'package:manager_app/Components/multi_string_input_container.dart';
|
import 'package:manager_app/Components/multi_string_input_container.dart';
|
||||||
@ -90,7 +90,7 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
|
|||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
//color: Colors.orangeAccent,
|
//color: Colors.orangeAccent,
|
||||||
height: 80,
|
height: 82,
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
@ -267,7 +267,7 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
ImageInputContainer(
|
ResourceInputContainer(
|
||||||
label: "Image :",
|
label: "Image :",
|
||||||
initialValue: sectionDTO != null ? sectionDTO.imageId : null,
|
initialValue: sectionDTO != null ? sectionDTO.imageId : null,
|
||||||
color: kPrimaryColor,
|
color: kPrimaryColor,
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:manager_app/Components/check_input_container.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/color_picker_input_container.dart';
|
||||||
import 'package:manager_app/Components/confirmation_dialog.dart';
|
import 'package:manager_app/Components/confirmation_dialog.dart';
|
||||||
import 'package:manager_app/Components/image_input_container.dart';
|
import 'package:manager_app/Components/resource_input_container.dart';
|
||||||
import 'package:manager_app/Components/loading_common.dart';
|
import 'package:manager_app/Components/loading_common.dart';
|
||||||
import 'package:manager_app/Components/message_notification.dart';
|
import 'package:manager_app/Components/message_notification.dart';
|
||||||
import 'package:manager_app/Components/multi_select_dropdown_container.dart';
|
import 'package:manager_app/Components/multi_select_dropdown_container.dart';
|
||||||
@ -184,7 +184,7 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
|
|||||||
//print(configurationDTO.languages);
|
//print(configurationDTO.languages);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
ImageInputContainer(
|
ResourceInputContainer(
|
||||||
label: "Image loader :",
|
label: "Image loader :",
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
initialValue: configurationDTO.loaderImageId,
|
initialValue: configurationDTO.loaderImageId,
|
||||||
@ -284,7 +284,7 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
|
|||||||
isTitle: true,
|
isTitle: true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
ImageInputContainer(
|
ResourceInputContainer(
|
||||||
label: "Image fond d'écran :",
|
label: "Image fond d'écran :",
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
initialValue: configurationDTO.imageId,
|
initialValue: configurationDTO.imageId,
|
||||||
|
|||||||
@ -107,6 +107,8 @@ void create(SectionDTO sectionDTO, AppContext appContext, BuildContext context,
|
|||||||
if (sectionDTO.label != null) {
|
if (sectionDTO.label != null) {
|
||||||
ManagerAppContext managerAppContext = appContext.getContext();
|
ManagerAppContext managerAppContext = appContext.getContext();
|
||||||
sectionDTO.instanceId = managerAppContext.instanceId;
|
sectionDTO.instanceId = managerAppContext.instanceId;
|
||||||
|
sectionDTO.isBeacon = false;
|
||||||
|
sectionDTO.dateCreation = DateTime.now();
|
||||||
SectionDTO? newSection = await managerAppContext.clientAPI!.sectionApi!.sectionCreate(sectionDTO);
|
SectionDTO? newSection = await managerAppContext.clientAPI!.sectionApi!.sectionCreate(sectionDTO);
|
||||||
|
|
||||||
if (!isSubSection) {
|
if (!isSubSection) {
|
||||||
|
|||||||
@ -87,6 +87,10 @@ getElementForResource(dynamic resourceDTO, AppContext appContext) {
|
|||||||
return Text("Vidéo locale - aucune visualisation possible");
|
return Text("Vidéo locale - aucune visualisation possible");
|
||||||
case ResourceType.VideoUrl:
|
case ResourceType.VideoUrl:
|
||||||
return Text(resourceDTO.url);
|
return Text(resourceDTO.url);
|
||||||
|
case ResourceType.Pdf:
|
||||||
|
return Text("Fichier pdf - aucune visualisation possible");
|
||||||
|
case ResourceType.Json:
|
||||||
|
return Text("Fichier json - aucune visualisation possible");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -141,6 +141,7 @@ Future<List<ResourceDTO?>?> create(ResourceDTO resourceDTO, List<File>? files, L
|
|||||||
case 'jpg':
|
case 'jpg':
|
||||||
case 'jpeg':
|
case 'jpeg':
|
||||||
case 'png':
|
case 'png':
|
||||||
|
case 'gif':
|
||||||
resourceDTO.type = ResourceType.Image;
|
resourceDTO.type = ResourceType.Image;
|
||||||
mimeType = 'image/'+platformFile.extension!;
|
mimeType = 'image/'+platformFile.extension!;
|
||||||
break;
|
break;
|
||||||
@ -152,6 +153,10 @@ Future<List<ResourceDTO?>?> create(ResourceDTO resourceDTO, List<File>? files, L
|
|||||||
resourceDTO.type = ResourceType.Video;
|
resourceDTO.type = ResourceType.Video;
|
||||||
mimeType = 'video/'+platformFile.extension!;
|
mimeType = 'video/'+platformFile.extension!;
|
||||||
break;
|
break;
|
||||||
|
case 'webm':
|
||||||
|
resourceDTO.type = ResourceType.Video;
|
||||||
|
mimeType = 'video/'+platformFile.extension!;
|
||||||
|
break;
|
||||||
case 'pdf':
|
case 'pdf':
|
||||||
resourceDTO.type = ResourceType.Pdf;
|
resourceDTO.type = ResourceType.Pdf;
|
||||||
mimeType = 'application/'+platformFile.extension!;
|
mimeType = 'application/'+platformFile.extension!;
|
||||||
|
|||||||
@ -18,8 +18,8 @@ dynamic showSelectResourceModal (String text, int maxLines, List<ResourceType> r
|
|||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
width: size.width * 0.7,
|
width: size.width * 0.85,
|
||||||
height: size.height * 0.75,
|
height: size.height * 0.85,
|
||||||
child: ResourcesScreen(
|
child: ResourcesScreen(
|
||||||
isAddButton: false,
|
isAddButton: false,
|
||||||
onGetResult: (ResourceDTO? resource) {
|
onGetResult: (ResourceDTO? resource) {
|
||||||
|
|||||||
@ -1885,6 +1885,7 @@ components:
|
|||||||
order:
|
order:
|
||||||
type: integer
|
type: integer
|
||||||
format: int32
|
format: int32
|
||||||
|
nullable: true
|
||||||
instanceId:
|
instanceId:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
@ -2163,7 +2164,7 @@ components:
|
|||||||
resourceUrl:
|
resourceUrl:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
latitude:
|
resourceName:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
CategorieDTO:
|
CategorieDTO:
|
||||||
|
|||||||
@ -11,7 +11,7 @@ Name | Type | Description | Notes
|
|||||||
**resourceId** | **String** | | [optional]
|
**resourceId** | **String** | | [optional]
|
||||||
**resourceType** | [**ResourceType**](ResourceType.md) | | [optional]
|
**resourceType** | [**ResourceType**](ResourceType.md) | | [optional]
|
||||||
**resourceUrl** | **String** | | [optional]
|
**resourceUrl** | **String** | | [optional]
|
||||||
**latitude** | **String** | | [optional]
|
**resourceName** | **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)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@ class ContentGeoPoint {
|
|||||||
this.resourceId,
|
this.resourceId,
|
||||||
this.resourceType,
|
this.resourceType,
|
||||||
this.resourceUrl,
|
this.resourceUrl,
|
||||||
this.latitude,
|
this.resourceName,
|
||||||
});
|
});
|
||||||
|
|
||||||
String? resourceId;
|
String? resourceId;
|
||||||
@ -31,14 +31,14 @@ class ContentGeoPoint {
|
|||||||
|
|
||||||
String? resourceUrl;
|
String? resourceUrl;
|
||||||
|
|
||||||
String? latitude;
|
String? resourceName;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) => identical(this, other) || other is ContentGeoPoint &&
|
bool operator ==(Object other) => identical(this, other) || other is ContentGeoPoint &&
|
||||||
other.resourceId == resourceId &&
|
other.resourceId == resourceId &&
|
||||||
other.resourceType == resourceType &&
|
other.resourceType == resourceType &&
|
||||||
other.resourceUrl == resourceUrl &&
|
other.resourceUrl == resourceUrl &&
|
||||||
other.latitude == latitude;
|
other.resourceName == resourceName;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
@ -46,10 +46,10 @@ class ContentGeoPoint {
|
|||||||
(resourceId == null ? 0 : resourceId!.hashCode) +
|
(resourceId == null ? 0 : resourceId!.hashCode) +
|
||||||
(resourceType == null ? 0 : resourceType!.hashCode) +
|
(resourceType == null ? 0 : resourceType!.hashCode) +
|
||||||
(resourceUrl == null ? 0 : resourceUrl!.hashCode) +
|
(resourceUrl == null ? 0 : resourceUrl!.hashCode) +
|
||||||
(latitude == null ? 0 : latitude!.hashCode);
|
(resourceName == null ? 0 : resourceName!.hashCode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => 'ContentGeoPoint[resourceId=$resourceId, resourceType=$resourceType, resourceUrl=$resourceUrl, latitude=$latitude]';
|
String toString() => 'ContentGeoPoint[resourceId=$resourceId, resourceType=$resourceType, resourceUrl=$resourceUrl, resourceName=$resourceName]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -68,10 +68,10 @@ class ContentGeoPoint {
|
|||||||
} else {
|
} else {
|
||||||
json[r'resourceUrl'] = null;
|
json[r'resourceUrl'] = null;
|
||||||
}
|
}
|
||||||
if (this.latitude != null) {
|
if (this.resourceName != null) {
|
||||||
json[r'latitude'] = this.latitude;
|
json[r'resourceName'] = this.resourceName;
|
||||||
} else {
|
} else {
|
||||||
json[r'latitude'] = null;
|
json[r'resourceName'] = null;
|
||||||
}
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
@ -98,7 +98,7 @@ class ContentGeoPoint {
|
|||||||
resourceId: mapValueOfType<String>(json, r'resourceId'),
|
resourceId: mapValueOfType<String>(json, r'resourceId'),
|
||||||
resourceType: ResourceType.fromJson(json[r'resourceType']),
|
resourceType: ResourceType.fromJson(json[r'resourceType']),
|
||||||
resourceUrl: mapValueOfType<String>(json, r'resourceUrl'),
|
resourceUrl: mapValueOfType<String>(json, r'resourceUrl'),
|
||||||
latitude: mapValueOfType<String>(json, r'latitude'),
|
resourceName: mapValueOfType<String>(json, r'resourceName'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user