• Greg Spencer's avatar
    Remove nullOk parameter from Shortcuts.of, Actions.find, and Actions.handler (#68921) · 4f586fa3
    Greg Spencer authored
    This removes the nullOk parameter from Shortcuts.of, Actions.find and Actions.handler and created Shortcuts.maybeOf and Actions.maybeFind. Shortcuts.of and Actions.find now return non-nullable values, and the maybe versions return a nullable value. I didn't create a non-nullable version of Actions.handler, since it needs to be able to return null if an action is not enabled, but I did remove the nullOk parameter, effectively setting it to true permanently, since setting it to false doesn't make much sense if the function can still return null when the action is not enabled.
    4f586fa3
shortcuts_test.dart 22.3 KB