Files
HiddingselAppOriginal/lib/appflow/model/pois.dart
2026-02-13 15:53:22 +01:00

32 lines
1.0 KiB
Dart

import 'package:get_it/get_it.dart';
import 'package:hiddingsel_app/appflow/model/images.dart';
import 'interfaces.dart';
class PointOfInterestModel with Name {
final String name;
final String? subtitle;
final String text;
final ImageModel image;
final List<ImageModel> otherImages;
const PointOfInterestModel.withImageModel(this.name, this.subtitle, this.text, this.image, this.otherImages);
PointOfInterestModel(this.name, this.subtitle, this.text, String imageResource, List<String> otherImagesResources) : image = ImageModel(imageResource), otherImages = otherImagesResources.map((e) => ImageModel(e)).toList();
factory PointOfInterestModel.fromJson(Map<String, dynamic> json) {
return PointOfInterestModel(
json['name'] as String,
json['subtitle'] as String?,
json['text'] as String,
json['assetThumbnailImage'] as String,
(json['assetsOtherImages'] as List<dynamic>).cast<String>(),
);
}
static final List<PointOfInterestModel> values = GetIt.I<List<PointOfInterestModel>>();
}