Closed felix-barz-brickmakers closed 3 years ago
@kendfinger @lgorence @mbullington @Pacane would be great to make this happen. There's a PR already #29
@mzdm Just merged, I will publish a release today.
thanks, much appreciated :)!
Published
Your release is broken! When trying to use console 4.0.0 in a sound nullsafe application, there are countless errors regarding broken nullsafety:
Unable to spawn isolate: ../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/console-4.0.0/lib/src/base.dart:12:16: Error: Field '_currentTextColor' should be initialized because its type 'Color' doesn't allow null.
- 'Color' is from 'package:console/console.dart' ('../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/console-4.0.0/lib/console.dart').
static Color _currentTextColor;
^^^^^^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/console-4.0.0/lib/src/base.dart:13:16: Error: Field '_currentBackgroundColor' should be initialized because its type 'Color' doesn't allow null.
- 'Color' is from 'package:console/console.dart' ('../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/console-4.0.0/lib/console.dart').
static Color _currentBackgroundColor;
^^^^^^^^^^^^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/console-4.0.0/lib/src/base.dart:135:31: Error: The parameter 'row' can't have a value of 'null' because of its type 'int', but the implicit default value is 'null'.
Try adding either an explicit non-'null' default value or the 'required' modifier.
static void moveCursor({int row, int column}) {
^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/console-4.0.0/lib/src/base.dart:135:40: Error: The parameter 'column' can't have a value of 'null' because of its type 'int', but the implicit default value is 'null'.
Try adding either an explicit non-'null' default value or the 'required' modifier.
static void moveCursor({int row, int column}) {
^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/console-4.0.0/lib/src/base.dart:177:38: Error: The parameter 'params' can't have a value of 'null' because of its type 'List<int>', but the implicit default value is 'null'.
- 'List' is from 'dart:core'.
Try adding either an explicit non-'null' default value or the 'required' modifier.
static void sgr(int id, [List<int> params]) {
^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/console-4.0.0/lib/src/format.dart:107:19: Error: The parameter 'args' can't have a value of 'null' because of its type 'List<String>', but the implicit default value is 'null'.
- 'List' is from 'dart:core'.
Try adding either an explicit non-'null' default value or the 'required' modifier.
{List<String> args,
^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/console-4.0.0/lib/src/format.dart:108:25: Error: The parameter 'replace' can't have a value of 'null' because of its type 'Map<String, String>', but the implicit default value is 'null'.
- 'Map' is from 'dart:core'.
Try adding either an explicit non-'null' default value or the 'required' modifier.
Map<String, String> replace,
^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/console-4.0.0/lib/src/format.dart:109:19: Error: The parameter 'style' can't have a value of 'null' because of its type 'VariableStyle', but the implicit default value is 'null'.
- 'VariableStyle' is from 'package:console/console.dart' ('../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/console-4.0.0/lib/console.dart').
Try adding either an explicit non-'null' default value or the 'required' modifier.
VariableStyle style,
^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/console-4.0.0/lib/src/format.dart:110:22: Error: The parameter 'resolver' can't have a value of 'null' because of its type 'String Function(String)', but the implicit default value is 'null'.
Try adding either an explicit non-'null' default value or the 'required' modifier.
VariableResolver resolver}) {
^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/console-4.0.0/lib/src/io.dart:3:41: Error: The parameter 'prefix' can't have a value of 'null' because of its type 'String', but the implicit default value is 'null'.
Try adding either an explicit non-'null' default value or the 'required' modifier.
void inheritIO(Process process, {String prefix, bool lineBased = true}) {
^^^^^^
I'm having the same issue, looking at the code it seems like that it is not fully migrated but weird thing is that on pub.dev it shows that it supports null safety.
I can raise a PR with full migration if it is needed and you don't have much time 👍
Please release a nullsafe version of this package