Mandatory setup
Running flutter app in your IDE
1. Firstly, download the source code and unarchive the file.2. Check whether your computer has installed flutter sdk or not by running this command in your terminal: flutter doctor.
If all items are marked as a green checkmark, you can continue.
4. You need to have installed VS Code or Android Studio on your computer. If you haven’t installed yet, you can download and install by these links: https://code.visualstudio.com/ for VS Code and https://developer.android.com/studio for Android Studio
5. We will see only running on Android Studio. Open Android Studio. Click the “Open” button. Select unarchived root project folder (driver_app).
6. After initialising all files, open terminal and run flutter pub get.
7. You can run the project on an emulator or a physical device. Select the device and click the “Run” button.
Change App Logo
You can generate app icon using this website https://romannurik.github.io/AndroidAssetStudio/icons-launcher.html• Then go to /android/app/src/main/res and replace all mipmap folder with your /android folder
• Again go to /ios/Runner and replace Assets.xcassets with your generated Assets.xcassets folder
Change App Name
1.Change the value of label from
/android/app/src/main/AndroidManifest.xml
/android/app/src/main/AndroidManifest.xml
android:label="My App"
2.Change the value of CFBundleName from
/iOS/Runner/info.plist
/iOS/Runner/info.plist
<key> CFBundleName </key> <string> My App </string>
Change Base URL
Please do NOT put slash ( / ) at the end of your base url. Use your admin url as base url. First you have to install your admin panel. For example: If your admin url is https://your_domain.com/admin then base url will be https://your_domain.com. Open /lib/src/core/constants/secret_vars.dart and replace baseUrl variable value with your own URL./lib/src/core/constants/secret_vars.dart
baseUrl=https://your_domain.com
Change App Package
Firstly, find out the existing package name. You can find it out from top of /app/src/main/AndroidManifest.xml file. Then right click on project folder from android studio and click on replace in path You will see a popup window with two input boxes. In first box you have to put existing package name that you saw in AndroidManifest.xml file previously and then write down your preferred package name in second box and then click on Replace All button.Add Google Map API Key
• Please generate the google API key. You can visit this link - https://developers.google.com/maps/documentation/embed/get-api-key• You need to enable mentioned APIs: Direction API, Distance Matrix API, Geocoding API, Maps SDK for Android, Maps SDK for iOS, Place API.
• Then you have to enable billing account. Visit this URL for activation: https://support.google.com/googleapi/answer/6158867?hl=en
• After generating API key, you have to paste it on 3 different places: Android, iOS and web.
For android, open /android/app/src/main/AndroidManifest.xml and place the value of com.google.android.geo.API_KEY
/android/app/src/main/AndroidManifest.xml
<meta-data android:name="com.google.android.geo.API_KEY" android:value=“YOUR_MAP_API_KEY_HERE”/>
For iOS: open
/iOS/Runner/AppDelegate.swift
and place the value of
GMSServices.provideAPIKey
/iOS/Runner/AppDelegate.swift
GMSServices.provideAPIKey(“YOUR_MAP_API_KEY_HERE")
Customization
Translate mobile app
• Translation admin panel is very easy. To translate admin panel, go to admin panel and openSettings > Translations menu and Translate all words into your language
Change App Color
• Open /lib/src/presentation/theme/app_colors.dart file and change colors as you want.Change App Font
• in our apps, google font package is installed. You may change app fonts easily by selecting new fontsApp build & release
Build for Android
For debug build you can run command:flutter build apk
flutter build apk
flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi