Initial commit
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mensaappbackend/modules/ratingStars.dart';
|
||||
|
||||
class RatingCard extends StatelessWidget {
|
||||
const RatingCard(
|
||||
{super.key,
|
||||
required this.rating1,
|
||||
required this.rating2,
|
||||
required this.text,
|
||||
required this.title,
|
||||
required this.rating1Title,
|
||||
required this.rating2Title});
|
||||
|
||||
final String title;
|
||||
final String rating1Title;
|
||||
final String rating2Title;
|
||||
|
||||
final int rating1;
|
||||
final int rating2;
|
||||
final String text;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.all(15),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.5),
|
||||
spreadRadius: 5,
|
||||
blurRadius: 7,
|
||||
offset: Offset(0, 3))
|
||||
]),
|
||||
child: Column(
|
||||
children: [
|
||||
Text(title, style: TextStyle(fontSize: 22),),
|
||||
SizedBox(height: 10,),
|
||||
Text("$rating1Title:", style: TextStyle(fontSize: 18),),
|
||||
RatingStars(initRating: rating1.toDouble()),
|
||||
SizedBox(height: 10,),
|
||||
Text("$rating2Title:", style: TextStyle(fontSize: 18),),
|
||||
RatingStars(initRating: rating2.toDouble()),
|
||||
SizedBox(height: 10,),
|
||||
Text(text, style: TextStyle(fontSize: 18),)
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user