attachment.dart 370 B

1234567891011121314
  1. class Attachment {
  2. final String name;
  3. final String path;
  4. Attachment({required this.name, required this.path});
  5. String get link => 'https://kemono.su/data$path';
  6. bool get isImage => path.endsWith('.jpg') || path.endsWith('.png');
  7. factory Attachment.fromJson(Map<String, dynamic> json) => Attachment(
  8. name: json['name'],
  9. path: json['path'],
  10. );
  11. }