skip to Main Content

setState not updating my star color because the FutureBuilder keeps rebuilding whenever I call setState – Flutter

Positioned( top: 12, right: 12, child: SizedBox( height: 25, width: 25, child: CircleAvatar( backgroundColor: isGolden? Colors.amber :Colors.black87, child: IconButton( padding: EdgeInsets.zero, icon: Icon(Icons.star,), color: Color(0xFFFFFFD5), onPressed: (){ futureMessage = PostStoryFavoriteCreateDelete(snapshot.data!.data![index].id.toString()); ScaffoldMessenger.of(context).showSnackBar(SnackBar(elevation: 20,content: FutureBuilder( future: futureMessage, builder: (context, snapshot){ if (snapshot.hasData)…

VIEW QUESTION
Back To Top
Search