Reputation: 93
The error I am receiving states "The return type 'String?' isn't a 'void', as required by the closure's context." the variable "_desc" is a string.
decoration: InputDecoration(labelText: 'Caption'),
validator: (value) {
return value!.isEmpty ? 'Description is required' : null;
},
onSaved: (value) {
return _desc = value;
},
Any help would be highly appreciated!
Upvotes: 0
Views: 4455