Skip to content

NguyenChanhTiep/flutter_clean_architecture

Repository files navigation

TDD Clean Architecture for Flutter


Clean Architecture Onion

Architecture Proposal




Folder structure

lib/
    data/                         <--- Data layer
        models/                       <-- Models are entities with some additional functionality added on top, serialized and deserialized to/from JSON.
        datasources/                  <-- CRUD data (Ex: Fetch data from API, fetch cached data from DB, location from device...)
        repositories/                 <-- repositories (retrieve data, heavy processing etc..)

    usecases/                     <--- Domain Layer - use cases

    blocs/                        <--- UI logic layer - Blocs, MVVM, MVP

    pages/                        <--- UI layer
        page_name/                     <-- pages name folder
          page_name.dart                   <-- page widget
          widgets/                         <-- custom widgets
    main.dart                     <--- entry point

About

Flutter Clean Architecture

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published