Githubit

DOC NAVIGATION

  • Mobile Apps
    • Mandatory setup
    • Customization
    • App build & release
  • Update
    • App

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.
image
3. Project was built with the 3.7.3 version. If your flutter version is less than with this version, you need to upgrade your flutter version by running this command in your terminal: flutter upgrade.

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).
image
image
6. After initialising all files, open terminal and run flutter pub get.
image
7. You can run the project on an emulator or a physical device. Select the device and click the “Run” button.
image

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
image

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 open
Settings > Translations menu and Translate all words into your language
image
image

Change App Color

• Open /lib/src/presentation/theme/app_colors.dart file and change colors as you want.
image

Change App Font

• in our apps, google font package is installed. You may change app fonts easily by selecting new fonts

App build & release

Build for Android

For debug build you can run command:
                                    

flutter build apk

flutter build apk
You will get a larger merged apk with this. But you can split them with this command:
                                    

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
Build file location: /build/app/outputs/apk/ For deploying it please follow this documentation: https://docs.flutter.dev/deployment/android

Build for iOS

There are no general way to generate app for iOS. Apple doesn’t allow to install app like this debug way. If you want to install it on your iOS device then you have to deploy it on TestFlight or AppStore. For deploying it please follow this documentation: https://docs.flutter.dev/deployment/ios

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.
image
3. Project was built with the 3.3.6 version. If your flutter version is less than with this version, you need to upgrade your flutter version by running this command in your terminal: flutter upgrade.

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.
image
image
6. After initialising all files, open terminal and run flutter pub get.
image
7. You can run the project on an emulator or a physical device. Select the device and click the “Run” button.
image

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/app_constants.dart and replace baseUrl variable value with your own URL.
                                    

/lib/src/core/constants/app_constants.dart

baseUrl=https://your_domain.com
image

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 open
Settings > Translations menu and Translate all words into your language
image
image

Change App Color

• Open /lib/src/presentation/theme/app_colors.dart file and change colors as you want.
image

Change App Font

• in our apps, google font package is installed. You may change app fonts easily by selecting new fonts

App build & release

Build for Android

For debug build you can run command:
                                    

flutter build apk

flutter build apk
You will get a larger merged apk with this. But you can split them with this command:
                                    

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
Build file location: /build/app/outputs/apk/ For deploying it please follow this documentation: https://docs.flutter.dev/deployment/android

Build for iOS

There are no general way to generate app for iOS. Apple doesn’t allow to install app like this debug way. If you want to install it on your iOS device then you have to deploy it on TestFlight or AppStore. For deploying it please follow this documentation: https://docs.flutter.dev/deployment/ios

App

Update mobile App

Download source code for flutter app.
For running your project in latest stable flutter version first run this command in your terminal root directory:
                                        

flutter upgrade

flutter upgrade

• Go to your project folder with terminal and update your packages:
                                        

flutter packages upgrade

flutter packages upgrade

• Update your code files where you need to change.
• Then for updating your app version go to pubspec.yaml file and change version:
image

WARNING

You have to be a developer in this case. If something goes wrong, we won't be responsible for that.
  • Mobile Apps
    • Mandatory setup
    • Customization
    • App build & release
  • Update
    • App

© Githubit. All Rights Reserved.