In the following MWE, I am trying to put the first frame as a list of todos over the whole presentation. However, I got an error
Undefined control sequence. \contentsline
So, what is wrong in this code?
\documentclass{beamer}
\usetheme{metropolis}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{todonotes}
\title{Title}
\author{Author}
\begin{document}
\begin{frame}{List of Todos}
\listoftodos
\end{frame}
\maketitle
\begin{frame}{Table of contents}
\setbeamertemplate{section in toc}[sections numbered]
\tableofcontents[hideallsubsections]
\end{frame}
\section{Section 1}
\begin{frame}
\todo[inline]{1st ToDo}
\end{frame}
\section{Section 2}
\begin{frame}
\todo[inline]{2nd ToDo}
\end{frame}
\end{document}
\listoftodos
is incompatible with beamer. Source.