Requirement
This project have required following depandency
Flutter/iOS Requirements
- Android Studio: 4.1.2
- Flutter: 2.10
PHP Requirements
- PHP >= 7.0
- MySQL >= 5.6
- Apache HTTP server
- OpenSSL PHP Extension
File Structure
Here is the general File structure of the template:
- app
- lang
- lib
- models
- network
- screens
- store
- utils
- Colors.dart
- Common.dart
- Constant.dart
- pubspec.yaml
Installation
Install flutter on windows
Download Android Studio
Click hereGet the Flutter SDK
- Install https://flutter.dev/docs/get-started/install

Extract the zip file and copy flutter folder into your desired installation location for the Flutter SDK (eg. C:\src\flutter; do not install Flutter in a directory like C:\Program Files\).
- Update your path

- Now set your enviournment variable
- From the Start search bar in , type ‘env’ and select Edit environment variables for your account
- Under User variables check if there is an entry called Path:
- Click on Edit. New Dialog open from it click on new and copy full path to flutter\bin as its value
- Now Restart your pc for changes to take effect
- Now check everything is ok or not
- open cmd and run flutter doctor as shown the below picture
- Now open Android Studio and create new flutter project then select your flutter sdk file to the location where we have downloaded earlier and that's it



- Install https://flutter.dev/docs/get-started/install
- Learn more about Android Studio - Click here
Install flutter on mac
- Download Android Studio - Click here
- Download Xcode - Click here
- Get the Flutter SDK - Click here
- Install Click here

Extract downloaded file, just double click on that. and just copy extracted folder and paste it to your desired location (for example, Documents\flutter).
- Update your path
Warning
Path variable needs to be updated to access “flutter” command from terminal. you can just update path variable for current terminal window only. and if you want to access flutter commands from anywhere in terminal, we need to update SDK path permanently.
To update PATH variable, we need to open terminal.
To update PATH variable for current terminal window only, then enter this command "export PATH="$PATH:`pwd`/flutter/bin"" and hit enter key.
To update PATH variable permanently, then Open or create .bash_profile file. to open or create that file, then enter "sudo open -e $HOME/.bash_profile" and hit enter key.
Append below line to bash_profile file at bottom of all other content. "export PATH="$PATH:[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin"" as [PATH_TO_FLUTTER_GIT_DIRECTORY] is actual path of SDK folder.Run this command on terminal "source $HOME/.bash_profile" to refresh PATH variables.
Then check whether our SDK is successfully installed or not.
You are now ready to run Flutter commands in the Flutter Console!
Run "flutter doctor" into terminal, If you are getting check list of flutter sdk requirements, it means SDK is successfully installed on your machine. and you can start building flutter apps on your machine.
If you find any issue during environment setup in macos, please go online Click here
- Install Click here
Install flutter on linux
- Download Android Studio - Click here
- Get the Flutter SDK - Click here
- Install Click here
Extract downloaded file, just double click on that. and just copy extracted folder and paste it to your desired location (for example, Documents\flutter).
- Update your path
Warning
Path variable needs to be updated to access “flutter” command from terminal. you can just update path variable for current terminal window only. and if you want to access flutter commands from anywhere in terminal, we need to update SDK path permanently.
You’ll
probablywant to update this variable permanently, so you can run flutter commands in any terminal session. To update PATH variable, we need to open terminal.1exportPATH="$PATH:[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin"- Run
source $HOME/.to refresh the current window, or open a new terminal window to automatically source the file. - Verify that the
flutter/bindirectory is now in your PATH by running:
1echo$PATHVerify that the
fluttercommand is available by running:You are now ready to run Flutter commands in the Flutter Console!1whichflutter - Run
- Install Click here
PHP Setup & Admin Panel Configuration
Installation instruction
Unzip the mightyradio.zip file and ONLY use the extracted /mightyradio folder and upload in below directory based on your server
In Linux
Path: var/www/html/
In cPanel
Inside File manager -> Path: public_html/
- Create the database on your server Import mightyradio.sql file in created database. ( Note : Only necessary for those client, who is setup project first time. )

For database settings, open the configuration/Connection.php file with a text editor and set your database settings.
Enter database name, database username, database password and the host details

Admin credentials
Email : admin@admin.com
Password : admin
Admin Panel Configuration
App Configuration
First go to the Web App Configuration Form and fill details which you want for your app.

Ads Configuration

Select Ads Type
You can select one ads type, which you want to display in your app. If don't want to display ads then select None.
Admob Configation
AdMob Banner Unit ID-AndroidThis field is for showing AdMob banner ads on your app. If you don't want to show google AdMob just keep it blank. If you want AdMob then don't forget to add meta-data on your AndroidManifest file.
AdMob Interstitial Unit ID-AndroidThis field is for showing AdMob interstitial ads on your app. If you don't want to show google AdMob just keep it blank. If you want AdMob then don't forget to add meta-data on your AndroidManifest file.
AdMob Banner Unit ID-iOSThis field is for showing AdMob banner ads on your app. If you don't want to show AdMob just keep it blank.
AdMob Interstitial Unit ID-iOSThis field is for showing AdMob interstitial ads on your app. If you don't want to show AdMob just keep it blank.
Facebook Audiunce Configation
Facebook Audiunce placement ID-AndroidThis field is for showing Facebook Audiunce banner ads on your app. If you don't want to show Facebook Audiunce just keep it blank. If you want AdMob then don't forget to add meta-data on your AndroidManifest file.
Facebook Audiunce placement ID-AndroidThis field is for showing Facebook Audiunce ads on your app. If you don't want to show Facebook Audiunce just keep it blank. If you want AdMob then don't forget to add meta-data on your AndroidManifest file.
Facebook Audiunce placement ID-iOSThis field is for showing Facebook Audiunce banner ads on your app. If you don't want to show Facebook Audiunce just keep it blank.
Facebook Audiunce placement ID-iOSThis field is for showing Facebook Audiunce interstitial ads on your app. If you don't want to show Facebook Audiunce just keep it blank.
OneSignal Configuration
Set Onesignal app id and rest api key for Onesignal Configuration.

Send Onesignal notification

Update Profile & Change Password

Configuration
Android Configuration
Change Application Name
Open /android/app/src/main/AndroidManifest.xml and specify your application name.

Change Application Icon
- Open Android studio. Select File -> open -> select root folder -> android
- Wait for indexing
- Right click on res -> New -> Image asset
- Now the following window will open once we click on Image Asset:
- Once all the required changes are made, Click on the Next button and then on Finish and then the icon of the app will be changed!

Please don't change the icon name.

Change Application ID
- Open Android studio. Select File -> open -> select root folder -> android
- Wait for indexing
- Open /android/app/build.gradle file and change YOUR_APP_ID
- after making changes sync your Project

Setup Firebase
- For Firebase setup, you just need to change the android/app/google-services.json file.
- Create a new firebase account, register your application with your package name.
- Now download the google-services.json file and replace with current.
- Refer to Link

Setup AdMob
- For AdMob setup, you just need to change the app id in android/app/src/main/AndroidManifest.xml file
- For that, you have to create a firebase account and create a new application in AdMob. and then you will get application id.
- Now run the application. your ads are now live.
Now, replace value with your new generated application id.

Generate Signed APK && AAB
- Go to your project -> Tools -> Flutter -> Open for Editing in Android Studio as shown below
- Open Project in New Window
- Wait for while until project synchronization. After that Go to Build -> GenerateSigned Bundle/APK...
- Select Android App Bundle or APK Option as per your need. (Android App Bundle is best solution) and click Next button.
- Select Create new.. option to generate new Signed key (When you release your app First Time) and Fill all options. Refer this link
- Click Next button and you will get following screen...
- Wait for a while until Gradle Build Running process complete.and finally you will get the Generate Signed APK : (APKs) generated successfully. from that click on Locate option to get Location of your Generate Signed APK Key.





Select Build variants - release and Signature versions both V1 and V2 respectively as shown above screen shot and click Finish button.
iOS Configuration
Open Project in Xcode
- Open Xcode.
- Select Open another Project.
- Open the iOS directory within your app.
- Now, click on Done button.
Change Bundle Name
- Select your project file icon in Group and files panel.
- Then Select Target -> Info Tab.
- At last change Bundle Name.

Change Bundle Identifier
Bundle Id is a unique Identifier of your of app on iOS and MacOS. iOS and MacOS use it to recognise updates to your app. The identifier must be unique for your app.
- Select your project file icon in Group and files panel.
- Select General Tab.
- After Select General tab you can see the details of your application.
- In Identity section, rename your Bundle identifier.

Change App Icons
- see How to Generate App Icons?
- In Group and files panel find “Assets.xcassets” folder.
- In Assets.xcassets folder replace AppIcon.
Change App Id
- Open Xcode,Select the Info.plist from the file Manager.
- Change the GADApplicationIdentifier value.
1 2 | <key>GADApplicationIdentifier</key><string>Add your Admob appId</string> |
Flutter Configuration
Change Base URL
In main directory goto the lib -> utils -> constant.dart file and repalce the URL at line number 6.

Change Primary Color
In main directory goto the lib -> utils -> color.dart files and change it.

Change One Signal Key
In main directory goto the lib -> utils -> constant.dart file and add the Key at line number 21.

OneSignal Configuration
- Create onesignal project in your account Choose android platform
- Go to your Firebase Console-> Project Settings -> Cloud Messgaing and copy 'Server Key' and 'Server ID'
- Now paste those values one by one here
- Choose Target SDK as Flutter
- Now copy App ID as shown below
- go to \lib\utils\AppConstants.dart and change 'YOUR_ONESIGNAL_KEY'
- You have connected android application to your Onesignal account successfully
- You can genrate and download your onesignal logo to Click here
- Add Downloaded folder in your project in android/app/src/main/res folder






How to change OneSignal Logo
How to integrate firebase
- Create new project to your firebase console
- Add andorid application to your firebase project
- Add package name and sha-1 key (sha-1 optional for now)
- You have connected andorid application to your firebase project successfully
- Now download the google-services.json file and replace with current.
- Add ios application to your firebase project
- Get your bundle id from \ios\Runner.xcodeproj\project.pbxproj file or search for PRODUCT_BUNDLE_IDENTIFIER and you will get following result
- Enter your ios bundle id
- You have connected ios application to your firebase project successfully













How to create admob account
- In the Admob console, click add android app from the Apps menu.
- Enter your app name and Enabling user metrics is not necessary to complete this codelab. However, we recommend that you do because it allows you to understand user behavior in more detail and click on ADD APP button.
- Create ad units.
- Select Banner unit ad and enter banner unit ad name then click on Create ad Unit button. Same procedure follow to create Interstitial ad)
- Then add another unit add shown in below image and Same as above create Interstitial ads and native ads.
- Same as Add iOS app and same as add units in iOS app.
- Add your ad unit id same way explain in previous step : Like this

Common error
No matching client found for package name
- The error is "package_name" in google-services.json is not matching with your "applicationId" in app gradle.
- Just make sure the
package_nameandapplicationIdboth are same.

Flutter SDK Not Available
Download the SDK and point the SDK folder path in your future projects.
There are different sources you can try
- You can clone it from the Github Repository
- Download SDK zip file + extract it after downloading
- You can also Download any version(including older) from here (For Mac, Windows, Linux)
Use the SDK path in your future projects

Update the existing code with new release
As per envato policy installation, setup and configurations or modification are not included in free support. Free support is only for any bug/ error in original code. we do not provide installation and customization support in FREE SUPPORT.
Still, We are providing steps for How to update future release code to existing source code for your knowledge purpose.
PLEASE DO NOT CREATE TICKETS IF YOU FACE ANY ISSUE DURING UPDATE YOUR CODE. WE WILL NOT PROVIDE ANY SUPPORT ON THAT.
How to update future release code to existing source code
If you want which file changes are on the latest updated version then you have to manage the git repository by yourself.
For First time: Initial project downloaded from codecanyon server.
Step 1: Create or login with gitlabLogin or register your account with gitlab: https://gitlab.com/users/sign_in
Step 2: Create a new project in GitLab- In your dashboard, click the green New project button or use the plus icon in the navigation bar. This opens the New project page.
- On the New project page -> Create a blank project.


- 1. Once project is created on your gitlab server. You have to clone the project to your local system. You can clone it with the command line.
- 2. git clone “repository path”
- 3. Copy your project url and clone into your exiting system
- 4. Once successfully clone then system will create a folder on your system



Once successfully downloaded project from codecanyon, copy/paste your downloaded project into clone directories
- Note
- Only orignal source code is put here.

Onces copy/paste your changes to clone directres, you have to push all files to your gitlab server. For that use the following commands.
Before commit to server directores, you have to remove below folder from your project
- 1. build
- 2. .idea
- 3. .gradle
After That follow below steps
- 1. Goto inside your clone directory project
- 2. Add your all files with “git add .” command
- 3. Now commit your changes with below command
- 4. git commit -m ‘initial commit’
- Note
- Write your latest version message instead of “initial commit”.
- 5. Push your changes to server with below command
- 6. Check your all changes to gitlab server


“git push” And provide you gitlab credential details


For Update existing code (If Already have old version of project)
Note
If you remove the project from the local system then clone the project again from your gitlab server. Follow the same above Step 3: Clone your project to your local system
Once you will received mail for updates. Just download latest code from codecanyon server.
Step 2: Copy/paste your initial downloaded project to clone directories.Once successfully downloaded project from codecanyon, copy/paste your downloaded project into clone directories
Note
Only orignal source code is put here.
Follow same Step 6: Commit and push to gitlab server
Step 4: Check updated filesAfter committing your latest changes. Goto the gitlab project dashboard and click on the commit link.

Click on link which you have commit message on above steps 3

Now check the all changed file.

Click on “XYZ changed file” to see which file has been changed.

إرسال تعليق