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.
		
		
		
		
		
			
		
			
				
	
	
		
			27 lines
		
	
	
		
			795 B
		
	
	
	
		
			Dart
		
	
			
		
		
	
	
			27 lines
		
	
	
		
			795 B
		
	
	
	
		
			Dart
		
	
| import 'package:flutter/cupertino.dart';
 | |
| import 'package:flutter/material.dart';
 | |
| 
 | |
| showDraggableDialog(BuildContext context, Widget child) {
 | |
|   showGeneralDialog(
 | |
|     barrierLabel: "Label",
 | |
|     barrierDismissible: false,
 | |
|     barrierColor: Colors.black.withOpacity(0.2),
 | |
|     transitionDuration: Duration(milliseconds: 200),
 | |
|     context: context,
 | |
|     pageBuilder: (context, anim1, anim2) {
 | |
|       return Dismissible(
 | |
|         direction: DismissDirection.vertical,
 | |
|         key: const Key('key'),
 | |
|         onDismissed: (_) => Navigator.of(context).pop(),
 | |
|         child: child,
 | |
|       );
 | |
|     },
 | |
|     transitionBuilder: (context, anim1, anim2, child) {
 | |
|       return SlideTransition(
 | |
|         position: Tween(begin: Offset(0, 1), end: Offset(0, 0)).animate(anim1),
 | |
|         child: child,
 | |
|       );
 | |
|     },
 | |
|   );
 | |
| }
 |