scored true

This commit is contained in:
Felipe
2024-04-18 08:37:09 -05:00
parent 73159cdd57
commit 2facd1b1d8
7 changed files with 289 additions and 138 deletions
+62 -4
View File
@@ -647,7 +647,8 @@ class _UserServiceScreenState extends State<UserServiceScreen> {
// ],
// );
// }
if (service.status == ServiceStatus.completed) {
if (service.status == ServiceStatus.completed &&
service.professionalScored == false) {
return Stack(
alignment: AlignmentDirectional.topCenter,
clipBehavior: Clip.none,
@@ -662,11 +663,11 @@ class _UserServiceScreenState extends State<UserServiceScreen> {
'Completado',
style: TextStyle(fontSize: 32, color: Colors.green),
),
const SizedBox(height: 16),
const Text(
'Califica el servicio',
style: TextStyle(fontSize: 28, color: Colors.green),
style: TextStyle(fontSize: 20, color: Colors.green),
),
const SizedBox(height: 15),
FilledButton(
onPressed: () {
Navigator.push(
@@ -678,7 +679,64 @@ class _UserServiceScreenState extends State<UserServiceScreen> {
),
);
},
child: const Text('Calificar'),
style: FilledButton.styleFrom(
backgroundColor: Theme.of(context).colorScheme.primary,
padding: const EdgeInsets.symmetric(vertical: 15),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
),
child: Container(
alignment: Alignment.center,
width: MediaQuery.of(context).size.width * 0.4,
child: const Text(
'Calificar',
style: TextStyle(
color: Colors.white,
fontSize: 18,
),
),
),
),
],
),
),
),
Positioned(
top: -40,
child: Container(
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(color: Colors.green.shade50, width: 4),
shape: BoxShape.circle,
),
child: const Icon(
Icons.star,
color: Colors.green,
size: 48,
),
),
)
],
);
}
if (service.status == ServiceStatus.completed &&
service.professionalScored == true) {
return Stack(
alignment: AlignmentDirectional.topCenter,
clipBehavior: Clip.none,
children: [
Card(
color: Colors.green.shade50,
child: const Padding(
padding: EdgeInsets.fromLTRB(32, 56, 32, 32),
child: Column(
children: [
Text(
'Completado',
style: TextStyle(fontSize: 32, color: Colors.green),
),
],
),