This commit is contained in:
Juan Gilsanz Polo 2022-11-05 03:56:04 +01:00
parent ee91277041
commit 5a12311c88
15 changed files with 124 additions and 180 deletions

View file

@ -28,17 +28,12 @@ class CustomRadioListTile extends StatelessWidget {
onTap: () => onChanged(value),
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 24,
horizontal: 16,
vertical: 12
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
CustomRadio(
value: value,
groupValue: groupValue,
backgroundColor: radioBackgroundColor,
),
const SizedBox(width: 24),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -66,7 +61,14 @@ class CustomRadioListTile extends StatelessWidget {
),
]
],
)
),
const SizedBox(width: 16),
CustomRadio(
value: value,
groupValue: groupValue,
backgroundColor: radioBackgroundColor,
),
const SizedBox(width: 8),
],
),
),

View file

@ -26,17 +26,16 @@ class CustomSwitchListTile extends StatelessWidget {
: () => onChanged(!value),
child: Padding(
padding: const EdgeInsets.only(
top: 12, left: 24, right: 12, bottom: 12
top: 12, left: 16, right: 18, bottom: 16
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
width: MediaQuery.of(context).size.width-110,
child: Text(
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
title,
style: TextStyle(
fontSize: 16,
@ -45,24 +44,25 @@ class CustomSwitchListTile extends StatelessWidget {
: Theme.of(context).colorScheme.onSurface,
),
),
),
if (subtitle != null) ... [
const SizedBox(height: 5),
SizedBox(
width: MediaQuery.of(context).size.width-110,
child: Text(
subtitle!,
style: TextStyle(
fontSize: 14,
color: disabled != null && disabled == true
? Theme.of(context).listTileTheme.textColor!.withOpacity(0.38)
: Theme.of(context).listTileTheme.textColor
if (subtitle != null) ... [
const SizedBox(height: 5),
SizedBox(
width: MediaQuery.of(context).size.width-110,
child: Text(
subtitle!,
style: TextStyle(
fontSize: 14,
color: disabled != null && disabled == true
? Theme.of(context).listTileTheme.textColor!.withOpacity(0.38)
: Theme.of(context).listTileTheme.textColor
),
),
),
),
]
],
]
],
),
),
const SizedBox(width: 16),
Switch(
value: value,
onChanged: disabled != null && disabled == true

View file

@ -16,7 +16,7 @@ class SectionLabel extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.start,
children: [
Padding(
padding: padding ?? const EdgeInsets.all(24),
padding: padding ?? const EdgeInsets.all(16),
child: Text(
label,
style: TextStyle(