diff --git a/lib/screens/manage_collection_screen.dart b/lib/screens/manage_collection_screen.dart index 5119ce7..faa93b1 100644 --- a/lib/screens/manage_collection_screen.dart +++ b/lib/screens/manage_collection_screen.dart @@ -86,17 +86,21 @@ class _ManageCollectionScreenState extends State { if (result != true) return; + final trimmedDesc = descCtrl.text.trim(); + final String? description = + trimmedDesc.isEmpty ? null : trimmedDesc; + try { await CollectionService.update( collectionId: _collection.id, name: ctrl.text.trim(), - description: descCtrl.text.trim(), + description: description, ); setState(() { _collection = Collection( id: _collection.id, name: ctrl.text.trim(), - description: descCtrl.text.trim(), + description: description, ownerId: _collection.ownerId, createdAt: _collection.createdAt, role: _collection.role,