dartclub / ical

iCal library for Dart and Flutter
https://pub.dev/packages/ical
BSD 3-Clause "New" or "Revised" License
10 stars 14 forks source link

Null safety migration #15

Closed spenap closed 3 years ago

spenap commented 3 years ago

I started using your ical package in my project last weekend. When I was running my tests, I hit the issue that this package is not null-safe yet, and I figured I would try to help.

This PR contains the changes suggested when running dart migrate. Essentially,

There are some additional instances where the late keyword was needed, too.

I have just started looking at dart, and I essentially followed the automatic migration process. After doing that, I manually run the tests in this module. subcomponents and utils failed, but they were failing already before the migration (in the case of utils, it seems to be a timezone issue. In the case of subcomponents, the error is Bad state: Can't call test() once tests have begun running.)

I'm happy for you to change this PR before merging it (including dropping it altogether if you would rather do the migration in a different way).

Thanks!