2020// 
2121
2222/// {@template error_handling} 
23- /// This method just redirects the work to the native LINE SDK. If any error happens during the native process, 
24- /// a [PlatformException]  will be thrown. You can check [PlatformException.code]  and [PlatformException.message]  
25- /// for detail information of an error. However, since the implementation in native side is different on iOS and  
26- /// Android, the error code and message could be different too. See [LineSDKError] (https://developers.line.biz/en/reference/ios-sdk-swift/Enums/LineSDKError.html) 
27- /// on iOS and [LineApiError] (https://developers.line.biz/en/reference/android-sdk/reference/com/linecorp/linesdk/LineApiError.html) on Android 
28- /// to get more information about error handling. 
23+ /// This method redirects calls to the LINE SDK for the relevant native platform (iOS or Android). 
24+ /// If an error happens in the native platform, a [PlatformException]  is thrown. See 
25+ /// [PlatformException.code]  and [PlatformException.message]  for error details.  
26+ /// 
27+ /// The LINE SDK implementation differs between iOS and Android, which means error codes and messages 
28+ /// can also be different. For platform-specific error information, see 
29+ /// [LineSDKError] (https://developers.line.biz/en/reference/ios-sdk-swift/Enums/LineSDKError.html) 
30+ /// (iOS) and 
31+ /// [LineApiError] (https://developers.line.biz/en/reference/android-sdk/reference/com/linecorp/linesdk/LineApiError.html) 
32+ /// (Android). 
2933/// {@endtemplate} 
3034
3135part of  flutter_line_sdk;
3236
33- /// A general manager class for LINE SDK Login  features. 
37+ /// A general manager class for LINE SDK login  features. 
3438///  
35- /// Don't create your own instance of this. Instead, call [LineSDK.instance]  to get  
36- /// a shared singleton and  call other methods on it . 
39+ /// Don't create your own instance of this class . Instead, call [LineSDK.instance]  to get a shared   
40+ /// singleton on which you can  call other methods. 
3741class  LineSDK  {
3842
39-   /// The method channel connected to native side of the LINE SDK. 
43+   /// The method channel connected to the  native side of the LINE SDK. 
4044  ///  
41-   /// Normally you should not use this channel directly. Instead, call the public methods on  
42-   /// this `LineSDK`  class. 
45+   /// Don't use this channel directly. Instead, call the public methods on the [LineSDK]  class. 
4346   static  const  MethodChannel  channel = 
4447      const  MethodChannel ('com.linecorp/flutter_line_sdk' );
4548
4649  /// The shared singleton object of `LineSDK` . 
4750  ///  
48-   /// Always use this instance to interact with the login process of the LINE SDK. 
51+   /// Always use this instance (rather than a self-created instance) to interact with the login  
52+   /// process of the LINE SDK. 
4953   static  final  LineSDK  instance =  LineSDK ._();
5054
5155  LineSDK ._();
5256
53-   /// Sets up the SDK with [channelId]  and an  optional [universalLink] . 
57+   /// Sets up the SDK with a  [channelId]  and optional [universalLink] . 
5458  ///  
55-   /// This method should be called once and only once, before any other methods in LineSDK. 
56-   /// You can find  your [channelId]  in the [LINE Developers Site ] (https://developers.line.biz/).  
59+   /// This method should be called once and only once, before any other methods in [ LineSDK]  . 
60+   /// Find  your [channelId]  in the [LINE Developers Console ] (https://developers.line.biz/console ).  
5761  ///  
58-   /// If you need to navigate from LINE back to your app by universal link, you also need to  
59-   /// set it in the LINE Developers Site, prepare your server and domain to handle the URL, then 
60-   /// pass the URL in [universalLink] . For more about it, check the  
61-   /// [Universal Links support] (https://developers.line.biz/en/docs/ios-sdk/swift/setting-up-project/) 
62-   /// section in documentation. If you do not pass a [universalLink]  value in this method, LINE SDK  
63-   /// will use the traditional URL scheme to open your app when using the LINE app to login. 
62+   /// If you need to navigate from LINE back to your app via a universal link, you must also:  
63+   /// 1. Specify the link URL in the LINE Developers Console 
64+   /// 2. Prepare your server and domain to handle the URL 
65+   /// 3. Pass the URL in [universalLink] .  
66+   ///  
67+   /// For more about this, see the section "Universal Links support" in  
68+   /// [Setting up your project] (https://developers.line.biz/en/docs/ios-sdk/swift/setting-up-project/).  
69+   /// If you don't pass a [universalLink]  in this method, LINE SDK will use the traditional URL  
70+   /// scheme to open your app when logging in through LINE. 
6471   Future <void > setup (String  channelId, {String  universalLink}) async  {
6572    await  channel.invokeMethod (
6673      'setup' ,
@@ -71,22 +78,26 @@ class LineSDK {
7178    );
7279  }
7380
74-   /// Logs in to the LINE Platform with the specified [scopes]  and [option] , by either opening the LINE app 
75-   /// for existing logged in user there or a web view if LINE app is not installed on user's device. 
81+   /// Logs the user into LINE with the specified [scopes]  and [option] , by either opening the  
82+   /// LINE client for an existing logged in user, or a web view if the LINE client isn't installed  
83+   /// on the user's device. 
7684  ///  
77-   /// By default, the login process will use only `"profile"`  as its required scope.  If you need other scopes  
78-   /// send all of them (including the default `"profile"` ) as a list to [scopes] .  
85+   /// By default, the login process uses only `"profile"`  as its required scope. If you need  
86+   /// more scopes, put the ones you want (in addition to the default `"profile"` ) in [scopes]  as a  
87+   /// list.  
7988  ///  
80-   /// If the value of [scopes]  contains `"profile"` , the user profile will be retrieved during the login process  
81-   /// and contained in the [LoginResult.userProfile]  property in the result value. Otherwise, it will be null.  
89+   /// If [scopes]  contains `"profile"` , the user profile is returned in the result as  
90+   /// [LoginResult.userProfile] . If `"profile"`  is not included, the value of [LoginResult.userProfile]  
91+   /// will be null.  
8292  ///  
83-   /// An access token will be  issued if the user authorizes your app. This token and  a refresh token will be automatically   
84-   /// stored in a secured  place in your app for later use. You do not  need to refresh the access token manually because   
85-   /// any following API calls will attempt to  refresh the access token if necessary. However, if you would like  to refresh  
86-   /// the access token manually, use  [refreshToken()] . 
93+   /// An access token is  issued if the user authorizes your app. This token, along with  a refresh  
94+   /// token, is automatically  stored in a secure  place in your app for later use. You don't  need to  
95+   /// refresh the access token manually. Any following API calls will try  to refresh the access   
96+   /// token when necessary. However, you can refresh  the access token manually with  [refreshToken()] . 
8797  ///  
88-   /// You can control some other login behaviors, like whether only trying to login with web page or what the approch  
89-   /// being used for bot prompting. To do that, create a proper [LoginOption]  object and pass it to the [option]  parameter. 
98+   /// You can control some other login behaviors, like whether to use a web page for login, or how  
99+   /// to ask the user to add your bot as a friend. To do so, create a [LoginOption]  object and pass  
100+   /// it to the [option]  parameter. 
90101  ///  
91102  /// {@macro error_handling} 
92103   Future <LoginResult > login (
@@ -115,12 +126,12 @@ class LineSDK {
115126
116127  /// Gets the current access token in use. 
117128  ///  
118-   /// This returns a `Future<StoredAccessToken>`  and the access token value in use is contained 
119-   /// in the result [StoredAccessToken.value] . 
129+   /// This returns a `Future<StoredAccessToken>` , with the access token value contained in the  
130+   /// result [StoredAccessToken.value] . If the user isn't logged in, it returns a `null`  value as  
131+   /// the [Future]  result.  
120132  ///  
121-   /// If the user is not logged in, it returns a `null`  value as the [Future]  result. 
122-   /// However, a valid [StoredAccessToken]  object does not mean the access token itself is valid since it could be 
123-   /// expired or revoked by user from other devices or LINE app. 
133+   /// A valid [StoredAccessToken]  object doesn't necessarily mean the access token itself is valid.  
134+   /// It may have expired or been revoked by the user from another device or LINE client. 
124135  ///  
125136  /// {@macro error_handling} 
126137   Future <StoredAccessToken > get  currentAccessToken async  {
@@ -131,7 +142,7 @@ class LineSDK {
131142
132143  /// Gets the user’s profile. 
133144  ///  
134-   /// To use  this method,  the `"profile"`  scope is required . 
145+   /// Using  this method requires  the `"profile"`  scope. 
135146  ///  
136147  /// {@macro error_handling} 
137148   Future <UserProfile > getProfile () async  {
@@ -140,14 +151,14 @@ class LineSDK {
140151    return  UserProfile ._(json.decode (result));
141152  }
142153
143-   ///   Refreshes the access token. 
154+   /// Refreshes the access token. 
144155  ///  
145156  /// If the token refresh process finishes successfully, the refreshed access token will be 
146-   /// automatically stored in user's device. You can wait for the result of this method or  
147-   /// use  [currentAccessToken]  to get it .  
157+   /// automatically stored in the  user's device. You can wait for the result of this method or get  
158+   /// the refreshed token with  [currentAccessToken] .  
148159  ///  
149-   /// Normally, you do not  need to refresh the access token manually because any  API call will  
150-   /// attempt to refresh the  access token if  necessary. 
160+   /// You don't  need to refresh the access token manually. Any  API call will attempt to refresh the   
161+   /// access token when  necessary. 
151162  ///  
152163  /// {@macro error_handling} 
153164   Future <AccessToken > refreshToken () async  {
@@ -156,7 +167,7 @@ class LineSDK {
156167    return  AccessToken ._(json.decode (result));
157168  }
158169
159-   /// Checks whether the stored access token is valid against to  LINE auth  server. 
170+   /// Checks whether the stored access token is valid against the  LINE authentication  server. 
160171  ///  
161172  /// {@macro error_handling} 
162173   Future <AccessTokenVerifyResult > verifyAccessToken () async  {
@@ -165,9 +176,10 @@ class LineSDK {
165176    return  AccessTokenVerifyResult ._(json.decode (result));
166177  }
167178
168-   /// Gets the friendship status of the user and the bot linked to your LINE Login channel. 
179+   /// Gets the friendship status between the user and the official account linked to your LINE Login  
180+   /// channel. 
169181  ///  
170-   /// To use  this method,  the `"profile"`  scope is required . 
182+   /// Using  this method requires  the `"profile"`  scope. 
171183  ///  
172184  /// {@macro error_handling} 
173185   Future <BotFriendshipStatus > getBotFriendshipStatus () async  {
0 commit comments