enterFullScreen method

void enterFullScreen(
  1. BuildContext context
)

Implementation

void enterFullScreen(BuildContext context) async {
  isFullScreen.value = true;

  Navigator.push(
    context,
    PageRouteBuilder<dynamic>(
      pageBuilder: (BuildContext context, _, __) => _FullScreenView(
        controller: this,
        configuration: configuration,
      ),
      transitionsBuilder: (context, animation, secondaryAnimation, child) {
        return FadeTransition(
          opacity: animation,
          child: ScaleTransition(
            scale: Tween<double>(begin: 0.95, end: 1.0).animate(
              CurvedAnimation(
                parent: animation,
                curve: Curves.easeInOut,
              ),
            ),
            child: child,
          ),
        );
      },
      transitionDuration: const Duration(milliseconds: 300),
      reverseTransitionDuration: const Duration(milliseconds: 300),
    ),
  );
}