-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
made to be null-safe #39
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this PR better than #38.
@@ -0,0 +1,13 @@ | |||
#!/bin/sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file should be part of the .gitignore
. See Flutter gitignore template.
this.opacity = 0.3, | ||
this.color = Colors.grey, | ||
this.progressIndicator = const CircularProgressIndicator(), | ||
this.offset, | ||
this.dismissible = false, | ||
@required this.child, | ||
required this.child, | ||
}) : assert(child != null), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to assert(x != null)
anymore when x
is not a nullable type.
@@ -64,7 +64,7 @@ class ModalProgressHUD extends StatelessWidget { | |||
child, | |||
new Opacity( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to see the obsolete new
keyword removed too.
@@ -5,7 +5,7 @@ import 'package:modal_progress_hud/modal_progress_hud.dart'; | |||
|
|||
void main() { | |||
group('Modal Progress HUD', () { | |||
Widget sut(bool inAsyncCall, Offset offset) { | |||
Widget sut(bool inAsyncCall, Offset? offset) { | |||
return MaterialApp( | |||
home: new ModalProgressHUD( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new
keyword is unnecessary now.
@@ -1,34 +1,55 @@ | |||
# Generated by pub |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pubspec.lock
file should be part of .gitignore
for a library. See Flutter .gitignore Template
Migrated to accomodate null safety.