@@ -6,6 +6,7 @@ import 'package:encointer_wallet/common/components/address_icon.dart';
6
6
import 'package:encointer_wallet/common/components/logo/community_icon.dart' ;
7
7
import 'package:encointer_wallet/store/app.dart' ;
8
8
import 'package:encointer_wallet/utils/format.dart' ;
9
+ import 'package:flutter_svg/svg.dart' ;
9
10
10
11
/// the CombinedCommunityAndAccountAvatar should be wrapped in an InkWell to provide the callback on a click
11
12
class CombinedCommunityAndAccountAvatar extends StatefulWidget {
@@ -42,7 +43,10 @@ class _CombinedCommunityAndAccountAvatarState extends State<CombinedCommunityAnd
42
43
shape: RoundedRectangleBorder (
43
44
borderRadius: BorderRadius .circular (widget.communityAvatarSize),
44
45
),
45
- child: CommunityAvatar (avatarSize: widget.communityAvatarSize),
46
+ child: CommunityAvatar (
47
+ widget.store.encointer.communityIconOrDefault,
48
+ avatarSize: widget.communityAvatarSize,
49
+ ),
46
50
),
47
51
Positioned (
48
52
bottom: 0 ,
@@ -72,7 +76,13 @@ class _CombinedCommunityAndAccountAvatarState extends State<CombinedCommunityAnd
72
76
}
73
77
74
78
class CommunityAvatar extends StatelessWidget {
75
- const CommunityAvatar ({super .key, this .avatarSize = 120 });
79
+ const CommunityAvatar (
80
+ this .icon, {
81
+ super .key,
82
+ this .avatarSize = 120 ,
83
+ });
84
+
85
+ final SvgPicture icon;
76
86
77
87
final double avatarSize;
78
88
@@ -81,7 +91,7 @@ class CommunityAvatar extends StatelessWidget {
81
91
return SizedBox (
82
92
width: avatarSize,
83
93
height: avatarSize,
84
- child: const CommunityIconObserver ( ),
94
+ child: CommunityCircleAvatar (icon ),
85
95
);
86
96
}
87
97
}
0 commit comments