EBasket App Documentation
EBasket App Documentation
1. Introduction
eBasket is a comprehensive solution tailored for single-vendor delivery systems,
meticulously crafted using a combination of cutting-edge technologies including
Flutter, Firebase, and the Laravel Framework. With its intuitive and refined
syntax, eBasket offers a seamless user experience.
Comprising two distinct applications - the Customer and Driver apps - eBasket
caters to the diverse needs of both end-users and service providers. Whether it's
placing orders or managing deliveries, eBasket ensures efficiency and
convenience at every step.
This documentation serves as a vital resource for configuring and optimising the
eBasket admin panel, empowering administrators to streamline operations and
enhance overall performance. From setup to advanced customization, this guide
equips users with the knowledge and tools needed to harness the full potential of
the eBasket platform.
Add the Flutter bin directory to your system PATH to run Flutter
commands from the command line. This step is important for executing
Flutter commands globally in your system.
For Android: Install Android Studio and configure the Flutter plugin.
Android Studio provides the Android SDK, which Flutter uses to develop for
Android. Ensure you have the Android SDK and the necessary tools
installed through Android Studio.
For iOS: You need a macOS system with Xcode installed to develop and
deploy Flutter apps for iOS.
Open a terminal and run flutter doctor. This command checks your
system for any dependencies needed for Flutter development.
2.5. Install Flutter and Dart plugins for your preferred IDE:
If you're using VS Code, install the Flutter and Dart plugins to enhance your
development experience.
Android Studio also has built-in support for Flutter, but make sure to install
the Flutter plugin if it's not already installed.
Navigate to the project directory and explore the file structure. You'll find
the main Dart file (main.dart) in the lib directory, where you'll write your
Flutter code.
Navigate to your Flutter project directory in the terminal and run flutter
run.
This will compile your Flutter app and launch it on the connected device or
emulator.
Once your app is running, you can start developing your Flutter UI and
logic. Flutter's hot reload feature allows you to see your changes instantly
without restarting the app.
Find the package attribute in the <manifest> tag and change its value to
your desired package name.
Under the General tab, find the Bundle Identifier field and change it to
your desired bundle identifier.
Update the android: package field under flutter: with your new
package name.
Replace occurrences of the old package name with the new package
name.
Replace occurrences of the old bundle identifier with the new bundle
identifier.
After making the necessary changes, clean and rebuild the project.
In Android Studio, you can clean the project by selecting Build > Clean
Project.
In Xcode, you can clean the project by selecting Product > Clean Build
Folder.
Verify that the app runs without any issues and that the new package
name/bundle identifier is reflected correctly.
First, prepare the new launcher icon images in the required sizes. Android
and iOS have different size requirements. You typically need icons in
various sizes to support different screen densities.
Android:
For Android, you need to replace the existing launcher icon files
with your new ones. The launcher icons for Android are stored in
the mipmap folders inside the android/app/src/main/res directory.
iOS:
For iOS, you need to replace the existing icon files with your new
ones. The icons for iOS are stored in the Assets.xcassets directory
in the ios/Runner directory.
Replace the existing AppIcon with your new icon files. You'll
typically find different sizes labelled for various devices (e.g.,
iPhone, iPad).
dev_dependencies:
flutter_launcher_icons: "^0.9.2"
5. To change the Google Maps API key in a Flutter app for both
Android and iOS, you need to update the respective
configuration files in each platform. Here are the steps:
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions:
[UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
// Add your Google Maps API key here
GMSServices.provideAPIKey("YOUR_NEW_API_KEY_HERE")
return super.application(application,
didFinishLaunchingWithOptions: launchOptions)
}
}
Replace "YOUR_NEW_API_KEY_HERE" with your actual Google Maps API
key.
After updating the API key in the AppDelegate.swift file, rebuild your Flutter
app for iOS to apply the changes.
By following these steps, your Flutter app will use the new Google Maps API
key specifically for iOS. Make sure you've also updated the API key in the
Android configuration as described earlier if you want to apply changes to both
platforms.
In your Flutter project directory, open the pubspec.yaml file and ensure
that the name field is set to the desired app name. This is the name that
appears in the app store listings, on the device's home screen, etc.
After making these changes, rebuild your app for each platform to apply
the new app name.
6.4. Example:
Let's say you want to change the app name to "My New App":
6.4.1. Android:
<application
android:label="My New App"
...>
6.4.2. iOS:
<key>CFBundleDisplayName</key>
<string>My New App</string>
6.4.3. Pubspec.yaml:
name: my_new_app
7. Two Ways to set up a firebase with an application(Using
Firebase CLI (5.1) OR Manually(5.2)).
7.1. Setting up Firebase for a Flutter project using the Firebase CLI
involves several steps. Below is a detailed guide on how to do
it:
7.1.1. Install Firebase CLI:
First, you need to install the Firebase CLI if you haven't already. You
can install it via npm (Node Package Manager) by running the
following command in your terminal or command prompt:
firebase login
If you haven't already created a Firebase project, you can create one
using the Firebase CLI by running:
firebase projects:create
Follow the prompts to create a new project.
firebase init
This command will prompt you to select the Firebase features you
want to set up. Choose the Firebase services you intend to use,
such as Authentication, Firestore, etc.
After selecting the Firebase features, Firebase CLI will generate the
necessary configuration files for your project.
dependencies:
firebase_core: latest_version
firebase_auth: latest_version # (if you need
Firebase Authentication)
cloud_firestore: latest_version # (if you need
Cloud Firestore)
# Add other Firebase plugins as needed
import 'package:firebase_core/firebase_core.dart';
Now you can use Firebase services in your Flutter app. Import the
necessary Firebase packages and follow the respective
documentation for each service you want to use (e.g., Firebase
Authentication, Cloud Firestore).
7.1.9. Testing:
dependencies:
flutter:
sdk: flutter
firebase_core: latest_version
firebase_auth: latest_version # (if you need
Firebase Authentication)
cloud_firestore: latest_version # (if you need
Cloud Firestore)
# Add other Firebase plugins as needed
You can now use Firebase services in your Flutter app. Import the
necessary Firebase packages and follow the respective
documentation for each service you want to use (e.g., Firebase
Authentication, Cloud Firestore).
7.2.6. Testing: