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
|
||||
SectionDTO? sectionSelected;
|
||||
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;
|
||||
int rowCount = 4;
|
||||
|
||||
@ -75,7 +75,7 @@ class _MainViewWidget extends State<MainViewWidget> {
|
||||
|
||||
//setState(() {
|
||||
//_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() {
|
||||
var options = <mapBox.PointAnnotationOptions>[];
|
||||
int i = 0;
|
||||
pointsToShow!.forEach((point) {
|
||||
var textSansHTML = parse(point.title!.firstWhere((translation) => translation.language == widget.language).value);
|
||||
var mapMarker = new MapMarker(
|
||||
id: point.id,
|
||||
id: i,
|
||||
title: parse(textSansHTML.body!.text).documentElement!.text,
|
||||
description: point.description!.firstWhere((translation) => translation.language == widget.language).value,
|
||||
longitude: point.longitude,
|
||||
@ -67,7 +68,6 @@ class _MapBoxViewState extends State<MapBoxView> {
|
||||
contents: point.contents
|
||||
);
|
||||
markersList.add(mapMarker);
|
||||
print(widget.selectedMarkerIcon);
|
||||
options.add(mapBox.PointAnnotationOptions(
|
||||
geometry: mapBox.Point(
|
||||
coordinates: mapBox.Position(
|
||||
@ -75,7 +75,7 @@ class _MapBoxViewState extends State<MapBoxView> {
|
||||
double.tryParse(mapMarker.latitude!)!,
|
||||
)).toJson(),
|
||||
iconSize: 1.3,
|
||||
textField: mapMarker.id.toString(),
|
||||
textField: i.toString(),
|
||||
textOpacity: 0.0,
|
||||
iconOffset: [0.0, 0.0],
|
||||
symbolSortKey: 10,
|
||||
@ -83,7 +83,10 @@ class _MapBoxViewState extends State<MapBoxView> {
|
||||
iconImage: null,
|
||||
image: widget.selectedMarkerIcon, //widget.selectedMarkerIcon,
|
||||
)); // ,
|
||||
|
||||
i++;
|
||||
});
|
||||
|
||||
print(options.length);
|
||||
|
||||
return options;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user