66 lines
2.2 KiB
Dart
66 lines
2.2 KiB
Dart
import 'package:ambito/src/extensions/extensions.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_rating_stars/flutter_rating_stars.dart';
|
|
|
|
import '../../../../main.dart';
|
|
import '../../../entity/entities.dart';
|
|
|
|
class ReviewCard extends StatelessWidget {
|
|
const ReviewCard({super.key, required this.massnahme});
|
|
|
|
final Measure massnahme;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return SizedBox(
|
|
width: double.infinity,
|
|
child: Card(
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(0),
|
|
),
|
|
elevation: 0,
|
|
color: baseTheme.currentColorScheme.tertiary,
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(16),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
context.translate('page.actionDetailPage.review.title'),
|
|
style: baseTheme.currentThemeData.textTheme.titleMedium,
|
|
),
|
|
baseTheme.verticalSpacer,
|
|
RatingStars(
|
|
value: 4.5,
|
|
onValueChanged: (v) {},
|
|
starBuilder: (index, color) => Icon(
|
|
Icons.star,
|
|
color: color,
|
|
),
|
|
starCount: 5,
|
|
starSize: 32,
|
|
valueLabelColor: const Color(0xff9b9b9b),
|
|
valueLabelTextStyle: const TextStyle(
|
|
color: Colors.white,
|
|
fontWeight: FontWeight.w400,
|
|
fontStyle: FontStyle.normal,
|
|
fontSize: 12.0),
|
|
valueLabelRadius: 10,
|
|
maxValue: 5,
|
|
starSpacing: 2,
|
|
maxValueVisibility: true,
|
|
valueLabelVisibility: false,
|
|
animationDuration: const Duration(milliseconds: 1000),
|
|
valueLabelPadding:
|
|
const EdgeInsets.symmetric(vertical: 1, horizontal: 8),
|
|
valueLabelMargin: const EdgeInsets.only(right: 8),
|
|
starOffColor: const Color(0xffe7e8ea),
|
|
starColor: Colors.grey.shade600,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|