Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

uwechai
Copy link

@uwechai uwechai commented Mar 4, 2021

Migrated to accomodate null safety.

  1. Used migration tool to migrate.
  2. changed the version to 1.0.0 to indicate breaking changes.

Copy link

@awhitford awhitford left a 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

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),

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(

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(

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants