Mytaxi Documentation


To set up Flutter on both Windows and Mac OS, follow these step-by-step instructions:

Setting Up Flutter on Windows

➼ System Requirements
➼ Download Flutter SDK
➼ Add Flutter to System Path
➼ Install Android Studio
➼ Set Up an Android Emulator
➼ Final Setup Check

Setting Up Flutter on MacOS

➼ System Requirements
➼ Install Flutter SDK
➼ Add Flutter to Your System PATH
➼ Verify Installation with Flutter Doctor
➼ Install Xcode (for iOS Development)
➼ Install CocoaPods
➼ Install Android Studio
➼ Set Up iOS Simulator
➼ Set Up Android Emulator
➼ Final Setup Check

Prerequisites

Android

Update AndroidManifest.xml:
<application
    android:name="${applicationName}"
    android:icon="@mipmap/ic_launcher"
    android:label="Customer"
    ... 
</application>
Update strings.xml:

IOS

Update Info.plist:
<key>CFBundleName</key>
<string>Your New App Name</string>
Update Display Name in Xcode:

Web

Update HTML Title:
<head>
...
<title>Your New App Name</title>
...
</head>

Changing the package name of a Flutter project involves updating multiple files and configurations for both Android and iOS platforms. Below are the detailed steps to change the package name.

Android

Update the applicationId in build.gradle:
defaultConfig{
    applicationId "com.new.package.name"
}
Rename Java Package Directories:
Update the Package Name in AndroidManifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.new.package.name">
</manifest>
Update Other Manifest Files:

IOS

Update PRODUCT_BUNDLE_IDENTIFIER in Xcode:

Replace it with your new iOS bundle identifier (e.g., com.new.package.name).

Update Bundle Identifier in Info.plist:
<key>CFBundleName</key>
<string>Your New App Name</string>
Notes:
This All setup are Same apply for Admin Panel.

1. Install Firebase CLI Tools

npm install -g firebase-tools

2. Authenticate Firebase CLI

firebase login

3. Create a Firebase Project

firebase projects:create

OR

4. Initialize Firebase in Your Flutter App

firebase init
Follow the prompts to:

5. Use Firebase Services

1. Create a Firebase Project

2. Add Your Flutter App to Firebase

Android Setup:
IOS Setup:

3. Start Using Firebase Services

Once the app is registered and files are added:

4. Configure DefaultFirebaseOptions

5. Initialize Firebase in main.dart

void main() async {
    WidgetsFlutterBinding.ensureInitialized();
    await Firebase.initializeApp(
    options: DefaultFirebaseOptions.currentPlatform,
    );
    runApp(MyApp());
}

1. Enable

2. Enable Google Sign-In

3. Enable Apple Sign-In

1. Install Firebase CLI Tools

2. Firebase Project Setup

Log in to Firebase:
Initialize Firebase (if not already initialized):
During this process:

3. Install Function Dependencies

1. Install Node.js and npm

2. Extract Database Files

3. Open Terminal or Command Prompt

4. Generate Firebase Service Account Key

5. Prepare config.json

6. Run Import Command

npx -p node-firestore-import-export firestore-import -a config.json -b database.json

7. Run Export Command

npx -p node-firestore-import-export firestore-export -a config.json -b database.json

1. Navigate to Your Firebase Project Folder

1. Open terminal and run the Command : firebase init
2. Select Firebase features: Use the arrow keys to navigate and press Space to select
3. Choose Firebase Project
4. Set Up Firestore Rules and Indexes
5. Deploy Only Firestore Indexes
6. Deployment Complete
Important Notes:
  • Ensure you are inside the correct project directory before running any Firebase CLI commands.
  • You must have sufficient permissions (e.g., Editor or Owner role) in your Firebase project to deploy indexes.
  • Once deployed, Firestore queries will benefit from better performance as they’ll use the optimized indexes you’ve defined.

1. Generate a Google Maps API Key

2. Add API Key to Your Flutter Project

For Android:
<application
 ...
 android:label="your_app_name">
 <meta-data
 android:name="com.google.android.geo.API_KEY"
 android:value="YOUR_API_KEY"/>
 ...
</application>
For iOS (Swift):
import GoogleMaps
GMSServices.provideAPIKey("YOUR_API_KEY")
For Flutter Web:
<head>
    ...
    <script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=places"><script>
</head>

1. Generate SHA-1 and SHA-256 Keys

For Windows (Android Debug Keystore)
For macOS/Linux

2. Add SHA Keys to Firebase Console

Important Notes:
  • For release builds, use your custom keystore (not the default debug one).
  • Keep your keystore file secure and never expose it publicly.
  • You may need to regenerate SHA keys if you change your signing configuration or keystore.
Important Notes:

This All Command are run project folder and android studio terminal

1. Build and deploy the admin panel using Firebase Hosting

1. Using Command-Line Interface (CLI)

Open Terminal
Run the Flutter App

Using an Integrated Development Environment (IDE)

Android Studio
Visual Studio Code (VS Code)
  • Open Project:
  • Run the App:
  • 1. Get Notification SenderId

    2. Get Json File

    3. where to add in admin Panel ?