This commit is contained in:
Felipe
2023-12-15 18:08:27 -05:00
parent d651b140fb
commit 8f042d9ef8
@@ -488,9 +488,7 @@ class _ProfileProScreenState extends State<ProfileProScreen> {
if (settings?.tarifas == true)
customSwitch(
'Tarifa',
17,
false,
FontWeight.w500,
(value) {
tarifaValue = value;
},
@@ -523,11 +521,10 @@ class _ProfileProScreenState extends State<ProfileProScreen> {
height: 12,
),
if (settings?.domicilios == true)
customSwitch('Servicio a domicilio', 17, domicilioValue,
FontWeight.w500, toggleDomicilio),
customSwitch(
'Servicio a domicilio', domicilioValue, toggleDomicilio),
const Divider(),
customSwitch('Servicio en sitio', 17, sitioValue, FontWeight.w500,
toggleSitio),
customSwitch('Servicio en sitio', sitioValue, toggleSitio),
sitioValue
? Padding(
padding:
@@ -759,9 +756,7 @@ class _ProfileProScreenState extends State<ProfileProScreen> {
Widget customSwitch(
String text,
double? size,
bool switchValue,
FontWeight? bold,
ValueChanged<bool> onChanged,
) {
return Padding(
@@ -773,12 +768,9 @@ class _ProfileProScreenState extends State<ProfileProScreen> {
Expanded(
child: Text(
text,
style: TextStyle(
fontSize: size ??
15, // Establece el tamaño predeterminado a 15 si no se proporciona
fontWeight: bold ??
FontWeight
.normal, // Usa negrita si se proporciona, de lo contrario, usa normal
style: const TextStyle(
fontSize: 17,
fontWeight: FontWeight.w500,
color: Colors.black,
),
),
@@ -795,36 +787,6 @@ class _ProfileProScreenState extends State<ProfileProScreen> {
),
);
}
// Widget customSwitch(String text, double? size = 15, bool switchValue,
// FontWeight bold, ValueChanged<bool> onChanged) {
// return Padding(
// padding: const EdgeInsets.symmetric(horizontal: 30),
// child: SizedBox(
// height: 40,
// child: Row(
// children: [
// Expanded(
// child: Text(
// text,
// style: TextStyle(
// fontSize: size,
// fontWeight: bold,
// color: Colors.black,
// ),
// ),
// ),
// Transform.scale(
// scale: 1.2,
// child: Switch(
// value: switchValue,
// onChanged: onChanged,
// ),
// ),
// ],
// ),
// ),
// );
// }
String timeList(Schedule? schedule, BuildContext context) {
if (schedule == null) {