# mohitj2401/live_iptv_flutter architecture

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

- Interactive diagram: https://gitdiagram.com/mohitj2401/live_iptv_flutter
- Repository: https://github.com/mohitj2401/live_iptv_flutter

## Overview

IPTV Player is a Flutter streaming app: users load an M3U playlist, browse and filter channels, then select one for playback. The README documents playlist fetching/parsing, channel state, channel and player screens, cached logos, and video playback. Dart source was not included in the excerpts, so the main workflow edges rely on README documentation; connectivity wiring is shown as unverified. Native platform launchers are omitted because they host the Flutter app rather than implement its product workflow.

Main entry points: [`lib/screens/channel_list_screen.dart`](https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/screens/channel_list_screen.dart) (Channel screen), [`lib/main.dart`](https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/main.dart) (App entry), [`lib/providers/channel_provider.dart`](https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/providers/channel_provider.dart) (Channel state), [`lib/services/iptv_service.dart`](https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/services/iptv_service.dart) (Playlist service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and UI"]
  node_app_entry["App entry<br/>[main.dart]"]
  node_channel_screen["Channel screen"]
  node_theme["Dark theme<br/>[app_theme.dart]"]
end

subgraph group_channels["Channel browsing"]
  node_channel_provider["Channel state"]
  node_channel_model["Channel model<br/>[channel.dart]"]
  node_search_filter["Search and filter"]
  node_channel_card["Channel card<br/>[channel_card.dart]"]
  node_logo_cache["Cached channel logos<br/>[channel_card.dart]"]
end

subgraph group_playlist["Playlist processing"]
  node_iptv_service["Playlist service<br/>[iptv_service.dart]"]
  node_m3u_parser["M3U parser<br/>[m3u_parser.dart]"]
  node_loading["Loading indicator"]
  node_error["Error display<br/>[error_widget.dart]"]
end

subgraph group_playback["Playback and connectivity"]
  node_player_screen["Player screen<br/>[player_screen.dart]"]
  node_video_player["Video playback"]
  node_connectivity_provider["Connectivity state"]
  node_connectivity_service["Connectivity service"]
  node_offline_banner["Offline banner"]
end

node_user(("Viewer"))
node_playlist_source[("M3U playlist")]

node_user -->|"opens app"| node_app_entry
node_app_entry -->|"shows channels"| node_channel_screen
node_channel_screen -->|"uses state"| node_channel_provider
node_channel_provider -->|"loads playlist"| node_iptv_service
node_iptv_service -->|"fetches playlist"| node_playlist_source
node_iptv_service -->|"parses M3U"| node_m3u_parser
node_m3u_parser -->|"creates channels"| node_channel_model
node_channel_provider -.->|"tracks channels"| node_channel_model
node_channel_screen -->|"filters channels"| node_search_filter
node_channel_screen -->|"shows channels"| node_channel_card
node_channel_card -->|"loads logos"| node_logo_cache
node_channel_screen -.->|"shows loading"| node_loading
node_channel_screen -.->|"shows errors"| node_error
node_user -->|"browses channels"| node_channel_screen
node_channel_screen -->|"selects channel"| node_player_screen
node_player_screen -->|"plays stream"| node_video_player
node_user -->|"controls playback"| node_player_screen
node_connectivity_provider -.->|"checks status"| node_connectivity_service
node_connectivity_provider -.->|"updates banner"| node_offline_banner
node_app_entry -.->|"configures theme"| node_theme

click node_app_entry "https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/main.dart"
click node_channel_screen "https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/screens/channel_list_screen.dart"
click node_theme "https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/theme/app_theme.dart"
click node_channel_provider "https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/providers/channel_provider.dart"
click node_channel_model "https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/models/channel.dart"
click node_search_filter "https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/screens/channel_list_screen.dart"
click node_channel_card "https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/widgets/channel_card.dart"
click node_logo_cache "https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/widgets/channel_card.dart"
click node_iptv_service "https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/services/iptv_service.dart"
click node_m3u_parser "https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/services/m3u_parser.dart"
click node_loading "https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/widgets/loading_widget.dart"
click node_error "https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/widgets/error_widget.dart"
click node_player_screen "https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/screens/player_screen.dart"
click node_connectivity_provider "https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/providers/connectivity_provider.dart"
click node_connectivity_service "https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/services/connectivity_service.dart"
click node_offline_banner "https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/widgets/offline_banner.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_app_entry,node_channel_screen,node_theme,node_user toneBlue
class node_channel_provider,node_channel_model,node_search_filter,node_channel_card,node_logo_cache,node_playlist_source toneAmber
class node_iptv_service,node_m3u_parser,node_loading,node_error toneMint
class node_player_screen,node_video_player,node_connectivity_provider,node_connectivity_service,node_offline_banner toneRose
```

## Components

### App and UI

- [App entry](https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/main.dart): `lib/main.dart`
- [Channel screen](https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/screens/channel_list_screen.dart): `lib/screens/channel_list_screen.dart`
- [Dark theme](https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/theme/app_theme.dart): `lib/theme/app_theme.dart`

### Channel browsing

- [Channel state](https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/providers/channel_provider.dart): `lib/providers/channel_provider.dart`
- [Channel model](https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/models/channel.dart): `lib/models/channel.dart`
- [Search and filter](https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/screens/channel_list_screen.dart): `lib/screens/channel_list_screen.dart`
- [Channel card](https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/widgets/channel_card.dart): `lib/widgets/channel_card.dart`
- [Cached channel logos](https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/widgets/channel_card.dart): `lib/widgets/channel_card.dart`

### Playlist processing

- [Playlist service](https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/services/iptv_service.dart): `lib/services/iptv_service.dart`
- [M3U parser](https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/services/m3u_parser.dart): `lib/services/m3u_parser.dart`
- [Loading indicator](https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/widgets/loading_widget.dart): `lib/widgets/loading_widget.dart`
- [Error display](https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/widgets/error_widget.dart): `lib/widgets/error_widget.dart`

### Playback and connectivity

- [Player screen](https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/screens/player_screen.dart): `lib/screens/player_screen.dart`
- **Video playback**
- [Connectivity state](https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/providers/connectivity_provider.dart): `lib/providers/connectivity_provider.dart`
- [Connectivity service](https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/services/connectivity_service.dart): `lib/services/connectivity_service.dart`
- [Offline banner](https://github.com/mohitj2401/live_iptv_flutter/blob/master/lib/widgets/offline_banner.dart): `lib/widgets/offline_banner.dart`

### Other components

- **Viewer**
- **M3U playlist**

## Connections

- Viewer → App entry: opens app (evidence: `README.md`)
- App entry → Channel screen: shows channels (evidence: `README.md`)
- Channel screen → Channel state: uses state (evidence: `README.md`)
- Channel state → Playlist service: loads playlist (evidence: `README.md`)
- Playlist service → M3U playlist: fetches playlist (evidence: `README.md`)
- Playlist service → M3U parser: parses M3U (evidence: `README.md`)
- M3U parser → Channel model: creates channels (evidence: `README.md`)
- Channel state → Channel model: tracks channels
- Channel screen → Search and filter: filters channels (evidence: `README.md`)
- Channel screen → Channel card: shows channels (evidence: `README.md`)
- Channel card → Cached channel logos: loads logos (evidence: `README.md`)
- Channel screen → Loading indicator: shows loading
- Channel screen → Error display: shows errors
- Viewer → Channel screen: browses channels (evidence: `README.md`)
- Channel screen → Player screen: selects channel (evidence: `README.md`)
- Player screen → Video playback: plays stream (evidence: `README.md`)
- Viewer → Player screen: controls playback (evidence: `README.md`)
- Connectivity state → Connectivity service: checks status
- Connectivity state → Offline banner: updates banner
- App entry → Dark theme: configures theme
