Selaa lähdekoodia

Fix possible error

Vishnu Mohandas 4 vuotta sitten
vanhempi
commit
0c86a7f29a
1 muutettua tiedostoa jossa 4 lisäystä ja 1 poistoa
  1. 4 1
      lib/ui/shared_collections_gallery.dart

+ 4 - 1
lib/ui/shared_collections_gallery.dart

@@ -208,7 +208,10 @@ class _SharedCollectionGalleryState extends State<SharedCollectionGallery> {
                     alignment: Alignment.bottomRight,
                     alignment: Alignment.bottomRight,
                     child: Container(
                     child: Container(
                       child: Text(
                       child: Text(
-                        c.collection.owner.name.substring(0, 1),
+                        c.collection.owner.name == null ||
+                                c.collection.owner.name.isEmpty
+                            ? c.collection.owner.email.substring(0, 1)
+                            : c.collection.owner.name.substring(0, 1),
                         textAlign: TextAlign.center,
                         textAlign: TextAlign.center,
                       ),
                       ),
                       padding: EdgeInsets.all(8),
                       padding: EdgeInsets.all(8),