2026-08-05 12:00:49 -07:00
|
|
|
import 'package:flutter/foundation.dart';
|
|
|
|
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
2024-01-15 15:26:13 +00:00
|
|
|
import 'package:maplibre_gl/maplibre_gl.dart';
|
|
|
|
|
import 'package:openapi/api.dart';
|
|
|
|
|
|
2026-08-05 12:00:49 -07:00
|
|
|
part 'map_marker.model.freezed.dart';
|
2024-01-15 15:26:13 +00:00
|
|
|
|
2026-08-05 12:00:49 -07:00
|
|
|
@freezed
|
|
|
|
|
abstract class MapMarker with _$MapMarker {
|
|
|
|
|
const factory MapMarker({required LatLng latLng, required String assetRemoteId}) = _MapMarker;
|
2024-01-15 15:26:13 +00:00
|
|
|
|
2026-08-05 12:00:49 -07:00
|
|
|
factory MapMarker.fromDto(MapMarkerResponseDto dto) =>
|
|
|
|
|
MapMarker(latLng: LatLng(dto.lat, dto.lon), assetRemoteId: dto.id);
|
2024-01-15 15:26:13 +00:00
|
|
|
}
|