DriveMond

Customization

Country Filter #

  • When you’re setting up your business using the Admin Panel, you can choose a default country. This means that when users or drivers log in, register, or reset their password, they’ll only see the country you selected as the default from the dialogue box.
    Then open <project>lib/common_widgets/text_field_widget.dart file and search CodePickerWidget. Now add a parameter with value like this:
    /lib/common_widgets/text_field_widget.dart
countryFilter: [_countryDialCode]

TIP

Recommended tutorial is below 👇

  • If you want to disable the country choosing dialogue, just remove showDropDownButton: true, parameter and add one parameter like this:
    /lib/common_widgets/text_field_widget.dart
enabled: false

Change onboarding text and graphics #

I) Text: If you want to change onboarding text, open <project>/assets/language/en.json and you will find some texts with a key named “on_boarding_1_title”. You just need to change the values. Do not change the key.    Also, do the same things for <project>/assets/language/ar.json file also.

"on_boarding_1_title": “YOUR_PREFERRED_TEXT”,

ii) Graphics: If you want to change the graphics of on boarding page then go to <project>/assets/image/ and replace on_board_one.png with your preferred image. Must use the same name and extension for your graphics.

Add New Local Language #

  • Go to /assets/language and press the right button on the language folder and create a new file and name it with your language code (.json). For example, if your language is Bengali then you have to name your file as bn.json. You have to name it with a proper and valid language code otherwise the app won’t work. To get the language and country code you can visit this URL: https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html
  • Copy all data from en.json and paste it into your created file.
  • Translate all English text placed here after the colon(:) to your local language. There are texts in key-value format. You have to translate value only not key otherwise it won’t work. For example: “home”: “Home” -> “home”: “বাড়ি”
  • Add your country picture on /assets/image folder.
  • Open /lib/util/app_constrants.dart, scroll down to the bottom and add one more LanguageModel under the languages array with your imageUrl, languageName, countryCode and languageCode. Again must remember that your language code and country code should be valid otherwise app won’t work. In the image URL field, you have to put your image path as assets/image/added_country_picture_name.extension. For example, if your added country picture name is bangladesh.png then the path will be assets/image/bangladesh.png.

TIP

Recommended tutorial is below 👇

Change App Color #

  • Open <project>/lib/theme/light_theme.dart file and set primary, accent and etc. colors for the light theme.
  • In the same way open <project>/lib/theme/dark_theme.dart file and set preferred primary, accent and etc. color for dark theme.
  • Apps Text color Change bodyMedium Color from 
    • <project>/lib/theme/light_theme.dart
    • <project>/lib/theme/dark_theme.dart

TIP

Recommended tutorial is below 👇

Change App Font #

  • Download your preferred font from the internet. Google has many free fonts,  you can check them at https://fonts.google.com/
  • Unzip fonts and paste them to <project>/assets/font/ folder.
  • Mentioned them in /pubspec.yaml file like: fonts:
    • family: YOUR_FONT_FAMILY_NAME fonts:
      • asset: assets/font/YOUR_FONT_FILE_NAME.ttf weight: YOUR_FONT_WEIGHT
  • Replace font family name in <project>/lib/theme/light_theme.dart, <project>/lib/theme/dark_theme.dart and <project>/lib/util/styles.dart file.
  • Replace FONTFamily name from AppConstants 

lib/util/app_constants.dart file

static const String fontFamily = Your FontFamily Name;