AnimatedList with FutureBuilder Flutter

267 Views Asked by At

I need rebuild my view and trying to use AnimatedList. Container child looks like:

      child: FutureBuilder(
        future: client.getArticle(),
        builder: (BuildContext context, AsyncSnapshot<List<Article>> snapshot) {
          if (snapshot.hasData) {
            List<Article> articles = snapshot.data;
            return ListView.builder(
              scrollDirection: Axis.vertical,
              itemCount: articles.length,
              itemBuilder: (context, index) => formatsRadioList(articles[index], context, _height, onPressing: () {
                _changeHeight();
              }),
            );
          } else if (snapshot.hasError) {
...} else {...}
        },
      ),

I'm trying to use AnimatedList but with no success. How to implement AL in this example?

0

There are 0 best solutions below