implemented native share intent support for android and ios with chat and folder pickers

This commit is contained in:
2026-05-09 19:42:51 +02:00
parent 00664c66a8
commit cb2c38aaa1
25 changed files with 1046 additions and 26 deletions
+6
View File
@@ -22,6 +22,7 @@ import 'app.dart';
import 'background/widget_background_task.dart';
import 'firebase_options.dart';
import 'model/account_data.dart';
import 'share_intent/share_intent_listener.dart';
import 'state/app/modules/account/bloc/account_bloc.dart';
import 'state/app/modules/account/bloc/account_state.dart';
import 'state/app/modules/breaker/bloc/breaker_bloc.dart';
@@ -68,6 +69,7 @@ Future<void> main() async {
HydratedBloc.storage = storage;
}),
AccountData().waitForPopulation(),
ShareIntentListener.instance.initialize(),
];
log('starting app initialisation...');
@@ -209,6 +211,10 @@ class _MainState extends State<Main> {
previous.status != current.status,
listener: (context, accountState) {
if (accountState.status != AccountStatus.loggedOut) return;
// A pending share would otherwise survive logout and be
// re-applied after re-login with file paths the OS may
// already have evicted from the cache.
ShareIntentListener.instance.clear();
// Routes pushed via AppRoutes (e.g. Settings) live on the
// root navigator and survive the home swap below, so they
// would still cover the Login screen after logout. Pop