Taking advantage of the same code in Flutter, I would like to publish two Apps to different audiences:
App 1: To dog watchers
App 2: To cat watchers
The code of both apps is the same and what I do is apply different configuration files (templates), so that the look and feel within the App changes.
Since they are oriented to different audiences, I would like to publish App 1 with an icon and name oriented to dog watchers and App 2 with an icon and name oriented to cat watchers. I need to identify which app was downloaded to activate the corresponding template.
How can I publish the same App with different Icons and Names on IOS and Android?
How can identify which app was downloaded?
2
Answers
Yes you can do it
Create two projects
Paste same code in both projects, name the projects differently and put the icons as tou want.
To use different configuration files or templates within the same codebase, you can use conditional statements to check which app was downloaded based on the package name or bundle ID. Then, you can load the appropriate configuration file or template based on the result of the conditional statement.
For example, you can use the package_info package in Flutter to get information about the app’s package name or bundle ID, like this:
import ‘package:package_info/package_info.dart’;
PackageInfo packageInfo = await PackageInfo.fromPlatform();
String packageName = packageInfo.packageName;
Use flavor which allows to create separate apps or environments for your app using the same code base.
Ref: https://pub.dev/packages/flutter_flavorizr