question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

✨ Refactor literals for Enums

See original GitHub issue

Hey ! great work ! amazing what are you accomplish 🥳. It would be nice if instead of using literals e.g: ScrollMode we changed for using Enums so in the documentation examples you can write something like

page.scroll = ScrollMode.ALWAYS

and even better IDE will try to autocomplete and get a better development experience. what do you think ? Let me know if you are interesting and I’m willing to make the proper changes.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
FeodorFitsnercommented, Sep 13, 2022

Tests is another question! 😃 I’m thinking about doind intergration tests mostly. I don’t have experience with Flutter integration tests, but there are some examples: https://github.com/flet-dev/flet/issues/143

0reactions
lmbringascommented, Sep 13, 2022

I don’t have any experience with that kind of implementation but i could research, and yes ! this evening I’ll open a pr with the refactor ! I’ll let you known as soon as is finished ! do you have any suggestion to start writing tests for the sdk ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Replace enums with string literals #324 - palantir/blueprint
You can't easily refactor a string literal, but you can for example hit F2 on an enum member and rename all occurrences, and...
Read more >
How to refactor constants to enums in Eclipse? - Stack Overflow
Here are a set of automated and manual steps to do this refactoring. Step 1 Encapsulate field on the constants. Step 2 (Optional)...
Read more >
Comparing TypeScript's union types, enums and const enums
Enum is an example of a nominal type (enums are not equal if they differ by name). Unions represent structural types (if literal...
Read more >
Enums and Literals - Beyond Velocity
The next step is to refactor the XMPP layer to standards and increase the scope and functionality. For anyone interested, this brief post ......
Read more >
Refactoring to enums – IDEs Support (IntelliJ Platform)
Refactoring to enums Follow ... public static final String ADD = "Add"; public static final String MOVE = "Move"; public static final String ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found