Fix fluttter 3.16 compatibility

This commit is contained in:
Ming Ming 2024-05-20 22:15:30 +08:00
parent bcca6d600a
commit 4c1ba03d6e
2 changed files with 2 additions and 2 deletions

View file

@ -186,7 +186,7 @@ class ShareHandler {
file,
password: password,
);
await Clipboard.setData(ClipboardData(text: share.url));
await Clipboard.setData(ClipboardData(text: share.url!));
SnackBarManager().showSnackBar(SnackBar(
content: Text(L10n.global().linkCopiedNotification),
duration: k.snackBarDurationNormal,

View file

@ -230,7 +230,7 @@ class _Bloc extends Bloc<_Event, _State> with BlocLogger {
file,
password: password,
);
await Clipboard.setData(ClipboardData(text: share.url));
await Clipboard.setData(ClipboardData(text: share.url!));
if (getRawPlatform() == NpPlatform.android) {
final textShare = AndroidTextShare(share.url!);