irc.dart icon indicating copy to clipboard operation
irc.dart copied to clipboard

Null-safety

Open pixelcmtd opened this issue 4 years ago • 2 comments

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

Closed by #36.

pixelcmtd avatar Apr 27 '21 06:04 pixelcmtd

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

ostafen avatar Dec 03 '21 20:12 ostafen

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

7NT avatar Jun 06 '22 21:06 7NT