implemented native share intent support for android and ios with chat and folder pickers
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user