# praveenakki/practice-1 architecture

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

- Interactive diagram: https://gitdiagram.com/praveenakki/practice-1
- Repository: https://github.com/praveenakki/practice-1

## Overview

Bloc Demo App is a Flutter learning app whose user workflow is to open a feature screen, interact with it, and see BLoC-managed state reflected in the UI. The README documents counter, switch, image-picker, todo, favorites, posts, and login examples, with global providers in app setup and repositories for data access. The graph preserves those feature stages and the documented posts repository/API pattern. Dart implementation files were not sampled, so detailed event handling and repository call wiring cannot be verified; uncertain links are omitted.

Main entry points: [`lib/app.dart`](https://github.com/praveenakki/practice-1/blob/main/lib/app.dart) (App providers), [`lib/bloc/image_picker/image_picker_bloc.dart`](https://github.com/praveenakki/practice-1/blob/main/lib/bloc/image_picker/image_picker_bloc.dart) (Image picker BLoC), [`lib/bloc/posts/post_bloc.dart`](https://github.com/praveenakki/practice-1/blob/main/lib/bloc/posts/post_bloc.dart) (Posts BLoC), [`lib/view/counter_screen.dart`](https://github.com/praveenakki/practice-1/blob/main/lib/view/counter_screen.dart) (Counter screen)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["App setup"]
  node_entry["Entry point<br/>[main.dart]"]
  node_setup["App providers<br/>[app.dart]"]
end

subgraph group_local_examples["Local examples"]
  node_counter_view["Counter screen"]
  node_counter_bloc["Counter BLoC<br/>[counter_bloc.dart]"]
  node_switch_view["Switch screen"]
  node_switch_bloc["Switch BLoC<br/>[switch_bloc.dart]"]
  node_todo_view["Todo screen<br/>[todo_screen.dart]"]
  node_todo_bloc["Todo BLoC"]
end

subgraph group_integration_examples["Integration examples"]
  node_image_view["Image picker screen"]
  node_image_bloc["Image picker BLoC"]
  node_favorites_view["Favorites screen"]
  node_favorites_bloc["Favorites BLoC"]
  node_posts_view["Posts screen<br/>[post_screen.dart]"]
  node_posts_bloc["Posts BLoC<br/>[post_bloc.dart]"]
  node_login_view["Login screen<br/>[login_screen.dart]"]
  node_login_bloc["Login BLoC<br/>[login_bloc.dart]"]
end

subgraph group_data_access["Data access"]
  node_image_util["Picker utility"]
  node_favorites_repo["Favorites repository"]
  node_posts_repo["Posts repository"]
  node_login_repo["Login repository"]
end

node_user(("App user"))
node_api{{"Posts API"}}

node_entry -->|"starts"| node_setup
node_setup -->|"provides"| node_counter_bloc
node_setup -->|"provides"| node_switch_bloc
node_setup -->|"provides"| node_todo_bloc
node_setup -->|"provides"| node_image_bloc
node_setup -->|"provides"| node_favorites_bloc
node_setup -->|"provides"| node_posts_bloc
node_setup -->|"provides"| node_login_bloc
node_user -->|"interacts"| node_counter_view
node_user -->|"interacts"| node_switch_view
node_user -->|"interacts"| node_todo_view
node_user -->|"interacts"| node_image_view
node_user -->|"interacts"| node_favorites_view
node_user -->|"interacts"| node_posts_view
node_user -->|"interacts"| node_login_view
node_counter_view -->|"dispatches events"| node_counter_bloc
node_counter_bloc -->|"emits state"| node_counter_view
node_switch_view -->|"dispatches events"| node_switch_bloc
node_switch_bloc -->|"emits state"| node_switch_view
node_todo_view -->|"dispatches events"| node_todo_bloc
node_todo_bloc -->|"emits state"| node_todo_view
node_image_view -->|"dispatches events"| node_image_bloc
node_image_bloc -->|"emits state"| node_image_view
node_image_bloc -->|"uses picker"| node_image_util
node_favorites_view -->|"dispatches events"| node_favorites_bloc
node_favorites_bloc -->|"emits state"| node_favorites_view
node_posts_view -->|"dispatches events"| node_posts_bloc
node_posts_bloc -->|"emits state"| node_posts_view
node_posts_bloc -->|"loads posts"| node_posts_repo
node_posts_repo -.->|"requests posts"| node_api
node_login_view -->|"dispatches events"| node_login_bloc
node_login_bloc -->|"emits state"| node_login_view

click node_entry "https://github.com/praveenakki/practice-1/blob/main/lib/main.dart"
click node_setup "https://github.com/praveenakki/practice-1/blob/main/lib/app.dart"
click node_counter_view "https://github.com/praveenakki/practice-1/blob/main/lib/view/counter_screen.dart"
click node_counter_bloc "https://github.com/praveenakki/practice-1/blob/main/lib/bloc/counter/counter_bloc.dart"
click node_switch_view "https://github.com/praveenakki/practice-1/blob/main/lib/view/switch_example_screen.dart"
click node_switch_bloc "https://github.com/praveenakki/practice-1/blob/main/lib/bloc/switch_example/switch_bloc.dart"
click node_todo_view "https://github.com/praveenakki/practice-1/blob/main/lib/view/todo_screen.dart"
click node_todo_bloc "https://github.com/praveenakki/practice-1/blob/main/lib/bloc/todo_list/todo_list_bloc.dart"
click node_image_view "https://github.com/praveenakki/practice-1/blob/main/lib/view/image_picker_screen.dart"
click node_image_bloc "https://github.com/praveenakki/practice-1/blob/main/lib/bloc/image_picker/image_picker_bloc.dart"
click node_favorites_view "https://github.com/praveenakki/practice-1/blob/main/lib/view/favoriate_app_screen.dart"
click node_favorites_bloc "https://github.com/praveenakki/practice-1/blob/main/lib/bloc/favoriate_app/favoriate_app_bloc.dart"
click node_posts_view "https://github.com/praveenakki/practice-1/blob/main/lib/view/post_screen.dart"
click node_posts_bloc "https://github.com/praveenakki/practice-1/blob/main/lib/bloc/posts/post_bloc.dart"
click node_login_view "https://github.com/praveenakki/practice-1/blob/main/lib/view/login_screens/login_screen.dart"
click node_login_bloc "https://github.com/praveenakki/practice-1/blob/main/lib/bloc/login/login_bloc.dart"
click node_image_util "https://github.com/praveenakki/practice-1/blob/main/lib/utils/image_picker_utils.dart"
click node_favorites_repo "https://github.com/praveenakki/practice-1/blob/main/lib/repository/favoriate_repository.dart"
click node_posts_repo "https://github.com/praveenakki/practice-1/blob/main/lib/repository/post_repository.dart"
click node_login_repo "https://github.com/praveenakki/practice-1/blob/main/lib/repository/login_repository.dart"

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_entry,node_setup,node_user toneBlue
class node_counter_view,node_counter_bloc,node_switch_view,node_switch_bloc,node_todo_view,node_todo_bloc toneAmber
class node_image_view,node_image_bloc,node_favorites_view,node_favorites_bloc,node_posts_view,node_posts_bloc,node_login_view,node_login_bloc,node_api toneMint
class node_image_util,node_favorites_repo,node_posts_repo,node_login_repo toneRose
```

## Components

### App setup

- [Entry point](https://github.com/praveenakki/practice-1/blob/main/lib/main.dart): `lib/main.dart`
- [App providers](https://github.com/praveenakki/practice-1/blob/main/lib/app.dart): `lib/app.dart`

### Local examples

- [Counter screen](https://github.com/praveenakki/practice-1/blob/main/lib/view/counter_screen.dart): `lib/view/counter_screen.dart`
- [Counter BLoC](https://github.com/praveenakki/practice-1/blob/main/lib/bloc/counter/counter_bloc.dart): `lib/bloc/counter/counter_bloc.dart`
- [Switch screen](https://github.com/praveenakki/practice-1/blob/main/lib/view/switch_example_screen.dart): `lib/view/switch_example_screen.dart`
- [Switch BLoC](https://github.com/praveenakki/practice-1/blob/main/lib/bloc/switch_example/switch_bloc.dart): `lib/bloc/switch_example/switch_bloc.dart`
- [Todo screen](https://github.com/praveenakki/practice-1/blob/main/lib/view/todo_screen.dart): `lib/view/todo_screen.dart`
- [Todo BLoC](https://github.com/praveenakki/practice-1/blob/main/lib/bloc/todo_list/todo_list_bloc.dart): `lib/bloc/todo_list/todo_list_bloc.dart`

### Integration examples

- [Image picker screen](https://github.com/praveenakki/practice-1/blob/main/lib/view/image_picker_screen.dart): `lib/view/image_picker_screen.dart`
- [Image picker BLoC](https://github.com/praveenakki/practice-1/blob/main/lib/bloc/image_picker/image_picker_bloc.dart): `lib/bloc/image_picker/image_picker_bloc.dart`
- [Favorites screen](https://github.com/praveenakki/practice-1/blob/main/lib/view/favoriate_app_screen.dart): `lib/view/favoriate_app_screen.dart`
- [Favorites BLoC](https://github.com/praveenakki/practice-1/blob/main/lib/bloc/favoriate_app/favoriate_app_bloc.dart): `lib/bloc/favoriate_app/favoriate_app_bloc.dart`
- [Posts screen](https://github.com/praveenakki/practice-1/blob/main/lib/view/post_screen.dart): `lib/view/post_screen.dart`
- [Posts BLoC](https://github.com/praveenakki/practice-1/blob/main/lib/bloc/posts/post_bloc.dart): `lib/bloc/posts/post_bloc.dart`
- [Login screen](https://github.com/praveenakki/practice-1/blob/main/lib/view/login_screens/login_screen.dart): `lib/view/login_screens/login_screen.dart`
- [Login BLoC](https://github.com/praveenakki/practice-1/blob/main/lib/bloc/login/login_bloc.dart): `lib/bloc/login/login_bloc.dart`

### Data access

- [Picker utility](https://github.com/praveenakki/practice-1/blob/main/lib/utils/image_picker_utils.dart): `lib/utils/image_picker_utils.dart`
- [Favorites repository](https://github.com/praveenakki/practice-1/blob/main/lib/repository/favoriate_repository.dart): `lib/repository/favoriate_repository.dart`
- [Posts repository](https://github.com/praveenakki/practice-1/blob/main/lib/repository/post_repository.dart): `lib/repository/post_repository.dart`
- [Login repository](https://github.com/praveenakki/practice-1/blob/main/lib/repository/login_repository.dart): `lib/repository/login_repository.dart`

### Other components

- **App user**
- **Posts API**

## Connections

- Entry point → App providers: starts
- App providers → Counter BLoC: provides
- App providers → Switch BLoC: provides
- App providers → Todo BLoC: provides
- App providers → Image picker BLoC: provides
- App providers → Favorites BLoC: provides
- App providers → Posts BLoC: provides
- App providers → Login BLoC: provides
- App user → Counter screen: interacts
- App user → Switch screen: interacts
- App user → Todo screen: interacts
- App user → Image picker screen: interacts
- App user → Favorites screen: interacts
- App user → Posts screen: interacts
- App user → Login screen: interacts
- Counter screen → Counter BLoC: dispatches events
- Counter BLoC → Counter screen: emits state
- Switch screen → Switch BLoC: dispatches events
- Switch BLoC → Switch screen: emits state
- Todo screen → Todo BLoC: dispatches events
- Todo BLoC → Todo screen: emits state
- Image picker screen → Image picker BLoC: dispatches events
- Image picker BLoC → Image picker screen: emits state
- Image picker BLoC → Picker utility: uses picker
- Favorites screen → Favorites BLoC: dispatches events
- Favorites BLoC → Favorites screen: emits state
- Posts screen → Posts BLoC: dispatches events
- Posts BLoC → Posts screen: emits state
- Posts BLoC → Posts repository: loads posts
- Posts repository → Posts API: requests posts
- Login screen → Login BLoC: dispatches events
- Login BLoC → Login screen: emits state
