🧩 CountryPicker
An extension for MIT App Inventor 2.Professional offline country picker with Material 3 UI and 250+ built‑in countries.
Specifications
Package: com.jamarcountrypicker.io.countrypicker
Size: 44.49 KB
Minimum API Level: 14
Updated On: 2026-07-23T22:00:00Z
Built & documented using: FAST v6.0.0
Events:
CountryPicker has total 5 events.
1. CountrySelected
Fired when a country is selected.

| Parameter | Type |
|---|---|
| name | text |
| code | text |
| phoneCode | text |
| flag | text |
2. SearchChanged
Fired as the user types in the search box.

| Parameter | Type |
|---|---|
| query | text |
3. PickerOpened
Fired when the picker is opened, with the display style.

| Parameter | Type |
|---|---|
| style | text |
4. PickerClosed
Fired when the picker is closed or dismissed.

5. ErrorOccurred
Fired when an internal error occurs.

| Parameter | Type |
|---|---|
| message | text |
Methods:
CountryPicker has total 8 methods.
1. Show
Show the country picker with the given style.

| Parameter | Type |
|---|---|
| styleString | PickerStyle (helper blocks) |
- Enums for PickerStyle:
Default,BottomSheet,Dialog,FullScreen
2. GetAllCountries
Returns all countries as a list of lists.
![]()
- Return type:
list
3. SearchCountries
Search countries by name, code or dial code.

- Return type:
list
| Parameter | Type |
|---|---|
| query | text |
4. GetCountryByCode
Get country by exact ISO alpha‑2 code.

- Return type:
list
| Parameter | Type |
|---|---|
| code | text |
5. GetCountryByPhone
Get first country matching the given dial code.

- Return type:
list
| Parameter | Type |
|---|---|
| phone | text |
6. SetDefaultCountry
Set the default country code.

| Parameter | Type |
|---|---|
| code | text |
7. SetTheme
Change the theme at runtime.

| Parameter | Type |
|---|---|
| mode | ThemeMode (helper blocks) |
- Enums for ThemeMode:
System,Light,Dark
8. ClosePicker
Dismiss the country picker if it is showing.
![]()
Designer:
CountryPicker has total 5 designer properties.
1. DefaultCountry

- Input type:
string - Default value:
US
2. ThemeMode

- Input type:
string - Default value:
System
3. ShowFlags
![]()
- Input type:
boolean - Default value:
True
4. ShowSearch
![]()
- Input type:
boolean - Default value:
True
5. SortMode

- Input type:
string - Default value:
Alphabetical
Setters:
CountryPicker has total 5 setter properties.
1. DefaultCountry
ISO alpha‑2 code of the default selected country.
![]()
- Input type:
text
2. ThemeMode
App theme mode: System, Light, or Dark.
![]()
- Input type:
text - Helper type:
ThemeMode
3. ShowFlags
Whether to show country flags.
![]()
- Input type:
boolean
4. ShowSearch
Whether to show the search bar.
![]()
- Input type:
boolean
5. SortMode
Country list sort order.
![]()
- Input type:
text - Helper type:
SortMode - Helper enums:
Alphabetical,DialCode
Getters:
CountryPicker has total 5 getter properties.
1. DefaultCountry
ISO alpha‑2 code of the default selected country.
![]()
- Return type:
text
2. ThemeMode
App theme mode: System, Light, or Dark.
![]()
- Return type:
text
3. ShowFlags
Whether to show country flags.
![]()
- Return type:
boolean
4. ShowSearch
Whether to show the search bar.
![]()
- Return type:
boolean
5. SortMode
Country list sort order.
![]()
- Return type:
text
Shoutout
A special shoutout to @JEWEL and @Taifun for their guide on adding Helpers (Dropdown Blocks). They shared it back in July 2025, and after a lot of experimenting, everything finally clicked for me a few weeks ago!
Doubts?
Thank you for taking the time to share your knowledge with the community—it has been incredibly helpful.
Downloads
com.jamarcountrypicker.io.countrypicker.aix (44.6 KB)
Happy building! ![]()

