mirror of
https://bitbucket.org/FransoletThomas/tablet-app.git
synced 2025-12-06 08:31:19 +00:00
Fix date + map marker selection
This commit is contained in:
parent
e0154aae3f
commit
f9f0564b5f
@ -50,7 +50,7 @@ class _MainViewWidget extends State<MainViewWidget> {
|
|||||||
Size sizeScreen = new Size(1080.0, 1920.0); // Tablet resolution
|
Size sizeScreen = new Size(1080.0, 1920.0); // Tablet resolution
|
||||||
SectionDTO? sectionSelected;
|
SectionDTO? sectionSelected;
|
||||||
late ConfigurationDTO configurationDTO;
|
late ConfigurationDTO configurationDTO;
|
||||||
ValueNotifier<DateTime?> currentHourDate = ValueNotifier<DateTime?>(DateTime.now());
|
ValueNotifier<DateTime?> currentHourDate = ValueNotifier<DateTime?>((DateTime.now().toUtc()).add(Duration(hours: 1)));
|
||||||
late Color backgroundColor;
|
late Color backgroundColor;
|
||||||
int rowCount = 4;
|
int rowCount = 4;
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ class _MainViewWidget extends State<MainViewWidget> {
|
|||||||
|
|
||||||
//setState(() {
|
//setState(() {
|
||||||
//_timeString = formattedDateTime;
|
//_timeString = formattedDateTime;
|
||||||
valueNotifier.value = DateTime.now();
|
valueNotifier.value = (DateTime.now().toUtc()).add(Duration(hours: 1));
|
||||||
//});
|
//});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -56,10 +56,11 @@ class _MapBoxViewState extends State<MapBoxView> {
|
|||||||
|
|
||||||
createPoints() {
|
createPoints() {
|
||||||
var options = <mapBox.PointAnnotationOptions>[];
|
var options = <mapBox.PointAnnotationOptions>[];
|
||||||
|
int i = 0;
|
||||||
pointsToShow!.forEach((point) {
|
pointsToShow!.forEach((point) {
|
||||||
var textSansHTML = parse(point.title!.firstWhere((translation) => translation.language == widget.language).value);
|
var textSansHTML = parse(point.title!.firstWhere((translation) => translation.language == widget.language).value);
|
||||||
var mapMarker = new MapMarker(
|
var mapMarker = new MapMarker(
|
||||||
id: point.id,
|
id: i,
|
||||||
title: parse(textSansHTML.body!.text).documentElement!.text,
|
title: parse(textSansHTML.body!.text).documentElement!.text,
|
||||||
description: point.description!.firstWhere((translation) => translation.language == widget.language).value,
|
description: point.description!.firstWhere((translation) => translation.language == widget.language).value,
|
||||||
longitude: point.longitude,
|
longitude: point.longitude,
|
||||||
@ -67,7 +68,6 @@ class _MapBoxViewState extends State<MapBoxView> {
|
|||||||
contents: point.contents
|
contents: point.contents
|
||||||
);
|
);
|
||||||
markersList.add(mapMarker);
|
markersList.add(mapMarker);
|
||||||
print(widget.selectedMarkerIcon);
|
|
||||||
options.add(mapBox.PointAnnotationOptions(
|
options.add(mapBox.PointAnnotationOptions(
|
||||||
geometry: mapBox.Point(
|
geometry: mapBox.Point(
|
||||||
coordinates: mapBox.Position(
|
coordinates: mapBox.Position(
|
||||||
@ -75,7 +75,7 @@ class _MapBoxViewState extends State<MapBoxView> {
|
|||||||
double.tryParse(mapMarker.latitude!)!,
|
double.tryParse(mapMarker.latitude!)!,
|
||||||
)).toJson(),
|
)).toJson(),
|
||||||
iconSize: 1.3,
|
iconSize: 1.3,
|
||||||
textField: mapMarker.id.toString(),
|
textField: i.toString(),
|
||||||
textOpacity: 0.0,
|
textOpacity: 0.0,
|
||||||
iconOffset: [0.0, 0.0],
|
iconOffset: [0.0, 0.0],
|
||||||
symbolSortKey: 10,
|
symbolSortKey: 10,
|
||||||
@ -83,7 +83,10 @@ class _MapBoxViewState extends State<MapBoxView> {
|
|||||||
iconImage: null,
|
iconImage: null,
|
||||||
image: widget.selectedMarkerIcon, //widget.selectedMarkerIcon,
|
image: widget.selectedMarkerIcon, //widget.selectedMarkerIcon,
|
||||||
)); // ,
|
)); // ,
|
||||||
|
|
||||||
|
i++;
|
||||||
});
|
});
|
||||||
|
|
||||||
print(options.length);
|
print(options.length);
|
||||||
|
|
||||||
return options;
|
return options;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user