How can we handle deep links in flutter with Get X for go to Custom pages of the application?


How can we handle deep links in flutter with Get X for go to Custom pages of the application ?

By default, by adding the desired address to the Android Manifest file:

        <meta-data android:name="flutter_deeplinking_enabled" android:value="true" />
        <intent-filter android:autoVerify="true">
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:scheme="http" android:host="" />
            <data android:scheme="https" android:host=""/>

when the application opens, the main page of application will be displayed to us.

I am looking to implement this I can direct the user to any page of the application that is needed. A practical example is to pay on the web page and return to the application. When we return, we should show the user a message about the status of the payment, not direct the user to the first page of the application.


Do the page routing in your app, when you process the deeplink.

In my apps, I usually use uni_links ( and in my main.dart, I have something like this:

StreamSubscription<String> _subUniLinks;

initState() {
    // universal link setup

Future<void> initUniLinks() async {
    try {
        final String initialLink = await getInitialLink();
        await processLink(initialLink);
    } on PlatformException {
    _subUniLinks = linkStream.listen(processLink, onError: (err) {});

processLink(String link) async {
    // parse link and decide what to do:
    // - use setState
    // - or use Navigator.pushReplacement
    // - or whatever mechanism if you have in your app for routing to a page

dispose() {
    if (_subUniLinks != null) _subUniLinks.cancel();

Answered By – Didier Prophete

Answer Checked By – Senaida (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *