Is it possible to deep link to Android and iOS in Flutter? You can use platform channel for this. It shouldn’t be tough. You need to add handlers in native code and redirect urls via channels to flutter code.
Example for iOS:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [GeneratedPluginRegistrant registerWithRegistry:self]; FlutterViewController *controller = (FlutterViewController*)self.window.rootViewController; self.urlChannel = [FlutterMethodChannel methodChannelWithName:@"com.myproject/url" binaryMessenger:controller]; return [super application:application didFinishLaunchingWithOptions:launchOptions]; } - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options{ [self.urlChannel invokeMethod:@"openURL" arguments:@{@"url" : url.absoluteString}]; return true; } @end |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.