From ef8860ec0b87ab7b5ce6b333e5091d562288f1fa Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Sat, 16 May 2020 15:43:07 +0200 Subject: [PATCH] Revert "Merge pull request #77 from simon-twonary/shows-the-flag-only-when-closed" This reverts commit f4b741ef96a49b522736526fd1e39644dc3bcb29, reversing changes made to f10402f2abefac00851b3b2c9ea01b62d4e18008. --- lib/country_code_picker.dart | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/lib/country_code_picker.dart b/lib/country_code_picker.dart index c8ab6ca..3a56eed 100644 --- a/lib/country_code_picker.dart +++ b/lib/country_code_picker.dart @@ -42,7 +42,6 @@ class CountryCodePicker extends StatefulWidget { /// shows the flag final bool showFlag; - /// shows the flag only when closed final bool showFlagMain; final bool showFlagDialog; @@ -72,7 +71,7 @@ class CountryCodePicker extends StatefulWidget { this.alignLeft = false, this.showFlag = true, this.showFlagDialog, - this.showFlagMain = false, + this.showFlagMain, this.builder, this.flagWidth = 32.0, this.enabled = true, @@ -148,17 +147,16 @@ class CountryCodePickerState extends State { ), ), ), - if (widget.showFlagMain == false) - Flexible( - fit: widget.alignLeft ? FlexFit.tight : FlexFit.loose, - child: Text( - widget.showOnlyCountryWhenClosed - ? selectedItem.toCountryStringOnly() - : selectedItem.toString(), - style: widget.textStyle ?? Theme.of(context).textTheme.button, - overflow: widget.textOverflow, - ), + Flexible( + fit: widget.alignLeft ? FlexFit.tight : FlexFit.loose, + child: Text( + widget.showOnlyCountryWhenClosed + ? selectedItem.toCountryStringOnly() + : selectedItem.toString(), + style: widget.textStyle ?? Theme.of(context).textTheme.button, + overflow: widget.textOverflow, ), + ), ], ), );