You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			31 lines
		
	
	
		
			872 B
		
	
	
	
		
			Dart
		
	
			
		
		
	
	
			31 lines
		
	
	
		
			872 B
		
	
	
	
		
			Dart
		
	
import 'package:flutter/material.dart';
 | 
						|
 | 
						|
/// FadePage animation
 | 
						|
/// [page]
 | 
						|
class FadePage extends PageRouteBuilder {
 | 
						|
  final Widget? page;
 | 
						|
 | 
						|
  FadePage({this.page})
 | 
						|
      : super(
 | 
						|
          opaque: false,
 | 
						|
          fullscreenDialog: true,
 | 
						|
          barrierDismissible: true,
 | 
						|
          barrierColor: Colors.black.withOpacity(0.8),
 | 
						|
          pageBuilder: (
 | 
						|
            BuildContext context,
 | 
						|
            Animation<double> animation,
 | 
						|
            Animation<double> secondaryAnimation,
 | 
						|
          ) =>
 | 
						|
              page!,
 | 
						|
          transitionDuration: const Duration(milliseconds: 600),
 | 
						|
          transitionsBuilder: (
 | 
						|
            BuildContext context,
 | 
						|
            Animation<double> animation,
 | 
						|
            Animation<double> secondaryAnimation,
 | 
						|
            Widget child,
 | 
						|
          ) {
 | 
						|
            return FadeTransition(opacity: animation, child: child);
 | 
						|
          },
 | 
						|
        );
 | 
						|
}
 |