# danielcastroperez/app_learning_flutter architecture

> Architecture diagram of the GitHub repository danielcastroperez/app_learning_flutter, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/danielcastroperez/app_learning_flutter
- Repository: https://github.com/danielcastroperez/app_learning_flutter

## Overview

This is a Flutter learning app demonstrating Provider state management and Clean Architecture, with a catalog of Flutter widget examples and a separate widget-data domain. The intended user flow is to browse examples and open a detail view; the README documents Provider registration and the presentation-to-domain-to-data layering. The Dart sources were not excerpted, so detailed calls, screen routing, and the relationship between the catalog and widget data cannot be verified. Native runner nodes reflect indexed platform entry points, not product logic.

Main entry points: [`lib/data/repositories/repositories_impl.dart`](https://github.com/danielcastroperez/app_learning_flutter/blob/main/lib/data/repositories/repositories_impl.dart) (Repository implementation), [`lib/main.dart`](https://github.com/danielcastroperez/app_learning_flutter/blob/main/lib/main.dart) (Flutter app setup), [`lib/presentation/screens/HomeScreen.dart`](https://github.com/danielcastroperez/app_learning_flutter/blob/main/lib/presentation/screens/HomeScreen.dart) (Home screen), [`lib/presentation/providers/widget_provider.dart`](https://github.com/danielcastroperez/app_learning_flutter/blob/main/lib/presentation/providers/widget_provider.dart) (Widget provider)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["Widget Examples UI"]
  node_app["Flutter app setup<br/>[main.dart]"]
  node_home["Home screen<br/>[HomeScreen.dart]"]
  node_examples["Widget examples"]
  node_card["Widget card<br/>[WidgetCard.dart]"]
  node_detail["Widget detail"]
  node_code["Code block<br/>[CodeBlock.dart]"]
  node_provider["Widget provider"]
end

subgraph group_domain["Widget Domain"]
  node_getwidget["Get widget use case<br/>[get_widget.dart]"]
  node_contract["Widget repository contract"]
  node_entity["Widget entity<br/>[widget_entity.dart]"]
end

subgraph group_data["Widget Data"]
  node_repoimpl["Repository implementation"]
  node_model["Widget model<br/>[widget_model.dart]"]
  node_local[("Local database<br/>[app_database.dart]")]
  node_remote["Remote data source"]
end

subgraph group_platform["Platform Runners"]
  node_linux["Linux application runner<br/>[my_application.h]"]
  node_linuxmain["Linux entry point<br/>[main.cc]"]
  node_winwindow["Windows Flutter window<br/>[flutter_window.h]"]
  node_winbase["Windows window host<br/>[win32_window.h]"]
  node_winmain["Windows entry point<br/>[main.cpp]"]
  node_ios["iOS app delegate<br/>[AppDelegate.swift]"]
  node_linuxplugins["Linux plugin registration"]
  node_macplugins["macOS plugin registration"]
  node_winplugins["Windows plugin registration"]
end

node_user(("App user"))

node_user -.->|"opens"| node_app
node_app -->|"registers providers"| node_provider
node_app -.->|"starts UI"| node_home
node_home -.->|"presents examples"| node_examples
node_home -.->|"watches state"| node_provider
node_examples -.->|"displays cards"| node_card
node_card -.->|"opens detail"| node_detail
node_detail -.->|"shows code"| node_code
node_provider -.->|"invokes use case"| node_getwidget
node_getwidget -.->|"uses contract"| node_contract
node_repoimpl -->|"implements"| node_contract
node_repoimpl -.->|"maps data"| node_model
node_repoimpl -.->|"uses local source"| node_local
node_repoimpl -.->|"uses remote source"| node_remote
node_repoimpl -.->|"returns domain data"| node_entity
node_linuxmain -->|"starts application"| node_linux
node_winmain -->|"creates window"| node_winwindow
node_winwindow -->|"extends host"| node_winbase
node_ios -.->|"registers plugins"| node_macplugins

click node_app "https://github.com/danielcastroperez/app_learning_flutter/blob/main/lib/main.dart"
click node_home "https://github.com/danielcastroperez/app_learning_flutter/blob/main/lib/presentation/screens/HomeScreen.dart"
click node_examples "https://github.com/danielcastroperez/app_learning_flutter/tree/main/lib/presentation/widget_examples"
click node_card "https://github.com/danielcastroperez/app_learning_flutter/blob/main/lib/presentation/widgets/WidgetCard.dart"
click node_detail "https://github.com/danielcastroperez/app_learning_flutter/blob/main/lib/presentation/widgets/WidgetDetailScreen.dart"
click node_code "https://github.com/danielcastroperez/app_learning_flutter/blob/main/lib/presentation/widgets/CodeBlock.dart"
click node_provider "https://github.com/danielcastroperez/app_learning_flutter/blob/main/lib/presentation/providers/widget_provider.dart"
click node_getwidget "https://github.com/danielcastroperez/app_learning_flutter/blob/main/lib/domain/usecases/get_widget.dart"
click node_contract "https://github.com/danielcastroperez/app_learning_flutter/blob/main/lib/domain/repositories/widget_repository.dart"
click node_entity "https://github.com/danielcastroperez/app_learning_flutter/blob/main/lib/domain/entities/widget_entity.dart"
click node_repoimpl "https://github.com/danielcastroperez/app_learning_flutter/blob/main/lib/data/repositories/repositories_impl.dart"
click node_model "https://github.com/danielcastroperez/app_learning_flutter/blob/main/lib/data/models/widget_model.dart"
click node_local "https://github.com/danielcastroperez/app_learning_flutter/blob/main/lib/data/datasources/local/app_database.dart"
click node_remote "https://github.com/danielcastroperez/app_learning_flutter/blob/main/lib/data/datasources/widget_remote_datasource.dart"
click node_linux "https://github.com/danielcastroperez/app_learning_flutter/blob/main/linux/runner/my_application.h"
click node_linuxmain "https://github.com/danielcastroperez/app_learning_flutter/blob/main/linux/runner/main.cc"
click node_winwindow "https://github.com/danielcastroperez/app_learning_flutter/blob/main/windows/runner/flutter_window.h"
click node_winbase "https://github.com/danielcastroperez/app_learning_flutter/blob/main/windows/runner/win32_window.h"
click node_winmain "https://github.com/danielcastroperez/app_learning_flutter/blob/main/windows/runner/main.cpp"
click node_ios "https://github.com/danielcastroperez/app_learning_flutter/blob/main/ios/Runner/AppDelegate.swift"
click node_linuxplugins "https://github.com/danielcastroperez/app_learning_flutter/blob/main/linux/flutter/generated_plugin_registrant.h"
click node_macplugins "https://github.com/danielcastroperez/app_learning_flutter/blob/main/macos/Flutter/GeneratedPluginRegistrant.swift"
click node_winplugins "https://github.com/danielcastroperez/app_learning_flutter/blob/main/windows/flutter/generated_plugin_registrant.h"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_home,node_examples,node_card,node_detail,node_code,node_provider,node_user toneBlue
class node_getwidget,node_contract,node_entity toneAmber
class node_repoimpl,node_model,node_local,node_remote toneMint
class node_linux,node_linuxmain,node_winwindow,node_winbase,node_winmain,node_ios,node_linuxplugins,node_macplugins,node_winplugins toneRose
```

## Components

### Widget Examples UI

- [Flutter app setup](https://github.com/danielcastroperez/app_learning_flutter/blob/main/lib/main.dart): `lib/main.dart`
- [Home screen](https://github.com/danielcastroperez/app_learning_flutter/blob/main/lib/presentation/screens/HomeScreen.dart): `lib/presentation/screens/HomeScreen.dart`
- [Widget examples](https://github.com/danielcastroperez/app_learning_flutter/tree/main/lib/presentation/widget_examples): `lib/presentation/widget_examples`
- [Widget card](https://github.com/danielcastroperez/app_learning_flutter/blob/main/lib/presentation/widgets/WidgetCard.dart): `lib/presentation/widgets/WidgetCard.dart`
- [Widget detail](https://github.com/danielcastroperez/app_learning_flutter/blob/main/lib/presentation/widgets/WidgetDetailScreen.dart): `lib/presentation/widgets/WidgetDetailScreen.dart`
- [Code block](https://github.com/danielcastroperez/app_learning_flutter/blob/main/lib/presentation/widgets/CodeBlock.dart): `lib/presentation/widgets/CodeBlock.dart`
- [Widget provider](https://github.com/danielcastroperez/app_learning_flutter/blob/main/lib/presentation/providers/widget_provider.dart): `lib/presentation/providers/widget_provider.dart`

### Widget Domain

- [Get widget use case](https://github.com/danielcastroperez/app_learning_flutter/blob/main/lib/domain/usecases/get_widget.dart): `lib/domain/usecases/get_widget.dart`
- [Widget repository contract](https://github.com/danielcastroperez/app_learning_flutter/blob/main/lib/domain/repositories/widget_repository.dart): `lib/domain/repositories/widget_repository.dart`
- [Widget entity](https://github.com/danielcastroperez/app_learning_flutter/blob/main/lib/domain/entities/widget_entity.dart): `lib/domain/entities/widget_entity.dart`

### Widget Data

- [Repository implementation](https://github.com/danielcastroperez/app_learning_flutter/blob/main/lib/data/repositories/repositories_impl.dart): `lib/data/repositories/repositories_impl.dart`
- [Widget model](https://github.com/danielcastroperez/app_learning_flutter/blob/main/lib/data/models/widget_model.dart): `lib/data/models/widget_model.dart`
- [Local database](https://github.com/danielcastroperez/app_learning_flutter/blob/main/lib/data/datasources/local/app_database.dart): `lib/data/datasources/local/app_database.dart`
- [Remote data source](https://github.com/danielcastroperez/app_learning_flutter/blob/main/lib/data/datasources/widget_remote_datasource.dart): `lib/data/datasources/widget_remote_datasource.dart`

### Platform Runners

- [Linux application runner](https://github.com/danielcastroperez/app_learning_flutter/blob/main/linux/runner/my_application.h): `linux/runner/my_application.h`
- [Linux entry point](https://github.com/danielcastroperez/app_learning_flutter/blob/main/linux/runner/main.cc): `linux/runner/main.cc`
- [Windows Flutter window](https://github.com/danielcastroperez/app_learning_flutter/blob/main/windows/runner/flutter_window.h): `windows/runner/flutter_window.h`
- [Windows window host](https://github.com/danielcastroperez/app_learning_flutter/blob/main/windows/runner/win32_window.h): `windows/runner/win32_window.h`
- [Windows entry point](https://github.com/danielcastroperez/app_learning_flutter/blob/main/windows/runner/main.cpp): `windows/runner/main.cpp`
- [iOS app delegate](https://github.com/danielcastroperez/app_learning_flutter/blob/main/ios/Runner/AppDelegate.swift): `ios/Runner/AppDelegate.swift`
- [Linux plugin registration](https://github.com/danielcastroperez/app_learning_flutter/blob/main/linux/flutter/generated_plugin_registrant.h): `linux/flutter/generated_plugin_registrant.h`
- [macOS plugin registration](https://github.com/danielcastroperez/app_learning_flutter/blob/main/macos/Flutter/GeneratedPluginRegistrant.swift): `macos/Flutter/GeneratedPluginRegistrant.swift`
- [Windows plugin registration](https://github.com/danielcastroperez/app_learning_flutter/blob/main/windows/flutter/generated_plugin_registrant.h): `windows/flutter/generated_plugin_registrant.h`

### Other components

- **App user**

## Connections

- App user → Flutter app setup: opens
- Flutter app setup → Widget provider: registers providers (evidence: `README.md`)
- Flutter app setup → Home screen: starts UI
- Home screen → Widget examples: presents examples
- Home screen → Widget provider: watches state
- Widget examples → Widget card: displays cards
- Widget card → Widget detail: opens detail
- Widget detail → Code block: shows code
- Widget provider → Get widget use case: invokes use case
- Get widget use case → Widget repository contract: uses contract
- Repository implementation → Widget repository contract: implements (evidence: `README.md`)
- Repository implementation → Widget model: maps data
- Repository implementation → Local database: uses local source
- Repository implementation → Remote data source: uses remote source
- Repository implementation → Widget entity: returns domain data
- Linux entry point → Linux application runner: starts application (evidence: `linux/runner/main.cc`)
- Windows entry point → Windows Flutter window: creates window (evidence: `windows/runner/main.cpp`)
- Windows Flutter window → Windows window host: extends host (evidence: `windows/runner/flutter_window.h`)
- iOS app delegate → macOS plugin registration: registers plugins (evidence: `ios/Runner/AppDelegate.swift`)
