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

View File

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

View File

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