diff --git a/lib/country_selection_theme.dart b/lib/country_selection_theme.dart index 4c5de38..f6769b8 100644 --- a/lib/country_selection_theme.dart +++ b/lib/country_selection_theme.dart @@ -7,6 +7,9 @@ class CountryTheme { final Color alphabetSelectedBackgroundColor; final Color alphabetTextColor; final Color alphabetSelectedTextColor; + final Color inputFieldBgColor; + final Color dividerTextColor; + final Color bodyBgColor; final bool isShowTitle; final bool isShowFlag; final bool isShowCode; @@ -23,6 +26,9 @@ class CountryTheme { this.alphabetSelectedBackgroundColor, this.alphabetTextColor, this.alphabetSelectedTextColor, + this.dividerTextColor, + this.inputFieldBgColor, + this.bodyBgColor, this.isShowTitle, this.isShowFlag, this.isShowCode, diff --git a/lib/selection_list.dart b/lib/selection_list.dart index e5a5eb4..4f306fe 100644 --- a/lib/selection_list.dart +++ b/lib/selection_list.dart @@ -102,7 +102,7 @@ class _SelectionListState extends State { Widget scaffold = Scaffold( appBar: widget.appBar, body: Container( - color: Color(0xfff4f4f4), + color: widget.theme?.bodyBgColor ?? Color(0xfff4f4f4), child: LayoutBuilder(builder: (context, contrainsts) { diff = height - contrainsts.biggest.height; _heightscroller = (contrainsts.biggest.height) / _alphabet.length; @@ -119,10 +119,10 @@ class _SelectionListState extends State { children: [ Padding( padding: const EdgeInsets.all(15.0), - child: Text(widget.theme?.searchText ?? 'SEARCH'), + child: Text(widget.theme?.searchText ?? 'SEARCH', style: TextStyle(color: widget.theme?.dividerTextColor ?? Colors.white)), ), Container( - color: Colors.white, + color: widget.theme?.inputFieldBgColor ?? Colors.white, child: TextField( controller: _controller, decoration: InputDecoration( @@ -142,10 +142,10 @@ class _SelectionListState extends State { Padding( padding: const EdgeInsets.all(15.0), child: - Text(widget.theme?.lastPickText ?? 'LAST PICK'), + Text(widget.theme?.lastPickText ?? 'LAST PICK', style: TextStyle(color: widget.theme?.dividerTextColor ?? Colors.white)), ), Container( - color: Colors.white, + color: widget.theme?.inputFieldBgColor ?? Colors.white, child: Material( color: Colors.transparent, child: ListTile( @@ -206,7 +206,7 @@ class _SelectionListState extends State { Widget getListCountry(CountryCode e) { return Container( height: 50, - color: Colors.white, + color: widget.theme?.inputFieldBgColor ?? Colors.white, child: Material( color: Colors.transparent, child: ListTile(