setup method

Future<void> setup(
  1. String channelId, {
  2. String? universalLink,
})

Sets up the SDK with a channelId and optional universalLink.

This method should be called once and only once, before any other methods in LineSDK. Find your channelId in the LINE Developers Console.

If you need to navigate from LINE back to your app via a universal link, you must also:

  1. Specify the link URL in the LINE Developers Console
  2. Prepare your server and domain to handle the URL
  3. Pass the URL in universalLink.

For more about this, see the section "Universal Links support" in Setting up your project. If you don't pass a universalLink in this method, LINE SDK will use the traditional URL scheme to open your app when logging in through LINE.

Implementation

Future<void> setup(String channelId, {String? universalLink}) async {
  await channel.invokeMethod('setup', <String, String?>{
    'channelId': channelId,
    'universalLink': universalLink
  });
}