# adellahlouh/country_phone_picker architecture

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

- Interactive diagram: https://gitdiagram.com/adellahlouh/country_phone_picker
- Repository: https://github.com/adellahlouh/country_phone_picker

## Overview

Country Phone Picker is a Flutter package for choosing a country and dial code in phone-number forms. A host app embeds the picker; the user opens its bottom sheet, searches or browses countries, and selects one, triggering an onChanged callback with a CountryModel. The README also documents country data, localized names, search, filtering, and sheet customization. Internal call relationships are not shown in the supplied source excerpts, so edges below represent documented product behavior rather than inspected implementation calls.

Main entry points: [`lib/src/country_phone_picker_bottom_sheet.dart`](https://github.com/adellahlouh/country_phone_picker/blob/master/lib/src/country_phone_picker_bottom_sheet.dart) (Picker Sheet), [`lib/src/country_phone_picker.dart`](https://github.com/adellahlouh/country_phone_picker/blob/master/lib/src/country_phone_picker.dart) (Picker Widget), [`lib/src/country_picker_localizations.dart`](https://github.com/adellahlouh/country_phone_picker/blob/master/lib/src/country_picker_localizations.dart) (Localization), [`lib/country_phone_picker.dart`](https://github.com/adellahlouh/country_phone_picker/blob/master/lib/country_phone_picker.dart) (Public API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_picker_ui["Picker UI"]
  node_picker_api["Public API"]
  node_picker_widget["Picker Widget"]
  node_bottom_sheet["Picker Sheet"]
end

subgraph group_country_data["Country Data"]
  node_country_model["Country Model<br/>[country_model.dart]"]
  node_country_codes["Country Codes"]
end

subgraph group_support["Localization and Config"]
  node_search_config["Search Config<br/>[search_config.dart]"]
  node_sheet_config["Sheet Config"]
  node_localizations["Localization"]
  node_translations["Translations"]
end

node_user(("User"))
node_host_app["Host App"]

node_host_app -->|"integrates"| node_picker_api
node_user -->|"opens picker"| node_picker_widget
node_picker_widget -->|"shows sheet"| node_bottom_sheet
node_picker_widget -->|"emits selection"| node_country_model
node_bottom_sheet -->|"lists countries"| node_country_codes
node_bottom_sheet -->|"supports search"| node_search_config
node_bottom_sheet -->|"uses customization"| node_sheet_config
node_bottom_sheet -->|"shows localized names"| node_localizations
node_localizations -->|"provides translations"| node_translations

click node_picker_api "https://github.com/adellahlouh/country_phone_picker/blob/master/lib/country_phone_picker.dart"
click node_picker_widget "https://github.com/adellahlouh/country_phone_picker/blob/master/lib/src/country_phone_picker.dart"
click node_bottom_sheet "https://github.com/adellahlouh/country_phone_picker/blob/master/lib/src/country_phone_picker_bottom_sheet.dart"
click node_country_model "https://github.com/adellahlouh/country_phone_picker/blob/master/lib/src/country_model.dart"
click node_country_codes "https://github.com/adellahlouh/country_phone_picker/blob/master/lib/src/country_picker_codes.dart"
click node_search_config "https://github.com/adellahlouh/country_phone_picker/blob/master/lib/src/search_config.dart"
click node_sheet_config "https://github.com/adellahlouh/country_phone_picker/blob/master/lib/src/bottom_sheet_config.dart"
click node_localizations "https://github.com/adellahlouh/country_phone_picker/blob/master/lib/src/country_picker_localizations.dart"
click node_translations "https://github.com/adellahlouh/country_phone_picker/tree/master/lib/src/i18n"

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_picker_api,node_picker_widget,node_bottom_sheet,node_user toneBlue
class node_country_model,node_country_codes toneAmber
class node_search_config,node_sheet_config,node_localizations,node_translations toneMint
class node_host_app toneIndigo
```

## Components

### Picker UI

- [Public API](https://github.com/adellahlouh/country_phone_picker/blob/master/lib/country_phone_picker.dart): `lib/country_phone_picker.dart`
- [Picker Widget](https://github.com/adellahlouh/country_phone_picker/blob/master/lib/src/country_phone_picker.dart): `lib/src/country_phone_picker.dart`
- [Picker Sheet](https://github.com/adellahlouh/country_phone_picker/blob/master/lib/src/country_phone_picker_bottom_sheet.dart): `lib/src/country_phone_picker_bottom_sheet.dart`

### Country Data

- [Country Model](https://github.com/adellahlouh/country_phone_picker/blob/master/lib/src/country_model.dart): `lib/src/country_model.dart`
- [Country Codes](https://github.com/adellahlouh/country_phone_picker/blob/master/lib/src/country_picker_codes.dart): `lib/src/country_picker_codes.dart`

### Localization and Config

- [Search Config](https://github.com/adellahlouh/country_phone_picker/blob/master/lib/src/search_config.dart): `lib/src/search_config.dart`
- [Sheet Config](https://github.com/adellahlouh/country_phone_picker/blob/master/lib/src/bottom_sheet_config.dart): `lib/src/bottom_sheet_config.dart`
- [Localization](https://github.com/adellahlouh/country_phone_picker/blob/master/lib/src/country_picker_localizations.dart): `lib/src/country_picker_localizations.dart`
- [Translations](https://github.com/adellahlouh/country_phone_picker/tree/master/lib/src/i18n): `lib/src/i18n`

### Other components

- **User**
- **Host App**

## Connections

- Host App → Public API: integrates (evidence: `README.md`)
- User → Picker Widget: opens picker (evidence: `README.md`)
- Picker Widget → Picker Sheet: shows sheet (evidence: `README.md`)
- Picker Widget → Country Model: emits selection (evidence: `README.md`)
- Picker Sheet → Country Codes: lists countries (evidence: `README.md`)
- Picker Sheet → Search Config: supports search (evidence: `README.md`)
- Picker Sheet → Sheet Config: uses customization (evidence: `README.md`)
- Picker Sheet → Localization: shows localized names (evidence: `README.md`)
- Localization → Translations: provides translations (evidence: `README.md`)
