Переглянути джерело

Layout changes to quick link section in shared section

ashilkn 2 роки тому
батько
коміт
a7205222d1

+ 1 - 1
lib/ui/tabs/shared/quick_link_album_item.dart

@@ -24,7 +24,7 @@ class QuickLinkAlbumItem extends StatelessWidget {
     return GestureDetector(
       behavior: HitTestBehavior.opaque,
       child: Container(
-        margin: const EdgeInsets.fromLTRB(16, 12, 16, 12),
+        margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 4),
         child: Row(
           children: <Widget>[
             ClipRRect(

+ 26 - 18
lib/ui/tabs/shared_collections_tab.dart

@@ -205,23 +205,31 @@ class _SharedCollectionsTabState extends State<SharedCollectionsTab>
                 ],
               ),
             ),
-            if (hasQuickLinks) const SizedBox(height: 12),
-            if (hasQuickLinks)
-              SectionOptions(SectionTitle(title: S.of(context).quickLinks)),
-            if (hasQuickLinks) const SizedBox(height: 4),
-            if (hasQuickLinks)
-              ListView.builder(
-                shrinkWrap: true,
-                padding: const EdgeInsets.only(bottom: 12),
-                physics: const NeverScrollableScrollPhysics(),
-                itemBuilder: (context, index) {
-                  return QuickLinkAlbumItem(
-                    c: collections.quickLinks[index],
-                  );
-                },
-                itemCount: collections.quickLinks.length,
-              ),
-            const SizedBox(height: 48),
+            hasQuickLinks
+                ? Padding(
+                    padding: const EdgeInsets.symmetric(vertical: 8.0),
+                    child: Column(
+                      children: [
+                        SectionOptions(
+                          SectionTitle(title: S.of(context).quickLinks),
+                        ),
+                        const SizedBox(height: 2),
+                        ListView.builder(
+                          shrinkWrap: true,
+                          padding: const EdgeInsets.only(bottom: 12),
+                          physics: const NeverScrollableScrollPhysics(),
+                          itemBuilder: (context, index) {
+                            return QuickLinkAlbumItem(
+                              c: collections.quickLinks[index],
+                            );
+                          },
+                          itemCount: collections.quickLinks.length,
+                        ),
+                      ],
+                    ),
+                  )
+                : const SizedBox.shrink(),
+            const SizedBox(height: 24),
             Padding(
               padding: const EdgeInsets.symmetric(horizontal: 24.0),
               child: ButtonWidget(
@@ -233,7 +241,7 @@ class _SharedCollectionsTabState extends State<SharedCollectionsTab>
                 },
               ),
             ),
-            const SizedBox(height: 32),
+            const SizedBox(height: 44),
           ],
         ),
       ),