title: Access multiple fields from Selector (when using Provider state management in Flutter)?
body: <p>I have a task manager app that displays a number of TaskWidget widgets in a ListView and am currently trying to modify my app to use Provider for state management. I have a TaskListModel class as my ChangeNotifier that contains a List of TaskModel along with some getters and setters that call notifyListeners(). (TaskModel is not a ChangeNotifier)</p>
  
  <p>When the user modifies data for a single task in the list, I want to rebuild that widget without rebuilding all the other widgets in the list. Selector almost does what I want, except that I need to access all the fields in TaskModel to rebuild the corresponding TaskWidget, whereas Selector only seems to work with a single field. I've tried using Selector by setting the selector to an instance of TaskModel using the list index. I assume this doesn't work because it is listening to the reference of TaskModel (which doesn't change) rather than all the fields within TaskModel. Is there a straightforward way for me to do this? I've included the build method for TaskWidget below for reference.</p>
  
  <pre><code>  Widget build(BuildContext context) {
  return Column(children: &lt;Widget&gt;[
    Selector&lt;TaskListModel, TaskModel&gt;(
      selector: (_, taskListModel) =&gt; taskListModel.taskList[index],
      builder: (_, taskModel, child) {
        print("rebuilding " + index.toString());
  
        return Material(
          color: taskModel.color,
          child: ListTile(
            title: Column(children: &lt;Widget&gt;[
              Text(
                taskModel.name,
                style: _taskFont,
                textAlign: TextAlign.center,
              ),
              Text(
                taskModel.formattedTime,
                style: _taskFont,
                textAlign: TextAlign.center,
              ),
            ]),
          ),
        );
      },
    ),
    Divider(
      height: 0.0,
    ),
  ]);
  
    }
  </code></pre>