mirror of
https://bitbucket.org/FransoletThomas/tablet-app.git
synced 2025-12-06 08:31:19 +00:00
Handling MapBox (wip) in map and agenda + PDF new view (list)
This commit is contained in:
parent
fbfd7e26b7
commit
c8224b1e35
BIN
assets/icons/marker.png
Normal file
BIN
assets/icons/marker.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.7 KiB |
@ -7,7 +7,6 @@ import 'dart:ui' as ui;
|
|||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:manager_api/api.dart';
|
import 'package:manager_api/api.dart';
|
||||||
import 'package:path_provider/path_provider.dart';
|
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:tablet_app/Components/loading_common.dart';
|
import 'package:tablet_app/Components/loading_common.dart';
|
||||||
import 'package:tablet_app/Models/agenda.dart';
|
import 'package:tablet_app/Models/agenda.dart';
|
||||||
@ -135,7 +134,7 @@ class _AgendaView extends State<AgendaView> {
|
|||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return EventPopup(eventAgenda: eventAgenda);
|
return EventPopup(eventAgenda: eventAgenda, mapProvider: agendaDTO.mapProvider ?? MapProvider.Google);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,22 +1,28 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
import 'dart:typed_data';
|
||||||
|
|
||||||
import 'package:auto_size_text/auto_size_text.dart';
|
import 'package:auto_size_text/auto_size_text.dart';
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.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:google_maps_flutter/google_maps_flutter.dart';
|
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||||
|
import 'package:mapbox_maps_flutter/mapbox_maps_flutter.dart' as mapBox;
|
||||||
|
import 'package:manager_api/api.dart';
|
||||||
import 'package:tablet_app/Components/loading_common.dart';
|
import 'package:tablet_app/Components/loading_common.dart';
|
||||||
import 'package:tablet_app/Components/video_viewer_youtube.dart';
|
import 'package:tablet_app/Components/video_viewer_youtube.dart';
|
||||||
import 'package:tablet_app/Models/agenda.dart'; // Assurez-vous d'importer votre modèle d'agenda
|
import 'package:tablet_app/Models/agenda.dart'; // Assurez-vous d'importer votre modèle d'agenda
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:tablet_app/constants.dart';
|
import 'package:tablet_app/constants.dart';
|
||||||
|
import 'dart:ui' as ui;
|
||||||
|
|
||||||
class EventPopup extends StatefulWidget {
|
class EventPopup extends StatefulWidget {
|
||||||
final EventAgenda eventAgenda;
|
final EventAgenda eventAgenda;
|
||||||
|
final MapProvider mapProvider;
|
||||||
|
|
||||||
EventPopup({Key? key, required this.eventAgenda}) : super(key: key);
|
EventPopup({Key? key, required this.eventAgenda, required this.mapProvider}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<EventPopup> createState() => _EventPopupState();
|
State<EventPopup> createState() => _EventPopupState();
|
||||||
@ -28,6 +34,9 @@ class _EventPopupState extends State<EventPopup> {
|
|||||||
Set<Marker> markers = {};
|
Set<Marker> markers = {};
|
||||||
bool init = false;
|
bool init = false;
|
||||||
|
|
||||||
|
mapBox.MapboxMap? mapboxMap;
|
||||||
|
mapBox.PointAnnotationManager? pointAnnotationManager;
|
||||||
|
|
||||||
Set<Marker> getMarkers() {
|
Set<Marker> getMarkers() {
|
||||||
markers = {};
|
markers = {};
|
||||||
|
|
||||||
@ -46,6 +55,51 @@ class _EventPopupState extends State<EventPopup> {
|
|||||||
return markers;
|
return markers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_onMapCreated(mapBox.MapboxMap mapboxMap, Uint8List icon) {
|
||||||
|
this.mapboxMap = mapboxMap;
|
||||||
|
|
||||||
|
mapboxMap.annotations.createPointAnnotationManager().then((pointAnnotationManager) async {
|
||||||
|
this.pointAnnotationManager = pointAnnotationManager;
|
||||||
|
pointAnnotationManager.createMulti(createPoints(LatLng(widget.eventAgenda.address!.lat, widget.eventAgenda.address!.lng), icon));
|
||||||
|
init = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
createPoints(LatLng position, Uint8List icon) {
|
||||||
|
var options = <mapBox.PointAnnotationOptions>[];
|
||||||
|
options.add(mapBox.PointAnnotationOptions(
|
||||||
|
geometry: mapBox.Point(
|
||||||
|
coordinates: mapBox.Position(
|
||||||
|
position.longitude,
|
||||||
|
position.latitude,
|
||||||
|
)).toJson(),
|
||||||
|
iconSize: 1.3,
|
||||||
|
iconOffset: [0.0, 0.0],
|
||||||
|
symbolSortKey: 10,
|
||||||
|
iconColor: 0,
|
||||||
|
iconImage: null,
|
||||||
|
image: icon, //widget.selectedMarkerIcon,
|
||||||
|
));
|
||||||
|
print(options.length);
|
||||||
|
|
||||||
|
return options;
|
||||||
|
}
|
||||||
|
|
||||||
|
getByteIcon() async {
|
||||||
|
final ByteData bytes = await rootBundle.load('assets/icons/marker.png');
|
||||||
|
var icon = await getBytesFromAsset(bytes, 25);
|
||||||
|
return icon;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<Uint8List> getBytesFromAsset(ByteData data, int width) async {
|
||||||
|
//ByteData data = await rootBundle.load(path);
|
||||||
|
ui.Codec codec = await ui.instantiateImageCodec(data.buffer.asUint8List(),
|
||||||
|
targetWidth: width);
|
||||||
|
ui.FrameInfo fi = await codec.getNextFrame();
|
||||||
|
return (await fi.image.toByteData(format: ui.ImageByteFormat.png))
|
||||||
|
!.buffer
|
||||||
|
.asUint8List();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -235,7 +289,8 @@ class _EventPopupState extends State<EventPopup> {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
width: size.width * 0.28,
|
width: size.width * 0.28,
|
||||||
height: size.height * 0.2,
|
height: size.height * 0.2,
|
||||||
child: GoogleMap(
|
child: widget.mapProvider == MapProvider.Google ?
|
||||||
|
GoogleMap(
|
||||||
mapToolbarEnabled: false,
|
mapToolbarEnabled: false,
|
||||||
initialCameraPosition: CameraPosition(
|
initialCameraPosition: CameraPosition(
|
||||||
target: LatLng(double.parse(widget.eventAgenda.address!.lat!.toString()), double.parse(widget.eventAgenda.address!.lng!.toString())),
|
target: LatLng(double.parse(widget.eventAgenda.address!.lat!.toString()), double.parse(widget.eventAgenda.address!.lng!.toString())),
|
||||||
@ -245,6 +300,33 @@ class _EventPopupState extends State<EventPopup> {
|
|||||||
_controller.complete(controller);
|
_controller.complete(controller);
|
||||||
},
|
},
|
||||||
markers: markers,
|
markers: markers,
|
||||||
|
) :
|
||||||
|
FutureBuilder(
|
||||||
|
future: getByteIcon(),
|
||||||
|
builder: (context, AsyncSnapshot<dynamic> snapshot) {
|
||||||
|
if (snapshot.connectionState == ConnectionState.done) {
|
||||||
|
Uint8List icon = snapshot.data!;
|
||||||
|
return mapBox.MapWidget(
|
||||||
|
key: ValueKey("mapBoxWidget"),
|
||||||
|
styleUri: mapBox.MapboxStyles.STANDARD,
|
||||||
|
onMapCreated: (maBoxMap) {
|
||||||
|
_onMapCreated(maBoxMap, icon);
|
||||||
|
},
|
||||||
|
cameraOptions: mapBox.CameraOptions(
|
||||||
|
center: mapBox.Point(coordinates: mapBox.Position(double.parse(widget.eventAgenda.address!.lng!.toString()), double.parse(widget.eventAgenda.address!.lat!.toString()))).toJson(),
|
||||||
|
zoom: 14
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else if (snapshot.connectionState == ConnectionState.none) {
|
||||||
|
return Text("No data");
|
||||||
|
} else {
|
||||||
|
return Center(
|
||||||
|
child: Container(
|
||||||
|
child: LoadingCommon()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
),
|
),
|
||||||
): SizedBox(),
|
): SizedBox(),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
|||||||
@ -18,7 +18,7 @@ import 'package:tablet_app/Helpers/DeviceInfoHelper.dart';
|
|||||||
import 'package:tablet_app/Helpers/ImageCustomProvider.dart';
|
import 'package:tablet_app/Helpers/ImageCustomProvider.dart';
|
||||||
import 'package:tablet_app/Helpers/MQTTHelper.dart';
|
import 'package:tablet_app/Helpers/MQTTHelper.dart';
|
||||||
import 'package:tablet_app/Models/tabletContext.dart';
|
import 'package:tablet_app/Models/tabletContext.dart';
|
||||||
import 'package:tablet_app/Screens/MainView/dropDown_configuration.dart';
|
import 'package:tablet_app/Screens/Configuration/dropDown_configuration.dart';
|
||||||
import 'package:tablet_app/Screens/MainView/main_view.dart';
|
import 'package:tablet_app/Screens/MainView/main_view.dart';
|
||||||
import 'package:tablet_app/app_context.dart';
|
import 'package:tablet_app/app_context.dart';
|
||||||
import 'package:tablet_app/client.dart';
|
import 'package:tablet_app/client.dart';
|
||||||
|
|||||||
@ -54,90 +54,49 @@ class _MapBoxViewState extends State<MapBoxView> {
|
|||||||
late mapBox.MapboxMap? mapboxMap;
|
late mapBox.MapboxMap? mapboxMap;
|
||||||
late mapBox.PointAnnotationManager? pointAnnotationManager;
|
late mapBox.PointAnnotationManager? pointAnnotationManager;
|
||||||
|
|
||||||
|
createPoints() {
|
||||||
|
var options = <mapBox.PointAnnotationOptions>[];
|
||||||
|
pointsToShow!.forEach((point) {
|
||||||
|
var textSansHTML = parse(point.title!.firstWhere((translation) => translation.language == widget.language).value);
|
||||||
|
var mapMarker = new MapMarker(
|
||||||
|
id: point.id,
|
||||||
|
title: parse(textSansHTML.body!.text).documentElement!.text,
|
||||||
|
description: point.description!.firstWhere((translation) => translation.language == widget.language).value,
|
||||||
|
longitude: point.longitude,
|
||||||
|
latitude: point.latitude,
|
||||||
|
contents: point.contents
|
||||||
|
);
|
||||||
|
markersList.add(mapMarker);
|
||||||
|
print(widget.selectedMarkerIcon);
|
||||||
|
options.add(mapBox.PointAnnotationOptions(
|
||||||
|
geometry: mapBox.Point(
|
||||||
|
coordinates: mapBox.Position(
|
||||||
|
double.tryParse(mapMarker.longitude!)!,
|
||||||
|
double.tryParse(mapMarker.latitude!)!,
|
||||||
|
)).toJson(),
|
||||||
|
iconSize: 1.3,
|
||||||
|
textField: mapMarker.id.toString(),
|
||||||
|
textOpacity: 0.0,
|
||||||
|
iconOffset: [0.0, 0.0],
|
||||||
|
symbolSortKey: 10,
|
||||||
|
iconColor: 0,
|
||||||
|
iconImage: null,
|
||||||
|
image: widget.selectedMarkerIcon, //widget.selectedMarkerIcon,
|
||||||
|
)); // ,
|
||||||
|
});
|
||||||
|
print(options.length);
|
||||||
|
|
||||||
|
return options;
|
||||||
|
}
|
||||||
|
|
||||||
_onMapCreated(mapBox.MapboxMap mapboxMap, MapContext mapContext) {
|
_onMapCreated(mapBox.MapboxMap mapboxMap, MapContext mapContext) {
|
||||||
this.mapboxMap = mapboxMap;
|
this.mapboxMap = mapboxMap;
|
||||||
|
|
||||||
mapboxMap.annotations.createPointAnnotationManager().then((pointAnnotationManager) async {
|
mapboxMap.annotations.createPointAnnotationManager().then((pointAnnotationManager) async {
|
||||||
this.pointAnnotationManager = pointAnnotationManager;
|
this.pointAnnotationManager = pointAnnotationManager;
|
||||||
|
pointAnnotationManager.createMulti(createPoints());
|
||||||
var options = <mapBox.PointAnnotationOptions>[];
|
|
||||||
pointsToShow!.forEach((point) {
|
|
||||||
var textSansHTML = parse(point.title!.firstWhere((translation) => translation.language == widget.language).value);
|
|
||||||
var mapMarker = new MapMarker(
|
|
||||||
id: point.id,
|
|
||||||
title: parse(textSansHTML.body!.text).documentElement!.text,
|
|
||||||
description: point.description!.firstWhere((translation) => translation.language == widget.language).value,
|
|
||||||
longitude: point.longitude,
|
|
||||||
latitude: point.latitude,
|
|
||||||
contents: point.contents
|
|
||||||
);
|
|
||||||
markersList.add(mapMarker);
|
|
||||||
if (mapMarker.latitude != null && mapMarker.longitude != null) {
|
|
||||||
/*markers.add(Marker(
|
|
||||||
draggable: false,
|
|
||||||
markerId: MarkerId(mapMarker.latitude! + mapMarker.longitude!),
|
|
||||||
position: LatLng(
|
|
||||||
double.tryParse(mapMarker.latitude!)!,
|
|
||||||
double.tryParse(mapMarker.longitude!)!,
|
|
||||||
),
|
|
||||||
icon: widget.selectedMarkerIcon != null ? BitmapDescriptor.fromBytes(widget.selectedMarkerIcon!) : BitmapDescriptor.defaultMarker,
|
|
||||||
/*icon: BitmapDescriptor.defaultMarkerWithHue(
|
|
||||||
BitmapDescriptor.hueYellow,
|
|
||||||
),*/
|
|
||||||
onTap: () {
|
|
||||||
//setState(() {
|
|
||||||
print("coucou tapped");
|
|
||||||
/*mapContext.setSelectedMarker(
|
|
||||||
new MapMarker(
|
|
||||||
title: mapMarker.title,
|
|
||||||
contents: mapMarker.contents,
|
|
||||||
description: mapMarker.description,
|
|
||||||
longitude: mapMarker.longitude,
|
|
||||||
latitude: mapMarker.latitude,
|
|
||||||
)
|
|
||||||
);*/
|
|
||||||
//});
|
|
||||||
},
|
|
||||||
infoWindow: InfoWindow.noText));*/
|
|
||||||
}
|
|
||||||
print("ADD POINT TO MAPPPPPPPPPPPP");
|
|
||||||
print(widget.selectedMarkerIcon);
|
|
||||||
options.add(mapBox.PointAnnotationOptions(
|
|
||||||
geometry: mapBox.Point(
|
|
||||||
coordinates: mapBox.Position(
|
|
||||||
double.tryParse(mapMarker.longitude!)!,
|
|
||||||
double.tryParse(mapMarker.latitude!)!,
|
|
||||||
)).toJson(),
|
|
||||||
iconSize: 1.3,
|
|
||||||
textField: mapMarker.id.toString(),
|
|
||||||
textOpacity: 0.0,
|
|
||||||
iconOffset: [0.0, 0.0],
|
|
||||||
symbolSortKey: 10,
|
|
||||||
iconColor: 0,
|
|
||||||
iconImage: widget.selectedMarkerIcon == null ? "car-15": null,
|
|
||||||
image: widget.selectedMarkerIcon, //widget.selectedMarkerIcon,
|
|
||||||
)); // ,
|
|
||||||
});
|
|
||||||
/*options.add(mapBox.PointAnnotationOptions(
|
|
||||||
geometry: mapBox.Point(
|
|
||||||
coordinates: mapBox.Position(
|
|
||||||
0.381457,
|
|
||||||
6.687337,
|
|
||||||
)).toJson(), image: widget.selectedMarkerIcon));*/
|
|
||||||
print(options.length);
|
|
||||||
pointAnnotationManager.createMulti(options);
|
|
||||||
|
|
||||||
/*var carOptions = <mapBox.PointAnnotationOptions>[];
|
|
||||||
for (var i = 0; i < 20; i++) {
|
|
||||||
carOptions.add(mapBox.PointAnnotationOptions(
|
|
||||||
geometry: mapBox.Point(
|
|
||||||
coordinates: mapBox.Position(
|
|
||||||
double.tryParse(mapMarker.longitude!)!,
|
|
||||||
double.tryParse(mapMarker.latitude!)!,
|
|
||||||
)).toJson(), iconImage: "car-15"));
|
|
||||||
}*/
|
|
||||||
//pointAnnotationManager.createMulti(carOptions);
|
|
||||||
pointAnnotationManager.addOnPointAnnotationClickListener(AnnotationClickListener(mapContext: mapContext, markersList: markersList));
|
pointAnnotationManager.addOnPointAnnotationClickListener(AnnotationClickListener(mapContext: mapContext, markersList: markersList));
|
||||||
|
init = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -148,50 +107,6 @@ class _MapBoxViewState extends State<MapBoxView> {
|
|||||||
List<String>? selectedCategories = [];
|
List<String>? selectedCategories = [];
|
||||||
bool init = false;
|
bool init = false;
|
||||||
|
|
||||||
/*Set<Marker> getMarkers(language, mapContext) {
|
|
||||||
markers = {};
|
|
||||||
|
|
||||||
pointsToShow!.forEach((point) {
|
|
||||||
var textSansHTML = parse(point.title!.firstWhere((translation) => translation.language == language).value);
|
|
||||||
var mapMarker = new MapMarker(
|
|
||||||
id: point.id,
|
|
||||||
title: parse(textSansHTML.body!.text).documentElement!.text,
|
|
||||||
description: point.description!.firstWhere((translation) => translation.language == language).value,
|
|
||||||
longitude: point.longitude,
|
|
||||||
latitude: point.latitude,
|
|
||||||
contents: point.contents
|
|
||||||
);
|
|
||||||
if (mapMarker.latitude != null && mapMarker.longitude != null) {
|
|
||||||
markers.add(Marker(
|
|
||||||
draggable: false,
|
|
||||||
markerId: MarkerId(mapMarker.latitude! + mapMarker.longitude!),
|
|
||||||
position: LatLng(
|
|
||||||
double.tryParse(mapMarker.latitude!)!,
|
|
||||||
double.tryParse(mapMarker.longitude!)!,
|
|
||||||
),
|
|
||||||
icon: widget.selectedMarkerIcon != null ? BitmapDescriptor.fromBytes(widget.selectedMarkerIcon!) : BitmapDescriptor.defaultMarker,
|
|
||||||
/*icon: BitmapDescriptor.defaultMarkerWithHue(
|
|
||||||
BitmapDescriptor.hueYellow,
|
|
||||||
),*/
|
|
||||||
onTap: () {
|
|
||||||
//setState(() {
|
|
||||||
mapContext.setSelectedMarker(
|
|
||||||
new MapMarker(
|
|
||||||
title: mapMarker.title,
|
|
||||||
contents: mapMarker.contents,
|
|
||||||
description: mapMarker.description,
|
|
||||||
longitude: mapMarker.longitude,
|
|
||||||
latitude: mapMarker.latitude,
|
|
||||||
)
|
|
||||||
);
|
|
||||||
//});
|
|
||||||
},
|
|
||||||
infoWindow: InfoWindow.noText));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return markers;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
pointsToShow = widget.mapDTO!.points;
|
pointsToShow = widget.mapDTO!.points;
|
||||||
@ -210,49 +125,38 @@ class _MapBoxViewState extends State<MapBoxView> {
|
|||||||
final mapContext = Provider.of<MapContext>(context);
|
final mapContext = Provider.of<MapContext>(context);
|
||||||
Size size = MediaQuery.of(context).size;
|
Size size = MediaQuery.of(context).size;
|
||||||
|
|
||||||
if(!init) {
|
var type = mapBox.MapboxStyles.STANDARD;
|
||||||
print("getmarkers in build");
|
if(widget.mapDTO!.mapTypeMapbox != null) {
|
||||||
//getMarkers(widget.language, mapContext);
|
switch(widget.mapDTO!.mapTypeMapbox!) {
|
||||||
init = true;
|
case MapTypeMapBox.standard:
|
||||||
}
|
type = mapBox.MapboxStyles.STANDARD;
|
||||||
//MapTypeApp? mapTypeApp = MapTypeApp.fromJson(widget.mapDTO!.mapType!.value);
|
break;
|
||||||
//print(mapTypeApp.toString());
|
case MapTypeMapBox.streets:
|
||||||
|
type = mapBox.MapboxStyles.MAPBOX_STREETS;
|
||||||
MapType type = MapType.hybrid;
|
break;
|
||||||
//if(kIsWeb) {
|
case MapTypeMapBox.outdoors:
|
||||||
if(widget.mapDTO!.mapType != null) {
|
type = mapBox.MapboxStyles.OUTDOORS;
|
||||||
switch(widget.mapDTO!.mapType!.value) {
|
break;
|
||||||
case 0:
|
case MapTypeMapBox.light:
|
||||||
type = MapType.none;
|
type = mapBox.MapboxStyles.LIGHT;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case MapTypeMapBox.dark:
|
||||||
type = MapType.normal;
|
type = mapBox.MapboxStyles.DARK;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case MapTypeMapBox.satellite:
|
||||||
type = MapType.satellite;
|
type = mapBox.MapboxStyles.SATELLITE;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case MapTypeMapBox.satellite_streets:
|
||||||
type = MapType.terrain;
|
type = mapBox.MapboxStyles.SATELLITE_STREETS;
|
||||||
break;
|
break;
|
||||||
case 4:
|
|
||||||
type = MapType.hybrid;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/*} else {
|
|
||||||
print("is OTHEER");
|
|
||||||
type = EnumToString.fromString(MapType.values, widget.mapDTO!.mapType.toString()) != null ? EnumToString.fromString(MapType.values, widget.mapDTO!.mapType.toString())! : MapType.hybrid;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
//MapType type = EnumToString.fromString(MapType.values, widget.mapDTO!.mapType.toString()) != null ? EnumToString.fromString(MapType.values, widget.mapDTO!.mapType.toString())! : MapType.hybrid;
|
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
Center(
|
Center(
|
||||||
child: mapBox.MapWidget(
|
child: mapBox.MapWidget(
|
||||||
key: ValueKey("mapWidget"),
|
key: ValueKey("mapBoxWidget"),
|
||||||
styleUri: mapBox.MapboxStyles.STANDARD, // TODO update // widget.mapDTO!.mapType != null ? EnumToString.fromString(MapType.values, widget.mapDTO!.mapType.toString())!: MapType.hybrid,
|
styleUri: type,
|
||||||
onMapCreated: (maBoxMap) {
|
onMapCreated: (maBoxMap) {
|
||||||
_onMapCreated(maBoxMap, mapContext);
|
_onMapCreated(maBoxMap, mapContext);
|
||||||
},
|
},
|
||||||
@ -285,6 +189,7 @@ class _MapBoxViewState extends State<MapBoxView> {
|
|||||||
pointsToShow = widget.mapDTO!.points!.where((point) => tempOutput.any((tps) => point.categorie?.label?.firstWhere((lab) => lab.language == widget.language).value == tps) || point.categorie == null).toList();
|
pointsToShow = widget.mapDTO!.points!.where((point) => tempOutput.any((tps) => point.categorie?.label?.firstWhere((lab) => lab.language == widget.language).value == tps) || point.categorie == null).toList();
|
||||||
//markers = getMarkers(widget.language, mapContext);
|
//markers = getMarkers(widget.language, mapContext);
|
||||||
pointAnnotationManager!.deleteAll();
|
pointAnnotationManager!.deleteAll();
|
||||||
|
pointAnnotationManager!.createMulti(createPoints());
|
||||||
mapContext.notifyListeners();
|
mapContext.notifyListeners();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,6 +12,7 @@ import 'package:tablet_app/Components/loading_common.dart';
|
|||||||
import 'package:tablet_app/Models/map-marker.dart';
|
import 'package:tablet_app/Models/map-marker.dart';
|
||||||
import 'dart:ui' as ui;
|
import 'dart:ui' as ui;
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
|
import 'package:tablet_app/Screens/Map/map_box_view.dart';
|
||||||
import 'package:tablet_app/Screens/Map/marker_view.dart';
|
import 'package:tablet_app/Screens/Map/marker_view.dart';
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
|
|
||||||
@ -19,7 +20,7 @@ import '../../app_context.dart';
|
|||||||
import 'google_map_view.dart';
|
import 'google_map_view.dart';
|
||||||
import 'package:image/image.dart' as IMG;
|
import 'package:image/image.dart' as IMG;
|
||||||
|
|
||||||
Set<Marker> markers = {};
|
//Set<Marker> markers = {};
|
||||||
List<MapMarker> markersList = [];
|
List<MapMarker> markersList = [];
|
||||||
|
|
||||||
class MapViewWidget extends StatefulWidget {
|
class MapViewWidget extends StatefulWidget {
|
||||||
@ -76,7 +77,17 @@ class _MapViewWidget extends State<MapViewWidget> {
|
|||||||
print("snapshot");
|
print("snapshot");
|
||||||
print(snapshot.data);
|
print(snapshot.data);
|
||||||
print(selectedMarkerIcon);
|
print(selectedMarkerIcon);
|
||||||
return GoogleMapView(language: appContext.getContext().language, mapDTO: mapDTO, selectedMarkerIcon: selectedMarkerIcon);
|
|
||||||
|
switch(mapDTO!.mapProvider) {
|
||||||
|
case MapProvider.Google:
|
||||||
|
return GoogleMapView(language: appContext.getContext().language, mapDTO: mapDTO, selectedMarkerIcon: selectedMarkerIcon);
|
||||||
|
case MapProvider.MapBox:
|
||||||
|
return MapBoxView(language: appContext.getContext().language, mapDTO: mapDTO, selectedMarkerIcon: selectedMarkerIcon);
|
||||||
|
default:
|
||||||
|
// By default google
|
||||||
|
return GoogleMapView(language: appContext.getContext().language, mapDTO: mapDTO, selectedMarkerIcon: selectedMarkerIcon);
|
||||||
|
}
|
||||||
|
|
||||||
} else if (snapshot.connectionState == ConnectionState.none) {
|
} else if (snapshot.connectionState == ConnectionState.none) {
|
||||||
return Text("No data");
|
return Text("No data");
|
||||||
} else {
|
} else {
|
||||||
@ -107,6 +118,10 @@ class _MapViewWidget extends State<MapViewWidget> {
|
|||||||
final ByteData imageData = await NetworkAssetBundle(Uri.parse(source)).load("");
|
final ByteData imageData = await NetworkAssetBundle(Uri.parse(source)).load("");
|
||||||
selectedMarkerIcon = await getBytesFromAsset(imageData, 50);
|
selectedMarkerIcon = await getBytesFromAsset(imageData, 50);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// default icon
|
||||||
|
final ByteData bytes = await rootBundle.load('assets/icons/marker.png');
|
||||||
|
selectedMarkerIcon = await getBytesFromAsset(bytes, 25);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
66
lib/Screens/PDF/pdf_filter.dart
Normal file
66
lib/Screens/PDF/pdf_filter.dart
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
import 'dart:ffi';
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_widget_from_html/flutter_widget_from_html.dart';
|
||||||
|
import 'package:manager_api/api.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
import 'package:tablet_app/Models/tabletContext.dart';
|
||||||
|
import 'package:tablet_app/app_context.dart';
|
||||||
|
import 'package:tablet_app/constants.dart';
|
||||||
|
|
||||||
|
class PdfFilter extends StatefulWidget {
|
||||||
|
final List<PDFFileDTO> pdfsList;
|
||||||
|
final Function(int?) onPDFSelected;
|
||||||
|
|
||||||
|
PdfFilter({required this.pdfsList, required this.onPDFSelected});
|
||||||
|
|
||||||
|
@override
|
||||||
|
_PdfFilterState createState() => _PdfFilterState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _PdfFilterState extends State<PdfFilter> {
|
||||||
|
int _selectedOrderPdf = 0;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final appContext = Provider.of<AppContext>(context);
|
||||||
|
TabletAppContext tabletAppContext = appContext.getContext();
|
||||||
|
var currentLanguage = tabletAppContext.language;
|
||||||
|
|
||||||
|
return ListView.builder(
|
||||||
|
itemCount: widget.pdfsList.length,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
if (widget.pdfsList.isNotEmpty) {
|
||||||
|
return ListTile(
|
||||||
|
title: HtmlWidget(
|
||||||
|
'${widget.pdfsList[index].pdfFilesAndTitles!.firstWhere((pfat) => pfat.language == currentLanguage).value}',
|
||||||
|
textStyle: TextStyle(
|
||||||
|
fontSize: 15.0,
|
||||||
|
fontWeight: _selectedOrderPdf == widget.pdfsList[index].order ? FontWeight.bold : FontWeight.normal,
|
||||||
|
color: _selectedOrderPdf == widget.pdfsList[index].order ? kTestSecondColor : null,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
/*Text(
|
||||||
|
'${widget.pdfsList[index].pdfFilesAndTitles!.firstWhere((pfat) => pfat.language == currentLanguage).value}',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 15.0,
|
||||||
|
fontWeight: _selectedOrderPdf == widget.pdfsList[index].order ? FontWeight.bold : FontWeight.normal,
|
||||||
|
color: _selectedOrderPdf == widget.pdfsList[index].order ? kTestSecondColor : null,
|
||||||
|
),
|
||||||
|
),*/
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
_selectedOrderPdf = widget.pdfsList[index].order!;
|
||||||
|
});
|
||||||
|
widget.onPDFSelected(_selectedOrderPdf);
|
||||||
|
},
|
||||||
|
tileColor: _selectedOrderPdf == widget.pdfsList[index].order ? kTestSecondColor : null,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
// Si nbrEvents est 0, ne retourne pas de widget
|
||||||
|
return SizedBox.shrink();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -12,6 +12,7 @@ import 'package:path_provider/path_provider.dart';
|
|||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:tablet_app/Components/loading_common.dart';
|
import 'package:tablet_app/Components/loading_common.dart';
|
||||||
import 'package:tablet_app/Models/tabletContext.dart';
|
import 'package:tablet_app/Models/tabletContext.dart';
|
||||||
|
import 'package:tablet_app/Screens/PDF/pdf_filter.dart';
|
||||||
import 'package:tablet_app/app_context.dart';
|
import 'package:tablet_app/app_context.dart';
|
||||||
import 'package:tablet_app/constants.dart';
|
import 'package:tablet_app/constants.dart';
|
||||||
|
|
||||||
@ -32,6 +33,7 @@ class _PDFViewWidget extends State<PDFViewWidget> {
|
|||||||
int? currentPage = 0;
|
int? currentPage = 0;
|
||||||
bool isReady = false;
|
bool isReady = false;
|
||||||
String errorMessage = '';
|
String errorMessage = '';
|
||||||
|
late ValueNotifier<PDFFileDTO?> selectedPdf = ValueNotifier<PDFFileDTO?>(pdfDTO.pdfs!.first);
|
||||||
ValueNotifier<Map<String, int>> currentState = ValueNotifier<Map<String, int>>({'page': 0, 'total': 1});
|
ValueNotifier<Map<String, int>> currentState = ValueNotifier<Map<String, int>>({'page': 0, 'total': 1});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -50,34 +52,38 @@ class _PDFViewWidget extends State<PDFViewWidget> {
|
|||||||
});*/
|
});*/
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<File> createFileOfPdfUrl(TabletAppContext tabletAppContext, PdfDTO pdfDTO) async {
|
Future<File?> createFileOfPdfUrl(TabletAppContext tabletAppContext, PDFFileDTO pdfFileDTO) async {
|
||||||
Completer<File> completer = Completer();
|
Completer<File?> completer = Completer();
|
||||||
|
|
||||||
var file = await _checkIfLocalResourceExists(tabletAppContext, pdfDTO.resourceId!);
|
if(pdfFileDTO.pdfFilesAndTitles!.firstWhere((pfat) => pfat.language == tabletAppContext.language).resourceId == null) {
|
||||||
|
completer.complete(null);
|
||||||
if(file == null) {
|
|
||||||
print("Start download file from internet!");
|
|
||||||
try {
|
|
||||||
// "https://berlin2017.droidcon.cod.newthinking.net/sites/global.droidcon.cod.newthinking.net/files/media/documents/Flutter%20-%2060FPS%20UI%20of%20the%20future%20%20-%20DroidconDE%2017.pdf";
|
|
||||||
// final url = "https://pdfkit.org/docs/guide.pdf";
|
|
||||||
final url = pdfDTO.resourceUrl!;
|
|
||||||
final filename = url.substring(url.lastIndexOf("/") + 1);
|
|
||||||
var request = await HttpClient().getUrl(Uri.parse(url));
|
|
||||||
var response = await request.close();
|
|
||||||
var bytes = await consolidateHttpClientResponseBytes(response);
|
|
||||||
var dir = await getApplicationDocumentsDirectory();
|
|
||||||
print("Download files");
|
|
||||||
print("${dir.path}/$filename");
|
|
||||||
File file = File("${dir.path}/$filename");
|
|
||||||
|
|
||||||
await file.writeAsBytes(bytes, flush: true);
|
|
||||||
completer.complete(file);
|
|
||||||
} catch (e) {
|
|
||||||
throw Exception('Error parsing asset file!');
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
print("FOUND FILE PDF");
|
var file = await _checkIfLocalResourceExists(tabletAppContext, pdfFileDTO.pdfFilesAndTitles!.firstWhere((pfat) => pfat.language == tabletAppContext.language).resourceId!);
|
||||||
completer.complete(file);
|
|
||||||
|
if(file == null) {
|
||||||
|
print("Start download file from internet!");
|
||||||
|
try {
|
||||||
|
// "https://berlin2017.droidcon.cod.newthinking.net/sites/global.droidcon.cod.newthinking.net/files/media/documents/Flutter%20-%2060FPS%20UI%20of%20the%20future%20%20-%20DroidconDE%2017.pdf";
|
||||||
|
// final url = "https://pdfkit.org/docs/guide.pdf";
|
||||||
|
final url = pdfFileDTO.pdfFilesAndTitles!.firstWhere((pfat) => pfat.language == tabletAppContext.language).resourceUrl!;
|
||||||
|
final filename = url.substring(url.lastIndexOf("/") + 1);
|
||||||
|
var request = await HttpClient().getUrl(Uri.parse(url));
|
||||||
|
var response = await request.close();
|
||||||
|
var bytes = await consolidateHttpClientResponseBytes(response);
|
||||||
|
var dir = await getApplicationDocumentsDirectory();
|
||||||
|
print("Download files");
|
||||||
|
print("${dir.path}/$filename");
|
||||||
|
File file = File("${dir.path}/$filename");
|
||||||
|
|
||||||
|
await file.writeAsBytes(bytes, flush: true);
|
||||||
|
completer.complete(file);
|
||||||
|
} catch (e) {
|
||||||
|
throw Exception('Error parsing asset file!');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
print("FOUND FILE PDF");
|
||||||
|
completer.complete(file);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return completer.future;
|
return completer.future;
|
||||||
@ -94,74 +100,121 @@ class _PDFViewWidget extends State<PDFViewWidget> {
|
|||||||
final appContext = Provider.of<AppContext>(context);
|
final appContext = Provider.of<AppContext>(context);
|
||||||
TabletAppContext tabletAppContext = appContext.getContext();
|
TabletAppContext tabletAppContext = appContext.getContext();
|
||||||
|
|
||||||
return pdfDTO.resourceUrl != null && pdfDTO.resourceUrl!.length > 0 ?
|
pdfDTO.pdfs!.sort((a, b) => a.order!.compareTo(b.order!));
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.all(12.5),
|
|
||||||
child: FutureBuilder(
|
|
||||||
future: createFileOfPdfUrl(tabletAppContext, pdfDTO),
|
|
||||||
builder: (context, AsyncSnapshot<dynamic> snapshot) {
|
|
||||||
print("snapshot.data");
|
|
||||||
print(snapshot.data);
|
|
||||||
if (snapshot.connectionState == ConnectionState.done) {
|
|
||||||
return Stack(
|
|
||||||
children: [
|
|
||||||
PDFView(
|
|
||||||
filePath: snapshot.data.path,
|
|
||||||
enableSwipe: true,
|
|
||||||
swipeHorizontal: true,
|
|
||||||
autoSpacing: true,
|
|
||||||
pageFling: true,
|
|
||||||
fitPolicy: FitPolicy.HEIGHT,
|
|
||||||
onRender: (_pages) {
|
|
||||||
//setState(() {
|
|
||||||
pages = _pages;
|
|
||||||
isReady = true;
|
|
||||||
//});
|
|
||||||
},
|
|
||||||
onError: (error) {
|
|
||||||
print(error.toString());
|
|
||||||
},
|
|
||||||
onPageError: (page, error) {
|
|
||||||
print('$page: ${error.toString()}');
|
|
||||||
},
|
|
||||||
onViewCreated: (PDFViewController pdfViewController) {
|
|
||||||
//_controller.complete(pdfViewController);
|
|
||||||
},
|
|
||||||
onPageChanged: (int? page, int? total) {
|
|
||||||
currentPage = page;
|
|
||||||
pages = total;
|
|
||||||
currentState.value = {'page': page!, 'total': total!};
|
|
||||||
|
|
||||||
print('page change: $page/$total');
|
return pdfDTO.pdfs != null && pdfDTO.pdfs!.length > 0 ?
|
||||||
},
|
Center(
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
flex: 1,
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: kBackgroundColor,
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
topLeft: Radius.circular(30.0),
|
||||||
|
bottomLeft: Radius.circular(30.0),
|
||||||
),
|
),
|
||||||
Positioned(
|
),
|
||||||
bottom: 20,
|
child: Padding(
|
||||||
right: 20,
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: ValueListenableBuilder<Map<String, int>>(
|
child: PdfFilter(
|
||||||
valueListenable: currentState,
|
pdfsList: pdfDTO.pdfs!,
|
||||||
builder: (context, value, _) {
|
onPDFSelected: (selectedOrder) {
|
||||||
return Container(
|
selectedPdf.value = pdfDTO.pdfs!.firstWhere((pdf) => pdf.order == selectedOrder);
|
||||||
//color: Colors.blueAccent,
|
}),
|
||||||
child: Text("${value["page"]!+1}/${value["total"]!}",
|
),
|
||||||
style: TextStyle(color: Colors.black, fontSize: 30))
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
flex: 4,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 8.0),
|
||||||
|
child: ValueListenableBuilder<PDFFileDTO?>(
|
||||||
|
valueListenable: selectedPdf,
|
||||||
|
builder: (context, value, _) {
|
||||||
|
return FutureBuilder(
|
||||||
|
future: createFileOfPdfUrl(tabletAppContext, value!),
|
||||||
|
builder: (context, AsyncSnapshot<dynamic> snapshot) {
|
||||||
|
print("snapshot.data");
|
||||||
|
print(snapshot.data);
|
||||||
|
if (snapshot.connectionState == ConnectionState.done) {
|
||||||
|
if(snapshot.data == null) {
|
||||||
|
return Center(child: Text("Aucun fichier à afficher"));
|
||||||
|
} else {
|
||||||
|
return Stack(
|
||||||
|
children: [
|
||||||
|
PDFView(
|
||||||
|
filePath: snapshot.data.path,
|
||||||
|
enableSwipe: true,
|
||||||
|
swipeHorizontal: true,
|
||||||
|
autoSpacing: true,
|
||||||
|
pageFling: true,
|
||||||
|
fitPolicy: FitPolicy.HEIGHT,
|
||||||
|
onRender: (_pages) {
|
||||||
|
//setState(() {
|
||||||
|
pages = _pages;
|
||||||
|
isReady = true;
|
||||||
|
//});
|
||||||
|
},
|
||||||
|
onError: (error) {
|
||||||
|
print(error.toString());
|
||||||
|
},
|
||||||
|
onPageError: (page, error) {
|
||||||
|
print('$page: ${error.toString()}');
|
||||||
|
},
|
||||||
|
onViewCreated: (PDFViewController pdfViewController) {
|
||||||
|
//_controller.complete(pdfViewController);
|
||||||
|
},
|
||||||
|
onPageChanged: (int? page, int? total) {
|
||||||
|
currentPage = page;
|
||||||
|
pages = total;
|
||||||
|
currentState.value = {'page': page!, 'total': total!};
|
||||||
|
|
||||||
|
print('page change: $page/$total');
|
||||||
|
},
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
bottom: 20,
|
||||||
|
right: 20,
|
||||||
|
child: ValueListenableBuilder<Map<String, int>>(
|
||||||
|
valueListenable: currentState,
|
||||||
|
builder: (context, value, _) {
|
||||||
|
return Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(30.0)),
|
||||||
|
color: kTestSecondColor
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(6.0),
|
||||||
|
child: Text("${value["page"]!+1}/${value["total"]!}",
|
||||||
|
style: TextStyle(color: Colors.white, fontSize: 20)),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return Center(
|
||||||
|
child: Container(
|
||||||
|
child: LoadingCommon()
|
||||||
|
)
|
||||||
);
|
);
|
||||||
},
|
}
|
||||||
),
|
}
|
||||||
),
|
);
|
||||||
],
|
}
|
||||||
);
|
),
|
||||||
} else {
|
),
|
||||||
return Center(
|
),
|
||||||
child: Container(
|
],
|
||||||
child: LoadingCommon()
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
) :
|
) :
|
||||||
Center(child: Text("Le PDF ne peut pas être affiché, il n'existe pas", style: TextStyle(fontSize: kNoneInfoOrIncorrect)));
|
Center(child: Text("Aucun pdf à afficher", style: TextStyle(fontSize: kNoneInfoOrIncorrect)));
|
||||||
}
|
}
|
||||||
} //_webView
|
} //_webView
|
||||||
|
|
||||||
|
|||||||
@ -2099,7 +2099,17 @@ components:
|
|||||||
type: integer
|
type: integer
|
||||||
format: int32
|
format: int32
|
||||||
mapType:
|
mapType:
|
||||||
$ref: '#/components/schemas/MapTypeApp'
|
nullable: true
|
||||||
|
oneOf:
|
||||||
|
- $ref: '#/components/schemas/MapTypeApp'
|
||||||
|
mapTypeMapbox:
|
||||||
|
nullable: true
|
||||||
|
oneOf:
|
||||||
|
- $ref: '#/components/schemas/MapTypeMapBox'
|
||||||
|
mapProvider:
|
||||||
|
nullable: true
|
||||||
|
oneOf:
|
||||||
|
- $ref: '#/components/schemas/MapProvider'
|
||||||
points:
|
points:
|
||||||
type: array
|
type: array
|
||||||
nullable: true
|
nullable: true
|
||||||
@ -2136,6 +2146,43 @@ components:
|
|||||||
- 2
|
- 2
|
||||||
- 3
|
- 3
|
||||||
- 4
|
- 4
|
||||||
|
MapTypeMapBox:
|
||||||
|
type: integer
|
||||||
|
description: |-
|
||||||
|
0 = standard
|
||||||
|
1 = streets
|
||||||
|
2 = outdoors
|
||||||
|
3 = light
|
||||||
|
4 = dark
|
||||||
|
5 = satellite
|
||||||
|
6 = satellite_streets
|
||||||
|
x-enumNames:
|
||||||
|
- standard
|
||||||
|
- streets
|
||||||
|
- outdoors
|
||||||
|
- light
|
||||||
|
- dark
|
||||||
|
- satellite
|
||||||
|
- satellite_streets
|
||||||
|
enum:
|
||||||
|
- 0
|
||||||
|
- 1
|
||||||
|
- 2
|
||||||
|
- 3
|
||||||
|
- 4
|
||||||
|
- 5
|
||||||
|
- 6
|
||||||
|
MapProvider:
|
||||||
|
type: integer
|
||||||
|
description: |-
|
||||||
|
0 = Google
|
||||||
|
1 = MapBox
|
||||||
|
x-enumNames:
|
||||||
|
- Google
|
||||||
|
- MapBox
|
||||||
|
enum:
|
||||||
|
- 0
|
||||||
|
- 1
|
||||||
GeoPointDTO:
|
GeoPointDTO:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
@ -2143,6 +2190,7 @@ components:
|
|||||||
id:
|
id:
|
||||||
type: integer
|
type: integer
|
||||||
format: int32
|
format: int32
|
||||||
|
nullable: true
|
||||||
title:
|
title:
|
||||||
type: array
|
type: array
|
||||||
nullable: true
|
nullable: true
|
||||||
@ -2313,7 +2361,9 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
imageBackgroundResourceType:
|
imageBackgroundResourceType:
|
||||||
$ref: '#/components/schemas/ResourceType'
|
nullable: true
|
||||||
|
oneOf:
|
||||||
|
- $ref: '#/components/schemas/ResourceType'
|
||||||
imageBackgroundResourceUrl:
|
imageBackgroundResourceUrl:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
@ -2390,11 +2440,23 @@ components:
|
|||||||
type: object
|
type: object
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
resourceId:
|
pdfs:
|
||||||
type: string
|
type: array
|
||||||
nullable: true
|
nullable: true
|
||||||
resourceUrl:
|
items:
|
||||||
type: string
|
$ref: '#/components/schemas/PDFFileDTO'
|
||||||
|
PDFFileDTO:
|
||||||
|
type: object
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
pdfFilesAndTitles:
|
||||||
|
type: array
|
||||||
|
nullable: true
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/TranslationAndResourceDTO'
|
||||||
|
order:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
nullable: true
|
nullable: true
|
||||||
PuzzleDTO:
|
PuzzleDTO:
|
||||||
type: object
|
type: object
|
||||||
@ -2429,6 +2491,10 @@ components:
|
|||||||
nullable: true
|
nullable: true
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/TranslationDTO'
|
$ref: '#/components/schemas/TranslationDTO'
|
||||||
|
mapProvider:
|
||||||
|
nullable: true
|
||||||
|
oneOf:
|
||||||
|
- $ref: '#/components/schemas/MapProvider'
|
||||||
User:
|
User:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
|
|||||||
0
macos/Flutter/ephemeral/flutter_export_environment.sh
Executable file → Normal file
0
macos/Flutter/ephemeral/flutter_export_environment.sh
Executable file → Normal file
@ -24,8 +24,14 @@ doc/InstanceDTO.md
|
|||||||
doc/LevelDTO.md
|
doc/LevelDTO.md
|
||||||
doc/LoginDTO.md
|
doc/LoginDTO.md
|
||||||
doc/MapDTO.md
|
doc/MapDTO.md
|
||||||
|
doc/MapDTOMapProvider.md
|
||||||
|
doc/MapDTOMapType.md
|
||||||
|
doc/MapDTOMapTypeMapbox.md
|
||||||
|
doc/MapProvider.md
|
||||||
doc/MapTypeApp.md
|
doc/MapTypeApp.md
|
||||||
|
doc/MapTypeMapBox.md
|
||||||
doc/MenuDTO.md
|
doc/MenuDTO.md
|
||||||
|
doc/PDFFileDTO.md
|
||||||
doc/PdfDTO.md
|
doc/PdfDTO.md
|
||||||
doc/PlayerMessageDTO.md
|
doc/PlayerMessageDTO.md
|
||||||
doc/PuzzleDTO.md
|
doc/PuzzleDTO.md
|
||||||
@ -84,9 +90,15 @@ lib/model/instance_dto.dart
|
|||||||
lib/model/level_dto.dart
|
lib/model/level_dto.dart
|
||||||
lib/model/login_dto.dart
|
lib/model/login_dto.dart
|
||||||
lib/model/map_dto.dart
|
lib/model/map_dto.dart
|
||||||
|
lib/model/map_dto_map_provider.dart
|
||||||
|
lib/model/map_dto_map_type.dart
|
||||||
|
lib/model/map_dto_map_type_mapbox.dart
|
||||||
|
lib/model/map_provider.dart
|
||||||
lib/model/map_type_app.dart
|
lib/model/map_type_app.dart
|
||||||
|
lib/model/map_type_map_box.dart
|
||||||
lib/model/menu_dto.dart
|
lib/model/menu_dto.dart
|
||||||
lib/model/pdf_dto.dart
|
lib/model/pdf_dto.dart
|
||||||
|
lib/model/pdf_file_dto.dart
|
||||||
lib/model/player_message_dto.dart
|
lib/model/player_message_dto.dart
|
||||||
lib/model/puzzle_dto.dart
|
lib/model/puzzle_dto.dart
|
||||||
lib/model/puzzle_dto_image.dart
|
lib/model/puzzle_dto_image.dart
|
||||||
@ -107,3 +119,4 @@ lib/model/user_detail_dto.dart
|
|||||||
lib/model/video_dto.dart
|
lib/model/video_dto.dart
|
||||||
lib/model/web_dto.dart
|
lib/model/web_dto.dart
|
||||||
pubspec.yaml
|
pubspec.yaml
|
||||||
|
test/pdf_file_dto_test.dart
|
||||||
|
|||||||
@ -60,7 +60,7 @@ try {
|
|||||||
|
|
||||||
## Documentation for API Endpoints
|
## Documentation for API Endpoints
|
||||||
|
|
||||||
All URIs are relative to *https://api.myinfomate.be*
|
All URIs are relative to *https://localhost:5001*
|
||||||
|
|
||||||
Class | Method | HTTP request | Description
|
Class | Method | HTTP request | Description
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
@ -141,8 +141,14 @@ Class | Method | HTTP request | Description
|
|||||||
- [LevelDTO](doc\/LevelDTO.md)
|
- [LevelDTO](doc\/LevelDTO.md)
|
||||||
- [LoginDTO](doc\/LoginDTO.md)
|
- [LoginDTO](doc\/LoginDTO.md)
|
||||||
- [MapDTO](doc\/MapDTO.md)
|
- [MapDTO](doc\/MapDTO.md)
|
||||||
|
- [MapDTOMapProvider](doc\/MapDTOMapProvider.md)
|
||||||
|
- [MapDTOMapType](doc\/MapDTOMapType.md)
|
||||||
|
- [MapDTOMapTypeMapbox](doc\/MapDTOMapTypeMapbox.md)
|
||||||
|
- [MapProvider](doc\/MapProvider.md)
|
||||||
- [MapTypeApp](doc\/MapTypeApp.md)
|
- [MapTypeApp](doc\/MapTypeApp.md)
|
||||||
|
- [MapTypeMapBox](doc\/MapTypeMapBox.md)
|
||||||
- [MenuDTO](doc\/MenuDTO.md)
|
- [MenuDTO](doc\/MenuDTO.md)
|
||||||
|
- [PDFFileDTO](doc\/PDFFileDTO.md)
|
||||||
- [PdfDTO](doc\/PdfDTO.md)
|
- [PdfDTO](doc\/PdfDTO.md)
|
||||||
- [PlayerMessageDTO](doc\/PlayerMessageDTO.md)
|
- [PlayerMessageDTO](doc\/PlayerMessageDTO.md)
|
||||||
- [PuzzleDTO](doc\/PuzzleDTO.md)
|
- [PuzzleDTO](doc\/PuzzleDTO.md)
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import 'package:manager_api/api.dart';
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**resourceIds** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
**resourceIds** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||||
|
**mapProvider** | [**MapDTOMapProvider**](MapDTOMapProvider.md) | | [optional]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,9 @@ import 'package:manager_api/api.dart';
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**zoom** | **int** | | [optional]
|
**zoom** | **int** | | [optional]
|
||||||
**mapType** | [**MapTypeApp**](MapTypeApp.md) | | [optional]
|
**mapType** | [**MapDTOMapType**](MapDTOMapType.md) | | [optional]
|
||||||
|
**mapTypeMapbox** | [**MapDTOMapTypeMapbox**](MapDTOMapTypeMapbox.md) | | [optional]
|
||||||
|
**mapProvider** | [**MapDTOMapProvider**](MapDTOMapProvider.md) | | [optional]
|
||||||
**points** | [**List<GeoPointDTO>**](GeoPointDTO.md) | | [optional] [default to const []]
|
**points** | [**List<GeoPointDTO>**](GeoPointDTO.md) | | [optional] [default to const []]
|
||||||
**iconResourceId** | **String** | | [optional]
|
**iconResourceId** | **String** | | [optional]
|
||||||
**iconSource** | **String** | | [optional]
|
**iconSource** | **String** | | [optional]
|
||||||
|
|||||||
14
manager_api/doc/MapDTOMapProvider.md
Normal file
14
manager_api/doc/MapDTOMapProvider.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# manager_api.model.MapDTOMapProvider
|
||||||
|
|
||||||
|
## Load the model package
|
||||||
|
```dart
|
||||||
|
import 'package:manager_api/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)
|
||||||
|
|
||||||
|
|
||||||
14
manager_api/doc/MapDTOMapType.md
Normal file
14
manager_api/doc/MapDTOMapType.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# manager_api.model.MapDTOMapType
|
||||||
|
|
||||||
|
## Load the model package
|
||||||
|
```dart
|
||||||
|
import 'package:manager_api/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)
|
||||||
|
|
||||||
|
|
||||||
14
manager_api/doc/MapDTOMapTypeMapbox.md
Normal file
14
manager_api/doc/MapDTOMapTypeMapbox.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# manager_api.model.MapDTOMapTypeMapbox
|
||||||
|
|
||||||
|
## Load the model package
|
||||||
|
```dart
|
||||||
|
import 'package:manager_api/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)
|
||||||
|
|
||||||
|
|
||||||
14
manager_api/doc/MapProvider.md
Normal file
14
manager_api/doc/MapProvider.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# manager_api.model.MapProvider
|
||||||
|
|
||||||
|
## Load the model package
|
||||||
|
```dart
|
||||||
|
import 'package:manager_api/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)
|
||||||
|
|
||||||
|
|
||||||
14
manager_api/doc/MapTypeMapBox.md
Normal file
14
manager_api/doc/MapTypeMapBox.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# manager_api.model.MapTypeMapBox
|
||||||
|
|
||||||
|
## Load the model package
|
||||||
|
```dart
|
||||||
|
import 'package:manager_api/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)
|
||||||
|
|
||||||
|
|
||||||
16
manager_api/doc/PDFFileDTO.md
Normal file
16
manager_api/doc/PDFFileDTO.md
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# manager_api.model.PDFFileDTO
|
||||||
|
|
||||||
|
## Load the model package
|
||||||
|
```dart
|
||||||
|
import 'package:manager_api/api.dart';
|
||||||
|
```
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**pdfFilesAndTitles** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [optional] [default to const []]
|
||||||
|
**order** | **int** | | [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)
|
||||||
|
|
||||||
|
|
||||||
@ -8,8 +8,7 @@ import 'package:manager_api/api.dart';
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**resourceId** | **String** | | [optional]
|
**pdfs** | [**List<PDFFileDTO>**](PDFFileDTO.md) | | [optional] [default to const []]
|
||||||
**resourceUrl** | **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)
|
||||||
|
|
||||||
|
|||||||
@ -53,8 +53,14 @@ part 'model/instance_dto.dart';
|
|||||||
part 'model/level_dto.dart';
|
part 'model/level_dto.dart';
|
||||||
part 'model/login_dto.dart';
|
part 'model/login_dto.dart';
|
||||||
part 'model/map_dto.dart';
|
part 'model/map_dto.dart';
|
||||||
|
part 'model/map_dto_map_provider.dart';
|
||||||
|
part 'model/map_dto_map_type.dart';
|
||||||
|
part 'model/map_dto_map_type_mapbox.dart';
|
||||||
|
part 'model/map_provider.dart';
|
||||||
part 'model/map_type_app.dart';
|
part 'model/map_type_app.dart';
|
||||||
|
part 'model/map_type_map_box.dart';
|
||||||
part 'model/menu_dto.dart';
|
part 'model/menu_dto.dart';
|
||||||
|
part 'model/pdf_file_dto.dart';
|
||||||
part 'model/pdf_dto.dart';
|
part 'model/pdf_dto.dart';
|
||||||
part 'model/player_message_dto.dart';
|
part 'model/player_message_dto.dart';
|
||||||
part 'model/puzzle_dto.dart';
|
part 'model/puzzle_dto.dart';
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
part of openapi.api;
|
part of openapi.api;
|
||||||
|
|
||||||
class ApiClient {
|
class ApiClient {
|
||||||
ApiClient({this.basePath = 'https://api.myinfomate.be', this.authentication,});
|
ApiClient({this.basePath = 'https://localhost:5001', this.authentication,});
|
||||||
|
|
||||||
final String basePath;
|
final String basePath;
|
||||||
final Authentication? authentication;
|
final Authentication? authentication;
|
||||||
@ -217,10 +217,22 @@ class ApiClient {
|
|||||||
return LoginDTO.fromJson(value);
|
return LoginDTO.fromJson(value);
|
||||||
case 'MapDTO':
|
case 'MapDTO':
|
||||||
return MapDTO.fromJson(value);
|
return MapDTO.fromJson(value);
|
||||||
|
case 'MapDTOMapProvider':
|
||||||
|
return MapDTOMapProvider.fromJson(value);
|
||||||
|
case 'MapDTOMapType':
|
||||||
|
return MapDTOMapType.fromJson(value);
|
||||||
|
case 'MapDTOMapTypeMapbox':
|
||||||
|
return MapDTOMapTypeMapbox.fromJson(value);
|
||||||
|
case 'MapProvider':
|
||||||
|
return MapProviderTypeTransformer().decode(value);
|
||||||
case 'MapTypeApp':
|
case 'MapTypeApp':
|
||||||
return MapTypeAppTypeTransformer().decode(value);
|
return MapTypeAppTypeTransformer().decode(value);
|
||||||
|
case 'MapTypeMapBox':
|
||||||
|
return MapTypeMapBoxTypeTransformer().decode(value);
|
||||||
case 'MenuDTO':
|
case 'MenuDTO':
|
||||||
return MenuDTO.fromJson(value);
|
return MenuDTO.fromJson(value);
|
||||||
|
case 'PDFFileDTO':
|
||||||
|
return PDFFileDTO.fromJson(value);
|
||||||
case 'PdfDTO':
|
case 'PdfDTO':
|
||||||
return PdfDTO.fromJson(value);
|
return PdfDTO.fromJson(value);
|
||||||
case 'PlayerMessageDTO':
|
case 'PlayerMessageDTO':
|
||||||
|
|||||||
@ -55,9 +55,15 @@ String parameterToString(dynamic value) {
|
|||||||
if (value is DateTime) {
|
if (value is DateTime) {
|
||||||
return value.toUtc().toIso8601String();
|
return value.toUtc().toIso8601String();
|
||||||
}
|
}
|
||||||
|
if (value is MapProvider) {
|
||||||
|
return MapProviderTypeTransformer().encode(value).toString();
|
||||||
|
}
|
||||||
if (value is MapTypeApp) {
|
if (value is MapTypeApp) {
|
||||||
return MapTypeAppTypeTransformer().encode(value).toString();
|
return MapTypeAppTypeTransformer().encode(value).toString();
|
||||||
}
|
}
|
||||||
|
if (value is MapTypeMapBox) {
|
||||||
|
return MapTypeMapBoxTypeTransformer().encode(value).toString();
|
||||||
|
}
|
||||||
if (value is ResourceType) {
|
if (value is ResourceType) {
|
||||||
return ResourceTypeTypeTransformer().encode(value).toString();
|
return ResourceTypeTypeTransformer().encode(value).toString();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,21 +14,26 @@ class AgendaDTO {
|
|||||||
/// Returns a new [AgendaDTO] instance.
|
/// Returns a new [AgendaDTO] instance.
|
||||||
AgendaDTO({
|
AgendaDTO({
|
||||||
this.resourceIds = const [],
|
this.resourceIds = const [],
|
||||||
|
this.mapProvider,
|
||||||
});
|
});
|
||||||
|
|
||||||
List<TranslationDTO>? resourceIds;
|
List<TranslationDTO>? resourceIds;
|
||||||
|
|
||||||
|
MapProvider? mapProvider;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) => identical(this, other) || other is AgendaDTO &&
|
bool operator ==(Object other) => identical(this, other) || other is AgendaDTO &&
|
||||||
other.resourceIds == resourceIds;
|
other.resourceIds == resourceIds &&
|
||||||
|
other.mapProvider == mapProvider;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
// ignore: unnecessary_parenthesis
|
// ignore: unnecessary_parenthesis
|
||||||
(resourceIds == null ? 0 : resourceIds!.hashCode);
|
(resourceIds == null ? 0 : resourceIds!.hashCode) +
|
||||||
|
(mapProvider == null ? 0 : mapProvider!.hashCode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => 'AgendaDTO[resourceIds=$resourceIds]';
|
String toString() => 'AgendaDTO[resourceIds=$resourceIds, mapProvider=$mapProvider]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -37,6 +42,11 @@ class AgendaDTO {
|
|||||||
} else {
|
} else {
|
||||||
json[r'resourceIds'] = null;
|
json[r'resourceIds'] = null;
|
||||||
}
|
}
|
||||||
|
if (this.mapProvider != null) {
|
||||||
|
json[r'mapProvider'] = this.mapProvider;
|
||||||
|
} else {
|
||||||
|
json[r'mapProvider'] = null;
|
||||||
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,6 +70,7 @@ class AgendaDTO {
|
|||||||
|
|
||||||
return AgendaDTO(
|
return AgendaDTO(
|
||||||
resourceIds: TranslationDTO.listFromJson(json[r'resourceIds']),
|
resourceIds: TranslationDTO.listFromJson(json[r'resourceIds']),
|
||||||
|
mapProvider: MapProvider.fromJson(json[r'mapProvider']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@ -22,12 +22,6 @@ class GeoPointDTO {
|
|||||||
this.longitude,
|
this.longitude,
|
||||||
});
|
});
|
||||||
|
|
||||||
///
|
|
||||||
/// Please note: This property should have been non-nullable! Since the specification file
|
|
||||||
/// does not include a default value (using the "default:" property), however, the generated
|
|
||||||
/// source code must fall back to having a nullable type.
|
|
||||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
|
||||||
///
|
|
||||||
int? id;
|
int? id;
|
||||||
|
|
||||||
List<TranslationDTO>? title;
|
List<TranslationDTO>? title;
|
||||||
|
|||||||
@ -15,6 +15,8 @@ class MapDTO {
|
|||||||
MapDTO({
|
MapDTO({
|
||||||
this.zoom,
|
this.zoom,
|
||||||
this.mapType,
|
this.mapType,
|
||||||
|
this.mapTypeMapbox,
|
||||||
|
this.mapProvider,
|
||||||
this.points = const [],
|
this.points = const [],
|
||||||
this.iconResourceId,
|
this.iconResourceId,
|
||||||
this.iconSource,
|
this.iconSource,
|
||||||
@ -29,14 +31,12 @@ class MapDTO {
|
|||||||
///
|
///
|
||||||
int? zoom;
|
int? zoom;
|
||||||
|
|
||||||
///
|
|
||||||
/// Please note: This property should have been non-nullable! Since the specification file
|
|
||||||
/// does not include a default value (using the "default:" property), however, the generated
|
|
||||||
/// source code must fall back to having a nullable type.
|
|
||||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
|
||||||
///
|
|
||||||
MapTypeApp? mapType;
|
MapTypeApp? mapType;
|
||||||
|
|
||||||
|
MapTypeMapBox? mapTypeMapbox;
|
||||||
|
|
||||||
|
MapProvider? mapProvider;
|
||||||
|
|
||||||
List<GeoPointDTO>? points;
|
List<GeoPointDTO>? points;
|
||||||
|
|
||||||
String? iconResourceId;
|
String? iconResourceId;
|
||||||
@ -49,6 +49,8 @@ class MapDTO {
|
|||||||
bool operator ==(Object other) => identical(this, other) || other is MapDTO &&
|
bool operator ==(Object other) => identical(this, other) || other is MapDTO &&
|
||||||
other.zoom == zoom &&
|
other.zoom == zoom &&
|
||||||
other.mapType == mapType &&
|
other.mapType == mapType &&
|
||||||
|
other.mapTypeMapbox == mapTypeMapbox &&
|
||||||
|
other.mapProvider == mapProvider &&
|
||||||
other.points == points &&
|
other.points == points &&
|
||||||
other.iconResourceId == iconResourceId &&
|
other.iconResourceId == iconResourceId &&
|
||||||
other.iconSource == iconSource &&
|
other.iconSource == iconSource &&
|
||||||
@ -59,13 +61,15 @@ class MapDTO {
|
|||||||
// ignore: unnecessary_parenthesis
|
// ignore: unnecessary_parenthesis
|
||||||
(zoom == null ? 0 : zoom!.hashCode) +
|
(zoom == null ? 0 : zoom!.hashCode) +
|
||||||
(mapType == null ? 0 : mapType!.hashCode) +
|
(mapType == null ? 0 : mapType!.hashCode) +
|
||||||
|
(mapTypeMapbox == null ? 0 : mapTypeMapbox!.hashCode) +
|
||||||
|
(mapProvider == null ? 0 : mapProvider!.hashCode) +
|
||||||
(points == null ? 0 : points!.hashCode) +
|
(points == null ? 0 : points!.hashCode) +
|
||||||
(iconResourceId == null ? 0 : iconResourceId!.hashCode) +
|
(iconResourceId == null ? 0 : iconResourceId!.hashCode) +
|
||||||
(iconSource == null ? 0 : iconSource!.hashCode) +
|
(iconSource == null ? 0 : iconSource!.hashCode) +
|
||||||
(categories == null ? 0 : categories!.hashCode);
|
(categories == null ? 0 : categories!.hashCode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => 'MapDTO[zoom=$zoom, mapType=$mapType, points=$points, iconResourceId=$iconResourceId, iconSource=$iconSource, categories=$categories]';
|
String toString() => 'MapDTO[zoom=$zoom, mapType=$mapType, mapTypeMapbox=$mapTypeMapbox, mapProvider=$mapProvider, points=$points, iconResourceId=$iconResourceId, iconSource=$iconSource, categories=$categories]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -79,6 +83,16 @@ class MapDTO {
|
|||||||
} else {
|
} else {
|
||||||
json[r'mapType'] = null;
|
json[r'mapType'] = null;
|
||||||
}
|
}
|
||||||
|
if (this.mapTypeMapbox != null) {
|
||||||
|
json[r'mapTypeMapbox'] = this.mapTypeMapbox;
|
||||||
|
} else {
|
||||||
|
json[r'mapTypeMapbox'] = null;
|
||||||
|
}
|
||||||
|
if (this.mapProvider != null) {
|
||||||
|
json[r'mapProvider'] = this.mapProvider;
|
||||||
|
} else {
|
||||||
|
json[r'mapProvider'] = null;
|
||||||
|
}
|
||||||
if (this.points != null) {
|
if (this.points != null) {
|
||||||
json[r'points'] = this.points;
|
json[r'points'] = this.points;
|
||||||
} else {
|
} else {
|
||||||
@ -123,6 +137,8 @@ class MapDTO {
|
|||||||
return MapDTO(
|
return MapDTO(
|
||||||
zoom: mapValueOfType<int>(json, r'zoom'),
|
zoom: mapValueOfType<int>(json, r'zoom'),
|
||||||
mapType: MapTypeApp.fromJson(json[r'mapType']),
|
mapType: MapTypeApp.fromJson(json[r'mapType']),
|
||||||
|
mapTypeMapbox: MapTypeMapBox.fromJson(json[r'mapTypeMapbox']),
|
||||||
|
mapProvider: MapProvider.fromJson(json[r'mapProvider']),
|
||||||
points: GeoPointDTO.listFromJson(json[r'points']),
|
points: GeoPointDTO.listFromJson(json[r'points']),
|
||||||
iconResourceId: mapValueOfType<String>(json, r'iconResourceId'),
|
iconResourceId: mapValueOfType<String>(json, r'iconResourceId'),
|
||||||
iconSource: mapValueOfType<String>(json, r'iconSource'),
|
iconSource: mapValueOfType<String>(json, r'iconSource'),
|
||||||
|
|||||||
96
manager_api/lib/model/map_dto_map_provider.dart
Normal file
96
manager_api/lib/model/map_dto_map_provider.dart
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.12
|
||||||
|
|
||||||
|
// ignore_for_file: unused_element, unused_import
|
||||||
|
// ignore_for_file: always_put_required_named_parameters_first
|
||||||
|
// ignore_for_file: constant_identifier_names
|
||||||
|
// ignore_for_file: lines_longer_than_80_chars
|
||||||
|
|
||||||
|
part of openapi.api;
|
||||||
|
|
||||||
|
class MapDTOMapProvider {
|
||||||
|
/// Returns a new [MapDTOMapProvider] instance.
|
||||||
|
MapDTOMapProvider();
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) => identical(this, other) || other is MapDTOMapProvider;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => 'MapDTOMapProvider[]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [MapDTOMapProvider] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static MapDTOMapProvider? fromJson(dynamic value) {
|
||||||
|
if (value is Map) {
|
||||||
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
|
// Ensure that the map contains the required keys.
|
||||||
|
// Note 1: the values aren't checked for validity beyond being non-null.
|
||||||
|
// Note 2: this code is stripped in release mode!
|
||||||
|
assert(() {
|
||||||
|
requiredKeys.forEach((key) {
|
||||||
|
assert(json.containsKey(key), 'Required key "MapDTOMapProvider[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null, 'Required key "MapDTOMapProvider[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return MapDTOMapProvider(
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<MapDTOMapProvider> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final result = <MapDTOMapProvider>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = MapDTOMapProvider.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, MapDTOMapProvider> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, MapDTOMapProvider>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = MapDTOMapProvider.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of MapDTOMapProvider-objects as value to a dart map
|
||||||
|
static Map<String, List<MapDTOMapProvider>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final map = <String, List<MapDTOMapProvider>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = MapDTOMapProvider.listFromJson(entry.value, growable: growable,);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
96
manager_api/lib/model/map_dto_map_type.dart
Normal file
96
manager_api/lib/model/map_dto_map_type.dart
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.12
|
||||||
|
|
||||||
|
// ignore_for_file: unused_element, unused_import
|
||||||
|
// ignore_for_file: always_put_required_named_parameters_first
|
||||||
|
// ignore_for_file: constant_identifier_names
|
||||||
|
// ignore_for_file: lines_longer_than_80_chars
|
||||||
|
|
||||||
|
part of openapi.api;
|
||||||
|
|
||||||
|
class MapDTOMapType {
|
||||||
|
/// Returns a new [MapDTOMapType] instance.
|
||||||
|
MapDTOMapType();
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) => identical(this, other) || other is MapDTOMapType;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => 'MapDTOMapType[]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [MapDTOMapType] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static MapDTOMapType? fromJson(dynamic value) {
|
||||||
|
if (value is Map) {
|
||||||
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
|
// Ensure that the map contains the required keys.
|
||||||
|
// Note 1: the values aren't checked for validity beyond being non-null.
|
||||||
|
// Note 2: this code is stripped in release mode!
|
||||||
|
assert(() {
|
||||||
|
requiredKeys.forEach((key) {
|
||||||
|
assert(json.containsKey(key), 'Required key "MapDTOMapType[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null, 'Required key "MapDTOMapType[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return MapDTOMapType(
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<MapDTOMapType> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final result = <MapDTOMapType>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = MapDTOMapType.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, MapDTOMapType> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, MapDTOMapType>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = MapDTOMapType.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of MapDTOMapType-objects as value to a dart map
|
||||||
|
static Map<String, List<MapDTOMapType>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final map = <String, List<MapDTOMapType>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = MapDTOMapType.listFromJson(entry.value, growable: growable,);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
96
manager_api/lib/model/map_dto_map_type_mapbox.dart
Normal file
96
manager_api/lib/model/map_dto_map_type_mapbox.dart
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.12
|
||||||
|
|
||||||
|
// ignore_for_file: unused_element, unused_import
|
||||||
|
// ignore_for_file: always_put_required_named_parameters_first
|
||||||
|
// ignore_for_file: constant_identifier_names
|
||||||
|
// ignore_for_file: lines_longer_than_80_chars
|
||||||
|
|
||||||
|
part of openapi.api;
|
||||||
|
|
||||||
|
class MapDTOMapTypeMapbox {
|
||||||
|
/// Returns a new [MapDTOMapTypeMapbox] instance.
|
||||||
|
MapDTOMapTypeMapbox();
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) => identical(this, other) || other is MapDTOMapTypeMapbox;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => 'MapDTOMapTypeMapbox[]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [MapDTOMapTypeMapbox] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static MapDTOMapTypeMapbox? fromJson(dynamic value) {
|
||||||
|
if (value is Map) {
|
||||||
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
|
// Ensure that the map contains the required keys.
|
||||||
|
// Note 1: the values aren't checked for validity beyond being non-null.
|
||||||
|
// Note 2: this code is stripped in release mode!
|
||||||
|
assert(() {
|
||||||
|
requiredKeys.forEach((key) {
|
||||||
|
assert(json.containsKey(key), 'Required key "MapDTOMapTypeMapbox[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null, 'Required key "MapDTOMapTypeMapbox[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return MapDTOMapTypeMapbox(
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<MapDTOMapTypeMapbox> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final result = <MapDTOMapTypeMapbox>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = MapDTOMapTypeMapbox.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, MapDTOMapTypeMapbox> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, MapDTOMapTypeMapbox>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = MapDTOMapTypeMapbox.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of MapDTOMapTypeMapbox-objects as value to a dart map
|
||||||
|
static Map<String, List<MapDTOMapTypeMapbox>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final map = <String, List<MapDTOMapTypeMapbox>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = MapDTOMapTypeMapbox.listFromJson(entry.value, growable: growable,);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
98
manager_api/lib/model/map_provider.dart
Normal file
98
manager_api/lib/model/map_provider.dart
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.12
|
||||||
|
|
||||||
|
// ignore_for_file: unused_element, unused_import
|
||||||
|
// ignore_for_file: always_put_required_named_parameters_first
|
||||||
|
// ignore_for_file: constant_identifier_names
|
||||||
|
// ignore_for_file: lines_longer_than_80_chars
|
||||||
|
|
||||||
|
part of openapi.api;
|
||||||
|
|
||||||
|
/// 0 = Google 1 = MapBox
|
||||||
|
class MapProvider {
|
||||||
|
/// Instantiate a new enum with the provided [value].
|
||||||
|
const MapProvider._(this.value);
|
||||||
|
|
||||||
|
/// The underlying value of this enum member.
|
||||||
|
final int value;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => value.toString();
|
||||||
|
|
||||||
|
int toJson() => value;
|
||||||
|
|
||||||
|
static const Google = MapProvider._(0);
|
||||||
|
static const MapBox = MapProvider._(1);
|
||||||
|
|
||||||
|
/// List of all possible values in this [enum][MapProvider].
|
||||||
|
static const values = <MapProvider>[
|
||||||
|
Google,
|
||||||
|
MapBox,
|
||||||
|
];
|
||||||
|
|
||||||
|
static MapProvider? fromJson(dynamic value) => MapProviderTypeTransformer().decode(value);
|
||||||
|
|
||||||
|
static List<MapProvider> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final result = <MapProvider>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = MapProvider.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Transformation class that can [encode] an instance of [MapProvider] to int,
|
||||||
|
/// and [decode] dynamic data back to [MapProvider].
|
||||||
|
class MapProviderTypeTransformer {
|
||||||
|
factory MapProviderTypeTransformer() => _instance ??= const MapProviderTypeTransformer._();
|
||||||
|
|
||||||
|
const MapProviderTypeTransformer._();
|
||||||
|
|
||||||
|
int encode(MapProvider data) => data.value;
|
||||||
|
|
||||||
|
/// Decodes a [dynamic value][data] to a MapProvider.
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
MapProvider? decode(dynamic data, {bool allowNull = true}) {
|
||||||
|
if (data != null) {
|
||||||
|
if(data.runtimeType == String) {
|
||||||
|
switch (data.toString().toLowerCase()) {
|
||||||
|
case r'google': return MapProvider.Google;
|
||||||
|
case r'mapbox': return MapProvider.MapBox;
|
||||||
|
default:
|
||||||
|
if (!allowNull) {
|
||||||
|
throw ArgumentError('Unknown enum value to decode: $data');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if(data.runtimeType == int) {
|
||||||
|
switch (data) {
|
||||||
|
case 0: return MapProvider.Google;
|
||||||
|
case 1: return MapProvider.MapBox;
|
||||||
|
default:
|
||||||
|
if (!allowNull) {
|
||||||
|
throw ArgumentError('Unknown enum value to decode: $data');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Singleton [MapProviderTypeTransformer] instance.
|
||||||
|
static MapProviderTypeTransformer? _instance;
|
||||||
|
}
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ class MapTypeAppTypeTransformer {
|
|||||||
/// The [allowNull] is very handy when an API changes and a new enum value is added or removed,
|
/// 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.
|
/// and users are still using an old app with the old code.
|
||||||
MapTypeApp? decode(dynamic data, {bool allowNull = true}) {
|
MapTypeApp? decode(dynamic data, {bool allowNull = true}) {
|
||||||
if (data != null) {
|
/*if (data != null) {
|
||||||
switch (data.toString()) {
|
switch (data.toString()) {
|
||||||
case r'None': return MapTypeApp.none;
|
case r'None': return MapTypeApp.none;
|
||||||
case r'Normal': return MapTypeApp.normal;
|
case r'Normal': return MapTypeApp.normal;
|
||||||
@ -84,7 +84,7 @@ class MapTypeAppTypeTransformer {
|
|||||||
throw ArgumentError('Unknown enum value to decode: $data');
|
throw ArgumentError('Unknown enum value to decode: $data');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
if(data.runtimeType == String) {
|
if(data.runtimeType == String) {
|
||||||
switch (data.toString()) {
|
switch (data.toString()) {
|
||||||
@ -113,7 +113,6 @@ class MapTypeAppTypeTransformer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
119
manager_api/lib/model/map_type_map_box.dart
Normal file
119
manager_api/lib/model/map_type_map_box.dart
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.12
|
||||||
|
|
||||||
|
// ignore_for_file: unused_element, unused_import
|
||||||
|
// ignore_for_file: always_put_required_named_parameters_first
|
||||||
|
// ignore_for_file: constant_identifier_names
|
||||||
|
// ignore_for_file: lines_longer_than_80_chars
|
||||||
|
|
||||||
|
part of openapi.api;
|
||||||
|
|
||||||
|
/// 0 = standard 1 = streets 2 = outdoors 3 = light 4 = dark 5 = satellite 6 = satellite_streets
|
||||||
|
class MapTypeMapBox {
|
||||||
|
/// Instantiate a new enum with the provided [value].
|
||||||
|
const MapTypeMapBox._(this.value);
|
||||||
|
|
||||||
|
/// The underlying value of this enum member.
|
||||||
|
final int value;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => value.toString();
|
||||||
|
|
||||||
|
int toJson() => value;
|
||||||
|
|
||||||
|
static const standard = MapTypeMapBox._(0);
|
||||||
|
static const streets = MapTypeMapBox._(1);
|
||||||
|
static const outdoors = MapTypeMapBox._(2);
|
||||||
|
static const light = MapTypeMapBox._(3);
|
||||||
|
static const dark = MapTypeMapBox._(4);
|
||||||
|
static const satellite = MapTypeMapBox._(5);
|
||||||
|
static const satellite_streets = MapTypeMapBox._(6);
|
||||||
|
|
||||||
|
/// List of all possible values in this [enum][MapTypeMapBox].
|
||||||
|
static const values = <MapTypeMapBox>[
|
||||||
|
standard,
|
||||||
|
streets,
|
||||||
|
outdoors,
|
||||||
|
light,
|
||||||
|
dark,
|
||||||
|
satellite,
|
||||||
|
satellite_streets,
|
||||||
|
];
|
||||||
|
|
||||||
|
static MapTypeMapBox? fromJson(dynamic value) => MapTypeMapBoxTypeTransformer().decode(value);
|
||||||
|
|
||||||
|
static List<MapTypeMapBox> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final result = <MapTypeMapBox>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = MapTypeMapBox.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Transformation class that can [encode] an instance of [MapTypeMapBox] to int,
|
||||||
|
/// and [decode] dynamic data back to [MapTypeMapBox].
|
||||||
|
class MapTypeMapBoxTypeTransformer {
|
||||||
|
factory MapTypeMapBoxTypeTransformer() => _instance ??= const MapTypeMapBoxTypeTransformer._();
|
||||||
|
|
||||||
|
const MapTypeMapBoxTypeTransformer._();
|
||||||
|
|
||||||
|
int encode(MapTypeMapBox data) => data.value;
|
||||||
|
|
||||||
|
/// Decodes a [dynamic value][data] to a MapTypeMapBox.
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
MapTypeMapBox? decode(dynamic data, {bool allowNull = true}) {
|
||||||
|
if (data != null) {
|
||||||
|
if(data.runtimeType == String) {
|
||||||
|
switch (data.toString().toLowerCase()) {
|
||||||
|
case r'standard': return MapTypeMapBox.standard;
|
||||||
|
case r'streets': return MapTypeMapBox.streets;
|
||||||
|
case r'outdoors': return MapTypeMapBox.outdoors;
|
||||||
|
case r'light': return MapTypeMapBox.light;
|
||||||
|
case r'dark': return MapTypeMapBox.dark;
|
||||||
|
case r'satellite': return MapTypeMapBox.satellite;
|
||||||
|
case r'satellite_streets': return MapTypeMapBox.satellite_streets;
|
||||||
|
default:
|
||||||
|
if (!allowNull) {
|
||||||
|
throw ArgumentError('Unknown enum value to decode: $data');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if(data.runtimeType == int) {
|
||||||
|
switch (data) {
|
||||||
|
case 0: return MapTypeMapBox.standard;
|
||||||
|
case 1: return MapTypeMapBox.streets;
|
||||||
|
case 2: return MapTypeMapBox.outdoors;
|
||||||
|
case 3: return MapTypeMapBox.light;
|
||||||
|
case 4: return MapTypeMapBox.dark;
|
||||||
|
case 5: return MapTypeMapBox.satellite;
|
||||||
|
case 6: return MapTypeMapBox.satellite_streets;
|
||||||
|
default:
|
||||||
|
if (!allowNull) {
|
||||||
|
throw ArgumentError('Unknown enum value to decode: $data');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Singleton [MapTypeMapBoxTypeTransformer] instance.
|
||||||
|
static MapTypeMapBoxTypeTransformer? _instance;
|
||||||
|
}
|
||||||
|
|
||||||
@ -13,39 +13,29 @@ part of openapi.api;
|
|||||||
class PdfDTO {
|
class PdfDTO {
|
||||||
/// Returns a new [PdfDTO] instance.
|
/// Returns a new [PdfDTO] instance.
|
||||||
PdfDTO({
|
PdfDTO({
|
||||||
this.resourceId,
|
this.pdfs = const [],
|
||||||
this.resourceUrl,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
String? resourceId;
|
List<PDFFileDTO>? pdfs;
|
||||||
|
|
||||||
String? resourceUrl;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) => identical(this, other) || other is PdfDTO &&
|
bool operator ==(Object other) => identical(this, other) || other is PdfDTO &&
|
||||||
other.resourceId == resourceId &&
|
other.pdfs == pdfs;
|
||||||
other.resourceUrl == resourceUrl;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
// ignore: unnecessary_parenthesis
|
// ignore: unnecessary_parenthesis
|
||||||
(resourceId == null ? 0 : resourceId!.hashCode) +
|
(pdfs == null ? 0 : pdfs!.hashCode);
|
||||||
(resourceUrl == null ? 0 : resourceUrl!.hashCode);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => 'PdfDTO[resourceId=$resourceId, resourceUrl=$resourceUrl]';
|
String toString() => 'PdfDTO[pdfs=$pdfs]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
if (this.resourceId != null) {
|
if (this.pdfs != null) {
|
||||||
json[r'resourceId'] = this.resourceId;
|
json[r'pdfs'] = this.pdfs;
|
||||||
} else {
|
} else {
|
||||||
json[r'resourceId'] = null;
|
json[r'pdfs'] = null;
|
||||||
}
|
|
||||||
if (this.resourceUrl != null) {
|
|
||||||
json[r'resourceUrl'] = this.resourceUrl;
|
|
||||||
} else {
|
|
||||||
json[r'resourceUrl'] = null;
|
|
||||||
}
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
@ -69,8 +59,7 @@ class PdfDTO {
|
|||||||
}());
|
}());
|
||||||
|
|
||||||
return PdfDTO(
|
return PdfDTO(
|
||||||
resourceId: mapValueOfType<String>(json, r'resourceId'),
|
pdfs: PDFFileDTO.listFromJson(json[r'pdfs']),
|
||||||
resourceUrl: mapValueOfType<String>(json, r'resourceUrl'),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
123
manager_api/lib/model/pdf_file_dto.dart
Normal file
123
manager_api/lib/model/pdf_file_dto.dart
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.12
|
||||||
|
|
||||||
|
// ignore_for_file: unused_element, unused_import
|
||||||
|
// ignore_for_file: always_put_required_named_parameters_first
|
||||||
|
// ignore_for_file: constant_identifier_names
|
||||||
|
// ignore_for_file: lines_longer_than_80_chars
|
||||||
|
|
||||||
|
part of openapi.api;
|
||||||
|
|
||||||
|
class PDFFileDTO {
|
||||||
|
/// Returns a new [PDFFileDTO] instance.
|
||||||
|
PDFFileDTO({
|
||||||
|
this.pdfFilesAndTitles = const [],
|
||||||
|
this.order,
|
||||||
|
});
|
||||||
|
|
||||||
|
List<TranslationAndResourceDTO>? pdfFilesAndTitles;
|
||||||
|
|
||||||
|
int? order;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) => identical(this, other) || other is PDFFileDTO &&
|
||||||
|
other.pdfFilesAndTitles == pdfFilesAndTitles &&
|
||||||
|
other.order == order;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(pdfFilesAndTitles == null ? 0 : pdfFilesAndTitles!.hashCode) +
|
||||||
|
(order == null ? 0 : order!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => 'PDFFileDTO[pdfFilesAndTitles=$pdfFilesAndTitles, order=$order]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
if (this.pdfFilesAndTitles != null) {
|
||||||
|
json[r'pdfFilesAndTitles'] = this.pdfFilesAndTitles;
|
||||||
|
} else {
|
||||||
|
json[r'pdfFilesAndTitles'] = null;
|
||||||
|
}
|
||||||
|
if (this.order != null) {
|
||||||
|
json[r'order'] = this.order;
|
||||||
|
} else {
|
||||||
|
json[r'order'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [PDFFileDTO] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static PDFFileDTO? fromJson(dynamic value) {
|
||||||
|
if (value is Map) {
|
||||||
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
|
// Ensure that the map contains the required keys.
|
||||||
|
// Note 1: the values aren't checked for validity beyond being non-null.
|
||||||
|
// Note 2: this code is stripped in release mode!
|
||||||
|
assert(() {
|
||||||
|
requiredKeys.forEach((key) {
|
||||||
|
assert(json.containsKey(key), 'Required key "PDFFileDTO[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null, 'Required key "PDFFileDTO[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return PDFFileDTO(
|
||||||
|
pdfFilesAndTitles: TranslationAndResourceDTO.listFromJson(json[r'pdfFilesAndTitles']),
|
||||||
|
order: mapValueOfType<int>(json, r'order'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<PDFFileDTO> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final result = <PDFFileDTO>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = PDFFileDTO.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, PDFFileDTO> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, PDFFileDTO>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = PDFFileDTO.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of PDFFileDTO-objects as value to a dart map
|
||||||
|
static Map<String, List<PDFFileDTO>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final map = <String, List<PDFFileDTO>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = PDFFileDTO.listFromJson(entry.value, growable: growable,);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
22
manager_api/test/map_dto_map_provider_test.dart
Normal file
22
manager_api/test/map_dto_map_provider_test.dart
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.12
|
||||||
|
|
||||||
|
// ignore_for_file: unused_element, unused_import
|
||||||
|
// ignore_for_file: always_put_required_named_parameters_first
|
||||||
|
// ignore_for_file: constant_identifier_names
|
||||||
|
// ignore_for_file: lines_longer_than_80_chars
|
||||||
|
|
||||||
|
import 'package:manager_api/api.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
|
// tests for MapDTOMapProvider
|
||||||
|
void main() {
|
||||||
|
// final instance = MapDTOMapProvider();
|
||||||
|
|
||||||
|
group('test MapDTOMapProvider', () {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
22
manager_api/test/map_dto_map_type_mapbox_test.dart
Normal file
22
manager_api/test/map_dto_map_type_mapbox_test.dart
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.12
|
||||||
|
|
||||||
|
// ignore_for_file: unused_element, unused_import
|
||||||
|
// ignore_for_file: always_put_required_named_parameters_first
|
||||||
|
// ignore_for_file: constant_identifier_names
|
||||||
|
// ignore_for_file: lines_longer_than_80_chars
|
||||||
|
|
||||||
|
import 'package:manager_api/api.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
|
// tests for MapDTOMapTypeMapbox
|
||||||
|
void main() {
|
||||||
|
// final instance = MapDTOMapTypeMapbox();
|
||||||
|
|
||||||
|
group('test MapDTOMapTypeMapbox', () {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
22
manager_api/test/map_dto_map_type_test.dart
Normal file
22
manager_api/test/map_dto_map_type_test.dart
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.12
|
||||||
|
|
||||||
|
// ignore_for_file: unused_element, unused_import
|
||||||
|
// ignore_for_file: always_put_required_named_parameters_first
|
||||||
|
// ignore_for_file: constant_identifier_names
|
||||||
|
// ignore_for_file: lines_longer_than_80_chars
|
||||||
|
|
||||||
|
import 'package:manager_api/api.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
|
// tests for MapDTOMapType
|
||||||
|
void main() {
|
||||||
|
// final instance = MapDTOMapType();
|
||||||
|
|
||||||
|
group('test MapDTOMapType', () {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
21
manager_api/test/map_provider_test.dart
Normal file
21
manager_api/test/map_provider_test.dart
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.12
|
||||||
|
|
||||||
|
// ignore_for_file: unused_element, unused_import
|
||||||
|
// ignore_for_file: always_put_required_named_parameters_first
|
||||||
|
// ignore_for_file: constant_identifier_names
|
||||||
|
// ignore_for_file: lines_longer_than_80_chars
|
||||||
|
|
||||||
|
import 'package:manager_api/api.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
|
// tests for MapProvider
|
||||||
|
void main() {
|
||||||
|
|
||||||
|
group('test MapProvider', () {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
21
manager_api/test/map_type_map_box_test.dart
Normal file
21
manager_api/test/map_type_map_box_test.dart
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.12
|
||||||
|
|
||||||
|
// ignore_for_file: unused_element, unused_import
|
||||||
|
// ignore_for_file: always_put_required_named_parameters_first
|
||||||
|
// ignore_for_file: constant_identifier_names
|
||||||
|
// ignore_for_file: lines_longer_than_80_chars
|
||||||
|
|
||||||
|
import 'package:manager_api/api.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
|
// tests for MapTypeMapBox
|
||||||
|
void main() {
|
||||||
|
|
||||||
|
group('test MapTypeMapBox', () {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
32
manager_api/test/pdf_file_dto_test.dart
Normal file
32
manager_api/test/pdf_file_dto_test.dart
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.12
|
||||||
|
|
||||||
|
// ignore_for_file: unused_element, unused_import
|
||||||
|
// ignore_for_file: always_put_required_named_parameters_first
|
||||||
|
// ignore_for_file: constant_identifier_names
|
||||||
|
// ignore_for_file: lines_longer_than_80_chars
|
||||||
|
|
||||||
|
import 'package:manager_api/api.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
|
// tests for PDFFileDTO
|
||||||
|
void main() {
|
||||||
|
// final instance = PDFFileDTO();
|
||||||
|
|
||||||
|
group('test PDFFileDTO', () {
|
||||||
|
// List<TranslationAndResourceDTO> pdfFilesAndTitles (default value: const [])
|
||||||
|
test('to test the property `pdfFilesAndTitles`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// int order
|
||||||
|
test('to test the property `order`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user