Skip to content

fix: expose background color & shadow customization, sync header support to BottomSheet#75

Open
MrRoy121 wants to merge 3 commits intochandrabezzo:mainfrom
MrRoy121:main
Open

fix: expose background color & shadow customization, sync header support to BottomSheet#75
MrRoy121 wants to merge 3 commits intochandrabezzo:mainfrom
MrRoy121:main

Conversation

@MrRoy121
Copy link

@MrRoy121 MrRoy121 commented Mar 6, 2026

Closes #69

What's fixed:

  • showModalBottomSheet background was hardcoded to Colors.transparent — now uses widget.backgroundColor
  • Dialog background was uncontrolled — now passes backgroundColor and elevation: 0 so SelectionDialog fully owns its visuals
  • Added boxShadow param to both SelectionDialog and SelectionBottomSheet — pass [] to remove shadow, or provide fully custom shadows
  • BottomSheet now supports the same header customization as Dialog (headerText, headerTextStyle, hideHeaderText, topBarPadding, headerAlignment, hideCloseIcon) — defaults to no header to keep existing behavior unchanged

Usage:

// Transparent with no shadow
CountryCodePicker(
  dialogBackgroundColor: Colors.transparent,
  boxShadow: [],
)

// Custom shadow
CountryCodePicker(
  boxShadow: [BoxShadow(color: Colors.black26, blurRadius: 10)],
)

// BottomSheet with header
CountryCodePicker(
  pickerStyle: PickerStyle.bottomSheet,
  headerText: 'Select Country',
  hideHeaderText: false,
)

MrRoy121 added 3 commits March 6, 2026 20:48
…Dialog`, and `SelectionBottomSheet`.

*   Allow users to provide a custom `List<BoxShadow>` to override the default dialog and bottom sheet styling.
*   Update `CountryCodePicker` to pass the `backgroundColor` and `boxShadow` properties to the selection components.
*   Set `elevation` to 0 in the default `Dialog` to favor custom `BoxDecoration`.
Specific changes include:
- Added `hideHeaderText`, `headerText`, `headerTextStyle`, `topBarPadding`, `headerAlignment`, and `hideCloseIcon` properties to `CountryCodePicker` and `SelectionBottomSheet`.
- Implemented a new header row in the bottom sheet to support optional titles and alignment configurations.
- Added logic to toggle the visibility of the close icon.
- Exposed backgroundColor for Dialog and BottomSheet
- Added customizable boxShadow support
- Added header customization for BottomSheet
@MrRoy121
Copy link
Author

MrRoy121 commented Mar 7, 2026

@chandrabezzo Brother.. Please review it..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

showCountryCodePickerBottomSheet has background color set to transparent

1 participant