Bonjour,
avec Dart v3.34.0, j’ai les erreurs suivantes :
NE_PAS_TOUCHER/user_input.dart:5:16: Error: A value of type ‹ String? › can’t be returned from a function with return type ‹ String › because ‹ String? › is nullable and ‹ String › isn’t.
return stdin.readLineSync();
^
NE_PAS_TOUCHER/user_input.dart:11:22: Error: A value of type ‹ int? › can’t be assigned to a variable of type ‹ int › because ‹ int? › is nullable and ‹ int › isn’t.
typedValue = int.tryParse(readText(question));
^
NE_PAS_TOUCHER/user_input.dart:22:25: Error: A value of type ‹ double? › can’t be assigned to a variable of type ‹ double › because ‹ double? › is nullable and ‹ double › isn’t.
typedValue = double.tryParse(readText(question));