jaspr
jaspr copied to clipboard
[framework] Consider moving and renaming `k` constants for improved discoverability
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:
- Moving them to be static fields on
Jaspror a new class such asRunInfo. - Changing their names to not have the
kprefix, 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.
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.