Merge branch 'master' into hotfix/search-localizations

This commit is contained in:
Salvatore Giordano
2020-04-04 16:43:15 +02:00
committed by GitHub
3 changed files with 19 additions and 15 deletions

View File

@@ -10,6 +10,7 @@ class SelectionDialog extends StatefulWidget {
final WidgetBuilder emptySearchBuilder;
final bool showFlag;
final double flagWidth;
final Size size;
/// elements passed as favorite
final List<CountryCode> favoriteElements;
@@ -24,6 +25,7 @@ class SelectionDialog extends StatefulWidget {
this.searchStyle,
this.showFlag,
this.flagWidth = 32,
this.size,
}) : assert(searchDecoration != null, 'searchDecoration must not be null!'),
this.searchDecoration =
searchDecoration.copyWith(prefixIcon: Icon(Icons.search)),
@@ -64,8 +66,9 @@ class _SelectionDialogState extends State<SelectionDialog> {
),
children: [
Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height * 0.7,
width: widget.size?.width ?? MediaQuery.of(context).size.width,
height:
widget.size?.height ?? MediaQuery.of(context).size.height * 0.7,
child: ListView(
children: [
widget.favoriteElements.isEmpty