Deeplink is a useful link to share product links and blog links. You need to prepare your link product or your base url. After you get your base url, you can open AndroidManifest.xml in source code. The directory folder of that is android/app/src/main/AndroidManifest.xml. You can scroll down to the bottom and find “App Links” word. You can change the value of android:host with your base url (without https:// or http:// only base url). For ex: demoonlineshop.revoapps.id. Don’t forget to change three of android:host value.
After you change the value, you can check your product’s link. If the word after your base url is shop or product, you don’t need to change anything anymore. But if the word after your base url is not shop or product, you need to add some code. For ex: https://demoonlineshop.revoapps.id/shops/smartphone-8-256gb/ . You can see after the base url is “shops”. You need to open deeplink_config.dart file. The directory is lib/deeplink/deeplink_config.dart. Find pathUrl function and add your word or pathsegment into first if section (Check your blog links too). You can check your blog links same like product links, see the word or pathsegment of your blog links. You can add the other word at the source code.
Beside that, you need to check your checkout links too. This section have same way like product links, check the word after your base url. If the word or pathsegment after your base url is checkout, you don’t need to change anything. But if the word or pathsegment after your base url is not checkout, you need to change the source code. Examples that don’t need to be replaced : https://demoonlineshop.revoapps.id/checkout/. Examples that need to be replaced : https://demoonlineshop.revoapps.id/shop/checkout/ or https://demoonlineshop.revoapps.id/checkouts/ . You can change the code in checkout_webview.dart and wallet_webview.dart. The directory is lib/widgets/webview/checkout_webview.dart and lib/widgets/webview/wallet_webview.dart. You can change the if section with /shop/checkout/order-received/ or /checkouts/order-received/ (Don’t remove /order-received/).
If you hard to find where is the code need to be replace, you can find at line 196 and line 197 for checkout_webview.dart file and line 171 and line 172 for wallet_webview.dart file.