If I want to use one codebase for my application, but add some specific widgets/features for mobile app and some for web version of my app, how should I do that? Should I write all the code and just add an if statement before those specific widgets to see what platform the application is running on by the user and show/hide that widget/feature, or I must separate mobile and web widgets in different files?
For example I want to show a camera feature on mobile version and another feature on web version. How should I do that?