showOryksaTvAssistant function

Future<void> showOryksaTvAssistant(
  1. BuildContext context, {
  2. required OryksaTv tv,
  3. OryksaAppContext? appContext()?,
  4. bool sidePanel = false,
  5. OryksaTvTheme theme = const OryksaTvTheme(),
})

Opens the assistant panel over your screen. Back closes it and the focus goes back where it was. sidePanel: a panel on the right instead of the whole screen.

Implementation

Future<void> showOryksaTvAssistant(
  BuildContext context, {
  required OryksaTv tv,
  OryksaAppContext? Function()? appContext,
  bool sidePanel = false,
  OryksaTvTheme theme = const OryksaTvTheme(),
}) {
  return Navigator.of(context).push(PageRouteBuilder<void>(
    opaque: !sidePanel,
    barrierColor: sidePanel ? Colors.black54 : null,
    pageBuilder: (_, __, ___) => OryksaTvAssistant(tv: tv, appContext: appContext, sidePanel: sidePanel, theme: theme),
    transitionsBuilder: (_, a, __, child) => FadeTransition(opacity: a, child: child),
  ));
}