🐛 Fix share image issue

This commit is contained in:
LittleSheep 2024-12-22 00:27:18 +08:00
parent a319bd7f8c
commit 8c8ab24c9e
2 changed files with 6 additions and 2 deletions

View File

@ -17,6 +17,8 @@ import 'package:responsive_framework/responsive_framework.dart';
import 'package:screenshot/screenshot.dart'; import 'package:screenshot/screenshot.dart';
import 'package:share_plus/share_plus.dart'; import 'package:share_plus/share_plus.dart';
import 'package:styled_widget/styled_widget.dart'; import 'package:styled_widget/styled_widget.dart';
import 'package:surface/providers/config.dart';
import 'package:surface/providers/link_preview.dart';
import 'package:surface/providers/sn_network.dart'; import 'package:surface/providers/sn_network.dart';
import 'package:surface/providers/userinfo.dart'; import 'package:surface/providers/userinfo.dart';
import 'package:surface/types/post.dart'; import 'package:surface/types/post.dart';
@ -83,6 +85,8 @@ class PostItem extends StatelessWidget {
child: MultiProvider( child: MultiProvider(
providers: [ providers: [
Provider<SnNetworkProvider>(create: (_) => context.read()), Provider<SnNetworkProvider>(create: (_) => context.read()),
Provider<SnLinkPreviewProvider>(create: (_) => context.read()),
ChangeNotifierProvider<ConfigProvider>(create: (_) => context.read()),
], ],
child: ResponsiveBreakpoints.builder( child: ResponsiveBreakpoints.builder(
breakpoints: ResponsiveBreakpoints.of(context).breakpoints, breakpoints: ResponsiveBreakpoints.of(context).breakpoints,
@ -410,7 +414,7 @@ class PostShareImageWidget extends StatelessWidget {
size: Size(28, 28), size: Size(28, 28),
), ),
eyeStyle: QrEyeStyle( eyeStyle: QrEyeStyle(
eyeShape: QrEyeShape.square, eyeShape: QrEyeShape.circle,
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).colorScheme.onSurface,
), ),
dataModuleStyle: QrDataModuleStyle( dataModuleStyle: QrDataModuleStyle(

View File

@ -196,7 +196,7 @@ class PostMediaPendingList extends StatelessWidget {
width: (constraints.maxWidth * devicePixelRatio).round(), width: (constraints.maxWidth * devicePixelRatio).round(),
height: (constraints.maxHeight * devicePixelRatio).round(), height: (constraints.maxHeight * devicePixelRatio).round(),
)!, )!,
fit: BoxFit.cover, fit: BoxFit.contain,
); );
}), }),
_ => Container( _ => Container(