Revert "Merge pull request #77 from simon-twonary/shows-the-flag-only-when-closed"

This reverts commit f4b741ef96, reversing
changes made to f10402f2ab.
This commit is contained in:
Salvatore Giordano
2020-05-16 15:43:07 +02:00
parent a24576b294
commit ef8860ec0b

View File

@@ -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<CountryCodePicker> {
),
),
),
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,
),
),
],
),
);