mirror of
https://github.com/kphanipavan/modal_progress_hud_nsn.git
synced 2025-10-28 22:32:50 -07:00
Fix #2: screen auto jump to top after rebuilding widget
This commit is contained in:
@@ -56,8 +56,6 @@ class ModalProgressHUD extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (!inAsyncCall) return child;
|
||||
|
||||
Widget layOutProgressIndicator;
|
||||
if (offset == null) {
|
||||
layOutProgressIndicator = Center(child: progressIndicator);
|
||||
@@ -72,14 +70,16 @@ class ModalProgressHUD extends StatelessWidget {
|
||||
return Stack(
|
||||
children: [
|
||||
child,
|
||||
BackdropFilter(
|
||||
filter: ImageFilter.blur(sigmaX: blur, sigmaY: blur),
|
||||
child: Opacity(
|
||||
opacity: opacity,
|
||||
child: ModalBarrier(dismissible: dismissible, color: color),
|
||||
if (inAsyncCall) ...[
|
||||
BackdropFilter(
|
||||
filter: ImageFilter.blur(sigmaX: blur, sigmaY: blur),
|
||||
child: Opacity(
|
||||
opacity: opacity,
|
||||
child: ModalBarrier(dismissible: dismissible, color: color),
|
||||
),
|
||||
),
|
||||
),
|
||||
layOutProgressIndicator,
|
||||
layOutProgressIndicator,
|
||||
],
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user