You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@johnpryan commented on Apr 8, 2021, 12:12 AM UTC:
ResultcheckLottery(bool isLucky) {
String? nullString;
if (isLucky) {
nullString ='You win!';
}
if (nullString !=null) {
// Use this to fix:// var nonNullString = nullString;return () {
returnResult(nullString);
// ^ The argument type 'String?' can't be assigned to the parameter type 'String'.
}();
}
returnResult('You lose.');
}
@leafpetersen is there already an issue for this? I think this is called out in #44900
@johnpryan commented on Apr 8, 2021, 12:12 AM UTC:
@leafpetersen is there already an issue for this? I think this is called out in #44900
DartPad example
This issue was moved by keertip from dart-lang/sdk#45622.
The text was updated successfully, but these errors were encountered: