0% found this document useful (0 votes)
26 views60 pages

Final Project 8 Sem

Image caption generator

Uploaded by

Anil Mahato
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views60 pages

Final Project 8 Sem

Image caption generator

Uploaded by

Anil Mahato
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 60

Tribhuvan University

Faculty of Humanities and Social Sciences

ROOM FINDER APPLICATION


A PROJECT REPORT

Submitted to
Department of Computer Application

New Summit College

In partial fulfillment of the requirements for the Bachelors in Computer Application

Submitted by
Pujan Adhikari (T.U. Registration No:6-2-476-52-2019)
Susan Shrestha (T.U. Registration No:6-2-476-61-2019)
September, 2024

Under the Supervision of


Prawesh Dhungana
Tribhuvan University

Faculty of Humanities and Social Sciences

New Summit College

Supervisor’s Recommendation

I hereby recommend that this project prepared under my supervision by PUJAN


ADHIKARI and SUSAN SHRESTHA entitled “ROOM FINDER APPLICATION” in
partial fulfillment of the requirements for the degree of Bachelor of Computer Application
is recommended for the final evaluation.

-----------------------

SIGNATURE
Prawesh Dhungana

SUPERVISOR
Department of Computer Application
New Summit College
Shantinagar, Kathmandu, Nepal

ii
Tribhuvan University

Faculty of Humanities and Social Sciences

New Summit College

LETTER OF APPROVAL

This is to certify that this project prepared by PUJAN ADHIKARI and SUSAN
SHRESTHA entitled “ROOM FINDER APPLICATION” in partial fulfillment of the
requirements for the degree of Bachelor in Computer Application has been evaluated. In
our opinion it is satisfactory in the scope and quality as a project for the required degree.

--------------------------- -------------------------
SIGNATURE SIGNATURE
Prawesh Dhungana Chok Raj Dawadi
Supervisor Principal
Department of Computer Application New Summit College
Shantinagar, Kathmandu, Nepal Shantinagar, Kathmandu, Nepal

------------------------- --------------------------
SIGNATURE SIGNATURE
Internal Examiner External Examiner

iii
ACKNOWLEDGEMENT
We would like to express our sincere gratitude to all those who have contributed to the
successful completion of the “Room Finder Application” project. First and foremost, we
would like to thank Prawesh Dhungana, my project supervisor, for his invaluable guidance
support, and expertise throughout the project.
Moreover, we would also like to extend our application and thankful to Department of
Humanities and Social Science, Tribhuvan University and Department of BCA (New
Summit College) for their support and encouragement during the project’s development.
We are grateful to our friends and colleagues who provided feedback, suggestions, and
encouragement throughout the project’s duration. Their input and support have been
invaluable in refining the project and making it a success.
Furthermore, we would like to acknowledge the support of our families and loved ones,
who have provided unwavering support, understanding, and motivation throughout the
project’s journey.

iv
ABSTRACT
The Room Finder Application is an Android mobile app designed to help users easily find
rental properties. Built using Flutter, the app consists of two main modules: one for users
searching for rooms and another for property owners listing their available spaces. The User
module allows people to search for rooms based on location, price, and amenities like
furniture or Wi-Fi. Integrated with Google Maps, users can visualize room locations and
explore the neighborhood. With Firebase handling secure login and real-time updates of
room listings, users can see the most up-to-date information about available rooms. The
Owner module enables property owners to easily list their rooms, providing details like
rent, size, and available amenities. Owners can manage their listings and communicate
directly with potential renters through the app. By having distinct modules for users and
owners, the Room Finder Application creates a seamless experience, making it easy for
users to find rooms and for owners to manage their rental properties, all within an Android
platform.
Keyword: Android, Application, Firebase, Flutter, Google Maps, Owner Module, User
Module, Wi-Fi

v
Table of Contents

Supervisor’s Recommendation ............................................................................................ii

LETTER OF APPROVAL ................................................................................................. iii

ACKNOWLEDGEMENT .................................................................................................. iv

ABSTRACT......................................................................................................................... v

LIST OF FIGURES ......................................................................................................... viii

LIST OF TABLES .............................................................................................................. ix

CHAPTER 1: INTRODUCTION ........................................................................................ 1

1.1. Introduction ............................................................................................................... 1

1.2. Problem Statement .................................................................................................... 2

1.3. Objectives ................................................................................................................. 2

1.4. Scope and Limitation ................................................................................................ 2

1.5. Development Methodology ...................................................................................... 3

1.6. Report Organization .................................................................................................. 4

CHAPTER 2: BACKGROUND STUDY AND LITERATURE REVIEW......................... 5

2.1. Background Study ..................................................................................................... 5

2.2. Literature Review...................................................................................................... 5

CHAPTER 3: SYSTEM ANALYSIS AND DESIGN ......................................................... 8

3.1. System Analysis ........................................................................................................ 8

3.1.1. Requirement Analysis ........................................................................................ 8

3.1.2. Feasibility Study .............................................................................................. 10

3.1.3. Object Modelling using Class and Object Diagram ........................................ 12

3.1.4. Dynamic Modelling using State and Sequence Diagram ................................ 13

3.1.5. Process Modelling using Activity Diagram ..................................................... 18

3.2. System Design ........................................................................................................ 19

3.2.1. Refinement of Class, Object, State, Sequence and Activity Diagram ............. 19

3.2.2. Component Diagram ........................................................................................ 19

vi
3.2.3. Deployment Diagram ....................................................................................... 21

3.3. Algorithm Details .................................................................................................... 22

3.3.1. Algorithmic Analysis ....................................................................................... 24

3.3.2. Summary of Algorithmic Performance ............................................................ 26

CHAPTER 4: IMPLEMENTATION AND TESTING ...................................................... 27

4.1. Implementation ....................................................................................................... 27

4.1.1. Tools Used........................................................................................................ 27

4.1.2. Implementation Detail of Modules .................................................................. 28

4.2. Testing ..................................................................................................................... 30

4.2.1. Test cases for Unit Testing ............................................................................... 30

4.2.2. Test cases for System Testing .......................................................................... 34

CHAPTER 5: CONCLUSION AND FUTURE RECOMMENDATION ......................... 36

5.1. Conclusion .............................................................................................................. 36

5.2. Future Recommendation ......................................................................................... 36

APPENDICES ................................................................................................................... 38

APPENDICES A: Screen Shots ..................................................................................... 38

APPENDICES B: Source Code ..................................................................................... 46

vii
LIST OF FIGURES

Figure 1.5. Iterative Waterfall Model ................................................................................... 3


Figure 3. 1. Use Case Diagram of Room Finder App .......................................................... 9
Figure 3. 2. Class Diagram ................................................................................................ 12
Figure 3. 3. Object Diagram .............................................................................................. 13
Figure 3. 4.State Diagram .................................................................................................. 14
Figure 3. 5. Buyer Sequence Diagram ............................................................................... 15
Figure 3. 6. Seller Sequence Diagram ............................................................................... 16
Figure 3. 7. Admin Sequence Diagram .............................................................................. 17
Figure 3. 8. Activity Diagram ............................................................................................ 18
Figure 3. 9. Component Diagram ...................................................................................... 20
Figure 3. 10. Deployment Diagram ................................................................................... 21

viii
LIST OF TABLES
Table 3.1. Gantt Chart ........................................................................................................ 11
Table 4.1. Testing Admin Panel ......................................................................................... 30
Table 4.2. Testing Seller Panel ........................................................................................... 32
Table 4.3. Testing Buyer Panel .......................................................................................... 33
Table 4.4. System Testing test cases .................................................................................. 34

ix
CHAPTER 1: INTRODUCTION
1.1. Introduction
At present, the growth of content and services related to information technology is
inevitable as it opens new opportunities and encourage the creation of business rental with
entirely new contents and services to help the community. Searching a room for rental
residence has become a tough job. But these tasks can be made easier with the help of
mobile application that could help people search for a house, flats and rooms. In the era of
smartphones, mobile apps can make this job easy and more convenient. Fortunately, the
system has the capabilities to help a buyer to locate nearby rooms, not to mention, save
time and effort in finding available units for rent. The application could also help the
apartment and house seller to promote their houses by simply uploading the pictures of
their units and find potential buyer for their house. This android-based application is a
mobile application that can be used by the community members especially students, to find
single rooms or whole flat easily and it is accessible from anywhere. Internet connection is
required in order to use this application.
A room finder application is a digital platform designed to help users find available rooms
for rent based on specific criteria such as location, price, size, and amenities. These
applications allow users to browse listings, compare options, and contact property owners
or seller’s directly through the app [1]. Features often include advanced search filters, real-
time updates on room availability, and detailed descriptions with images. The primary goal
of a room finder application is to simplify and streamline the process of finding suitable
accommodations, whether for short-term or long-term stays. Users can search rented home
in various places like district wise and local area wise along with directions using Google
maps. The system is a room finder, a mobile application which is develop using Flutter that
aim to simplify the process of searching for rooms, flats and apartments. The Room Finder
app is a mobile application designed to simplify the process of searching for rental rooms,
flats and apartments. Flutter, a versatile open-source UI toolkit developed by Google,
allows for the creation of natively compiled applications for mobile, web, and desktop from
a single codebase. By leveraging Flutter's capabilities, the Room Finder app offers a
consistent and high-performance user experience across various platforms.

1
1.2. Problem Statement
Finding a suitable rental can be difficult and time-consuming. Traditional methods like
browsing classified ads, using multiple websites, or relying on word of mouth often don't
provide complete or up-to-date information. This makes it frustrating for people looking
for rooms, as they have to check many different places to find something that fits their
needs [2]. Property owners also face challenges in promoting their rentals effectively and
finding potential buyers for their house. They often have to list their properties on different
platforms, which is inefficient and time-consuming. Without a single, easy-to-use platform,
both room seekers and owners miss out on opportunities. The Room Finder app solves these
problems by offering a simple, centralized platform for the rental market. It provides a real-
time database of available rooms, with options to filter based on personal preferences and
detailed property information. Using modern technology and a user-friendly design, the
app aims to make the rental process smoother for everyone involved.

1.3. Objectives
The objectives of the projects are:
• To provide a user-friendly interface that allows users to easily search for and find
rental rooms, flats, house and apartments.
• To find and rent room or flats easily without investing lot of time and effort.
• To get the suitable buyers as per the details uploaded by house seller.

1.4. Scope and Limitation


The Room Finder app aims to simplify the rental process by offering a centralized platform
where users can search for available rooms based on location, price, and amenities.
Property owners can easily list and manage their rentals in one place. And, admin can
approve the amendments and updates made by the seller. The app provides real-time
updates on availability, room details, and allows users to directly contact sellers. By
integrating features like Google Maps and secure logins through Firebase, the app ensures
a seamless experience for both room seekers and property owners. Currently, the app is
only available for Android users, limiting its reach to those without iOS devices. The app
depends on property owners regularly updating their listings, and incomplete or outdated
listings could impact user experience. Additionally, while the app connects users with
sellers, it does not handle rental payments or contracts.

2
1.5. Development Methodology
Iterative Waterfall Methodology
The Iterative Waterfall Model is a variation of the traditional Waterfall Model that
incorporates feedback and iteration into the development process, unlike the linear
approach of classic Waterfall. In this model, software development still follows a sequential
flow through phases like Requirements, Design, Implementation, Testing, and
Maintenance, but it allows revisiting earlier phases based on the results of testing or
feedback. In the context of a Room Finder Application, the Iterative Waterfall Model would
help manage the development process by progressing through key phases one at a time, but
with the flexibility to revisit earlier phases if needed. For example:
Requirements Phase: In the first phase, we gather all the requirements for the features like
the user module, owner module, and admin module.
Design Phase: Based on these requirements, the system's design is created. The UI and
database structure for the modules are designed.
Implementation Phase: Developers begin coding the individual modules, like the user
module.
Testing Phase: Once a module is developed, it is thoroughly tested. If any bugs or new
requirements arise, we can return to the design or implementation phase, ensuring that these
issues are addressed before moving forward.
Deployment & Maintenance: Once all modules are built and tested, the application is
deployed, and maintenance starts. If any issues are found post-deployment, we can go back
and iterate over the affected phases.

Figure 1.5. Iterative Waterfall Model


3
1.6. Report Organization
The project is divided into five distinctive chapters where each of them define a different
development phase. The brief discussion on the chapters is given below:
Chapter 1: “Introduction” - provides an introductory overview of the project, its
objectives, purposes, and scope. It outlines the project's plan to achieve its goals and
objectives while aligning
with its core idea and development process.
Chapter 2: “Background Study and Literature Review” - focuses on the preliminary
preparations and research conducted prior to project initiation and planning. It includes a
comprehensive background study and literature review, essential for understanding the
current landscape of similar projects and identifying areas for improvement.
Chapter 3: “System Analysis and Design” - analyzes the functional and non-functional
requirements of the projects in addition with the feasibility study in economic, technical
and operational ways. Also, delivers into the design phase of the required system based on
the project's concept. This chapter primarily covers the design of processes, databases, and
interfaces.
Chapter 4: “Implementation and Testing” - addresses the implementation of the
designed system and the testing of the application. It utilizes various tools and techniques
to bring the system to life and ensure its functionality.
Chapter 5: “Conclusion and Future Recommendations” - concludes the project by
presenting key findings, lessons learned, and insights into how future projects can be
enhanced by incorporating the ideas and lessons from this project. It emphasizes meeting
customer expectations and improving the application's functionality to drive future success.

4
CHAPTER 2: BACKGROUND STUDY AND LITERATURE
REVIEW
2.1. Background Study
The growing demand for rental accommodations, especially in urban areas, has led to a
significant shift in how people search for and manage rental properties. Traditionally,
finding a rental space involved browsing newspaper ads, relying on real estate agents, or
word of mouth. These methods were often time-consuming, inefficient, and lacked
transparency. The rise of the internet and mobile technology introduced online listing
websites, which made searching for properties more accessible. However, these platforms
often require users to navigate multiple sites, leading to fragmented and sometimes
outdated information.
In recent years, mobile applications have emerged as a more efficient solution for the rental
market. These apps offer a centralized platform where users can quickly search, filter, and
view available rental properties. They allow users to connect with sellers directly, explore
neighborhoods through maps, and compare options with ease. At the same time, property
owners can manage their listings, update availability, and reach potential buyers more
efficiently.
Despite these advancements, there are still challenges in the rental market. Many apps lack
real-time updates, leading to frustration when properties are no longer available.
Additionally, the user experience in some apps can be clunky or complicated. The need for
a user-friendly, real-time rental app that bridges the gap between renters and property
owners continues to grow. A well-designed app can simplify the process for both parties by
providing up-to-date listings, easy communication, and advanced search features. This
background sets the stage for the development of a streamlined rental app that addresses
the existing inefficiencies in the market.

2.2. Literature Review


The room finder app is proposed which will provide a user-friendly interface that allows
users to easily search for and find rental rooms and apartments. To do that, a lot of effort
has been put to study a number of researches in this field and to gather enough information
that will help achieve that goal. In order to appreciate the facts within this research, there
is a necessity to analyze the current state and the overall nature of the room finder
application.

5
• Nproom:
NpRoom developed by Hira Lal Chaudhary, is a cutting-edge platform designed to
streamline the process of finding and managing rental accommodations [3]. It combines
advanced technology with user-focused features to address common challenges faced by
both renters and property owners. The application provides a comprehensive search engine
that allows users to locate rental properties based on various criteria such as location, price,
room type, and amenities. Detailed property listings offer high-quality images, thorough
descriptions, and rental terms, ensuring that users have all the information needed to make
informed decisions. Real-time updates keep property listings current, preventing users from
encountering outdated or unavailable options. Nproom also features a secure in-app
messaging system that facilitates direct communication between users and property
owners, enabling efficient inquiries, viewings, and negotiations.
• GharBazar
Gharbazar is an innovative platform designed to streamline the process of finding and
managing rental properties [4]. It offers a comprehensive solution for both individuals
seeking accommodation and property owners looking to list and manage their rentals. The
platform features an intuitive search engine that allows users to find properties based on
criteria such as location, budget, room type, and amenities, with advanced filtering options
to narrow down choices effectively. Each property listing includes detailed information,
including high-resolution images, thorough descriptions, and rental terms, ensuring users
have all the necessary details to make informed decisions. Gharbazar provides real-time
updates to keep property listings current, helping users avoid outdated or unavailable
options.
• Kotha Bhada
Kotha Bhada is Nepal's best and most trusted, online real estate destination for finding,
advertising, and managing Rental [5]. It enables users to explore and find their desired
property easily. With thousands of available rental properties in Nepal, Kotha Bhada has a
rich experience when it comes to looking after renters. Kotha Badha is equipped with value-
added services that can support users through the entire process, from finding your property
to packing and shifting your belongings, making it a one-stop solution. Kotha Bhada will
be there for you at every step of your journey.

6
• Rooms Finder Nepal
Room Finder Nepal is a website designed to connect people seeking accommodations with
property owners offering rental spaces across Nepal. It simplifies the search for rooms,
apartments, and other living arrangements, offering a one-stop solution for both renters and
landlords [6]. The website features profiles for users and property owners, where owners
can create detailed listings complete with photos, descriptions, amenities, and rental terms.
Users can easily search through these listings using filters like location, price range, and
room type, helping them quickly find options that match their preferences. An interactive
map feature further enhances the experience by allowing users to explore available
properties by location, making it easy to assess proximity to key landmarks or work
locations.
• Zillow Rentals
Zillow Rentals is a feature-rich rental platform under the Zillow brand, one of the most
recognized names in real estate [7]. Designed to help users easily find apartments, condos,
houses, and townhomes for rent, Zillow Rentals provides a vast database of rental listings
across the United States. The platform’s search features allow users to filter properties by
price range, number of bedrooms, property type, pet policies, and amenities, making it easy
to find rentals that suit individual preferences and budgets.
• Trulia Rental
Trulia Rentals is a rental search platform designed to help users find apartments, houses,
and condos for rent with ease while offering in-depth information about neighborhoods [8].
As part of the Zillow Group, Trulia is known for its user-friendly interface and a wide range
of filters, enabling renters to search properties by budget, number of bedrooms, pet policies,
amenities, and more. This allows renters to quickly narrow down listings that match their
specific requirements.

7
CHAPTER 3: SYSTEM ANALYSIS AND DESIGN
3.1. System Analysis
For the identification of the requirement of the project existing system was studied. After
the study the requirement are classified below:

3.1.1. Requirement Analysis


Functional requirement represents the specific functions, inputs, outputs, behaviors and
tasks provided by the system. These requirements define the precise services and
functionalities that the system must deliver to its users. They outline the fundamental
capabilities the system should possess to meet user needs effectively.
i. Functional Requirement
The functional requirements of the system are described below with the help use
case diagram:

8
Use Case Diagram

Figure 3. 1. Use Case Diagram of Room Finder App

• Admin module
The admin can manage the rooms and flat in the application.
The admin can login and approve or reject the seller’s update in the application.

9
• Seller module
The seller can maintain the rooms or flat information in the application.
The seller can login and accept the booking of the buyer in the application.
• Buyer module
The buyer can book the rooms and flat in the application.
The buyer can login and manage his/her profile in the application.
ii. Non-Functional Requirement
Non-functional requirements describe the external design and implementation
constraints, database security, reliability and usability constraints, and the standards
related to the system.
• Database Security:
It is imperative to ensure that unauthorized access to the system's database is
restricted. Only authorized personnel should have access to read and write data.
This level of security is crucial to protect customer data and payment information.
• Reliability Requirement:
The rental application must be highly reliable to provide a seamless experience for
buyers, house seller and admin. Buyers should be able to find and search for rooms,
flats, house or apartments without encountering errors or interruptions. House seller
should be able to update their house or rooms, flats or apartment and find potential
buyers for the house or property. And, admin should be able to update the changes
made by house owners.
• Usability Requirement:
The rental application should prioritize usability, offering a user-friendly
environment for buyers, house sellers and admin. The user interface should be
intuitive, making it easy for buyers to browse available houses, flats, room and book
it. House seller should find it straightforward to update their houses efficiently.

3.1.2. Feasibility Study


A feasibility study is a way to evaluate whether or not a project plan could be successful.
A feasibility study evaluates the practicality of your project plan in order judge whether or
not you’re able to move forward with the project.
i. Technical Feasibility
This system can be easily maintained and repaired technically; the system will be powerful
to be applied by low skilled users as much as possible. There is no need for the developer

10
involvement in almost all implementation of the entire system. It is easily accessible by the
people who can easily understand natural languages. Permission to the users would be
granted based on the roles specifies.
ii. Operation Feasibility
As the system is develop to solve the problem of the organization according the
requirements and the organization is also satisfying with the solution suggested. So, they
are ready to operate software once it is developed and operative once it is installed. It is
easier to use and there is no need of skilled manpower to use this system. That will meet
the organization’s operating requirement. The proposed system will provide best services
for customers and user and it will be highly secure. An estimate should be made up of how
strong the user is likely to move towards the development of a computerized system.
iii. Economic Feasibility
As for cost/benefit analysis, show the new system is develop using minimum cost and it
gives a lot of benefits such as advancing the services of the system, decreasing the workload
of the users. The organization does not use any media advertisements because it makes
information online and everyone ca get the information from the site.
iv. Schedule Feasibility
Since the project is small project and constitute dependencies. It will follow with
methodology of development of the system. During the development, process, small
iterative changes will be made in the system.

Table 3.1. Gantt Chart

Working Time 15th June 9th July 24th July 16th Aug 10th Sept 20th Sept
Requirement
Analysis
System Design
Coding
Implementation
Testing
Documentation

11
3.1.3. Object Modelling using Class and Object Diagram

Object modeling is crucial for visualizing the structure and behavior of a system. Object
Modeling using Class and Object Diagrams for a rental application involves representing
the system's structure and components by defining the classes, objects, and their
relationships.
Class Diagram: A Class Diagram represents the blueprint of the system. It defines the
system's classes, their attributes, methods, and relationships. The main classes include
Admin, User, Owner, Room, Booking, Location, and Search. For example, the User class
has attributes like UserID, Name, and Email, with methods such as Register() and
SearchRoom(). The Room class includes attributes like RoomID, RentPrice, and
Amenities, with methods to update availability or view room details. Relationships are
defined as well, such as a User (Renter) can search for and book a Room, while an Owner
can list and manage rooms. Whereas, the Admin class has attributes like AdminID, Name,
and methods such as ManageUsers() and ApproveListings().

Figure 3. 2. Class Diagram

12
Object Diagram: An Object Diagram is a snapshot of a system at a particular moment in
time. It shows instances of classes (objects) and their relationships at a specific point. For
the Room Finder app, an object diagram might show a specific User (e.g., Pujan) searching
for a Room (e.g., Room/Flat at Baneswor.) owned by a particular Owner (e.g., Susan). It
illustrates the relationships between these objects, such as Pujan making a Booking for
Room/Flat, and how objects connect and behave in real-world use at a particular moment
in time. Also, the Admin can approve or reject listings from the Owner, monitor Bookings,
and ensure system compliance.

Figure 3. 3. Object Diagram

3.1.4. Dynamic Modelling using State and Sequence Diagram

Dynamic modeling focuses on the behavior of the system during runtime, showing how the
system changes states and how objects interact over time.
State Diagram: A State Diagram shows the different states an object can be in and how it
transitions from one state to another based-on events or actions. For example, a room starts
in the Available state, moves to Booked when a user reserves it, then transitions to Occupied
once the user moves in. If the owner removes the listing or marks the room as unavailable,
13
it moves to the Unavailable state. These transitions are triggered by actions such as booking,
moving in, or removing the listing.

Figure 3. 4.State Diagram

Sequence Diagram: A Sequence Diagram illustrates how objects in the system interact with
each other over time. It shows the flow of messages between objects in a specific scenario,
like how a user books a room or how an admin approves a listing. For example, the
sequence starts with a User searching for a room and sending a request to view room details.
The Room object responds with the details, the User sends a booking request to the Owner,

14
and the admin can intervene to approve or review the booking. This diagram helps visualize
how these objects communicate and the flow of messages in a process.
Buyer Sequence Diagram

Figure 3. 5. Buyer Sequence Diagram


The Buyer Sequence Diagram illustrates how buyer interact with the application to book,
the rooms or flat. It outlines the buyer’s actions, like logging in, searching the rooms or
flat, booking the rooms or flat. It also showcases the system's responses, such as bill.

15
Seller Sequence Diagram

Figure 3. 6. Seller Sequence Diagram


The Seller Sequence Diagram offers insight into the interactions between sellers and the
application during booking management. It illustrates actions such as seller login,
uploading available rooms and flat, confirming the booking, and generating bill.
Additionally, it demonstrates how the application responds by updating the room status and
securely handling buyers.

16
Admin Sequence Diagram

Figure 3. 7. Admin Sequence Diagram


The Admin Sequence Diagram provides a visual representation of how administrators
interact with the application to manage various aspects. It showcases the admin's tasks,
including rooms or flat management, managing seller, and application monitoring. The
diagram also reveals how the application responds.

17
3.1.5. Process Modelling using Activity Diagram

An Activity Diagram represents the flow of activities or actions in a process, highlighting


the sequence and decision points. In the Room Finder Application, an activity diagram
could model the process of booking a room. It starts with the User logging into the app,
followed by searching for a room using filters like location and price. The system displays
the results, and the user selects a room to view details. If the room meets their needs, the
user sends a booking request. The Owner reviews the request and either approves or rejects
it. If approved, the booking is confirmed, and the process ends with a successful booking.
This diagram visualizes the overall flow and decisions made during the room booking
process.

Figure 3. 8. Activity Diagram


18
3.2. System Design
System design for the Room Finder Application involves defining the architecture,
components, and interactions within the app. The system consists of two main modules:
one for Users and another for Owners, along with an Admin module for managing the
platform. The design includes a backend database to store user information, room listings,
and booking data. Technologies like Firebase are used for authentication and real-time data
updates, while Google Maps integration helps users visualize room locations. The frontend,
built using Flutter, provides a user-friendly interface where users can search for rooms, and
owners can manage listings. The system design ensures smooth communication between
the modules, real-time updates, and secure data handling.

3.2.1. Refinement of Class, Object, State, Sequence and Activity Diagram


Refinement involves adding more detail and complexity to diagrams as the system evolves,
allowing better representation of functionality and behavior.
Class Diagram: Initially, the diagram shows basic classes like User and Room. Refinement
adds more attributes (like UserType) and methods (like ApproveListing()), making it more
detailed.
Object Diagram: Begins with simple object instances, like a specific Room. Refinement
adds more details such as AvailabilityStatus and connections with specific users or owners.
State Diagram: Starts with basic states like Available and Booked for a room. Refinement
adds new states like PendingApproval or UnderMaintenance, making state transitions
clearer.
Sequence Diagram: Initially shows basic interactions like booking a room. Refinement
adds steps like payment confirmation, admin approval, or error handling for failed
bookings.
Activity Diagram: Begins with simple workflows, like searching for rooms. Refinement
adds extra decision points, parallel tasks, or additional steps like verifying user info or
confirming availability.

3.2.2. Component Diagram


A Component Diagram shows the main parts (components) of a system and how they
interact. In the Room Finder App, components like the User Module, Owner Module,
Admin Module, Database, and services like Google Maps and Firebase work together. Each
component has a specific job: for example, the User Module helps users search for rooms,

19
while the Owner Module lets owners list properties. The Admin Module oversees
everything. These components communicate with each other to make the app function
smoothly. This diagram helps understand how the system is structured and how its parts
connect.

Figure 3. 9. Component Diagram

The Component diagram helps to visualize the physical components of the system and their
dependency relationship. The Room Finder Application has the components such as admin,
buyer, and seller parties involved to make a complete architecture.

20
3.2.3. Deployment Diagram
A Deployment Diagram shows how the software is deployed on hardware or servers. In the
Room Finder App, it illustrates where different parts of the app run. For example, the User
Module and Owner Module are deployed on users' Android devices, while the Database
(for storing room listings, bookings, etc.) is deployed on a cloud server like Firebase. The
diagram might also show external services like Google Maps API being accessed over the
internet. This helps visualize where each part of the system operates and how they connect.

Figure 3. 10. Deployment Diagram


A deployment diagram helps by providing a clear picture of how the system is structured
in terms of its physical components. It shows how the “Buyer”, “Seller", "Android" and
"Firebase" are interconnected, helping developers and stakeholders understand how data
flows between them and how the system operates in a real-world environment. This
visualization aids in system design, troubleshooting, and scalability planning, ensuring that
the room finder application can effectively meet its goals while maintaining security and
performance.

21
3.3. Algorithm Details
An algorithm is a step-by-step set of instructions or rules designed to solve a specific
problem or complete a task. It provides a clear process to follow, where each step leads to
the desired result. Algorithms are used in computer programs to handle tasks like sorting
data, searching for information, or performing calculations efficiently. In short, an
algorithm is a precise plan or method for solving a problem.
• Geolocation Algorithm
The algorithm used for filtering locations based on proximity (i.e., finding the
nearest items) is commonly known as the Geographical Distance Calculation or
Spatial Querying. Here's a breakdown of the concepts and the theory behind it:
i. Geographical Distance Calculation
When you want to find the nearest locations, you typically use the Haversine
formula or other distance calculation methods to measure the distance between two
points on the Earth's surface given their latitude and longitude.
Haversine Formula: The Haversine formula calculates the distance between two
points on the surface of a sphere (the Earth) based on their latitude and longitude.
It accounts for the spherical shape of the Earth, providing an accurate distance over
the globe.
Formula:
Given two points with coordinates ( 𝑙 𝑎 𝑡 1 , 𝑙 𝑛 𝑔 1 ) (lat 1 ,lng 1 ) and ( 𝑙 𝑎 𝑡 2 , 𝑙
𝑛 𝑔 2 ) (lat 2 ,lng 2 ), the Haversine distance 𝑑 d can be calculated as: 𝑑 = 2 𝑟 ⋅
asin ( haversin ( Δ 𝑙 𝑎 𝑡 ) + cos ( 𝑙 𝑎 𝑡 1 ) ⋅ cos ( 𝑙 𝑎 𝑡 2 ) ⋅ haversin ( Δ 𝑙 𝑛 𝑔 ) )
d=2r⋅asin( haversin(Δlat)+cos(lat 1 )⋅cos(lat 2 )⋅haversin(Δlng) ) Where: 𝑟 r is the
radius of the Earth (approximately 6371 km). Δ 𝑙 𝑎 𝑡 = 𝑙 𝑎 𝑡 2 − 𝑙 𝑎 𝑡 1 Δlat=lat 2
−lat 1 Δ 𝑙 𝑛 𝑔 = 𝑙 𝑛 𝑔 2 − 𝑙 𝑛 𝑔 1 Δlng=lng 2 −lng 1 haversin ( 𝜃 ) = sin 2 ( 𝜃 2 )
haversin(θ)=sin 2 ( 2 θ )
ii. Spatial Querying
Once you calculate the distance between the user's current location and the locations
of available items (rooms, in your case), you can filter and sort these items based
on their distance: Filter: Only include items within a certain distance threshold (e.g.,
5 km).

22
Sort: Sort the filtered list based on the distance from the user’s location in ascending
order, so the nearest items appear first. Example Algorithm Steps Get User
Location: Retrieve the current latitude and longitude of the user.
Fetch Room Locations: Get the list of room locations (latitude and longitude) from
your data source.
Calculate Distance:
For each room, use the Haversine formula to calculate the distance from the user’s
location. Filter and Sort: Filter rooms based on a specified maximum distance. Sort
the remaining rooms by distance from nearest to farthest. Use Case in Your Flutter
App In your Flutter app, you can implement this as follows: Fetch the current
location of the user. Retrieve all available room data from Firestore. For each room,
calculate the distance using the Haversine formula. Filter and sort the rooms based
on the calculated distance. Display the sorted list to the user. This approach ensures
that users can quickly find the nearest rooms based on their current location,
improving their overall experience.
Codes:
double haversineDistance(double lat1, double lon1, double lat2, double lon2) {
const earthRadius = 6371; // Radius of the Earth in kilometers
double dLat = _toRadians(lat2 - lat1);
double dLon = _toRadians(lon2 - lon1);
double a = sin(dLat / 2) * sin(dLat / 2) +
cos(_toRadians(lat1)) * cos(_toRadians(lat2)) *
sin(dLon / 2) * sin(dLon / 2);
double c = 2 * atan2(sqrt(a), sqrt(1 - a));
return earthRadius * c; // Distance in kilometers
}
double _toRadians(double degrees) {
return degrees * pi / 180;
}

23
• Content based Filtering Algorithm
Content-based filtering is a type of recommendation system that suggests items to
users based on what they have liked or shown interest in before. It looks at the
features or characteristics of the items (like price, location, or room type in a rental
app) and compares them with the user's preferences. For example, if a user has
previously liked rooms in a specific city or price range, the system will recommend
similar rooms based on those preferences. It works by analyzing the content of the
items and matching it with what the user is most likely to be interested in, making
the recommendations more personalized.
Codes:
double calculateSimilarity(Room room1, Room room2) {
// Calculate similarity based on price, capacity, and location
double priceSimilarity = 1 - (room1.price - room2.price).abs() / (room1.price +
room2.price);
double capacitySimilarity = 1 - (room1.capacity - room2.capacity).abs() /
(room1.capacity + room2.capacity);
// Optional: You can also compare more attributes like facilities or location
double locationSimilarity = (room1.locationName == room2.locationName) ?
1.0 : 0.0;
// You can give different weights to each similarity measure if needed
double similarityScore = (priceSimilarity + capacitySimilarity +
locationSimilarity) / 3;
return similarityScore;
}

3.3.1. Algorithmic Analysis

This section assesses the efficiency, scalability, and overall performance of the
Geolocation and Content-Based Filtering algorithms used in the Room Finder
application. Each algorithm’s role, strengths, and areas for improvement are
analyzed to determine their suitability for delivering relevant room
recommendations to users.

24
1. Geolocation Algorithm Analysis
• Objective: This algorithm calculates the distance between the user's current location
and available room listings, ranking rooms by proximity to help users quickly find
nearby options.
• Efficiency:
The Haversine formula is used here to calculate distances based on geographic
coordinates (latitude and longitude) and considers the Earth's curvature for accuracy.
Since each room requires one calculation relative to the user’s location, the complexity
is O(n)O(n)O(n) for n listings.
Once distances are calculated, sorting them by proximity has an additional complexity
of O(nlogn)O(nlogn)O(nlogn), making the combined complexity O(nlogn)O(n log
n)O(nlogn).
• Scalability:
This algorithm performs well with smaller to medium-sized datasets. As the number
of listings grows, optimizations such as caching distances or using spatial data
structures (e.g., R-Trees) could reduce the computation load and improve efficiency.
• Accuracy:
The Haversine formula is accurate for real-world location calculations, accounting
for Earth’s spherical shape. For larger datasets, spatial indexing would be beneficial
for reducing processing time while maintaining accuracy.
• Conclusion: The Geolocation Algorithm is effective for sorting rooms by proximity.
For scaling to larger datasets, adding spatial indexing could optimize performance and
reduce processing time.

2. Content-Based Filtering Algorithm Analysis


• Objective: This algorithm recommends rooms by matching features such as price,
capacity, and location to user preferences, enabling tailored suggestions.
• Efficiency:
The similarity score between a user’s preferred room and each listing is computed
based on these shared attributes. Calculating similarity scores is O(n)O(n)O(n), and
sorting them for prioritized recommendations adds O(nlogn)O(n log n)O(nlogn),
yielding a total complexity of O(nlogn)O(n log n)O(nlogn).

25
• Personalization:
By recommending rooms based on user-specified features, the algorithm enhances
personalization. Adding attribute weights, such as prioritizing price over capacity,
could improve the relevance of recommendations to users.
• Limitations:
Since content-based filtering suggests only similar items, it may restrict variety. A
hybrid model that combines content-based and collaborative filtering could broaden
recommendations by including both user preferences and interaction history.
• Conclusion: This algorithm effectively personalizes recommendations for the
Room Finder app. A hybrid approach could further diversify results, offering users
a broader selection of options.

3.3.2. Summary of Algorithmic Performance

Both algorithms are efficient and well-suited for the Room Finder application’s
current requirements. The Geolocation Algorithm provides accurate location-based
filtering, while the Content-Based Filtering Algorithm delivers customized
recommendations. Future enhancements might include spatial indexing for the
Geolocation Algorithm and a hybrid recommendation system for the Content-Based
Filtering to further boost scalability and enrich the user experience as the app grows.

26
CHAPTER 4: IMPLEMENTATION AND TESTING
4.1. Implementation
4.1.1. Tools Used
i. CASE Tools
Diagram Tools
• Draw.io used for Use case diagram
IDEs
• Android Studio is the official integrated development environment (IDE) for
building Android apps. Developed by Google, it provides tools for coding, testing,
and debugging Android applications. Android Studio supports languages like Java,
Kotlin, and C++, and comes with features like a visual layout editor, a code editor
with suggestions, and an emulator to test apps on different devices. It also integrates
with services like Firebase for real-time databases and Google Play for app
publishing, making it a comprehensive tool for Android development.
ii. Programming Language
• Dart is a programming language developed by Google, primarily used for building
web, mobile, and desktop applications. It's the language behind Flutter, a popular
framework for developing cross-platform apps. Dart is designed for fast
performance, simplicity, and scalability. It supports both object-oriented and
functional programming features, making it flexible for various types of
development tasks.
iii. Database Platform
• Firebase is a platform developed by Google that provides various tools and services
for building and managing web and mobile applications. It offers features like real-
time databases, authentication, cloud storage, and analytics to help developers build
apps quickly and efficiently. Firebase is widely used for its ability to handle tasks
like storing user data, managing user logins, sending notifications, and syncing app
data across devices in real-time. It simplifies backend development, allowing
developers to focus more on creating great user experiences.

27
4.1.2. Implementation Detail of Modules
When the design was completed and any concerns that arise during the design phase were
addressed, it was time to begin developing the application. While this paper will not dig
into the full implementation process due to resource constraints, it will outline the main
components of the implementation. Below is a list of some of the modules for this rental
application:
Admin Module:
In this section, admin can manage the rooms or flat that has been updated by the seller. The
Admin is responsible for system management, with methods such as
approvePropertyListing() for approving listings and generateReports() for analyzing app
data.
Seller Module:
In this section, seller maintain the rooms and flat information. The Seller Class represents
property owners with attributes like ownerID, name, and properties []. It provides methods
such as addProperty() for listing new rooms and manageInquiries() for handling potential
renters’ questions.
Buyer Module:
The User Class holds the details of individuals searching for rooms, with attributes like
userID, name, email, password, and location. It has methods such as searchRooms(),
allowing users to search for properties, and bookRoom() for booking a room.
Procedures
The app has several important procedures to manage specific tasks. The Search Procedure
enables users to find properties based on different filters such as location, price, and
amenities. When a user searches, the procedure searchRooms(query, filters) is called, which
fetches available rooms, applies the filters, and returns results that match the user’s criteria.
Another key procedure is the Property Listing Procedure, which allows property owners to
add or update their listings. The procedure addProperty(ownerID, propertyDetails) takes
the owner’s ID and property details, storing them in the database for renters to view. If an
owner wants to update an existing listing, they use updateProperty(propertyID,
updatedDetails). The Booking Procedure is crucial for room reservations, with
bookRoom(userID, roomID) being called to handle booking requests.

28
Function
The Authentication Function, which handles user login and security. The function
authenticates User (email, password) checks if the credentials provided by the user match
the stored data, allowing access if they do.
Methods
The application includes specific methods tied to each class that handle key actions. For
the User Class, methods like searchRooms() allow users to search for rooms with specific
filters such as location or price, while viewRoomDetails(roomID) provides detailed
information about a selected room. In the Owner Class, methods like addProperty() enable
owners to list new properties with descriptions, prices, and amenities, while
manageInquiries() allows them to communicate with potential renters through the app. The
Admin Class contains administrative methods like approvePropertyListing(propertyID) for
reviewing and approving property listings before they go live, ensuring the app's quality.
Algorithm
Several algorithms are essential for making the app efficient and user-friendly. The Search
Algorithm enables users to quickly find rooms based on their queries by indexing property
data like titles, descriptions, and amenities. When a user enters a search query, the algorithm
matches it with relevant listings. Another important algorithm is the Geolocation
Algorithm, which helps in filtering rooms based on the user’s current location. It uses the
user’s GPS coordinates to calculate distances to nearby properties and returns listings that
fall within the specified range. Additionally, the Content-Based Filtering Algorithm
recommends properties to users based on their past behavior and preferences. It analyzes
the features of previously viewed or liked properties, allowing the app to suggest similar
listings that match the user’s interests.
Bundle
A Panorama Bundle is a feature that allows users to see a 360-degree view of a location,
like the way you can explore streets in Google Maps. It gives a complete picture of the
surroundings, letting users look around in every direction. In a room rental app, a Panorama
Bundle could be used to help users explore the area around a rental property. They can get
a better sense of what the neighborhood looks like before deciding to rent. This feature
improves the experience by letting users "virtually walk around" and see more details about
the property’s surroundings.

29
4.2. Testing
Once source code has been generated, software must be tested to correct as many errors as
possible before delivery to customer. Our goal is to design a series of test cases that have a
high likelihood of finding errors. Following testing techniques are well known and the same
strategy is adopted during this project testing.
i. Unit Testing
Unit testing focuses verification effort on the smallest unit of software design- the software
component or module. The unit test is white-box oriented. The unit testing implemented in
every module of Room Finder Application, by giving correct manual input to the system,
the data are stored in database and retrieved. If you want required module to access input
or get the output from the End user any error will accrue the time will provide handler to
show what type of error will be accrued.

4.2.1. Test cases for Unit Testing


Testing Admin Panel
Table 4.1. Testing Admin Panel

S.N. Test Case Test Steps Expected Actual Pass/


ID Description Executed Results Results Fail

i) TC-01 Opening the Click the Login should Login was Pass
Room Finder admin login be successful successful,
admin page and go to the
dashboard. and the
dashboard
was entered.

ii) TC-02 Logout Click the Should be Was Pass


Account redirected to redirected to
the login page the login
page.

iii) TC-03 Viewing Click the Users page Users were Pass
Admin, Buyer user’s icon. should be displayed.
and Seller displayed.

30
iv) TC-04 Approving Click the Approve button Approve Pass
Rooms/Flat approve should be button was
button. clicked. clicked.

v) TC-05 Rejecting Click the Reject button Reject Pass


Rooms/Flat reject should be button was
button. clicked. clicked.

vi) TC-06 Update Click the Information Information Pass


Information information button should button was
be opened. opened.
button.

31
Testing Seller Panel
Table 4.2. Testing Seller Panel

S.N. Test Case Test Steps Expected Actual Pass/


ID Description Executed Results Results Fail

i) TC-01 Opening the Click the Login should be Login was Pass
Room Finder Seller login successful and go successful,
Application icon. to the dashboard.
and the
Login
dashboard
was entered.

TC-02 Clicking the Click the Property should be Property was Pass
Add option Add icon. submitted submitted.
ii)

iii) TC-03 Clicking the Click the Property should be Property was Pass
Home option Home icon. listed listed.

iv) TC-04 Update Click the Information Information Pass


Information information button should be button was
opened. opened.
button.

32
Testing Buyer Panel

Table 4.3. Testing Buyer Panel

S.N. Test Case Test Steps Expected Actual Results Pass/


ID Description Executed Results Fail

i) TC-01 Opening the Click the Signup page Signup page Pass
Room Finder Signup should be was displayed.
Application icon. displayed.
page

ii) TC-02 Clicking the Click the Login should Login was Pass
Buyer Login buyer login be successful successful, and
icon. and go to the
dashboard. the
dashboard was
entered.

iii) TC-03 Clicking the Click the Rooms/flat Rooms/flat Pass


Search button related should be were searched.
rooms/flat. searched.

iv) TC-04 Clicking the Click the Property Property was Pass
Listing option List icon. should be listed.
listed

v) TC-05 Logout Click Should be Was Pass


logout icon redirected to redirected to
the login the login page.
page

33
i. System Testing
System testing is actually a series of different tests whose primary purpose is to fully
exercise the computer-based system. Below we have described the two types of testing
which have been taken for this project. It is to check all modules worked on input basis. if
you want change any values or inputs will change all information. So specified input is
must.

4.2.2. Test cases for System Testing


Table 4.4. System Testing test cases

S.N. Test Test Steps Executed Expected Actual Pass/


Case Description Results Results Fail
ID

i) TC-01 Buyer login Buyer signup with Buyer can Buyer is Pass
and Username, Phone fill form to successfully
Number, Email Signup, fill Login.
Registration address, and sign in form
password, it gets and sign in
saved to database, to
the user now signs dashboard.
in with the same
credential.

ii) TC-02 Buyer Book Click on Book User can User has Pass
button for book successfully
Rooms/Flat
booking booked
according buyer Rooms/Flat. Rooms/Flat.
requirements.

TC-03 Checking Login with your Successful Successful Pass


iii) Security to registered Login Login
access system username and Directed to Directed to
password User User
dashboard. dashboard.

34
iv) TC-04 Checking Try Login with An error An error Pass
Security to unauthorized message message
access system username and “Invalid User “Invalid
password or User or
Password...” Password...”
must be displayed.
displayed.
v) TC-05 Checking Try accessing Redirect to Redirect to Pass
Security to system with login page login page
access system unauthorized
links

vi) TC-06 Eliminate Buyer Message Message Pass


Duplicate Signup with displayed displayed
buyer data on already available “Sorry... “Sorry...
registration username username username
already already
taken.” taken.”

vii) TC 54 Migrating Migrating Project System runs System runs


Project to to another PC successfully successfully Pass
another PC

35
CHAPTER 5: CONCLUSION AND FUTURE
RECOMMENDATION
5.1. Conclusion
In conclusion, the room finder application operates effectively and meets the needs of its
users. The system has undergone thorough testing, with all identified errors addressed and
resolved. Its user-friendly design ensures that customers of all backgrounds can navigate
the platform with ease. Comprehensive documentation has been provided, allowing end
users to understand the system's implementation clearly. The performance of the
application has been found to be satisfactory, generating all necessary outputs efficiently.
Overall, the project has been successfully completed. Future enhancements could further
improve the system’s functionality and appeal, making it even more attractive and useful
for users.

5.2. Future Recommendation


There is significant scope for future development of the room finder application. The
technology landscape is constantly evolving, and what is popular today may quickly
become outdated. To stay current with technical advancements, the system can be further
refined and enhanced. This project is not considered finalized; rather, it has the potential
for continuous improvement. Future enhancements can be implemented efficiently,
allowing for updates and modifications with minimal disruption. The system's flexible
architecture ensures that it can easily integrate new features, such as personalized room
finding experiences, advanced analytics, or AI-driven recommendations, making it
adaptable to changing user needs and market trends.

36
References

[1] Microsoft, "How to configure rooms and workspaces for the room finder," in Microsoft
Learn, https://learn.microsoft.com/en-us/outlook/troubleshoot/calendaring/configure-
room-finder-rooms-workspaces., Sep. 18, 2023.
[2] S. S. K. B. Ms. Surbhi Khare, "Room Rental Application," International Journal of
Creative Research Thoughts (IJCRT), p. 3, 2023.
[3] H. L. Chaudhary, "nproom," https://nproom.com/, 2023.
[4] T. Technologies, "gharbazar," https://www.gharbazar.com/, 2016.
[5] I. Technology, Kotha Bhada, https://kothabhada.com/, 1992-2024.
[6] VSIC, Rooms Finder Nepal, http://roomsfindernepal.com/, 2017.
[7] T. C. R. E. Association, Zillow, https://www.zillow.com/homes/for_rent/, 2006-2024.
[8] Inc. Zillow, "Trulia," https://www.trulia.com/rent/, 2024.
[9] geeksforgeeks, "What is Agile Methodology?," 2024, pp.
https://www.geeksforgeeks.org/what-is-agile-methodology/.

37
APPENDICES
APPENDICES A: Screen Shots

Figure:1 This is the system Dashboard for Admin, Buyer and Seller.

38
Figure:2 This is the Home page of buyer

39
Figure:3 This is the Listing page of buyer

40
Figure:4 This is the page where Seller add the rooms/flat

41
Figure:5 This is the page where Seller’s property is listed

42
Figure:6 This is the Profile page of Seller

43
Figure:7 This is the Home page of Admin

44
Figure:8 This is the users page where all the users are listed

45
APPENDICES B: Source Code
Login page code
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:loading_animation_widget/loading_animation_widget.dart';
import 'package:meroapp/Auth/forgotPassword.dart';
import 'package:meroapp/Constants/styleConsts.dart';
import 'package:meroapp/Auth/registerPage.dart';
import 'firebase_auth.dart';

class LoginPage extends StatefulWidget {


const LoginPage({super.key});

@override
State<LoginPage> createState() => _LoginPageState();
}

class _LoginPageState extends State<LoginPage> {


final _formKey = GlobalKey<FormState>();
bool isLoading = false;
final FirebaseAuthService _auth = FirebaseAuthService();
final TextEditingController emailController = TextEditingController();
final TextEditingController passwordController = TextEditingController();
bool _obscureText = true;

Future<bool> _onBackPressed() async {


return await showDialog(
context: context,
builder: (context) => AlertDialog(
title: Text(
'Exit App',
style: TextStyle(
color: kThemeColor,
fontSize: 18,
fontWeight: FontWeight.bold,
),
),
content: const Text(
'Are you sure you want to exit the app?',
style: TextStyle(
color: Colors.black54,

46
fontSize: 16,
),
),
actions: <Widget>[
TextButton(
onPressed: () => Navigator.of(context).pop(false),
child: Text(
'No',
style: TextStyle(
color: kThemeColor,
fontWeight: FontWeight.bold,
),
),
),
ElevatedButton(
onPressed: () => Navigator.of(context).pop(true),
style: ElevatedButton.styleFrom(
backgroundColor: kThemeColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
elevation: 2,
),
child: const Text(
'Yes',
style: TextStyle(
color: Colors.white,
),
),
),
],
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16),
),
contentPadding: const EdgeInsets.all(20),
),
) ??
false;
}

47
Room Detail code
import 'dart:developer';
import 'package:carousel_slider/carousel_slider.dart';
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:meroapp/Constants/styleConsts.dart';
import 'package:meroapp/provider/wishlistProvider.dart';
import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart';
import 'package:panorama/panorama.dart';
import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
import 'PanoramaFull.dart';
import 'model/onSaleModel.dart';

class RoomDetailPage extends StatefulWidget {


final Room room;
final String distance;

const RoomDetailPage({super.key, required this.room, required this.distance});

@override
State<RoomDetailPage> createState() => _RoomDetailPageState();
}

class _RoomDetailPageState extends State<RoomDetailPage> {


bool _isBooking = false;
final String _mapApiKey = 'AIzaSyAGFdLuw0m2pCFxNxmFA5EzJia6IzUM3iU';

Future<void> _openGoogleMap(String lat, String lng) async {


final String googleMapsUrl =
'https://www.google.com/maps/search/?api=1&query=$lat,$lng';
final Uri url = Uri.parse(googleMapsUrl);
if (await canLaunchUrl(url)) {
await launchUrl(url);
} else {
throw 'Could not launch $googleMapsUrl';
}
}
@override

48
Widget build(BuildContext context) {
final wishlistProvider = Provider.of<WishlistProvider>(context);
log(wishlistProvider.isInWishlist(widget.room).toString());
List<String> allImages = widget.room.photo;
final double carouselHeight = MediaQuery.of(context).size.height / 3;
String mapImageUrl = 'https://maps.googleapis.com/maps/api/staticmap?'
'center=${widget.room.lat},${widget.room.lng}&'

'zoom=15&size=800x300&markers=color:red%7C${widget.room.lat},${widget.room.ln
g}&'
'key=$_mapApiKey';

return Scaffold(
body: ModalProgressHUD(
inAsyncCall: _isBooking,
child: SizedBox(
height: MediaQuery.of(context).size.height,
child: Stack(
children: [
SizedBox(
height: carouselHeight,
child: CarouselSlider(
options: CarouselOptions(
height: carouselHeight,
autoPlay: true,
aspectRatio: 16 / 9,
viewportFraction: 1.0,
enlargeCenterPage: false,
enableInfiniteScroll: true,
),
items: allImages.map((imageUrl) {
return Builder(
builder: (BuildContext context) {
return Container(
width: double.infinity,
margin: const EdgeInsets.symmetric(horizontal: 0.0),
child: Image.network(
imageUrl,
fit: BoxFit.cover,
),
);

49
},
);
}).toList(),
),
),
Positioned(
top: 50,
left: 10,
child: GestureDetector(
onTap: () {
Navigator.pop(context);
},
child: Container(
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.5),
shape: BoxShape.circle,
),
child: const Padding(
padding: EdgeInsets.all(8.0),
child: Icon(
Icons.arrow_back_ios_new,
color: Colors.white,
),
),
),
)),
Positioned(
top: carouselHeight - 30,
left: 0,
right: 0,
bottom: 0,
child: Container(
decoration: const BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topRight: Radius.circular(50.0),
),
),
child: Padding(
padding: const EdgeInsets.all(20.0),
child:

50
NotificationListener<OverscrollIndicatorNotification>(
onNotification: (overscroll) {
overscroll.disallowIndicator();
return true;
},

51

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy