'I wants to show the custom progress dialog (similar to iOS default dialog) in flutter
Currently I'm using the default flutter dialog
Scaffold(
appBar: AppBar(
backgroundColor: Color(0xFFB50208),
title: const Text('Progressbar'),
),
body: Center(
child: CircularProgressIndicator(),
)
)
But below is the image what I need to implement
Solution 1:[1]
You should use CupertinoActivityIndicator.
First import Cupertino Widgets :
import 'package:flutter/cupertino.dart';
Then you can use this :
showDialog(
context: context,
builder: (context) => Center(
child: Container(
width: 60.0,
height: 60.0,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(4.0),
),
child: Padding(
padding: const EdgeInsets.all(12.0),
child: CupertinoActivityIndicator(),
),
),
),
);
);
To dismiss, use Navigator.pop(context);
.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |