I have a Flutter App. I have to make two versions (apk) of the same application with some functionality changing between the two, although they're mostly similar.
I have a finished project that, on one code base, groups together the functionality for the two apps.
I'd like to know if it's possible to choose at compile time which parts of the code are compiled. In order to make applications A and B with the same code base?
The second version is an admin version that skips every payment and also adds information and one feature in the main page.
I was thinking about Flutter Flavors which are mostly made to setup environments (dev, staging, prod, ...). But I'm not sure it will make it
the way I'm imagining it is the following:
void coolFunction () {
if (apk.version == 'Admin') {
print("this is the Admin App");
} else {
print("this is the user App");
}
}
This would allow me to continue to update the apps without having troubles maintaining it.