浏览代码

Remove implementing PreferredSizeWidget in FadingAppBar

ashilkn 2 年之前
父节点
当前提交
745b511d69
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      lib/ui/viewer/file/fading_app_bar.dart

+ 1 - 4
lib/ui/viewer/file/fading_app_bar.dart

@@ -30,7 +30,7 @@ import 'package:photos/utils/file_util.dart';
 import "package:photos/utils/magic_util.dart";
 import "package:photos/utils/magic_util.dart";
 import 'package:photos/utils/toast_util.dart';
 import 'package:photos/utils/toast_util.dart';
 
 
-class FadingAppBar extends StatefulWidget implements PreferredSizeWidget {
+class FadingAppBar extends StatefulWidget {
   final File file;
   final File file;
   final Function(File) onFileRemoved;
   final Function(File) onFileRemoved;
   final double height;
   final double height;
@@ -48,9 +48,6 @@ class FadingAppBar extends StatefulWidget implements PreferredSizeWidget {
     Key? key,
     Key? key,
   }) : super(key: key);
   }) : super(key: key);
 
 
-  @override
-  Size get preferredSize => Size.fromHeight(height);
-
   @override
   @override
   FadingAppBarState createState() => FadingAppBarState();
   FadingAppBarState createState() => FadingAppBarState();
 }
 }