mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-02-02 14:56:20 +01:00
61 lines
983 B
Dart
61 lines
983 B
Dart
part of '../map_browser.dart';
|
|
|
|
@genCopyWith
|
|
@toString
|
|
class _State {
|
|
const _State({
|
|
required this.data,
|
|
this.initialPoint,
|
|
required this.markers,
|
|
this.error,
|
|
});
|
|
|
|
factory _State.init() {
|
|
return const _State(
|
|
data: [],
|
|
markers: {},
|
|
);
|
|
}
|
|
|
|
@override
|
|
String toString() => _$toString();
|
|
|
|
final List<_DataPoint> data;
|
|
final LatLng? initialPoint;
|
|
final Set<Marker> markers;
|
|
|
|
final ExceptionEvent? error;
|
|
}
|
|
|
|
abstract class _Event {
|
|
const _Event();
|
|
}
|
|
|
|
@toString
|
|
class _Init implements _Event {
|
|
const _Init();
|
|
|
|
@override
|
|
String toString() => _$toString();
|
|
}
|
|
|
|
@toString
|
|
class _SetMarkers implements _Event {
|
|
const _SetMarkers(this.markers);
|
|
|
|
@override
|
|
String toString() => _$toString();
|
|
|
|
final Set<Marker> markers;
|
|
}
|
|
|
|
@toString
|
|
class _SetError implements _Event {
|
|
const _SetError(this.error, [this.stackTrace]);
|
|
|
|
@override
|
|
String toString() => _$toString();
|
|
|
|
final Object error;
|
|
final StackTrace? stackTrace;
|
|
}
|