chore(ui): initial channel list view draft with controller.
Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
@@ -6,6 +6,7 @@ class GroupAvatar extends StatelessWidget {
|
||||
/// Constructor for creating a [GroupAvatar]
|
||||
const GroupAvatar({
|
||||
Key? key,
|
||||
this.channel,
|
||||
required this.members,
|
||||
this.constraints,
|
||||
this.onTap,
|
||||
@@ -15,6 +16,8 @@ class GroupAvatar extends StatelessWidget {
|
||||
this.selectionThickness = 4,
|
||||
}) : super(key: key);
|
||||
|
||||
final Channel? channel;
|
||||
|
||||
/// List of images to display
|
||||
final List<Member> members;
|
||||
|
||||
@@ -38,7 +41,7 @@ class GroupAvatar extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final channel = StreamChannel.of(context).channel;
|
||||
final channel = this.channel ?? StreamChannel.of(context).channel;
|
||||
|
||||
assert(channel.state != null, 'Channel ${channel.id} is not initialized');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user