Innim / flutter_login_vk

Flutter Plugin to login via VK.com
BSD 3-Clause "New" or "Revised" License
18 stars 17 forks source link

Bad documentation. #35

Closed darkstarx closed 1 year ago

darkstarx commented 1 year ago

vk_login.dart

  /// Returns access token if user logged in.
  ///
  /// If user is now logged in, than returns `null`.
  Future<VKAccessToken?> get accessToken async {
  1. than -> then, if user logged in -> if the user is logged in, etc.
  2. The expression If the user is logged in now, then returns null. contradicts this one Returns an access token if the user's logged in.

Please, make sense of the documentation and clarify the behavior. Also explain where the access token should be used after been fetched using this method.

greymag commented 1 year ago

Hey. Thanks for pointing it out.

There is a typo in (2): now -> not. So:

About using access token: you can use it to make some requests to the VK API or you can send it to your server for verification.

darkstarx commented 1 year ago

Great, thanks!