jaspr icon indicating copy to clipboard operation
jaspr copied to clipboard

[framework] Consider moving and renaming `k` constants for improved discoverability

Open parlough opened this issue 2 months ago • 1 comments

The k constant style (inherited from Flutter) is not standard in the Dart ecosystem and being top-level variables in the already large jaspr.dart library, they're a bit hard to discover.

To improve discoverability and improve consistency of the naming scheme, I'd suggest two things:

  1. Moving them to be static fields on Jaspr or a new class such as RunInfo.
  2. Changing their names to not have the k prefix, perhaps requiring some more changes as well.

To facilitate this change, the old top-level properties can still remain and be deprecated or provided with an auto migration.

parlough avatar Oct 07 '25 15:10 parlough

I get your point, but I think the value of having it the same as Flutter still outweighs it.

I like that using 'kIsWeb' and 'kDebugMode' just works.

schultek avatar Oct 08 '25 08:10 schultek