mirror of
https://github.com/kphanipavan/modal_progress_hud_nsn.git
synced 2025-10-28 22:32:50 -07:00
Implemented Null Safety.
This commit is contained in:
@@ -27,22 +27,20 @@ class ModalProgressHUD extends StatelessWidget {
|
||||
final double opacity;
|
||||
final Color color;
|
||||
final Widget progressIndicator;
|
||||
final Offset offset;
|
||||
final Offset? offset;
|
||||
final bool dismissible;
|
||||
final Widget child;
|
||||
|
||||
ModalProgressHUD({
|
||||
Key key,
|
||||
@required this.inAsyncCall,
|
||||
Key? key,
|
||||
required this.inAsyncCall,
|
||||
this.opacity = 0.3,
|
||||
this.color = Colors.grey,
|
||||
this.progressIndicator = const CircularProgressIndicator(),
|
||||
this.offset,
|
||||
this.dismissible = false,
|
||||
@required this.child,
|
||||
}) : assert(child != null),
|
||||
assert(inAsyncCall != null),
|
||||
super(key: key);
|
||||
required this.child,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -54,8 +52,8 @@ class ModalProgressHUD extends StatelessWidget {
|
||||
else {
|
||||
layOutProgressIndicator = Positioned(
|
||||
child: progressIndicator,
|
||||
left: offset.dx,
|
||||
top: offset.dy,
|
||||
left: offset!.dx,
|
||||
top: offset!.dy,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user