fixed small flags on phones
This commit is contained in:
@@ -26,7 +26,7 @@ class _MyAppState extends State<MyApp> {
|
||||
onChanged: print,
|
||||
// Initial selection and favorite can be one of code ('IT') OR dial_code('+39')
|
||||
initialSelection: 'IT',
|
||||
// showCountryOnly: true,
|
||||
showCountryOnly: true,
|
||||
favorite: ['+39', 'FR']),
|
||||
)));
|
||||
}
|
||||
|
||||
@@ -59,28 +59,32 @@ class _SelectionDialogState extends State<SelectionDialog> {
|
||||
.toList()));
|
||||
|
||||
Widget _buildOption(CountryCode e) {
|
||||
return Flex(
|
||||
direction: Axis.horizontal,
|
||||
children: <Widget>[
|
||||
Flexible(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(right: 16.0),
|
||||
child: Image.asset(
|
||||
e.flagUri,
|
||||
package: 'country_code_picker',
|
||||
width: 32.0,
|
||||
return Container(
|
||||
width: 400,
|
||||
child: Flex(
|
||||
direction: Axis.horizontal,
|
||||
children: <Widget>[
|
||||
Flexible(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(right: 16.0),
|
||||
child: Image.asset(
|
||||
e.flagUri,
|
||||
package: 'country_code_picker',
|
||||
width: 32.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
flex: 10,
|
||||
fit: FlexFit.tight,
|
||||
child: Text(
|
||||
widget.showCountryOnly ? e.toCountryStringOnly() : e.toLongString(),
|
||||
overflow: TextOverflow.fade,
|
||||
Expanded(
|
||||
flex: 4,
|
||||
child: Text(
|
||||
widget.showCountryOnly
|
||||
? e.toCountryStringOnly()
|
||||
: e.toLongString(),
|
||||
overflow: TextOverflow.fade,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user