enable custom view widgets;
This commit is contained in:
@@ -76,9 +76,15 @@ class _CountryCodePickerState extends State<CountryCodePicker> {
|
||||
Widget build(BuildContext context) {
|
||||
Widget _widget;
|
||||
if (widget.customWidget != null)
|
||||
_widget = widget.customWidget;
|
||||
_widget = InkWell(
|
||||
onTap: _showSelectionDialog,
|
||||
child: widget.customWidget,
|
||||
);
|
||||
else {
|
||||
_widget = Flex(
|
||||
_widget = FlatButton(
|
||||
padding: widget.padding,
|
||||
onPressed: _showSelectionDialog,
|
||||
child: Flex(
|
||||
direction: Axis.horizontal,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
@@ -108,13 +114,10 @@ class _CountryCodePickerState extends State<CountryCodePicker> {
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
return FlatButton(
|
||||
child: _widget,
|
||||
padding: widget.padding,
|
||||
onPressed: _showSelectionDialog,
|
||||
);
|
||||
return _widget;
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user