Changed library

This commit is contained in:
Juan Gilsanz Polo
2024-03-23 03:54:01 +01:00
parent bdc256399a
commit aa3ca5d8de
3 changed files with 12 additions and 12 deletions

View File

@@ -9,7 +9,7 @@ import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:dynamic_color/dynamic_color.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:receive_sharing_intent/receive_sharing_intent.dart';
import 'package:receive_sharing_intent_plus/receive_sharing_intent_plus.dart';
import 'package:sentry_flutter/sentry_flutter.dart';
import 'package:shared_preferences/shared_preferences.dart';
@@ -76,10 +76,10 @@ class MyApp extends HookConsumerWidget {
useEffect(
() {
// When app is on background
ReceiveSharingIntent.getMediaStream().listen(
ReceiveSharingIntentPlus.getTextStream().listen(
(value) {
if (value.isNotEmpty) {
ref.read(receiveSharingIntentUrlProvider.notifier).setValue(value[0].path);
ref.read(receiveSharingIntentUrlProvider.notifier).setValue(value);
ref.read(routerProvider).go(RoutesPaths.bookmarks);
}
},
@@ -87,12 +87,12 @@ class MyApp extends HookConsumerWidget {
);
// When app is closed
ReceiveSharingIntent.getInitialMedia().then((value) {
if (value.isNotEmpty) {
ref.read(receiveSharingIntentUrlProvider.notifier).setValue(value[0].path);
ReceiveSharingIntentPlus.getInitialText().then((value) {
if (value != null) {
ref.read(receiveSharingIntentUrlProvider.notifier).setValue(value);
ref.read(routerProvider).go(RoutesPaths.bookmarks);
}
ReceiveSharingIntent.reset();
ReceiveSharingIntentPlus.reset();
});
return null;

View File

@@ -854,14 +854,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.2.3"
receive_sharing_intent:
receive_sharing_intent_plus:
dependency: "direct main"
description:
name: receive_sharing_intent
sha256: "8fdf5927934041264becf65199ef8057b8b176e879d95ffa0420cd2a6219c0fd"
name: receive_sharing_intent_plus
sha256: "89020b3c72a0c70409c07f549ae7fc614a56278ecc9bde0a637e49918e00b083"
url: "https://pub.dev"
source: hosted
version: "1.6.7"
version: "1.0.1"
riverpod:
dependency: transitive
description:

View File

@@ -63,7 +63,7 @@ dependencies:
url: https://github.com/JGeek00/flutter_split_view
ref: master-alt
super_context_menu: ^0.8.5
receive_sharing_intent: ^1.6.7
receive_sharing_intent_plus: ^1.0.1
dev_dependencies:
build_runner: ^2.4.8