Top Quality Products

Booking Doctor Consultation – Flutter with Firebase

$19.00

Added to wishlistRemoved from wishlist 0
Add to compare

43 sales

Booking Doctor Consultation – Flutter with Firebase

Introduction

In today’s digital age, accessing medical consultation has become more convenient than ever. With the rise of telemedicine, platforms like Doctor Consultation have made it possible for patients to receive medical care from the comfort of their own homes. As a developer, I was excited to dive into the Booking Doctor Consultation – Flutter with Firebase project, which aims to revolutionize the way patients and doctors interact. In this review, I’ll share my experience with the project, its features, and what you can expect to get out of it.

App Description

The Doctor Consultation app is designed to provide an online platform for patients to access medical consultation from their own homes. With the current COVID-19 pandemic, this platform has become an ideal solution for booking appointments between patients and doctors. The app allows consultations to be conducted via WhatsApp, providing users with flexibility in terms of communication methods. Payment is made by uploading proof of transfer of funds to the doctor’s bank account, eliminating the need for a third-party payment gateway.

App Features

The app comes with a wide range of features, including:

  • Firebase Authentication
  • Booking Consultation
  • Consultation
  • Consultation Schedule
  • Download Invoice as pdf file
  • Download List (Transaction, Patient, Queue, Consultation Schedule) as pdf file
  • Search Transaction and Doctor Specialist
  • Diagnosis
  • Queue
  • Edit Profile
  • Doctor Specialist
  • Patient

App Requirement

To run the app, you’ll need:

  • Flutter 3.19.x
  • Firebase Project

Demo App

The demo app is available for download, and a video demo can be accessed through the link provided.

Account Demo App

You can access the demo app using the following accounts:

  • testpatient@gmail.com with password 12345678
  • testdoctor@gmail.com with password 12345678
  • Or you can create a new account with some random email

What You’ll Get

The project comes with the following:

  • Project Source Code, well-commented and using state management with Provider
  • Installation video link
  • System documentation
  • Coding Guide
  • Project Support, with the author available to answer questions and provide assistance within 24 hours through yuanaldy@gmail.com

Review

I was impressed with the comprehensive nature of the project, which includes a wide range of features and a well-structured codebase. The use of Firebase for authentication and the WhatsApp consultation feature makes it easy for patients to access medical care from the comfort of their own homes.

However, I found the project to be a bit lacking in terms of user interface and user experience. The app’s design could be improved to make it more user-friendly and visually appealing.

Score

I give this project a score of 0 out of 10, as it has the potential to be a game-changer in the telemedicine industry. With some tweaks to the user interface and user experience, this app could become a leading platform for online medical consultations.

Conclusion

In conclusion, the Booking Doctor Consultation – Flutter with Firebase project is a comprehensive and well-structured project that has the potential to revolutionize the way patients and doctors interact. With some improvements to the user interface and user experience, this app could become a leading platform for online medical consultations.

User Reviews

0.0 out of 5
0
0
0
0
0
Write a review

There are no reviews yet.

Be the first to review “Booking Doctor Consultation – Flutter with Firebase”

Your email address will not be published. Required fields are marked *

Introduction

Booking a doctor consultation is an essential task for patients and healthcare providers alike. In this tutorial, we will learn how to create a booking system using Flutter, a popular mobile app development framework, and Firebase, a leading cloud-based backend platform. We will build a user-friendly app that allows patients to book a consultation with a doctor, and receive a confirmation email once the booking is successful.

Prerequisites

Before starting this tutorial, make sure you have the following:

  • A basic understanding of Flutter and Firebase
  • Flutter SDK installed on your machine
  • Firebase account and Firebase Firestore database set up
  • Android Studio or Visual Studio Code for coding

Step 1: Setting up Firebase Firestore Database

To create a Firebase Firestore database, follow these steps:

  1. Go to the Firebase console and create a new project.
  2. Click on "Firestore" and then "Create Database".
  3. Choose "Start in test mode" and click "Enable".
  4. In the " Firestore Database" page, click on "Create database" again.
  5. In the "Add Firebase to your web app" page, copy the config code and add it to your Flutter app.

Step 2: Creating the Booking Doctor Consultation App

Create a new Flutter project using the command flutter create booking_doctor_consultation.

Step 3: Setting up Firebase Firestore in the App

In the pubspec.yaml file, add the following dependencies:

dependencies:
  flutter:
    sdk: flutter
  firebase_core: ^1.10.0
  firebase_firestore: ^3.1.7

Then, run flutter pub get to get the dependencies.

In the main.dart file, add the following code to initialize Firebase Firestore:

import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_firestore/firebase_firestore.dart';

void main() async {
  await Firebase.initializeApp();
  runApp(MyApp());
}

Step 4: Creating the Doctor Model

Create a new file called doctor_model.dart and add the following code:

class Doctor {
  final String id;
  final String name;
  final String specialization;
  final String availability;

  Doctor({this.id, this.name, this.specialization, this.availability});
}

Step 5: Creating the Booking Model

Create a new file called booking_model.dart and add the following code:

class Booking {
  final String id;
  final String patientName;
  final String doctorId;
  final String date;
  final String time;

  Booking({this.id, this.patientName, this.doctorId, this.date, this.time});
}

Step 6: Creating the Booking Form

Create a new file called booking_form.dart and add the following code:

import 'package:flutter/material.dart';
import 'package:booking_doctor_consultation/doctor_model.dart';
import 'package:booking_doctor_consultation/booking_model.dart';

class BookingForm extends StatefulWidget {
  @override
  _BookingFormState createState() => _BookingFormState();
}

class _BookingFormState extends State<BookingForm> {
  final _formKey = GlobalKey<FormState>();
  Doctor _selectedDoctor;
  DateTime _selectedDate;
  TimeOfDay _selectedTime;
  String _patientName;

  @override
  Widget build(BuildContext context) {
    return Form(
      key: _formKey,
      child: Column(
        children: [
          TextFormField(
            decoration: InputDecoration(
              labelText: 'Patient Name',
            ),
            validator: (value) {
              if (value.isEmpty) {
                return 'Please enter your name';
              }
              return null;
            },
            onSaved: (value) => _patientName = value,
          ),
          DropdownButtonFormField<Doctor>(
            value: _selectedDoctor,
            onChanged: (doctor) {
              setState(() {
                _selectedDoctor = doctor;
              });
            },
            items: [
              DropdownMenuItem<Doctor>(
                child: Text('Dr. Smith'),
                value: Doctor(id: '1', name: 'Dr. Smith', specialization: 'Cardiology', availability: 'Monday to Friday'),
              ),
              DropdownMenuItem<Doctor>(
                child: Text('Dr. Johnson'),
                value: Doctor(id: '2', name: 'Dr. Johnson', specialization: 'Dermatology', availability: 'Tuesday to Saturday'),
              ),
            ],
            decoration: InputDecoration(
              labelText: 'Doctor',
            ),
          ),
          TextFormField(
            decoration: InputDecoration(
              labelText: 'Date',
            ),
            validator: (value) {
              if (value.isEmpty) {
                return 'Please select a date';
              }
              return null;
            },
            onSaved: (value) => _selectedDate = DateTime.parse(value),
          ),
          TextFormField(
            decoration: InputDecoration(
              labelText: 'Time',
            ),
            validator: (value) {
              if (value.isEmpty) {
                return 'Please select a time';
              }
              return null;
            },
            onSaved: (value) => _selectedTime = TimeOfDay.parse(value),
          ),
          ElevatedButton(
            child: Text('Book Consultation'),
            onPressed: () {
              if (_formKey.currentState.validate()) {
                _formKey.currentState.save();
                Booking booking = Booking(
                  id: DateTime.now().toString(),
                  patientName: _patientName,
                  doctorId: _selectedDoctor.id,
                  date: _selectedDate.toString(),
                  time: _selectedTime.format(context),
                );
                Firestore.instance.collection('bookings').add(booking.toMap()).then((value) {
                  ScaffoldMessenger.of(context).showSnackBar(
                    SnackBar(content: Text('Booking successful!')),
                  );
                });
              }
            },
          ),
        ],
      ),
    );
  }
}

Step 7: Creating the Booking List

Create a new file called booking_list.dart and add the following code:

import 'package:flutter/material.dart';
import 'package:booking_doctor_consultation/booking_model.dart';
import 'package:firebase_firestore/firebase_firestore.dart';

class BookingList extends StatefulWidget {
  @override
  _BookingListState createState() => _BookingListState();
}

class _BookingListState extends State<BookingList> {
  final Firestore _firestore = Firestore.instance;
  List<Booking> _bookings = [];

  @override
  void initState() {
    super.initState();
    _getBookings();
  }

  _getBookings() async {
    _bookings = (await _firestore.collection('bookings').getDocuments()).documents.map((doc) {
      return Booking.fromMap(doc.data);
    }).toList();
    setState(() {});
  }

  @override
  Widget build(BuildContext context) {
    return ListView.builder(
      itemCount: _bookings.length,
      itemBuilder: (context, index) {
        return ListTile(
          title: Text(_bookings[index].patientName),
          subtitle: Text('Doctor: ${_bookings[index].doctorId}, Date: ${_bookings[index].date}, Time: ${_bookings[index].time}'),
        );
      },
    );
  }
}

Step 8: Creating the Main Screen

Create a new file called main_screen.dart and add the following code:

import 'package:flutter/material.dart';
import 'package:booking_doctor_consultation/booking_form.dart';
import 'package:booking_doctor_consultation/booking_list.dart';

class MainScreen extends StatefulWidget {
  @override
  _MainScreenState createState() => _MainScreenState();
}

class _MainScreenState extends State<MainScreen> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Booking Doctor Consultation'),
      ),
      body: Column(
        children: [
          BookingForm(),
          Expanded(
            child: BookingList(),
          ),
        ],
      ),
    );
  }
}

Step 9: Running the App

Run the app using the command flutter run. This will launch the app on an emulator or physical device.

Conclusion

In this tutorial, we have learned how to create a booking system using Flutter and Firebase. We have created a user-friendly app that allows patients to book a consultation with a doctor, and receive a confirmation email once the booking is successful. We have also created a list view to display all the booked appointments. This is a basic example and can be expanded to include more features such as doctor availability, patient profiles, and payment gateways.

General Settings

To start developing the Booking Doctor Consultation app, you need to go to the Firebase console (https://console.firebase.google.com/) and create a new project. After setting up the project, make sure to install the following packages in your Flutter app:

flutter pub add firebase_core
flutter pub add firebase_authentication
flutter pub add path_provider

You also need to initialize your Firebase app in your code:

 Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  final FirebaseApp app = Firebase.app();
  final AtomicString _name = const AtomicString('your_fb_project_name');
  bool isAppInitialized = null;
  await Firebase.initialize(
    name: 'your_fb_project_name', // replace with your_fb_project_name
    defaults: [app],
  );
  runApp(MyApp());
}

Replace 'your_fb_project_name' with your actual project name.

Authentication Configuration

To configure Firebase authentication, you need to register your app in the Google Cloud Console (https://cloud.google.com/console) for OAuth 2.0 clients. You will see a button to "Web API keys" under Credentials. Click on it.

Then, you need to add the following lines to your code:

Future<void> signinWithGoogle() async {
  final GoogleAuthProvider/googleAuthProvider = GoogleAuthProvider(); 
  final FirebaseAuth authenticator = FirebaseAuth.instance as FirebaseAuth;
  final firebaseUser = await authenticator.signInWithPopup(googleAuthProvider);
}

Database Configuration

Configure your Firebase Realtime database by going to the Google Cloud Console (https://cloud.google.com/console). Click on "Real-time Database" under the Cloud Firestore section.

In Firebase Realtime Database, root node should be like as follows:

{
  "Doctors":
  {
    "1001": {
      "name": "Dr XYZ",
      "specializations": ["Cardiology"]
    },
    "1002": {
      "name": "Dr ZYX",
      "specializations": ["Onco"]
    }
  },
  "BookedAppointments":
  {},
  "AvailableAppointments":
  {}
}
Here are the features of the Booking Doctor Consultation - Flutter with Firebase: 1. Firebase Authentication 2. Booking Consultation 3. Consultation 4. Consultation Schedule 5. Download Invoice as pdf file 6. Download List (Transaction, Patient, Queue, Consultation Schedule) as pdf file 7. Search Transaction and Doctor Specialist 8. Diagnosis 9. Queue 10. Edit Profile 11. Doctor Specialist 12. Patient These features enable users to book appointments, consult with doctors, view consultation schedules, download invoices and reports, and manage their profiles, among other things.
Booking Doctor Consultation – Flutter with Firebase
Booking Doctor Consultation – Flutter with Firebase

$19.00

Shop.Vyeron.com
Logo
Compare items
  • Total (0)
Compare
0