build method
dynamic
build( - dynamic context,
- dynamic ref
)
Implementation
@override
Widget build(BuildContext context, WidgetRef ref) {
final avatar = ActerAvatar(
options: AvatarOptions(
AvatarInfo(uniqueId: roomId),
parentBadges: showParent && parentRoomId != null
? [
AvatarInfo(uniqueId: parentRoomId!, displayName: parentRoomId!),
]
: [],
),
);
return LayoutBuilder(
builder: (context, constraints) {
return Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Material(
color: Colors.transparent,
child: ListTile(
onTap: onTap,
selected: roomId == ref.watch(selectedChatIdProvider),
selectedTileColor: Theme.of(context).colorScheme.onPrimary,
onFocusChange: onFocusChange,
onLongPress: onLongPress,
leading: avatar,
title: Skeletonizer(
child: Text(
roomId,
style: Theme.of(context)
.textTheme
.bodyMedium!
.copyWith(fontWeight: FontWeight.w700),
overflow: TextOverflow.ellipsis,
),
),
subtitle: constraints.maxWidth < 300
? null
: subtitle != null
? Skeletonizer(child: subtitle!)
: null,
trailing: constraints.maxWidth < 300 ? null : trailing,
),
),
constraints.maxWidth < 300
? const SizedBox.shrink()
: Divider(
indent: 75,
endIndent: 10,
color: Theme.of(context).colorScheme.tertiary,
),
],
);
},
);
}