khamidjon-khamidov / flutter_telegram_web_app

MIT License
25 stars 21 forks source link

Fix identifier names lint issues #6

Closed OlegNovosad closed 3 months ago

OlegNovosad commented 3 months ago

While looking through the code I found multiple lint issues related to identifier names which can be fixed with JS("<value>") annotation while keeping dart style, e.g.:

Current

@JS()
class WebAppUser {
  external int get id;
  external bool get is_bot;
  external bool get is_premium;
  external String get first_name;
  external String get last_name;
  external String get username;
  external String get photo_url;
  external String get language_code;
}

Proposal

@JS("WebAppUser")
class WebAppUser {
  @JS("id")
  external int get id;

  @JS("is_bot")
  external bool get isBot;

  @JS("is_premium")
  external bool get isPremium;

  @JS("first_name")
  external String get firstName;

  @JS("last_name")
  external String get lastName;

  @JS("username")
  external String get username;

  @JS("photo_url")
  external String get photoUrl;

  @JS("language_code")
  external String get languageCode;
}

I'm opening this issue just to keep track of it. I can do the improvements @khamidjon-khamidov

khamidjon-khamidov commented 3 months ago

Hi @OlegNovosad . Thank you for your interest in this library). I think it is a good idea.

khamidjon-khamidov commented 3 months ago

@OlegNovosad Could you make MRs separately? Note they contain too many changes which are mixed along with some bugs.

OlegNovosad commented 3 months ago

@OlegNovosad Could you make MRs separately? Not they contain too many changes which are mixed along with some bugs.

Ok, I will create separate MRs 👌 should I open an issue for MR first?

khamidjon-khamidov commented 3 months ago

Thanks). It would be easier to track if you open