Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- showDialog(
- context: context,
- barrierDismissible: false,
- builder: (BuildContext context) => CustomDialog(),
- );
- class CustomDialog extends StatelessWidget {
- @override
- Widget build(BuildContext context) {
- return Dialog(
- shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(16),
- ),
- elevation: 0.0,
- backgroundColor: Colors.transparent,
- child: Stack(
- children: <Widget>[
- Positioned(
- child: Align(
- alignment: Alignment.center,
- child: Material(
- color: Colors.white,
- child: Image.asset(
- 'assets/loader.gif',
- height: 80,
- width: 80,
- ),
- shape: CircleBorder(),
- clipBehavior: Clip.antiAlias,
- ),
- ),
- ),
- ],
- )
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement