build method

  1. @override
dynamic build(
  1. dynamic context,
  2. dynamic ref
)

Implementation

@override
Widget build(BuildContext context, WidgetRef ref) {
  final taskList = ref.watch(taskListProvider(taskListId)).valueOrNull;
  final isBookmarked = ref.watch(
    isBookmarkedProvider(BookmarkType.forTaskList(taskListId)),
  );
  if (taskList != null) {
    return Card(
      margin: cardMargin,
      key: Key('task-list-card-$taskListId'),
      child: Stack(
        children: [
          taskListItemView(context, ref, taskList),
          if (isBookmarked) buildTaskBookmarkView(context),
        ],
      ),
    );
  } else if (refDetails != null) {
    return ReferenceDetailsItem(refDetails: refDetails!);
  } else {
    return const Skeletonizer(child: SizedBox(height: 100, width: 100));
  }
}