object query and remove parentheses in dart, flutter
问题 Hello? I'm building an app using the flutter provider pattern. And I created a process to query the values inside the object. I also have data in my model dart file. Check the code below. List<Device> _devices = [ Device(one: 'apple', two: 'iphone'), Device(one: 'samsung', two: 'galaxy') ]; String Query(String value) { return _media.where((medium) => medium.one == value) .map((medium) => (medium.two)).toString(); Query("apple") So, when I call that function, I expect iphone to be returned.