title: How to access a list created in a stateful widget in one file to stateless widget in another file?
body: <p>I have a stateful widget where there is a list like this,</p>
  <pre><code>import 'package:flutter/material.dart';
  import 'package:todoapp/widgets/tasks_tile.dart';
  import 'package:todoapp/models/Tasks.dart';
  
  class TasksList extends StatefulWidget {
    @override
    _TasksListState createState() =&gt; _TasksListState();
  }
  
  class _TasksListState extends State&lt;TasksList&gt; {
    List&lt;Task&gt; task = [
      Task(
        taskTitle: &quot;Buy Bread&quot;,
      ),
      Task(
        taskTitle: &quot;Buy Cream&quot;,
      ),
      Task(
        taskTitle: &quot;Buy Beer&quot;,
      )
    ];
    @override
    Widget build(BuildContext context) {
      return ListView.builder(
        itemCount: task.length,
        itemBuilder: (context,index){
          return TaskTile(isChecked: task[index].isDone,
          taskText: task[index].taskTitle,
          callBackCheckBox: (bool checkBoxState){
            setState(() {
              task[index].toogleDone();
            });
          });
      });
    }
  }
  
  </code></pre>
  <p>How do I access this list in stateless widget in another dart file?  I am new to flutter. And please explain the concept behind it.</p>