Dart: Custom “copyWith” method with nullable properties
One solution is to use a function to set the value. This gives you more options. A function that isn’t provided: null This will not change the value A function that is provided and returns null: () => null This will set the value to null A function that returns the name: () => ‘Gustavo’ … Read more