0

in native Android, we can launch another app like this:

startActivity(new Intent("android.intent.action.VIEW", Uri.parse(url)));

how can this be accomplished in Flutter/dart?

SA DL
  • 73
  • 1
  • Does this answer your question? [Can any one tell me how to open another app using flutter?](https://stackoverflow.com/questions/55771211/can-any-one-tell-me-how-to-open-another-app-using-flutter) – WSBT Oct 19 '21 at 16:01
  • You can use https://pub.dev/packages/flutter_appavailability package. – Kathan Patel Oct 19 '21 at 16:02

2 Answers2

0

You can use Share_Plus plugin and archive your goal. import this package in your pubspacs.yaml file

share_plus: ^3.0.4

then import it using import 'package:share_plus/share_plus.dart';

Now you can use

Share.share('Sharing Text', subject: 'Sharing Subjects');

You can also share file using

Share.shareFiles(['${directory.path}/image.jpg'], text: 'Great picture');
Shailendra Rajput
  • 2,131
  • 17
  • 26
0

Use External app launcher package you can run the app you want using the package name using the following

import the package then

import 'package:external_app_launcher/external_app_launcher.dart';

use this to launch the app if it is installed else it will send to play store

await LaunchApp.openApp(
        androidPackageName: 'com.whatsapp',
        openStore: true);
Kaleb
  • 541
  • 2
  • 7