As your package uses GetIt, would it still work if we registered dependencies using the GetIt syntax?
For example:
final getIt = GetIt.instance;
void setup() {
getIt.registerSingleton<AppModel>(AppModel());
}
I only ask because if I'm being honest, I think the cubes syntax is less readable than the standard GetIt syntax with the use of the type parameter. In addition, it looks like your missing a few features from the standard GetIt syntax such as Scopes and the ability to unregister a dependency.
I think cubes would be much more popular if instead of creating your own abstraction you simply let people use the GetIt syntax or even simply created a global variable called cubes like the 'getit' variable in the example above so that our code would look like this:
// global variable defined in the cubes package
final cubes = GetIt.instance;
// use in our code
void setup() {
cubes.registerSingleton<AppModel>(AppModel());
}
As your package uses GetIt, would it still work if we registered dependencies using the GetIt syntax?
For example:
I only ask because if I'm being honest, I think the cubes syntax is less readable than the standard GetIt syntax with the use of the type parameter. In addition, it looks like your missing a few features from the standard GetIt syntax such as Scopes and the ability to unregister a dependency.
I think cubes would be much more popular if instead of creating your own abstraction you simply let people use the GetIt syntax or even simply created a global variable called cubes like the 'getit' variable in the example above so that our code would look like this: