diff --git a/lib/ui/views/service_view.dart b/lib/ui/views/service_view.dart index 6bf066f..72e0794 100644 --- a/lib/ui/views/service_view.dart +++ b/lib/ui/views/service_view.dart @@ -218,12 +218,12 @@ class _ServiceViewState extends State { ), ElevatedButton( onPressed: () { - if (type == 'user') { + if (widget.type == 'user') { NavigationService.navigateTo( '/dashboard/user/service/${service.id}/chat/${user.id}'); } - if (type == 'professional') { + if (widget.type == 'professional') { NavigationService.navigateTo( '/dashboard/professional/service/${service.id}/chat/${user.id}'); } @@ -266,7 +266,7 @@ class _ServiceViewState extends State { service.range1Hour2.minute, ); - if (type == 'user') { + if (widget.type == 'user') { if (service.status == ServiceStatus.completed && service.professionalScored == false) { return Stack( @@ -482,7 +482,7 @@ class _ServiceViewState extends State { } } - if (type == 'professional') { + if (widget.type == 'professional') { if (service.status == ServiceStatus.completed && service.userScored == false) { return Stack( @@ -732,7 +732,7 @@ class _ServiceViewState extends State { ), ); } else { - if (type == 'professional') { + if (widget.type == 'professional') { if (service.status == ServiceStatus.pending) { return Column( children: [ @@ -853,7 +853,7 @@ class _ServiceViewState extends State { } } - if (type == 'user') { + if (widget.type == 'user') { if (service.status == ServiceStatus.pending) { return ConstrainedBox( constraints: const BoxConstraints(maxWidth: 130), @@ -931,10 +931,10 @@ class _ServiceViewState extends State { constraints: const BoxConstraints(maxWidth: 130), child: ElevatedButton( onPressed: () { - if (type == 'professional') { + if (widget.type == 'professional') { navigateTo(Flurorouter.professionalServicesRequestsRoute); } - if (type == 'user') { + if (widget.type == 'user') { navigateTo(Flurorouter.dashboardRoute); } }, @@ -953,13 +953,13 @@ class _ServiceViewState extends State { } String _CustomServiceLocation(ServiceLocationPreferences location) { - if (type == 'user') { + if (widget.type == 'user') { if (location == ServiceLocationPreferences.office) { return 'Servicio en sitio / consultorio'; } } - if (type == 'professional') { + if (widget.type == 'professional') { if (location == ServiceLocationPreferences.office) { return 'Servicio en tu consultorio'; }