79 lines
2.0 KiB
Dart
79 lines
2.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:latlong2/latlong.dart';
|
|
|
|
enum ExperienceEmotion { comfort, energy, curiosity, tenderness, focus }
|
|
|
|
extension ExperienceEmotionText on ExperienceEmotion {
|
|
String get label {
|
|
return switch (this) {
|
|
ExperienceEmotion.comfort => 'уют',
|
|
ExperienceEmotion.energy => 'энергия',
|
|
ExperienceEmotion.curiosity => 'любопытство',
|
|
ExperienceEmotion.tenderness => 'нежность',
|
|
ExperienceEmotion.focus => 'собранность',
|
|
};
|
|
}
|
|
|
|
IconData get icon {
|
|
return switch (this) {
|
|
ExperienceEmotion.comfort => Icons.weekend_outlined,
|
|
ExperienceEmotion.energy => Icons.bolt_outlined,
|
|
ExperienceEmotion.curiosity => Icons.explore_outlined,
|
|
ExperienceEmotion.tenderness => Icons.spa_outlined,
|
|
ExperienceEmotion.focus => Icons.center_focus_strong_outlined,
|
|
};
|
|
}
|
|
}
|
|
|
|
class DishSignal {
|
|
const DishSignal({
|
|
required this.name,
|
|
required this.reason,
|
|
required this.texture,
|
|
});
|
|
|
|
final String name;
|
|
final String reason;
|
|
final String texture;
|
|
}
|
|
|
|
class ProfileFacet {
|
|
const ProfileFacet({required this.name, required this.value});
|
|
|
|
final String name;
|
|
final String value;
|
|
}
|
|
|
|
class ExperienceAuthor {
|
|
const ExperienceAuthor({required this.name, required this.facets});
|
|
|
|
final String name;
|
|
final List<ProfileFacet> facets;
|
|
}
|
|
|
|
class PlaceExperience {
|
|
const PlaceExperience({
|
|
required this.id,
|
|
required this.placeName,
|
|
required this.neighborhood,
|
|
required this.coordinate,
|
|
required this.emotion,
|
|
required this.intensity,
|
|
required this.context,
|
|
required this.dish,
|
|
required this.author,
|
|
required this.createdLabel,
|
|
});
|
|
|
|
final String id;
|
|
final String placeName;
|
|
final String neighborhood;
|
|
final LatLng coordinate;
|
|
final ExperienceEmotion emotion;
|
|
final int intensity;
|
|
final String context;
|
|
final DishSignal dish;
|
|
final ExperienceAuthor author;
|
|
final String createdLabel;
|
|
}
|