forked from Nexus/nexus
use EventRenderer card for pins
This commit is contained in:
parent
8711fc2099
commit
92f53c9aca
1 changed files with 12 additions and 32 deletions
|
|
@ -52,42 +52,22 @@ class PinnedEventsDrawer extends HookConsumerWidget {
|
|||
),
|
||||
),
|
||||
AsyncData(:final value) => ListView.builder(
|
||||
padding: .symmetric(vertical: 18),
|
||||
padding: .symmetric(horizontal: 8),
|
||||
itemCount: value.length,
|
||||
itemBuilder: (context, index) {
|
||||
final event = value[index];
|
||||
|
||||
return Card(
|
||||
margin: .only(bottom: 8),
|
||||
child: InkWell(
|
||||
borderRadius: .circular(12),
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
// TODO: // Close drawer, then scroll to the message
|
||||
},
|
||||
child: Padding(
|
||||
padding: .all(12),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.push_pin,
|
||||
size: 16,
|
||||
color: theme.colorScheme.primary,
|
||||
),
|
||||
SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: EventRenderer(
|
||||
event,
|
||||
textOnly: true,
|
||||
maxLines: 2,
|
||||
isGrouped: false,
|
||||
getEventOptions: getEventOptions,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
return InkWell(
|
||||
borderRadius: .circular(12),
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
// TODO: // Close drawer, then scroll to the message
|
||||
},
|
||||
child: EventRenderer(
|
||||
event,
|
||||
maxLines: 2,
|
||||
isGrouped: false,
|
||||
getEventOptions: getEventOptions,
|
||||
),
|
||||
);
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue