Introduction
Thank you for purchasing code. It really means a lot and It's our pleasure to serve top-notch service to you. Thank you so much for choosing WRTeam . If you have trouble with the code and documentation please contact to our Support Team Here
How to setup Flutter
-
Visit flutter official website : Get Flutter sdk
for full installation guide.
If you prefer video tutorials, we recommend this playlist for the full installation process
Flutter installation video - Now open Android Studio and click on 'Open' then select 'eRestro' folder that you have downloaded from codecanyon.
- Click on open
- Select folder of erestro
- Now if you have not set 'flutter sdk' path before. then go to File>Settings
- If you have not installed plugin before then click on 'plugins' tab and install
flutter,dart and kotlin plugins
- From left pane, open 'Languages and Frameworks' and click on 'flutter', then on
right panel set path of flutter folder that you have downloaded in first step
- It will set Dart SDK automatically, but if does not. then from left panel click on
'dart' and set 'dart-sdk' path as shown in image
Upgrade flutter
- for upgrade go to terminal in android studio and type 'flutter upgrade' it will automatically pick latest version with stable channel
- If you have updated flutter 3.x after upgrade run flutter doctor. and in flutter
doctor if you see error like licence status unknown.
- Then go to sdk manager from uper right corner, then go to android sdk and then
uncheck 'hide obsolute package' then check 'android sdk command line tool latest'
then apply and then ok. it will download latest version as shown in below fig.
- now run flutter doctor again your error will be removed
How to change package name
- If your package directory not broken up in individual directories. In the Android
panel, click on the little gear icon.Uncheck/Deselect the Compact Empty Middle
Packages option.
- Your package directory will now be broken up in individual directories.
- Individually select each directory you want to rename, and: Right-click it Select
Refactor Click on Rename current In the Pop-up dialog.
- Enter the new name and hit Refactor.Allow a minute to let Android Studio update all
changes.
- after changing 'com.wrteam.erestro' , your directory should look like this(new name
is just for example purpose) Please give meaningful package name
- Now press ctrl + shift + R and replace old packagename with your new packagename
- For ios, open ios > Runner > info.plist, search for key CFBundleIdentifier, its
value is coming from varable named 'PRODUCT_BUNDLE_IDENTIFIER'
So press Ctrl_Shift+F and search for 'PRODUCT_BUNDLE_IDENTIFIER' and at evry place
change value of this variable
For example, in this project ios package name is 'com.wrteam.webviewprime' so change it to your package name
How to run flutter project
- Now to run project, if you see upper right part 'enable dart support' then click that and go to pubspec.yaml file and in uper right part click 'pub get' or 'package get' and then press run button.
- If you are getting error then you can perform below hack
- if in your system firewall is on, then you can temporary disable firewall and then try to run project
- if your flutter channel is not stable then you need to change it to stable. you can check your flutter channel by terminal.
- go to android studio in bottom line click on terminal, in terminal write flutter
channel.as shown below.
- if your are not in stable then write "flutter channel stable"
- go to Tools > Flutter > Flutter Clean.
- go to file > invalidate cache/ restart
- If all set, then select device or run emulator, and click on 'Play' icon in uper
right corner
To run app in physical device, you have to enable 'Developer Options' and 'USB Debugging' in your phone
How to change application name
- Change application name for your android application. Go to
lib>utils>string.dart
- Change application name for your android application. Go to
android/app/src/main/AndroidManifest.xml and change value of 'android:label'
- Change application name for your ios application. Go to ios/Runner/Info.plist and
change value of 'CFBundleName'
How to change application version
- go to pubspec.yaml and change 'version'. for example. version:1.0.1+2 .
- Do not forget to execute 'flutter pub get',and 'flutter run' after this step
How to change application logo
- For Android, open android > app > src > main > res > add paste your logo in all
mipmap folders according to device screen size
- For IOS open ios > Runner > Assets.xcassets > AppIcon.appiconset here you need to
put your logo according to diffrent size.
How to change application color
- Add your colors in lib>ui>styles>colors.dart and do not change the color variables
name
How to change application string
- Go to lib>utils>string.dart as shown in image and change values of variable you
want to change according to your app
How to change Language
- By default,default applicaiton language is english. If you want to change default
language
go to lib>utils>appLanguages.dart and add your respective language's code shown in below
image.
Get your language code from here
https://developers.google.com/admin-sdk/directory/v1/languages.
- If your default language code is not in app language list add language details
in list as shown in below image. Go to lib/utils/appLanguages.dart
- If your default language is not in assets/languages/[language-code].json then create new
file
in same folder with [language-code].json. Add all the labels from en.json and
convert label values in your respective language
- Copy all the labels form en.json file in your [language-code].json file.
- If you want to add new language then follow the steps 2,3 and 4.
How to change application font
-
Go to assets/fonts and add your font as shown in image
then open pubspec.yaml file and add your font details as shown in below image
How to change application image
-
Go to assets/images and replace your image with same name
How to Change server url
-
Go to your admin panel in that go to system and inside that client api key, here you
have to copy API link as shown in below fig and paste it in app baseURL.
-
Go to lib > utils > constants.dart. here you have to change your API server url.
How to Change default country code for OTP.
-
Go to lib>ui>screen>auth>login_screen.dart file inside that here you have to change country
code to your language code.
How to set Notification
- For ios your need to perform below given step
- In Xcode, open the project.
- In the Project Navigator (the left-hand menu), select the project icon that represents your app.
- In the top-left corner of the right-hand pane in Xcode, select your app's target.
- Navigate to the Capabilities tab.
- Enable Push Notifications.
- Check Remote Notifications and Background Fetch from Enabling Background Modes.
- APNs (Apple's Push Notification service) currently supports two types of connections: token-based (.p8) and certificate-based (.p12).you can follow either one of them
- Log in to the Apple Developer Portal.
- Navigate to Certificates, IDs & Profiles > Identifiers > App IDs and click the App ID associated with your app.
- On the screen for your App ID, check Capabilities > Push Notifications.
- Select App ID in next page & click continue.
- And then create Development SSL Certificate & Production SSL Certificate by adding CSR certificate. follow Apple's Create a certificate signing request instructions.
- Navigate to Certificates, IDs & Profiles > Keys Section and add a Universal key for Notifications,which you can use for more than one apps as well.
- Just save and Download & keep it safe, as it will be downloaded only once.
- Then go to Firebase and add this .p8 file along with Your Key ID and Team ID.
- Log in to the Apple Developer Portal.
- Navigate to Certificates, IDs & Profiles > Identifiers > App IDs and click the App ID associated with your app.
- On the screen for your App ID, check Capabilities > Push Notifications.
- Click Save and respond to the Modify App Capabilities dialog box that appears.
- To create the certificate, we will use to communicate with Apple when sending push notifications:
- In a new browser tab, follow Apple's Create a certificate signing request instructions.
- In the Apple Developer Portal, navigate back to your App ID.
- Click Capabilities > Push Notifications > Configure.
- Click one of the following buttons:
- Development SSL Certificate > Create Certificate (for testing push notifications while developing an iOS app)
- Production SSL Certificate > Create Certificate (for sending push notifications in production)
- Click Choose File and select the certificate signing request you created above.
- Click Continue.
- Click Download to download the certificate.
- Use this file to export a .p12 file in the next step.
- Navigate in the Apple Developer Portal to Certificates, IDs & Profiles > Provisioning Profiles.
- Click the provisioning profile you'd like to edit.
- Edit the provisioning profile as necessary, and click Save.
- Click Download, and double-click the downloaded provisioning profile to install it.
- Make sure your Xcode project is configured to use the provisioning profile as necessary.Next, export the downloaded certificate (.cer file) as a .p12 file that can be uploaded to firebase:
- On your Mac, double-click the .cer file to open it in Keychain Access.
- In Keychain Access, in the lower-left corner, select Category > Certificates.
- Select the certificate to export.
- Choose File > Export Items.
- Enter a name in the Save As field.
- Accept the default .p12 file format and click Save. Respond to the prompts, and enter a password for the file if necessary.
- Keep track of this file, since you'll upload it to firebase in a later step.
- Now Goto Firebase Console> Project Settings > Cloud Messaging > Apple app
configuration, now upload p8 Cetificate here.
Please go through this link to learn how to generate p8 certificate link for Firebase Push Notification Certificate Generation
Now Paste Key ID and Team ID,the Key ID is the string behind AuthKey in the file name.As for the Team ID, you can get this on your Apple developer account membership page
For Token-based (.p8).
FOR certificate-based (.p12) :
How to manage payment gatway and add Credential in admin panel
-
Go to the panel, in that system > payment mehod. for any payment method you have to
add just key id and secrect key.and if you don't wanat to use then disable from
here.
How to Add Map API key for Address
- Go to Google Cloud Platform. Click here
-
Click on console
-
Select your Firebase Project
-
Search for APIs, which are shown in below image.
-
Click on Enable to, enable that APIs for Maps SDK for Android
-
Click on Enable to, enable that APIs for Maps SDK for IOS
-
Click on Enable to, enable that APIs for Maps Geocoding API
-
Click on Enable to, enable that APIs for Maps Places API
-
Do above steps for below listed API. (enable all below APIs one by one by searching)
-
Go to Credential Tab. you will find your Androiod and iOS API keys.
-
Go to Credential Tab. you will find CREATE CREDENTIALS Click on it -> click on API key.
-
Place Search API key generate copy key and Go to lib>utils>constants.dart and past in placeSearchApiKey
-
Go to Credential Tab. you will find your Androiod and iOS API keys.
-
You have to setup those above API keys for both Platform.
- Android Setup
-
Next, open android > app > src > main > AndroidManifest.xml and
paste the , placing the android map API key you copied before to
replace
{{YOUR_API_KEY_HERE}}.
-
Next, open android > app > src > main > AndroidManifest.xml and
paste the , placing the android map API key you copied before to
replace
{{YOUR_API_KEY_HERE}}.
- iOS Setup
-
Next, open the ios > Runner > AppDelegate.swift file and paste
the
map api key for ios.
GMSServices.provideAPIKey("YOUR KEY HERE")
-
Next, open the ios > Runner > AppDelegate.swift file and paste
the
map api key for ios.
- Android Setup
- Add android and ios Map api key for map and place search map api key Go to lib>utils>constants.dart
How to Increase Product Load Limit
-
you can chnage at a time when request send to server how many item will fetch.go to
lib > utils > constants.dart please check below given image.
Change Api Parameter And Api Url
- You can change or add api url from lib > utils > api.dart, for api url here
all list of api is listed that is used in app.
-
You can change or add parameter from lib > utils > apiBodyParameterLabels.dart, for
api parameter here all list of api paramater is listed that is used in app.
Get Privacy-Policy URL for PlayStore.
- First login to admin panel.
-
System > Privacy Policy
How to Change Predefind Order Cancle Message
- You can change or add predefind order cancle message from lib > utils > constants.dart
How to integrate firebase
- Create firebase project in your account
- Go to firebase console and then click on add project.
- After that below given step will come. here you have to enter your project details.Enter your project name and then press on continue.then select email and then press continue.
- After that your project is created
- Add andorid application to your firebase project
- after that below given screen will appear, in that you have to enter your packagename and appname.and then click
register app.
- Download this google-services.json file and put indsie android > app folder
- You have connected andorid application to your firebase project successfully
- Add ios application to your firebase project
- Get your bundle id here [your-flutter-project-dir]\ios\Runner.xcodeproj\project.pbxproj or search for PRODUCT_BUNDLE_IDENTIFIER and you will get following result
- After that below given screen will appear, in that you have to enter your apple bundle Id and appname.and then click register app.
-
Download this GoogleService-Info.plist file and put indsie ios > Runner folder, Now click on next
- Now click on next next
- Now click continue to the console button.
- You have connected ios application to your firebase project successfully
How to enable Firebase Phone Authentication(OTP).
- Open your firebase console.
- Go to Authentication and open Sign-in method.
- Enable Phone Sign-in method and save.
- We have to add sha1 and sha256 key in firebase, for that perform below given step
for that you can do one of the below command in terminal "keytool -list -v -keystore
~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass
android"
- Now take debug sha1 and sha256 will print copy that and add it in firebase console.
- When we are releasing apk then we need to add release sha1 and sha256 key in
firebase panel otherwise otp will not work. for that perform below command in
terminal "keytool -list -v -keystore
"/Users/hencypithadiya/Documents/WorkSpace/KeyStoreFiles/erestro.jks" -alias key0".
Replace with your keystoreFiles path: "/Users/hencypithadiya/Documents/WorkSpace/KeyStoreFiles/erestro.jks"
Replace with your alias: "key0"
- For ios you need to set following.
- Add custom URL schemes to your Xcode project:
- Open your project configuration: double-click the project name in the left tree view. Select your app from the TARGETS section, then select the Info tab, and expand the URL Types section.
- Click the + button, and add a URL scheme for your reversed client ID. To find this value, open theGoogleService-Info.plist configuration file, and look for the REVERSED_CLIENT_ID key. Copy the value of that key, and paste it into the URL Schemes box on the configuration page. Leave the other fields blank.
- When completed, your config should look something similar to the following (but with your application-specific values):
- now enable SafetyNet for use with Firebase Authentication.In the Google Cloud Console, enable the Android DeviceCheck API for your project.first make sure your correct project is selected then press enable button.
OR Go to the terminal view and paste- gradlew signingReport as shown in below
for mac it should be ./gradlew signingReport
Steps to Authenticate firebase using Google
- Open your firebase console.
- Go to Sign-in method in Authentication.
- Go to the Google and enable the google sign_in automatically.
- after press on save button google authentication enable in your app.
Authenticate Using Facebook Login with Firebase.
- first create project for your android application , go to Facebook for Developers
- Go to Facebook Quick Start Integrate the Facebook SDK
- On the Facebook for Developers site, get the App ID and an App Secret for your app.
- In the Firebase console, open the Auth section. Enable Facebook Login.
- On the Sign in method tab, enable the Facebook sign-in method and specify the App ID and App
Secret you got from Facebook.
- Then, make sure your OAuth redirect URI (e.g. my-app-12345.firebaseapp.com/__/auth/handler) is listed as one of your OAuth redirect URIs in your Facebook app's settings page on the Facebook for Developers site in the Product Setting > Facebook Login config
- Open your app >res >values >strings.xml file.
- Associate Your Package Name and Default Class with Your App
- Provide the Development and Release Key Hashes for Your App
- To ensure the authenticity of the interactions between your app and Facebook, you need to supply us with the Android
key hash for your development environment. If your app has already been published, you should add your release key
hash too.
Generating a Development Key Hash- We will use SHA-1 key to generate hashkey for facebook login.
- you can generate hash online. Here is external link for generate key has for facebook login.Key hash Genrate Link
- Create iOS application here.
- Add your iOS Bundle Id as shown as below fig.
- Copy code shown in below fig. and paste into Info.plist file.
- and after Configure your Info.plist file.
and finally iOS app in facebook authentication enabled.
Steps to Authenticate firebase using Apple
- Open your firebase console.
- Go to Sign-in method in Authentication.
- Go to the Apple and enable apple sign in.
- In Xcode, select the Signing & Capabilities tab, and add "Sign In With Apple" as a new Capability then select a team on the Code Signing section.
- This will generate and configure an App ID in the "Certificates, Identifiers & Profiles" section of the Apple Developer portal.
Generate Release bundle for Android
- In your android studio, right click on you 'android' module of you flutter project. There is one option 'flutter', click on that. Then click on 'Open android module in android studio'.then generate release apk from that new module.
- and if in your android studio, the flutter option is disable then go to File option of your android studio. Click on 'Open' option, then locate your flutter project's android module and open it. now generate relase apk from that new module.
- Wait for build process to finish. If build finish successfully then, in Build menu you will get option 'generate signed bundle/apk'.
- Choose 'Android App Bundle' here
- If you are creating apk for first time then click on 'Create New' for Keystore path (and save this file for future use). for subsequent version updates always choose existing keystore file
- Fill all required information and click next
- from options, choose 'release'
-
Create an upload keystore
Running the following at the command line:
-
On Mac/Linux, use the following command:
keytool -genkey -v -keystore /upload-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias upload
-
On Windows, use the following command:
keytool -genkey -v -keystore c:\Users\USER_NAME\upload-keystore.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias upload
-
On Mac/Linux, use the following command:
-
Run following commands in Terminal as per your need:
-
To generate an APK
flutter build apk -
To generate an App Bundle
flutter build appbundle
-
To generate an APK
Steps to Publish iOS App to App Store
- Open your Project's Runner.xcworkspace file in Xcode, and Add your Team [Your Apple Developer ID] and also Insert GoogleService-Info.plist file [Downloaded From Firebase Project] inside folder named Runner.
- and then Select Any iOS Device (armv7,arm64) as shown in image below.
- After that Select Archive From Product Menu of Xcode as shown below.
- Once Build / Archive Generated, pop up window will be shown. Validate app First, and After Successfull Validation of App, You Can Distribute App to AppStore.
- After SuccessFull Submission of Build File, it will be Reflected to your Apple Developer Account in which we have created app with same Bundle ID. Click here for Detailed Help
How to solve Data Safety Issue in play store?
Support
Its our pleasure to serve our service and support. please contact our support team.
Head of Customer Support : Hency Pithadiya
Skype: Hency Pithadiya
To help our customers, we constantly be in touch with every customer if they need any assistance regarding our product. We offer our customers a support from Mon – Fri 9.00am to 6.00pm IST (GMT +5.30) – We are a Team located in India – Asia.
Typically we reply our customers for all the questions and queries within 24 hours of time via comments, support forum or emails.
Your Feedback
Dear valuable customer, Thank you very much for choosing our product. It's our pleasure to serve top-notch service to you. Please give us your honest feedback that will help us to make a more strong and reliable product by click here Rate Us. Thank you very much.
Contact Us
WRTeam has creative and dedicated group of developers who are mastered in Apps Developments and Web Application Development with a niche in delivering quality solutions to customers across the globe. Contact us today to find out how we can help you or for freelance work.
Visit Us : https://wrteam.in
Mail Us : info@wrteam.in
Thank you very much.