How to discern if an optional named parameter in dart was given?
You can use a special marker in the file like this
const _noValueGiven = const Object();
class State {
...
State copy({String firstName: _noValueGiven, String lastName: _noValueGiven}) {
if (identical(firstName, _noValueGiven)) {
firstName = this.firstName;
}
...
}
}