瀏覽代碼

remove weird hero animation

ashilkn 2 年之前
父節點
當前提交
c7f559673a
共有 2 個文件被更改,包括 48 次插入54 次删除
  1. 27 30
      lib/ui/backup_folder_selection_page.dart
  2. 21 24
      lib/ui/home_widget.dart

+ 27 - 30
lib/ui/backup_folder_selection_page.dart

@@ -150,36 +150,33 @@ class _BackupFolderSelectionPageState extends State<BackupFolderSelectionPage> {
           Expanded(child: _getFolders()),
           Column(
             children: [
-              Hero(
-                tag: "select_folders",
-                child: Container(
-                  width: double.infinity,
-                  decoration: BoxDecoration(
-                    boxShadow: [
-                      BoxShadow(
-                        color: Theme.of(context).backgroundColor,
-                        blurRadius: 24,
-                        offset: const Offset(0, -8),
-                        spreadRadius: 4,
-                      )
-                    ],
-                  ),
-                  padding: widget.isOnboarding
-                      ? const EdgeInsets.only(left: 20, right: 20)
-                      : EdgeInsets.only(
-                          top: 16,
-                          left: 20,
-                          right: 20,
-                          bottom: Platform.isIOS ? 60 : 32,
-                        ),
-                  child: OutlinedButton(
-                    onPressed: _selectedDevicePathIDs.isEmpty
-                        ? null
-                        : () async {
-                            await updateFolderSettings();
-                          },
-                    child: Text(widget.buttonText),
-                  ),
+              Container(
+                width: double.infinity,
+                decoration: BoxDecoration(
+                  boxShadow: [
+                    BoxShadow(
+                      color: Theme.of(context).backgroundColor,
+                      blurRadius: 24,
+                      offset: const Offset(0, -8),
+                      spreadRadius: 4,
+                    )
+                  ],
+                ),
+                padding: widget.isOnboarding
+                    ? const EdgeInsets.only(left: 20, right: 20)
+                    : EdgeInsets.only(
+                        top: 16,
+                        left: 20,
+                        right: 20,
+                        bottom: Platform.isIOS ? 60 : 32,
+                      ),
+                child: OutlinedButton(
+                  onPressed: _selectedDevicePathIDs.isEmpty
+                      ? null
+                      : () async {
+                          await updateFolderSettings();
+                        },
+                  child: Text(widget.buttonText),
                 ),
               ),
               widget.isOnboarding

+ 21 - 24
lib/ui/home_widget.dart

@@ -505,30 +505,27 @@ class _HomeWidgetState extends State<HomeWidget> {
               .copyWith(fontFamily: 'Inter-Medium', fontSize: 16),
         ),
         Center(
-          child: Hero(
-            tag: "select_folders",
-            child: Material(
-              type: MaterialType.transparency,
-              child: Container(
-                width: double.infinity,
-                height: 64,
-                padding: const EdgeInsets.fromLTRB(20, 0, 20, 0),
-                child: GradientButton(
-                  onTap: () async {
-                    if (LocalSyncService.instance
-                        .hasGrantedLimitedPermissions()) {
-                      PhotoManager.presentLimited();
-                    } else {
-                      routeToPage(
-                        context,
-                        const BackupFolderSelectionPage(
-                          buttonText: "Start backup",
-                        ),
-                      );
-                    }
-                  },
-                  text: "Start backup",
-                ),
+          child: Material(
+            type: MaterialType.transparency,
+            child: Container(
+              width: double.infinity,
+              height: 64,
+              padding: const EdgeInsets.fromLTRB(20, 0, 20, 0),
+              child: GradientButton(
+                onTap: () async {
+                  if (LocalSyncService.instance
+                      .hasGrantedLimitedPermissions()) {
+                    PhotoManager.presentLimited();
+                  } else {
+                    routeToPage(
+                      context,
+                      const BackupFolderSelectionPage(
+                        buttonText: "Start backup",
+                      ),
+                    );
+                  }
+                },
+                text: "Start backup",
               ),
             ),
           ),