Line up option in device settings with min width

This commit is contained in:
Hillel Coren 2021-05-04 21:17:23 +03:00
parent df40e05e19
commit aad9f9600c
1 changed files with 32 additions and 24 deletions

View File

@ -89,36 +89,44 @@ class BoolDropdownButton extends StatelessWidget {
children: <Widget>[ children: <Widget>[
InkWell( InkWell(
onTap: () => onChanged(false), onTap: () => onChanged(false),
child: Row( child: ConstrainedBox(
children: [ constraints:
IgnorePointer( BoxConstraints(minWidth: 125, minHeight: 36),
child: Radio<bool>( child: Row(
value: false, children: [
onChanged: (value) => null, IgnorePointer(
groupValue: value, child: Radio<bool>(
activeColor: Theme.of(context).accentColor, value: false,
onChanged: (value) => null,
groupValue: value,
activeColor: Theme.of(context).accentColor,
),
), ),
), Text(falseLabel),
Text(falseLabel), SizedBox(width: 16),
SizedBox(width: 16), ],
], ),
), ),
), ),
InkWell( InkWell(
onTap: () => onChanged(true), onTap: () => onChanged(true),
child: Row( child: ConstrainedBox(
children: [ constraints:
IgnorePointer( BoxConstraints(minWidth: 125, minHeight: 36),
child: Radio<bool>( child: Row(
value: true, children: [
onChanged: (value) => null, IgnorePointer(
groupValue: value, child: Radio<bool>(
activeColor: Theme.of(context).accentColor, value: true,
onChanged: (value) => null,
groupValue: value,
activeColor: Theme.of(context).accentColor,
),
), ),
), Text(trueLabel),
Text(trueLabel), SizedBox(width: 16),
SizedBox(width: 16), ],
], ),
), ),
), ),
], ],