Quotes App Created in Flutter using BLoC and Provider

Clixily – Quotes App

This project is created in Flutter using BLoC and Provider.

Screenshots of the app

Getting Started

Requirements:

Run the following command to see if there are any dependencies you need to install to complete the setup:

 flutter doctor

How to Use

Step 1:

Download or clone this repo by using the link below:

https://github.com/dperczuk/clixily

Step 2:

Go to project root and execute the following command in console to get the required dependencies:

flutter pub get

Step 3:

This project uses freezed library that works with code generation, execute the following command to generate files:

flutter packages pub run build_runner build --delete-conflicting-outputs

or watch command in order to keep the source code synced automatically:

flutter packages pub run build_runner watch

More about build_runner

i10n support

More information about using i10n, you can find in documentation.

Architecture

This project is based on a combination of Clean Architecture and BLoC pattern.

Every “feature” of the app, will be divided into 3 layers – presentationdomain and data

Presentation:

This layer is responsible for UI, and everything which is connected with user interactions. In most of the cases, it will be divided into 3 packages:

  • cubit – with all cubits and states used in this feature, responsible for controlling current state of widgets
  • components – all smaller widgets used in this feature, which could be easily reused in many places
  • pages – which defines all high level scaffolds, in most cases with some AppBar which includes title and navigation button

Domain: This layer will contain only the core business logic (use cases) and business objects (entities). It should be totally independent of every other layer.

Domain layer will be divided into 3 packages:

  • entities – all business objects and holders used in a specific features,
  • repositories – which should contain only abstract definition of repository,
  • usecases – with classes which encapsulate all the business logic of a particular use case of the app.

Data:

The data layer consists of a Repository implementation (the contract comes from the domain layer) and data sources.

This layer contains 2 packages:

  • models – dart representation of API models, with proper methods for serialization vs deserialization
  • dataproviders – the data provider’s responsibility is to provide raw data. The data provider should be generic and versatile.
  • repositories – are a wrapper around one or more data providers, should cover all repositories defined inside domain layer

Folder Structure

Here is the folder structure, with flutter implementation:

lib/
|- app/
    |- app.dart
    |- dependencies.dart
    |- environment_config.dart
    |- router.dart
|- core/
    |- data/
    |- dependency_injection/
    |- error/
    |- extensions/
    |- theme/
    |- usecases/
|- features/
    |- common/
        |- ...
    |- home/
        |- ...
    |- quotes/
        |- ...
 |- generated/
        |- ...
 |- l10n/
        |- ...
 |- main.dart

Libraries & Tools Used

The most important packages used in this project:

GitHub

View Github

Related Posts

Recent Posts

ഇടുക്കിയിലെ മലയോര മേഖലകളിൽ രാത്രിയാത്ര നിരോധിച്ചു. രാത്രി ഏഴു മുതൽ രാവിലെ ആറു വരെയാണ് നിരോധനം

ഏന്തയാർ ഈസ്റ്റിൽ പ്രളയത്തിൽ തകർന്ന പാലത്തിന് പകരം പുതിയ പാലം നിർമ്മിക്കുവാൻ താത്ക്കാലിക പാലം പൊളിച്ച് നീക്കി

Explore the Investment Opportunities: A Comprehensive Guide to Different Types of Mutual Funds

Title: Understanding Mutual Funds: A Beginner's Guide to Investing

തീവ്രമഴ മുന്നറിയിപ്പിന്റെ പശ്ചാതലത്തിൽ സംസ്ഥാനം ജാഗ്രതയിൽ

250,000 അപേക്ഷകൾ വർദ്ധിച്ചതിനാൽ ട്രാൻസ്‌പോർട്ട് കമ്മീഷണർ പരിശോധന പുനരാരംഭിക്കും

ഏലക്കയിൽ കീടനാശിനി സാന്നിധ്യം; ആറര ലക്ഷത്തിലധികം ടിൻ അരവണ നശിപ്പിക്കാൻ ടെൻഡർ ക്ഷണിച്ച് ദേവസ്വം ബോർഡ്‌

ഭീമൻ പാറക്കഷണങ്ങൾ അടർന്ന് ദേശീയ പാതയിലേക്ക് വീഴുന്നത് പതിവാകുന്നു. കുട്ടിക്കാനത്തിനും മുണ്ടക്കയത്തിനുമിടയിൽ നിലനിൽക്കുന്നത് വൻ അപകട ഭീഷണി

ചക്രവാതച്ചുഴി:അതിശക്തമായ മഴ വരുന്നു

പ്ലസ് വൺ പ്രവേശനം. അക്ഷയയിൽ തിക്കി തിരക്കേണ്ട, നെറ്റിവിറ്റി/ജാതി തെളിയിക്കാൻ പത്താംതരം സർട്ടിഫിക്കറ്റ് മതി