Better DM

This commit is contained in:
2024-05-29 00:14:41 +08:00
parent c50a49f37d
commit d4cbabeb31
17 changed files with 253 additions and 187 deletions

View File

@ -3,11 +3,17 @@ import 'package:solian/services.dart';
class AccountAvatar extends StatelessWidget {
final dynamic content;
final Color? color;
final Color? bgColor;
final Color? feColor;
final double? radius;
const AccountAvatar(
{super.key, required this.content, this.color, this.radius});
const AccountAvatar({
super.key,
required this.content,
this.bgColor,
this.feColor,
this.radius,
});
@override
Widget build(BuildContext context) {
@ -22,7 +28,7 @@ class AccountAvatar extends StatelessWidget {
return CircleAvatar(
key: Key('a$content'),
radius: radius,
backgroundColor: color,
backgroundColor: bgColor,
backgroundImage: !isEmpty
? NetworkImage(
direct
@ -34,6 +40,7 @@ class AccountAvatar extends StatelessWidget {
? Icon(
Icons.account_circle,
size: radius != null ? radius! * 1.2 : 24,
color: feColor,
)
: null,
);

View File

@ -19,7 +19,7 @@ class FriendSelect extends StatefulWidget {
class _FriendSelectState extends State<FriendSelect> {
int _accountId = 0;
List<Friendship> _friends = List.empty(growable: true);
final List<Friendship> _friends = List.empty(growable: true);
getFriends() async {
final AuthProvider auth = Get.find();