title: how to keep the state of my widgets after scrolling?
body: <p>I'm codeing an app with flutter an i'm haveing problems with the development. I'm trying to have a listview with a custom widget that it has  a favourite icon that represents that you have liked it product. I pass a boolean on the constructor to set a variables that controls if the icons is full or empty. When i click on it i change it state. It works awesome but when i scroll down and up again it loses the lastest state and returns to the initial state.
  Do you know how to keep it states after scrolling?</p>
  
  <p>Ty a lot &lt;3</p>
  
  <p>Here is my code: </p>
  
  <pre><code>import 'package:flutter/material.dart';
  
  void main() =&gt; runApp(new MyApp());
  
  class MyApp extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return new MaterialApp(
        title: 'Flutter Demo',
        theme: new ThemeData(
          primarySwatch: Colors.blue,
        ),
        home: new MyHomePage(title: 'Flutter Demo Home Page'),
      );
    }
  }
  
  class MyHomePage extends StatefulWidget {
    MyHomePage({Key key, this.title}) : super(key: key);
    final String title;
  
    @override
    _MyHomePageState createState() =&gt; new _MyHomePageState();
  }
  
  class _MyHomePageState extends State&lt;MyHomePage&gt; {
  
    @override
    Widget build(BuildContext context) {
      return new Scaffold(
        appBar: new AppBar(
          title: new Text(widget.title),
        ),
        body: new ListView.builder(
          itemCount: 100,
          itemBuilder: (BuildContext context, int index){
            return new LikeClass(liked: false);
          },
        ),
      );
    }
  }
  
  class LikeClass extends StatefulWidget {
    final bool liked;//i want this variable controls how heart looks like
  
    LikeClass({this.liked});
  
    @override
    _LikeClassState createState() =&gt; new _LikeClassState();
  }
  
  class _LikeClassState extends State&lt;LikeClass&gt; {
    bool liked;
    @override
    void initState() {
      liked=widget.liked;
    }
    @override
    Widget build(BuildContext context) {
      return new Container(
        child: new Column(
          children: &lt;Widget&gt;[
            new GestureDetector(
              onTap:((){
                setState(() {
                  liked=!liked;
                  //widget.liked=!widget.liked;
                });
              }),
              child: new Icon(Icons.favorite, size: 24.0,
                color: liked?Colors.red:Colors.grey,
                //color: widget.liked?Colors.red:Colors.grey,//final method to control the appearance
              ),
            ),
          ],
        ),
      );
    }
  }
  </code></pre>