forked from eatvio/eatvio_app
57 lines
1.7 KiB
Dart
57 lines
1.7 KiB
Dart
import 'package:eatvio_app/core/theme/custom_text_style.dart';
|
|
import 'package:eatvio_app/core/theme/theme_helper.dart';
|
|
import 'package:eatvio_app/core/widgets/main_background_bouble.dart';
|
|
import 'package:eatvio_app/generated/l10n.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_svg/svg.dart';
|
|
|
|
class RatingWidget extends StatelessWidget {
|
|
const RatingWidget({super.key, required this.rating});
|
|
|
|
final int rating;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final s = S.of(context);
|
|
return MainBackgroundBouble(
|
|
child: SizedBox(
|
|
height: 130,
|
|
child: Stack(
|
|
children: [
|
|
Positioned(
|
|
right: 12,
|
|
top: 12,
|
|
child: SvgPicture.asset(
|
|
'assets/icons/question_mark.svg',
|
|
height: 22,
|
|
width: 22,
|
|
colorFilter: ColorFilter.mode(
|
|
appTheme.blueA400,
|
|
BlendMode.srcIn,
|
|
),
|
|
),
|
|
),
|
|
Align(
|
|
alignment: Alignment.center,
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
Text(
|
|
rating.toString(),
|
|
style: TextStyles.headingFS40FW600.copyWith(color: appTheme.blueA400),
|
|
),
|
|
SizedBox(height: 4),
|
|
Text(
|
|
s.your_rating,
|
|
style: TextStyles.headingXLSemibold.copyWith(color: appTheme.black),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|