Add stars to review list
Co-authored-by: Reimar <mail@reim.ar>
This commit is contained in:
parent
0dcfb2ea1e
commit
d767e0bb85
@ -19,7 +19,9 @@ class _ReviewListState extends State<ReviewListPage> {
|
||||
|
||||
return SideMenu(
|
||||
selectedIndex: -1,
|
||||
body: Scaffold(body: SingleChildScrollView(child: Container(
|
||||
body: Scaffold(
|
||||
backgroundColor: Color(0xFFF9F9F9),
|
||||
body: SingleChildScrollView(child: Container(
|
||||
decoration: const BoxDecoration(color: Color(0xFFF9F9F9)),
|
||||
width: MediaQuery.of(context).size.width,
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
@ -52,11 +54,16 @@ class _ReviewListState extends State<ReviewListPage> {
|
||||
children: [
|
||||
Text(review.title, style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 24)),
|
||||
Text(review.content),
|
||||
const SizedBox(height: 10),
|
||||
Row(children: [
|
||||
for (var i = 0; i < review.rating; i++) const Icon(Icons.star, color: Colors.yellow),
|
||||
for (var i = review.rating; i < 5; i++) const Icon(Icons.star_border),
|
||||
]),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
),
|
||||
)).toList(),
|
||||
),
|
||||
)),
|
||||
@ -70,6 +77,7 @@ class _ReviewListState extends State<ReviewListPage> {
|
||||
tooltip: "Write a Review",
|
||||
child: const Icon(CupertinoIcons.plus),
|
||||
),
|
||||
));
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user