GayPizzaSpecifications / irc.dart

Dart IRC Library
MIT License
46 stars 15 forks source link

Null-safety #35

Open pixelcmtd opened 3 years ago

pixelcmtd commented 3 years ago

About 2 months ago, Dart 2.12 was released, which made NNBD/Null-safety stable. This package has to be migrated.

Closed by #36.

ostafen commented 2 years ago

Give a look at https://github.com/SpinlockLabs/irc.dart/pull/36.

7NT commented 2 years ago

Still trouble, when I run: dart migrate Analyzing project... [-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|] 2 analysis issues found:

error • A value of type 'Entity*' can't be assigned to a variable of type 'Channel' at lib/example.dart:125:23 • (invalid_assignment)
  error • The method 'add' can't be unconditionally invoked because the receiver can be 'null' at lib/example.dart:198:25 • (unchecked_use_of_nullable_value)

The migration tool didn't start, due to analysis errors.

The following steps might fix your problem:

  1. Set the lower SDK constraint (in pubspec.yaml) to a version before 2.12.
  2. Run dart pub get.
  3. Try running dart migrate again.

More information: https://dart.dev/go/null-safety-migration

flutter --version : 3.0.1 dart --version: 2.17.1