Flutter ,My Launcher is not working With Link Widget of Url Launcher.
final websiteUri = Uri.parse('https://flutter.dev');
Link(
uri: websiteUri,
target: LinkTarget.blank,
builder: (context, openLink) => TextButton(
onPressed: openLink,
child: Text(websiteUri.toString()),
),
)
CodePudding user response:
use launchUrlString
from the url_launcher package instead:
final websiteUri = 'https://flutter.dev';
onpressed:launchUrlString(websiteUri);
CodePudding user response:
I just updated my AndroidManifest.xml , according to: https://pub.dev/packages/url_launcher#android and https://developer.android.com/training/package-visibility/use-cases#check-browser-available
and finally i add thi to AndroidManifest.xml like:
<queries>
<!-- If your app checks for SMS support -->
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="sms" />
</intent>
<!-- If your app checks for call support -->
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="tel" />
</intent>
<!-- Place inside the <queries> element. -->
<intent>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" />
</intent>
</queries>
It worked Perfectly no issues