Implemented Null Safety.

This commit is contained in:
Phani Pavan K
2021-02-18 15:41:13 +05:30
parent 56f5210712
commit 0e792ea48f
10 changed files with 402 additions and 39 deletions

View File

@@ -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,
);
}