Skip to content

ZeaadAyman74/Flight-Booking

Repository files navigation

✈️ Flight Booking App

A simple and elegant Flutter application for booking flights. This app allows users to search flights by departure and destination, select travel dates, and view available flights. It’s built with clean architecture and modern Flutter tools.

📸 Screenshots

🚀 Features

  • 🔍 Flight search by destination and departure
  • 📅 Date picker for travel selection
  • 🛫 Animated flight results list
  • 📲 Responsive design with flutter_screenutil
  • 🧪 Full widget and unit test coverage
  • 🌍 Localization support (English & Arabic)
  • ⚙️ Clean architecture (data/domain/presentation)

📁 Floder Structure

└── └── lib/ ├── core/ │ ├── di │ ├── extensions │ ├── router │ ├── theme │ ├── utils │ └── widgets ├── features/ │ └── feature/ │ ├── data/ │ │ ├── data_source │ │ ├── models │ │ └── repos │ ├── domain/ │ │ ├── repos │ │ └── usecases │ └── presentation/ │ ├── bloc │ ├── screens │ └── widgets ├── root/ ├── l10n/ └── main.dart

🛠 Tech Stack

  • Flutter
  • Bloc (Cubit)
  • Dio (HTTP client)
  • GoRouter (Navigation)
  • flutter_screenutil (Responsive layout)
  • Mocktail (for testing)
  • Intl (Date formatting and localization)

🧪 Testing Flights Screen Logic In the Flights Cubit, there are four different methods implemented to simulate and test various flight data responses:

✅ Get Flights from API – fetches flight data using the API service.

🧪 Get Mock Flights – returns mock data to simulate a successful search.

⚠️ Simulate Error Response – triggers an error scenario to test error handling and UI.

📭 Simulate Empty Result – returns an empty list to test empty state UI.

These methods are useful during development and testing to quickly switch between real and simulated states without changing much logic or relying on the backend.

🔍 You can easily toggle between them in the FlightsScreen.

✅ Prerequisites

  • Flutter SDK installed
  • Emulator or physical device

▶️ Run App

git clone https://github.com/ZeaadAyman74/Flight-Booking.git
cd flight_booking
flutter pub get
flutter run

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published