From d257a9697b6f8e7e887637715ed6d96e797e7bd5 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sat, 24 May 2025 02:23:23 +0800 Subject: [PATCH] :zap: Remove app background resize image --- lib/widgets/app_scaffold.dart | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lib/widgets/app_scaffold.dart b/lib/widgets/app_scaffold.dart index bf21831..8155cd3 100644 --- a/lib/widgets/app_scaffold.dart +++ b/lib/widgets/app_scaffold.dart @@ -214,9 +214,6 @@ class AppBackground extends ConsumerWidget { return imageFileAsync.when( data: (file) { if (file != null) { - final devicePixelRatio = MediaQuery.of(context).devicePixelRatio; - - final size = MediaQuery.of(context).size; return Container( color: Theme.of(context).colorScheme.surface, child: Container( @@ -225,12 +222,7 @@ class AppBackground extends ConsumerWidget { color: Theme.of(context).colorScheme.surface, image: DecorationImage( opacity: 0.2, - image: ResizeImage( - FileImage(file), - width: (size.width * devicePixelRatio).round(), - height: (size.height * devicePixelRatio).round(), - policy: ResizeImagePolicy.fit, - ), + image: FileImage(file), fit: BoxFit.cover, ), ),