resolveIn static method
theme with the LogViewerTheme extension: the same theme if it already has one, otherwise
a copy with LogViewerTheme.fallback. The list page wraps its tiles in it so each finds a
ready theme via LogViewerTheme.of instead of building a fallback on every build. Compute
the result in didChangeDependencies, not in build: ThemeData.copyWith is not free.
Implementation
static ThemeData resolveIn(ThemeData theme) => theme.extension<LogViewerTheme>() != null
? theme
: theme.copyWith(extensions: [...theme.extensions.values, LogViewerTheme.fallback(theme.colorScheme)]);