class Attachment { final String name; final String path; Attachment({required this.name, required this.path}); String get link => 'https://kemono.su/data$path'; bool get isImage => path.endsWith('.jpg') || path.endsWith('.png'); factory Attachment.fromJson(Map json) => Attachment( name: json['name'], path: json['path'], ); }