Skip to main content

Flutter Configuration

Setting up Flutter for your Handyman Service Project

Change App's Name

In the main directory, go to lib → utils → configs.dart

const APP_NAME = 'YOUR APP NAME';

Reconfigure Server URL

In the main directory, go to lib → utils → configs.dart

const DOMAIN_URL = "ADD YOUR DOMAIN URL";

Change Default Language

In the main directory, go to lib → utils → configs.dart

const DEFAULT_LANGUAGE = "LANGUAGE CODE"; // (e.g., "en", "ar", "de", "pt", "es")
tip
  1. Set the language code from the provided list ["en", "ar", "de", "pt", "es"] for supported languages in the application. For other languages, customization is required.
  2. Use only the language code, not the entire language name. You can find the language codes here.

Change App Font

In the main directory, go to lib → app_theme.dart

fontFamily: GoogleFonts.FONT_NAME().fontFamily,
textTheme: GoogleFonts.FONT_NAMETextTheme(),
tip

Remember to apply these steps to both the DarkTheme and LightTheme in the app_theme.dart file to ensure consistent behavior across your app's themes.

Change Primary & Secondary Color

In the main directory, go to lib → utils → colors.dart

var primaryColor = Color(0xFF5F60B9);
var secondaryColor = Color(0xFFF3F4FA);

Change The URLs

In the main directory, go to lib → utils → configs.dart

const TERMS_CONDITION_URL = '' //Add Your Terms And Condition URL;
const PRIVACY_POLICY_URL = '' //Add Your Privacy Policy URL;
const HELP_AND_SUPPORT_URL = '' //Add Your Help & Support URL;
const REFUND_POLICY_URL = '' //Add Your Refund Policy URL;
const INQUIRY_SUPPORT_EMAIL = '' //Add Your Inquiry Support Email;

Change The Partner App Package and iOS App URL

const PROVIDER_PACKAGE_NAME = '' // Your Provider App Package Name;
const IOS_LINK_FOR_PARTNER = '' // Your Provider App's Appstore Link;

Update Notification Icon Name

After creating notification icon you can perform this change.

  • Open lib → utils → firebase_messaging_utils.dart.
  • In showNotification() method find lines below
  const AndroidInitializationSettings initializationSettingsAndroid = AndroidInitializationSettings('@drawable/YOUR NOTIFICATION ICON NAME');
var androidPlatformChannelSpecifics = AndroidNotificationDetails(
'notification',
'Notification',
importance: Importance.high,
visibility: NotificationVisibility.public,
autoCancel: true,
//color: primaryColor,
playSound: true,
priority: Priority.high,
icon: '@drawable/YOUR NOTIFICATION ICON NAME',
);

tip

Best practice and setting the hex value after 0xFF, you can avoid unexpected color rendering issues and ensure consistent appearance of your UI elements.