feat: REV-001 — DiceBear Notionists avatars on review cards
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
// lib/features/reviews/widgets/review_card.dart
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import '../models/review_models.dart';
|
||||
import 'star_display.dart';
|
||||
|
||||
@@ -119,10 +120,22 @@ class _ReviewCardState extends State<ReviewCard> {
|
||||
// Header row
|
||||
Row(
|
||||
children: [
|
||||
CircleAvatar(
|
||||
radius: 18,
|
||||
backgroundColor: _avatarColor(_review.username),
|
||||
child: Text(initial, style: const TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 15)),
|
||||
ClipOval(
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: 'https://api.dicebear.com/9.x/notionists/svg?seed=${Uri.encodeComponent(_review.username)}',
|
||||
width: 36,
|
||||
height: 36,
|
||||
placeholder: (_, __) => CircleAvatar(
|
||||
radius: 18,
|
||||
backgroundColor: _avatarColor(_review.username),
|
||||
child: Text(initial, style: const TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 15)),
|
||||
),
|
||||
errorWidget: (_, __, ___) => CircleAvatar(
|
||||
radius: 18,
|
||||
backgroundColor: _avatarColor(_review.username),
|
||||
child: Text(initial, style: const TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 15)),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(
|
||||
|
||||
Reference in New Issue
Block a user