Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom txt and bg colors #36

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/country_selection_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -23,6 +26,9 @@ class CountryTheme {
this.alphabetSelectedBackgroundColor,
this.alphabetTextColor,
this.alphabetSelectedTextColor,
this.dividerTextColor,
this.inputFieldBgColor,
this.bodyBgColor,
this.isShowTitle,
this.isShowFlag,
this.isShowCode,
Expand Down
12 changes: 6 additions & 6 deletions lib/selection_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class _SelectionListState extends State<SelectionList> {
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;
Expand All @@ -119,10 +119,10 @@ class _SelectionListState extends State<SelectionList> {
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(
Expand All @@ -142,10 +142,10 @@ class _SelectionListState extends State<SelectionList> {
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(
Expand Down Expand Up @@ -206,7 +206,7 @@ class _SelectionListState extends State<SelectionList> {
Widget getListCountry(CountryCode e) {
return Container(
height: 50,
color: Colors.white,
color: widget.theme?.inputFieldBgColor ?? Colors.white,
child: Material(
color: Colors.transparent,
child: ListTile(
Expand Down