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