Advertisement
faisalkabir

Untitled

Nov 12th, 2019
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 0.95 KB | None | 0 0
  1. showDialog(
  2.       context: context,
  3.       barrierDismissible: false,
  4.       builder: (BuildContext context) => CustomDialog(),
  5.     );
  6.  
  7.  
  8. class CustomDialog extends StatelessWidget {
  9.  
  10.   @override
  11.   Widget build(BuildContext context) {
  12.     return Dialog(
  13.       shape: RoundedRectangleBorder(
  14.         borderRadius: BorderRadius.circular(16),
  15.       ),
  16.       elevation: 0.0,
  17.       backgroundColor: Colors.transparent,
  18.       child: Stack(
  19.         children: <Widget>[
  20.           Positioned(
  21.             child: Align(
  22.               alignment: Alignment.center,
  23.               child: Material(
  24.                 color: Colors.white,
  25.                 child: Image.asset(
  26.                   'assets/loader.gif',
  27.                   height: 80,
  28.                   width: 80,
  29.                 ),
  30.                 shape: CircleBorder(),
  31.                 clipBehavior: Clip.antiAlias,
  32.               ),
  33.  
  34.             ),
  35.           ),
  36.         ],
  37.       )
  38.     );
  39.   }
  40.  
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement