Add new features and update configurations for improved functionality

This commit is contained in:
ImBenji
2026-04-11 12:34:00 +01:00
parent fa4415553d
commit 0b6b604c56
125 changed files with 14119 additions and 1664 deletions
+22
View File
@@ -0,0 +1,22 @@
import 'dart:typed_data';
class Attachment {
final String name;
final String mimeType;
final Uint8List data;
final DateTime createdAt;
Attachment({
required this.name,
required this.mimeType,
required this.data,
DateTime? createdAt,
}) : createdAt = createdAt ?? DateTime.now();
bool get isImage => mimeType.startsWith('image/');
bool get isPdf => mimeType == 'application/pdf';
bool get isText => mimeType.startsWith('text/');
int get sizeInKB => (data.length / 1024).ceil();
String get displayName => name;
}