Code Monkey home page Code Monkey logo

iampranabray / petadoption-flutterui Goto Github PK

View Code? Open in Web Editor NEW
12.0 1.0 1.0 398.22 MB

Pet Adoption app - A pet adoption app is a digital platform designed to connect prospective pet owners with animals available for adoption.

License: MIT License

Kotlin 0.06% Objective-C 0.02% C 0.63% Ruby 1.24% Swift 0.93% Dart 77.66% CMake 8.34% C++ 10.30% HTML 0.82%
dart design-patterns flutter-apps flutterbloc gorouter isar-database offline-app provider-state-management flutter-bloc

petadoption-flutterui's Introduction

Pet Adoption

This is a pet adoption app built with Flutter that allows users to browse and adopt pets. It includes pagination listing, search functionality, and a history of adoption feature.

Features

  • Pagination listing: The app fetches and displays a list of pets in a paginated manner, allowing users to browse through multiple pages of available pets.

  • Search: Users can search for pets based on different criteria such as name age, gender, etc. The app provides a search bar where users can enter their search query and receive filtered results.

  • History of adoption: The app keeps track of pets that users have adopted in the past. It provides a history section where users can view the details of previously adopted pets.

Screenshots

Architecture

Data Layer

This layer is the lowest layer and is responsible for retrieving raw data from external sources such as a databases, APIs, and more.

Domain Layer

This layer combines one or more data providers and applies "business rules" to the data. Each component in this layer is called a repository and each repository generally manages a single domain. Packages in the repository layer should generally only interact with the data layer.

Feature Layer

This layer contains all of the application-specific features and use cases. Each feature generally consists of some UI and business logic. Features should generally be independent of other features so that they can easily be added/removed without impacting the rest of the codebase. Within each feature, the state of the feature along with any business logic is managed by blocs. Blocs interact with zero or more repositories. Blocs react to events and emit states which trigger changes in the UI. Widgets within each feature should generally only depend on the corresponding bloc and render UI based on the current state. The UI can notify the bloc of user input via events.

Now that we've gone over the layers at a high level, let's start building our application starting with the data layer!

Database queries are:

  • Find Records of Limit n.

    final List<PetDataModel?> dataModel = await isar.petDataModels.where().limit(20).findAll();

  • Pagination using ISAR Data Base.

    var offsetCount = index * perPage;

    await dataModel.where().offset(offsetCount).limit(10).findAll();

  • Searching items(AKA Pets)

    List<PetDataModel?> dataModel = await isar.petDataModels .filter() .nameContains(searchText ?? "") .findAll();

  • Setting up model attributes

    await isar.petDataModels.filter().isAdoptedEqualTo(true).findAll();

Getting Started

To get started with this project, follow these steps:

  1. Clone the repository:

  2. Change into the project directory:

  3. Install dependencies:

  4. Run the app:

Dependencies

This project relies on the following famous dependencies:

  • flutter_bloc: State management library that provides a predictable way to manage app state.
  • isar: Super Fast Cross-Platform Database for Flutter
  • provider: State management library that provides a predictable way to manage app state.
  • get_it: This is a simple Service Locator for Dart and Flutter projects with some additional goodies highly inspired by Splat. It can be used instead of InheritedWidget or Provider to access objects e.g. from your UI.

Make sure to check the pubspec.yaml file for the specific versions of these dependencies used in the project.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.

License

[Add your license information here]

petadoption-flutterui's People

Contributors

iampranabray avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

rajavikas03

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.