Prechádzať zdrojové kódy

feat: improve sidebar item dragged appearance (#2471)

Richard Shiue 2 rokov pred
rodič
commit
2b7282195b

+ 4 - 0
frontend/appflowy_flutter/lib/workspace/presentation/home/menu/app/section/section.dart

@@ -61,6 +61,10 @@ class ViewSection extends StatelessWidget {
             .add(ViewSectionEvent.moveView(oldIndex, index));
       },
       ignorePrimaryScrollController: true,
+      buildDraggableFeedback: (context, constraints, child) => ConstrainedBox(
+        constraints: constraints,
+        child: Material(color: Colors.transparent, child: child),
+      ),
       children: children,
     );
   }

+ 2 - 0
frontend/appflowy_flutter/lib/workspace/presentation/home/menu/menu.dart

@@ -149,6 +149,8 @@ class HomeMenu extends StatelessWidget {
                     ),
                   );
                 },
+                proxyDecorator: (child, index, animation) =>
+                    Material(color: Colors.transparent, child: child),
               );
             },
           ),