DriveMond

Mandatory setup

Run an existing flutter project on IDE #

Change App Logo #

You can generate app icons from this website https://appicon.co.

  • Go to <project>/assets/image/ and replace logo.png with your own logo.
  • Go to <project>/assets/image/ and replace logo_with_name.png with your company name image.
  • Then go to /android/app/src/main/res and replace all mipmap folders with your <generated icon>/android folder.
  • Again go to /ios/Runner and replace Assets.xcassets with your generated Assets.xcassets folder.

TIP

Recommended tutorial is below 👇

Change App Name #

  1. You need to set your app name in three different places. Open <project>/lib/util/app_constrants.dart and set the value of appName
    /lib/util/app_constrants.dart
static const String appName = Your App Name’;

  1. Change the value of label from <project>/android/app/src/main/AndroidManifest.xml
    /android/app/src/main/AndroidManifest.xml
android:label="Your App Name"

  1. Change the value of CFBundleName from <project>/iOS/Runner/info.plist
    /iOS/Runner/info.plist
<key>CFBundleName</key>

<string>Your App Name</string>

TIP

Recommended tutorial is below 👇

Change Base URL #

Must remember that don’t 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/util/app_constrants.dart and replace BASE_URL variable value with your own URL.

/lib/util/app_constrants.dart

static const String baseUrl = 'https://your_domain.com';

TIP

Recommended tutorial is below 👇

Change App Package #

First, you have to find out the existing package name. You can find it out from the top of /app/src/main/AndroidManifest.xml file. 

Now right-click on the project folder from Android Studio and click on replace in the path. 

You will get a popup window with two input box. 

In the first box, you have to put the existing package name that you saw in AndroidManifest.xml file previously and write down your preferred package name in the second box and then click on the Replace All button.

TIP

Recommended tutorial is below 👇

Setup Firebase for Push Notification #

First, you have to change your package name. If you didn’t then follow this.

  • Click register app and download google-services.json file from there.
  • Copy that file and paste it under <project>/android/app/ folder.
  • Create a totally white png logo for the notification icon. Paste it on <project>/android/app/src/main/res/drawable/ and replace notification_icon.png with your whiter version logo.
  • For IOS again create an app under the same project and download GoogleService-Info.plist and paste it under <project>/iOS/ folder. Also follow this documentation for full setup for IOS: https://firebase.flutter.dev/docs/messaging/apple-integration
  • Paste the Firebase Service Account Content in the admin panel Notification Settings section. You can get the Service Account Content from Firebase project settings->service accounts->Generate new private key.

After completing the setup, please restart your IDE, uninstall your previously installed app and finally run it. Also, don’t try to test it on an emulator or simulator. Emulators and simulators are unable to get push. Use a real device in this case.

TIP

Recommended tutorial is below 👇

Add Google Map API Key #

It is mandatory to enable Google Direction API, Distance Matrix API, Geocoding API, Maps SDK and Place API.

For android, open <project>/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 <project>/iOS/Runner/AppDelegate.swift and place the value of GMSServices.provideAPIKey

/iOS/Runner/AppDelegate.swift

GMSServices.provideAPIKey(“YOUR_MAP_API_KEY_HERE")